# Code Enhancer Workflow

> Parallel execution workflow for code enhancement and multi-domain deep-dive auditing using the Unified Parallel Engine

- Skill: `knuckles-team/code-enhancer-workflow` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add knuckles-team/code-enhancer-workflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/knuckles-team/code-enhancer-workflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: Knuckles-Team (https://skillmd.com/u/knuckles-team)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/knuckles-team/code-enhancer-workflow

---


# Code Enhancer Workflow

**CONCEPT:DEV-002**

Parallel execution workflow for code enhancement and multi-domain deep-dive auditing using the Unified Parallel Engine

## Steps

### Step 1: Detect Language
**Agent**: `analysis-agent`
**Tools**: `rep_rm_workspace, rep_rm_projects`

Detect primary/secondary languages, build systems, available linters, and test frameworks in the target project.
Expected: `detect_language_artifacts`

### Step 2: Project Analysis [depends_on: detect_language]
**Agent**: `analysis-agent`
**Tools**: `rep_rm_workspace, rep_rm_projects`

Scan codebase for architectural patterns, libraries, Pydantic-AI agent setups, externalized prompts, and dependency freshness.
Expected: `project_analysis_artifacts`

### Step 3: Run Linters [depends_on: detect_language]
**Agent**: `analysis-agent`
**Tools**: `rep_rm_projects`

Orchestrate pre-commit hooks and language-appropriate linters (ruff, mypy, bandit, eslint, go vet) to scan for code issues.
Expected: `run_linters_artifacts`

### Step 4: Run Tests [depends_on: detect_language]
**Agent**: `test-agent`
**Tools**: `rep_rm_projects`

Locate and execute the project test suite with automated test framework detection and timeout protections.
Expected: `run_tests_artifacts`

### Step 5: Deep Code Analysis [depends_on: project_analysis]
**Agent**: `analysis-agent`
**Tools**: `rep_rm_projects`

Examine module coupling, cyclomatic complexity, directory density, code duplication, and smell patterns.
Expected: `deep_code_analysis_artifacts`

### Step 6: Security Analysis [depends_on: project_analysis]
**Agent**: `security-agent`
**Tools**: `rep_rm_projects`

Evaluate attack surface, credential exposure, CWE vulnerability patterns, threat model alignments, and API/SSO security controls.
Expected: `security_analysis_artifacts`

### Step 7: Documentation Audit [depends_on: project_analysis]
**Agent**: `doc-agent`
**Tools**: `rep_rm_workspace`

Audit repository documentation (README.md, AGENTS.md, docs/) for quality, completeness, Keep a Changelog standard compliance, and drift.
Expected: `documentation_audit_artifacts`

### Step 8: Concept Traceability Audit [depends_on: project_analysis]
**Agent**: `doc-agent`
**Tools**: `rep_rm_workspace`

Scan codebase docstrings, test suites, and documentation files for CONCEPT ID annotations and map traceability/parity.
Expected: `concept_traceability_audit_artifacts`

### Step 9: User Interface Analysis [depends_on: project_analysis]
**Agent**: `analysis-agent`
**Tools**: `rep_rm_workspace`

Evaluate web or terminal interface files against Usability Heuristics and WCAG accessibility standards.
Expected: `user_interface_analysis_artifacts`

### Step 10: Generate Report [depends_on: run_linters, run_tests, deep_code_analysis, security_analysis, documentation_audit, concept_traceability_audit, user_interface_analysis]
**Agent**: `synthesis-agent`
**Tools**: `rep_rm_workspace`

Consolidate the multi-domain findings into a prettified 0-100 graded report with prioritized TODOs and structured SDD handoffs.
Expected: `generate_report_artifacts`

### Step 11: KG Persistence [depends_on: generate_report]
**Agent**: `synthesis-agent`
**Tools**: `graph_write`

Persist the generated report, grading metrics, and identified conceptual/code linkages in Graph-OS Knowledge Graph.
Expected: `kg_persistence_artifacts`

## Output
- Unified multi-domain codebase enhancement audit report in `.specify/`
- Prioritized TODO checklist and SDD-ready implementation specification
- Nodes and edges persisted to Knowledge Graph representing code quality and compliance status

## Execution

Run this workflow as a dependency-ordered DAG. Steps with no unmet `depends_on` run in parallel; dependents run after their prerequisites complete.

- **Run first (in parallel):** Step 1 — Detect Language
- **After level 0:** Step 2 — Project Analysis; Step 3 — Run Linters; Step 4 — Run Tests
- **After level 1:** Step 5 — Deep Code Analysis; Step 6 — Security Analysis; Step 7 — Documentation Audit; Step 8 — Concept Traceability Audit; Step 9 — User Interface Analysis
- **After level 2:** Step 10 — Generate Report
- **After level 3:** Step 11 — KG Persistence

**Execution:** If graph-os is reachable, offload the whole DAG via `graph_orchestrate action=execute_workflow` (or the `kg-delegate` skill) for true parallel/swarm execution. Otherwise execute the steps natively in dependency order: run steps with no unmet `depends_on` in parallel, then their dependents.

