Feature Review Workflow
Reusable workflow guidance for PR-style feature review.
Required Shared Skills
Always apply:
policy-compliance-orderevidence-and-timestamp-conventionspolicy-audit-template-usagepr-context-artifactspr-base-branch-merge-baseacceptance-criteria-trackingremediation-handoff-atomic-planner
Role
- Review a feature branch relative to the correct base branch.
- Produce audit artifacts, not implementation fixes.
- Prefer deterministic evidence from canonical PR-context artifacts and exact diff anchors.
- Trigger remediation planning when blockers or unmet acceptance criteria remain.
Workflow Contract
Baseline and evidence
- Treat the review as a feature-vs-base audit, not an isolated file inspection.
- Use
artifacts/pr_context.summary.txtas the primary evidence source. - Use
artifacts/pr_context.appendix.txtas the baseline-diff appendix for raw evidence and exact anchors. - If PR-context artifacts are missing or stale, refresh them per
pr-context-artifactsusing the resolved base branch.
Review artifact templates
- When creating review artifacts from templates, use the MCP-exposed bundled assets instead of copying directly from repo template paths.
- Resolve the templates through the MCP server tool
resolve_policy_audit_template_assetwith these selectors:templateforpolicy-audit.<timestamp>.mdcode-review-templateforcode-review.<timestamp>.mdfeature-audit-templateforfeature-audit.<timestamp>.md
- The MCP-resolved asset is the authoritative template source for review artifacts in this workflow.
No silent fixes
- Do not clean up code during review.
- If checks fail, document the failure and include exact remediation guidance.
Work-mode acceptance-criteria contract
- Read the persisted marker from
issue.mdusing one of:- Work Mode: minor-audit- Work Mode: full-feature- Work Mode: full-bug
- Legacy compatibility: interpret
- Work Mode: fullasfull-feature. - Acceptance-criteria sources by marker:
minor-audit: only the explicit## Acceptance Criteriasection inissue.mdfull-feature:spec.mdanduser-story.mdfull-bug:spec.md
- Fail closed:
- if the marker is missing or malformed, use
full-feature - if
minor-auditis selected andissue.mdlacks## Acceptance Criteria, require remediation
- if the marker is missing or malformed, use
Ordered Procedure
Resolve the base branch
- Use the supplied base branch when it is present.
- Otherwise resolve
PRBaseBranchwithpr-base-branch-merge-base. - Record the resolved branch, merge-base SHA, merge-base timestamp, and top competing candidates when available.
Load or refresh PR context
- Load the canonical PR-context summary and appendix per
pr-context-artifacts. - Refresh only when the artifacts are missing or stale relative to the current branch state.
- Load the canonical PR-context summary and appendix per
Determine the active feature folder
- Prefer the active feature folder that corresponds to the primary changed scoping docs.
- If multiple active folders are present, prefer the one whose suffix matches the issue number in the branch name.
- Otherwise choose the folder with the most material scoping-doc changes.
- If no active feature folder exists, create
docs/features/active/<today>-feature-review/and document the assumption.
Produce the policy audit
- Use
policy-audit-template-usageand the MCPtemplateasset to drive the artifact structure. - Include exact command references for the checks that were run.
- Validate the resulting
policy-audit.<timestamp>.mdimmediately after writing it.
Run required checks
- Prefer repo-defined, check-only commands.
- Default order:
- formatting check
- lint check
- type check
- tests
- Run the smallest relevant subset first when the repo policy permits it.
- If a tool cannot run in the environment, mark the affected section unverified or partial with a concrete reason.
Produce the code review
- Create the artifact from the MCP
code-review-templateasset. - Write
code-review.<timestamp>.mdwith:## Executive Summary## Findings Table- a Markdown findings table header containing
Severity | File | Location | Finding | Recommendation | Rationale | Evidence
- Include typed-Python review where Python files changed.
- Validate the artifact immediately after writing it.
- Produce the feature audit
- Create the artifact from the MCP
feature-audit-templateasset. - Write
feature-audit.<timestamp>.mdwith:## Scope and Baseline## Acceptance Criteria Inventory## Acceptance Criteria Evaluation## Summary## Acceptance Criteria Check-off
- Use the resolved base branch in the baseline section.
- Evaluate each criterion as PASS, PARTIAL, FAIL, or UNVERIFIED.
- Check off passing criteria in the authoritative source files per
acceptance-criteria-tracking. - Validate the artifact immediately after writing it.
Trigger remediation when required
- Remediation is required when any of the following apply:
- the policy audit contains meaningful FAIL or PARTIAL results
- toolchain checks fail
- the code review contains blockers
- required acceptance criteria are FAIL or PARTIAL
- coverage regression below policy threshold (< 80% repo-wide or < 90% for new code)
- Create
remediation-inputs.<timestamp>.mdfirst. - Create the target remediation plan file from the canonical plan template.
- Hand off plan creation through
remediation-handoff-atomic-planner. - Do not report completion unless the remediation plan file exists when remediation was triggered.
- Remediation is required when any of the following apply:
Finalize the review
- Verify every reported artifact exists on disk before reporting completion.
- Report artifact paths and a concise go/no-go recommendation for PR readiness.
- End the final report with these exact single-line fields:
REVIEW_STATUS: PASSorREVIEW_STATUS: REMEDIATION_REQUIREDFEATURE_FOLDER: <path>POLICY_AUDIT: <path>CODE_REVIEW: <path>FEATURE_AUDIT: <path>REMEDIATION_INPUTS: <path-or-NONE>REMEDIATION_PLAN: <path-or-NONE>
Required Artifact Shapes
policy-audit.<timestamp>.md- copied from the canonical policy-audit template
- template instruction block removed
- includes the canonical major headings and Appendix B command reference
code-review.<timestamp>.md- contains
## Executive Summary - contains
## Findings Table - contains the required findings table header
- contains
feature-audit.<timestamp>.md- contains the five required major sections listed above
Constraints
- Prefer check-only commands.
- Do not claim completion until every required artifact exists and its validator passes.
- Use shared skills as the source of truth for policy order, base-branch resolution, PR-context handling, acceptance-criteria tracking, template usage, and remediation handoff.
- Do not omit any required final result field from the review report.