create-sdd-project 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -354,7 +354,7 @@ Quality gates (tests, lint, build, validators) **always run** regardless of leve
354
354
  Every ticket includes a `## Merge Checklist Evidence` table that the agent must fill before requesting merge approval. This mechanism:
355
355
 
356
356
  - **Survives context compaction** — the ticket is always re-read via product tracker, so the empty evidence table acts as a persistent reminder
357
- - **Forces sequential execution** — agent must read `references/merge-checklist.md`, execute 10 actions (0–9), and record evidence
357
+ - **Forces sequential execution** — agent must read `references/merge-checklist.md`, execute 11 actions (0–10), and record evidence
358
358
  - **Works at all tiers** — Simple tasks get a lite ticket with the same evidence table
359
359
 
360
360
  Validated across 16+ features with 87% first-attempt pass rate (failures led to iterative improvements in v0.8.7–v0.9.8).
package/lib/config.js CHANGED
@@ -110,6 +110,7 @@ const TEMPLATE_COMMANDS = [
110
110
  'review-spec.md',
111
111
  'context-prompt.md',
112
112
  'review-project.md',
113
+ 'audit-merge.md',
113
114
  ];
114
115
 
115
116
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sdd-project",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Create a new SDD DevFlow project with AI-assisted development workflow",
5
5
  "bin": {
6
6
  "create-sdd-project": "bin/cli.js"
@@ -0,0 +1,90 @@
1
+ Run an automated compliance audit on the current feature before requesting merge approval.
2
+
3
+ ## Prerequisites
4
+
5
+ - An active feature at Step 5 (Review) with Merge Checklist Evidence filled
6
+ - All quality gates passed (tests, lint, build)
7
+
8
+ ## What to do
9
+
10
+ Read `docs/project_notes/product-tracker.md` → Active Session to identify the current feature, branch, and ticket path. Then run ALL checks below and report results in a table.
11
+
12
+ ### Checks
13
+
14
+ **1. Ticket Status** — Read the ticket file. The `**Status:**` field in the header must be `Ready for Merge`. Flag if it shows any other value (In Progress, Spec, Planning, Review, Done).
15
+
16
+ **2. Acceptance Criteria** — Count `[x]` vs `[ ]` in the `## Acceptance Criteria` section. ALL must be `[x]`. Report ratio (e.g., "14/14").
17
+
18
+ **3. Definition of Done** — Count `[x]` vs `[ ]` in the `## Definition of Done` section. ALL must be `[x]`. Report ratio.
19
+
20
+ **4. Workflow Checklist** — Count `[x]` vs `[ ]` in the `## Workflow Checklist` section. All steps except Step 6 must be `[x]`. Step 6 should be `[ ]` (pending merge).
21
+
22
+ **5. Merge Checklist Evidence** — Verify the `## Merge Checklist Evidence` table has ALL rows marked `[x]` with real evidence (not placeholder text like "Sections verified: (list)").
23
+
24
+ **6. Completion Log** — Verify the `## Completion Log` table has at least one entry per executed workflow step. If bugs are mentioned in any entry, verify they are documented in `docs/project_notes/bugs.md`.
25
+
26
+ **7. Product Tracker Sync** — Read `docs/project_notes/product-tracker.md`:
27
+ - Active Session must show step `5/6` with correct feature ID and branch
28
+ - Features table must show the feature as `in-progress` at step `5/6`
29
+ - Flag if stale or mismatched with ticket
30
+
31
+ **8. key_facts.md** — If the ticket's changes include new models, migrations, endpoints, modules, or shared utilities, verify they are documented in `docs/project_notes/key_facts.md`. If no new infrastructure, this is N/A.
32
+
33
+ **9. Merge Base** — Run these commands and report result:
34
+ ```bash
35
+ TARGET_BRANCH="develop" # or "main" — check key_facts.md branching-strategy
36
+ git fetch origin "$TARGET_BRANCH"
37
+ git merge-base --is-ancestor "origin/$TARGET_BRANCH" HEAD && echo "UP TO DATE" || echo "DIVERGED"
38
+ ```
39
+ If DIVERGED, flag as FAIL with instruction to merge target branch first.
40
+
41
+ **10. Working Tree** — Run `git status`. Must show "nothing to commit, working tree clean".
42
+
43
+ **11. Data File Integrity** (if JSON/seed files are in the diff) — Check:
44
+ - String arrays (aliases, tags): all values same casing convention
45
+ - ID fields: no duplicates
46
+ - Numeric fields: no negatives where unexpected
47
+ - Object arrays: consistent shape (no missing keys)
48
+
49
+ Run only if `git diff origin/<target-branch>..HEAD --name-only` shows `.json` files in seed-data or fixtures directories.
50
+
51
+ ### Output Format
52
+
53
+ Report as a compliance table:
54
+
55
+ ```
56
+ ## Merge Compliance Audit — [FEATURE-ID]
57
+
58
+ | # | Check | Status | Detail |
59
+ |---|-------|:------:|--------|
60
+ | 1 | Ticket Status | PASS | "Ready for Merge" |
61
+ | 2 | Acceptance Criteria | PASS | 14/14 |
62
+ | 3 | Definition of Done | PASS | 7/7 |
63
+ | 4 | Workflow Checklist | PASS | 7/8 (Step 6 pending) |
64
+ | 5 | Merge Checklist Evidence | PASS | 8/8 with evidence |
65
+ | 6 | Completion Log | PASS | 5 entries, bugs documented |
66
+ | 7 | Tracker Sync | PASS | Active Session + Features table correct |
67
+ | 8 | key_facts.md | PASS | N/A — no new infrastructure |
68
+ | 9 | Merge Base | PASS | Up to date with develop |
69
+ | 10 | Working Tree | PASS | Clean |
70
+ | 11 | Data Files | PASS | N/A — no JSON seed files |
71
+
72
+ **Verdict: READY FOR MERGE** (or **NEEDS FIX — N issues**)
73
+ ```
74
+
75
+ ### If issues are found
76
+
77
+ Fix them directly:
78
+ - Status wrong → update the ticket header
79
+ - AC/DoD unchecked → mark `[x]`
80
+ - Tracker stale → update Active Session and Features table
81
+ - Merge base diverged → `git merge origin/<target-branch>` and resolve conflicts
82
+ - Data file issues → fix the data
83
+
84
+ After fixing, re-run the audit to confirm all checks pass.
85
+
86
+ ## Notes
87
+
88
+ - This command automates the compliance portion of the merge review — it does NOT replace code review, QA, or human architectural review
89
+ - Run this AFTER completing Action 8 (Fill Merge Checklist Evidence) and BEFORE Action 9 (Request merge approval)
90
+ - The output should be included in the merge approval request message so the reviewer can skip compliance checks and focus on code quality
@@ -72,8 +72,14 @@ In the ticket, fill the `## Merge Checklist Evidence` table. For each action (0
72
72
  | 0. Validate ticket structure | [x] | Sections verified: Spec, Plan, AC, DoD, Workflow, Log, Evidence |
73
73
  | 1. Mark all items | [x] | AC: 12/12, DoD: 7/7, Workflow: 0-5/6 |
74
74
 
75
- ## Action 9: Request merge approval
75
+ ## Action 9: Run compliance audit
76
76
 
77
- Verify the Merge Checklist Evidence table is fully filled (all rows `[x]` with real evidence).
77
+ Run `/audit-merge` to verify all compliance checks pass automatically. If any check fails, fix it and re-run until all pass.
78
+
79
+ Include the audit output in the merge approval request message so the reviewer can skip compliance checks and focus on code/architecture review.
80
+
81
+ ## Action 10: Request merge approval
82
+
83
+ Verify the compliance audit passed and the Merge Checklist Evidence table is fully filled.
78
84
 
79
85
  THEN — and only then — request merge approval from the user.
@@ -0,0 +1,90 @@
1
+ Run an automated compliance audit on the current feature before requesting merge approval.
2
+
3
+ ## Prerequisites
4
+
5
+ - An active feature at Step 5 (Review) with Merge Checklist Evidence filled
6
+ - All quality gates passed (tests, lint, build)
7
+
8
+ ## What to do
9
+
10
+ Read `docs/project_notes/product-tracker.md` → Active Session to identify the current feature, branch, and ticket path. Then run ALL checks below and report results in a table.
11
+
12
+ ### Checks
13
+
14
+ **1. Ticket Status** — Read the ticket file. The `**Status:**` field in the header must be `Ready for Merge`. Flag if it shows any other value (In Progress, Spec, Planning, Review, Done).
15
+
16
+ **2. Acceptance Criteria** — Count `[x]` vs `[ ]` in the `## Acceptance Criteria` section. ALL must be `[x]`. Report ratio (e.g., "14/14").
17
+
18
+ **3. Definition of Done** — Count `[x]` vs `[ ]` in the `## Definition of Done` section. ALL must be `[x]`. Report ratio.
19
+
20
+ **4. Workflow Checklist** — Count `[x]` vs `[ ]` in the `## Workflow Checklist` section. All steps except Step 6 must be `[x]`. Step 6 should be `[ ]` (pending merge).
21
+
22
+ **5. Merge Checklist Evidence** — Verify the `## Merge Checklist Evidence` table has ALL rows marked `[x]` with real evidence (not placeholder text like "Sections verified: (list)").
23
+
24
+ **6. Completion Log** — Verify the `## Completion Log` table has at least one entry per executed workflow step. If bugs are mentioned in any entry, verify they are documented in `docs/project_notes/bugs.md`.
25
+
26
+ **7. Product Tracker Sync** — Read `docs/project_notes/product-tracker.md`:
27
+ - Active Session must show step `5/6` with correct feature ID and branch
28
+ - Features table must show the feature as `in-progress` at step `5/6`
29
+ - Flag if stale or mismatched with ticket
30
+
31
+ **8. key_facts.md** — If the ticket's changes include new models, migrations, endpoints, modules, or shared utilities, verify they are documented in `docs/project_notes/key_facts.md`. If no new infrastructure, this is N/A.
32
+
33
+ **9. Merge Base** — Run these commands and report result:
34
+ ```bash
35
+ TARGET_BRANCH="develop" # or "main" — check key_facts.md branching-strategy
36
+ git fetch origin "$TARGET_BRANCH"
37
+ git merge-base --is-ancestor "origin/$TARGET_BRANCH" HEAD && echo "UP TO DATE" || echo "DIVERGED"
38
+ ```
39
+ If DIVERGED, flag as FAIL with instruction to merge target branch first.
40
+
41
+ **10. Working Tree** — Run `git status`. Must show "nothing to commit, working tree clean".
42
+
43
+ **11. Data File Integrity** (if JSON/seed files are in the diff) — Check:
44
+ - String arrays (aliases, tags): all values same casing convention
45
+ - ID fields: no duplicates
46
+ - Numeric fields: no negatives where unexpected
47
+ - Object arrays: consistent shape (no missing keys)
48
+
49
+ Run only if `git diff origin/<target-branch>..HEAD --name-only` shows `.json` files in seed-data or fixtures directories.
50
+
51
+ ### Output Format
52
+
53
+ Report as a compliance table:
54
+
55
+ ```
56
+ ## Merge Compliance Audit — [FEATURE-ID]
57
+
58
+ | # | Check | Status | Detail |
59
+ |---|-------|:------:|--------|
60
+ | 1 | Ticket Status | PASS | "Ready for Merge" |
61
+ | 2 | Acceptance Criteria | PASS | 14/14 |
62
+ | 3 | Definition of Done | PASS | 7/7 |
63
+ | 4 | Workflow Checklist | PASS | 7/8 (Step 6 pending) |
64
+ | 5 | Merge Checklist Evidence | PASS | 8/8 with evidence |
65
+ | 6 | Completion Log | PASS | 5 entries, bugs documented |
66
+ | 7 | Tracker Sync | PASS | Active Session + Features table correct |
67
+ | 8 | key_facts.md | PASS | N/A — no new infrastructure |
68
+ | 9 | Merge Base | PASS | Up to date with develop |
69
+ | 10 | Working Tree | PASS | Clean |
70
+ | 11 | Data Files | PASS | N/A — no JSON seed files |
71
+
72
+ **Verdict: READY FOR MERGE** (or **NEEDS FIX — N issues**)
73
+ ```
74
+
75
+ ### If issues are found
76
+
77
+ Fix them directly:
78
+ - Status wrong → update the ticket header
79
+ - AC/DoD unchecked → mark `[x]`
80
+ - Tracker stale → update Active Session and Features table
81
+ - Merge base diverged → `git merge origin/<target-branch>` and resolve conflicts
82
+ - Data file issues → fix the data
83
+
84
+ After fixing, re-run the audit to confirm all checks pass.
85
+
86
+ ## Notes
87
+
88
+ - This command automates the compliance portion of the merge review — it does NOT replace code review, QA, or human architectural review
89
+ - Run this AFTER completing Action 8 (Fill Merge Checklist Evidence) and BEFORE Action 9 (Request merge approval)
90
+ - The output should be included in the merge approval request message so the reviewer can skip compliance checks and focus on code quality
@@ -0,0 +1,2 @@
1
+ description = "Run automated compliance audit on the current feature before requesting merge approval"
2
+ prompt = "Read the file .gemini/commands/audit-merge-instructions.md and follow the instructions to audit the current feature for merge readiness."
@@ -72,8 +72,14 @@ In the ticket, fill the `## Merge Checklist Evidence` table. For each action (0
72
72
  | 0. Validate ticket structure | [x] | Sections verified: Spec, Plan, AC, DoD, Workflow, Log, Evidence |
73
73
  | 1. Mark all items | [x] | AC: 12/12, DoD: 7/7, Workflow: 0-5/6 |
74
74
 
75
- ## Action 9: Request merge approval
75
+ ## Action 9: Run compliance audit
76
76
 
77
- Verify the Merge Checklist Evidence table is fully filled (all rows `[x]` with real evidence).
77
+ Run `/audit-merge` to verify all compliance checks pass automatically. If any check fails, fix it and re-run until all pass.
78
+
79
+ Include the audit output in the merge approval request message so the reviewer can skip compliance checks and focus on code/architecture review.
80
+
81
+ ## Action 10: Request merge approval
82
+
83
+ Verify the compliance audit passed and the Merge Checklist Evidence table is fully filled.
78
84
 
79
85
  THEN — and only then — request merge approval from the user.