Description
Add a per-unit code-review stage after code-generation and before build-and-test.
The review should independently verify:
- Requirements, user stories, acceptance criteria, business rules, and NFR completeness.
- Correctness, edge cases, error handling, concurrency, reliability, and performance.
- Clean code, DRY, KISS, YAGNI, SOLID, maintainability, and dead code.
- Compliance with existing project architecture, patterns, libraries, and standards.
- Test quality, meaningful coverage, regressions, and failure paths.
- Security, privacy, secrets, OWASP/CWE risks, dependencies, and supply-chain risks.
- API, schema, migration, and backward compatibility.
- Configuration, observability, accessibility, and documentation.
- Formatter, lint, type/static analysis, targeted tests, coverage, secret scanning, and configured dependency checks.
Use a dedicated aidlc-code-reviewer-agent. The developer agent should repair blocking findings, followed by re-review, for at most two repair rounds.
Use Case
Code Generation currently creates code and its summary within one stage and uses the architecture reviewer as an embedded reviewer. This does not provide a distinct, comprehensive source-code review boundary.
A first-class stage would ensure generated code:
- Implements everything agreed in preceding stages.
- Follows established repository conventions.
- Does not introduce unapproved dependencies or patterns.
- Includes adequate, meaningful tests.
- Does not introduce security issues or breaking changes.
- Has a durable, auditable review result before broader build and integration testing.
For gated Construction, each unit should require review approval. For autonomous Construction, units should be reviewed without interruption and presented at one aggregate gate.
Version
v2 (alpha)
Area
Construction phase rules
Additional Context
Proposed lifecycle:
code-generation -> code-review -> build-and-test
Express should remain the documented no-review path.
Suggested inputs:
- Implementation change manifest
- Approved code-generation plan and testing contract
- Requirements and user stories
- Acceptance criteria and business rules
- Functional and NFR designs
- Contracts and unit definitions
- Project practices, standards, and CodeKB context
Suggested outputs:
- code-review.md
- code-review-findings.json
- code-summary.md
- Final traceability.json
Severity behavior:
- Critical correctness, security, privacy, data-loss, and unapproved breaking-change findings are non-waivable.
- Major findings require an explicit human waiver with rationale.
- Minor findings remain visible but do not block approval.
Executable checks should use project-configured tools without installing new dependencies. Code Review should run targeted checks; the following Build and Test stage remains responsible for the complete build and broader integration/E2E suites.
When Code Review is present, it should replace Code Generation’s existing completion gate. The separate per-unit Code Generation Plan Approval remains mandatory.
Description
Add a per-unit
code-reviewstage aftercode-generationand beforebuild-and-test.The review should independently verify:
Use a dedicated
aidlc-code-reviewer-agent. The developer agent should repair blocking findings, followed by re-review, for at most two repair rounds.Use Case
Code Generation currently creates code and its summary within one stage and uses the architecture reviewer as an embedded reviewer. This does not provide a distinct, comprehensive source-code review boundary.
A first-class stage would ensure generated code:
For gated Construction, each unit should require review approval. For autonomous Construction, units should be reviewed without interruption and presented at one aggregate gate.
Version
v2 (alpha)
Area
Construction phase rules
Additional Context
Proposed lifecycle:
code-generation -> code-review -> build-and-testExpress should remain the documented no-review path.
Suggested inputs:
Suggested outputs:
Severity behavior:
Executable checks should use project-configured tools without installing new dependencies. Code Review should run targeted checks; the following Build and Test stage remains responsible for the complete build and broader integration/E2E suites.
When Code Review is present, it should replace Code Generation’s existing completion gate. The separate per-unit Code Generation Plan Approval remains mandatory.