Loading...
Loading...
Phase 3 of the feature workflow – Complete the acceptance closed-loop. Four tasks: 1. Check layer by layer against {slug}-design.md to verify if the implementation deviates from the plan; fix any deviations on the spot instead of just "noting them" in the report. 2. Incorporate this feature into the project's overall architecture documentation. 3. If this feature changes the user story or boundaries of the corresponding requirement, update the requirement doc accordingly. 4. If this feature originated from a roadmap item, change the status of the corresponding entry in roadmap items.yaml to done and sync it with the main document. Finally, produce a {slug}-acceptance.md as the closed-loop proof for the entire workflow. Prerequisite: cs-feat-impl is completed. Trigger scenarios: User says "The feature is done, let's accept it", "Do the final check", "Prepare for merge", "Generate the acceptance report".
npx skill4agent add liuzhengdongfortest/codestable cs-feat-accept{slug}-design.mdrequirementcs-reqroadmaproadmap_itemstatuscodestable/roadmap/{roadmap}/{roadmap}-items.yamldoneplannedSee Section 0 offor shared paths and naming conventions.codestable/reference/shared-conventions.md
doc_type=feature-designfeaturestatus=approvedsummarytags| Acceptance Report Section | Standard Design Reference | Fastforward Design Reference |
|---|---|---|
| 1 Interface Contract Check | Section 2 of Design (Interface Contract) | Change points in Section 1 of Design (Design Solution) |
| 2 Behavior and Decision Check | Section 1 of Design (Decisions and Constraints) | Section 0 of Design (Requirement Summary) |
| 3 Test Constraint Check | Section 3 of Design (Test Design) | Section 2 of Design (Acceptance Criteria) |
| 4 Terminology Consistency | Section 0 of Design (Terminology Conventions) | No terminology table; just check code naming consistency |
| 5 Architecture Incorporation | Section 4 of Design (Architecture Relationship) | Usually no architecture changes; if indeed irrelevant, write "No architecture-level changes for this fastforward" |
codestable/reference/shared-conventions.md{slug}-checklist.yamlchecksfeaturestepsdonependingcheckspending{slug}-checklist.yaml{slug}-acceptance.mdchecks{slug}-checklist.yamlpassed{slug}-design.mdcodestable/reference/shared-conventions.md# {Feature Name} Acceptance Report
> Phase: Phase 3 (Acceptance Closed-loop)
> Acceptance Date: YYYY-MM-DD
> Associated Design Doc: {Design Doc Path}
## 1. Interface Contract Check
Check the consistency between the implementation and the contract against Section 2 of the design doc:
**Item-by-item check of contract examples**:
- [ ] Example A ({File Path + Function Name}): Input→Output in example → Actual behavior in code: {Consistent / Deviation Description}
- [ ] Example B: ...
**Formal type definition check** (if supplementary type definitions are included in the design doc):
- [ ] Type X: {Key Fields} → Corresponding definition in code: {Consistent / Deviation Description}
**Flowchart check** (if there is a Mermaid diagram in the design doc):
- [ ] All nodes / call relationships in the diagram have actual implementations in code (confirmed via grep)
If deviations are found, **stop and fix the code or update the design doc first**. Writing "Known deviation, temporarily not processed" in the report is an anti-pattern – the next person looking for code according to the design will be tripped by this deviation.
## 2. Behavior and Decision Check
Check against Section 1 of the design doc (Decisions and Constraints):
**Item-by-item verification of requirement summary**:
- [ ] Behavior A: {Description + Actual Test Result}
- [ ] Behavior B: {Description + Actual Test Result}
**Item-by-item check of explicitly not done items**:
- [ ] Out-of-scope item X **is indeed not implemented** (confirmed via grep / code review)
- [ ] Out-of-scope item Y **is indeed not implemented**
**Key decision implementation**:
- [ ] Decision D1: {Decision Content} → How it is reflected in code: {Description}
**Reverse check of mount points (uninstallability)**:
Against the "Mount Point List" in Section 1 of the design doc, check two things for each item – the actual mount location matches the list; if this feature is removed reversely according to the list, can it be completely removed, or will orphan code / orphan configuration / orphan data structures remain?
- [ ] Mount Point M1: {Entry in List} → Actual code location: {File or Configuration Key}, Consistency: {Consistent / Deviation Description}
- [ ] Mount Point M2: ...
- [ ] **Reverse Verification**: Grep all references to this feature in the code; are they all within the scope of the list? References outside the list indicate missing mount points; add them to Section 1 of the design doc
- [ ] **Removal Sandbox Simulation**: If this feature is to be removed, after performing reverse operations item by item according to the list, are there any remaining files / fields / configurations? Record the remaining ones in "Legacy" or go back to supplement the mount points
If the Fastforward design does not have a mount point list, supplement an on-site inventory in this section: Grep all mount locations hit by this change, list them in the report as the uninstallation basis for now.
## 3. Test Constraint Check
Verify each test constraint against Section 3 of the design doc (Test Design):
- [ ] **C1**: {Constraint Assertion}
- Verification Method: {Type System / Unit Test / Integration Test / Visual Inspection}
- Result: {Passed / Failed + Reason + Remediation Plan}
- [ ] **C2**: ...
**Frontend changes must be verified visually in the browser** (typecheck passing does not mean it works correctly for users):
- [ ] UI Area X: Verified OK in browser / Screenshot Link
- [ ] Interaction Behavior Y: Verified OK in browser
## 4. Terminology Consistency
Check against Section 0 of the design doc (Terminology Conventions) via grep:
- Term X: Hit N times in code, all consistent ✓
- Term Y: Hit N times in code, all consistent ✓
- **Conflict Prevention**: No hits for forbidden words listed in Section 0 of the design doc (if any) ✓
If inconsistencies are found, go back to correct the code; do not write "Known difference" in the report and skip – the reason is the same as Section 1.
## 5. Architecture Incorporation
Architecture incorporation is not "adding a reference to this feature design in the architecture" – that would force future readers to jump back to the historical design to understand the system after opening the architecture. **The goal is to extract stable, system-visible content from this feature into the architecture, so that readers can understand the existence and shape of the new capability just by looking at the architecture**.
Against Section 4 of the design doc "Relationship with Project-level Architecture Documentation", extract three types of content from this feature and write them into the corresponding architecture docs item by item:
- **Terminology Incorporation**: New / changed entities, types, and external contracts in Section 2 of the design, extracted into the "Structure and Interaction" or "Data and State" section of the architecture
- **Verb Skeleton Incorporation**: Cross-module visible parts of the main process, key orchestration, and key branches in Section 1 of the design, updated into the architecture's structure diagram / module interaction description
- **Cross-layer Discipline Incorporation**: Cross-feature stable constraints (error semantics, idempotency, extension points, observability points, mount point specifications) in Section 1 of the design, added to the "Known Constraints / Boundary Cases" section of the architecture
Check item by item:
- [ ] Doc X in the architecture center directory ({Path}):
- Content to be incorporated this time (what are the terminology / verb skeleton / discipline respectively): {Description}
- Actually written: ✓ / Not updated (Reason: {Specific reason, e.g., "The changes of this feature are completely limited within a single module, with no system-visible new structures"})
- [ ] Doc Y in the architecture center directory: ...
If Section 4 of the design doc is empty or too brief, supplement the evaluation here:
- Which modules did this feature add / which interfaces did it change / which cross-module disciplines did it introduce
- Whether the architecture's main entry needs to add a description of this feature (note: it is a description, not just a link to the design)
- Whether `AGENTS.md` needs to add new specifications or known pitfalls
**Criterion**: After incorporation, a person who has not read this design should be able to know "this capability exists in the system, its general shape, and what rules others must follow when interacting with it" when opening the architecture. If this standard is not met, the incorporation is not done properly.
Architecture incorporation is an **actual file-writing action**, not a self-assessment of "should not need to change", nor is "adding a design link" sufficient. Each item must have a clear conclusion.
## 6. Requirement Update
Against the `requirement` field in the design doc's frontmatter (and any descriptions in Section 1 involving changes to user-perceivable capabilities), determine whether this feature has changed the user story / boundaries / pitch of the corresponding requirement:
- [ ] `requirement` field is empty (pure refactoring / technical debt): Skip this section, write "This feature does not add new capabilities, no requirement update needed"
- [ ] Corresponding requirement exists, but this implementation does not change the user perspective of the capability: Write "The user story / boundaries of req-{slug} remain unchanged, no update needed"
- [ ] Corresponding requirement exists, and this implementation changes the boundaries / user story / pitch description of the requirement:
- Content to be updated: {Description}
- Updated: ✓ (Triggered `cs-req` update mode to execute actually) / Not updated (Reason: {Specific reason})
Like architecture incorporation, this is an **actual file-writing action**, not a self-assessment of "should not need to change".
## 7. Roadmap Update
Against the `roadmap` / `roadmap_item` fields in the design doc's frontmatter:
- [ ] Both fields are empty (feature did not originate from the roadmap): Skip this section, write "This feature did not originate from the roadmap, no update needed"
- [ ] Both fields have values:
- Open `codestable/roadmap/{roadmap}/{roadmap}-items.yaml`
- Find the entry with `slug: {roadmap_item}`, check that the current `status` is `in-progress` and `feature` is the current feature directory name – if not, stop and find the reason (did the design phase miss the update? Did someone modify it manually?)
- Change `status` to `done`
- Validate with `python codestable/tools/validate-yaml.py --file {path} --yaml-only`
- Open the main document `{roadmap}-roadmap.md`, find the corresponding `{roadmap_item}` entry in the sub-feature list of Section 3, and sync the display status to `done` (keep the check status and corresponding feature directory name consistent with items.yaml)
- Updated: ✓ (Update locations: items.yaml + main document)
- [ ] The two fields are inconsistent (only one is filled): Stop to complete or clarify, do not perform the update
See Section 2.5 of `codestable/reference/shared-conventions.md` for the complete definition of the衔接协议 (wait, no, this should be "handover protocol") → "See Section 2.5 of `codestable/reference/shared-conventions.md` for the complete definition of the handover protocol."
Like architecture incorporation and requirement update, this is an **actual file-writing action**, not a self-assessment.
## 8. Legacy Items
- Follow-up optimization points (already created as issues or added to the issue list): {List}
- Known limitations: {List}
- "Found along the way" list from the implementation phase: {List}requirementcs-reqroadmaproadmap_itemdonechecks{slug}-checklist.yamlstatuspassedstatusfailedpassedpassedvalidate-yaml.py{slug}-checklist.yamlpassedcodestable/reference/shared-conventions.mdcodestable/reference/shared-conventions.mdcs-learncodestable/compound/cs-decidecs-guidecs-libdocroadmaproadmap_itemgit commit