@ktpartners/dgs-platform 3.0.4 → 3.3.1
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/CHANGELOG.md +124 -0
- package/README.md +8 -1
- package/agents/dgs-executor.md +124 -3
- package/agents/dgs-idea-researcher.md +447 -0
- package/agents/dgs-plan-checker.md +32 -0
- package/agents/dgs-planner.md +41 -8
- package/bin/install.js +44 -0
- package/commands/dgs/audit-milestone.md +2 -1
- package/commands/dgs/diff-report.md +124 -0
- package/commands/dgs/new-project.md +8 -21
- package/commands/dgs/package-scan.md +43 -0
- package/commands/dgs/research-idea.md +1 -0
- package/commands/dgs/switch-project.md +13 -0
- package/deliver-great-systems/bin/dgs-tools.cjs +120 -5
- package/deliver-great-systems/bin/lib/audit-tolerance.cjs +77 -0
- package/deliver-great-systems/bin/lib/audit-tolerance.test.cjs +101 -0
- package/deliver-great-systems/bin/lib/commands.cjs +311 -16
- package/deliver-great-systems/bin/lib/commands.test.cjs +115 -0
- package/deliver-great-systems/bin/lib/commit-verify.test.cjs +236 -0
- package/deliver-great-systems/bin/lib/config.cjs +41 -0
- package/deliver-great-systems/bin/lib/config.test.cjs +309 -0
- package/deliver-great-systems/bin/lib/core.cjs +9 -9
- package/deliver-great-systems/bin/lib/core.test.cjs +79 -1
- package/deliver-great-systems/bin/lib/docs.cjs +22 -12
- package/deliver-great-systems/bin/lib/fast-routing.cjs +199 -0
- package/deliver-great-systems/bin/lib/fast-routing.test.cjs +108 -0
- package/deliver-great-systems/bin/lib/final-commit-precondition.test.cjs +87 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/bundler-audit-gemfile.json +21 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/gate-parity-expected.md +186 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/gate-parity-runresult.json +235 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/govulncheck-import.json +3 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/npm-audit-v10.json +37 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/osv-clean.json +3 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/osv-vulns.json +77 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/pip-audit-requirements.json +28 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/snyk-lodash.json +30 -0
- package/deliver-great-systems/bin/lib/fixtures/package-scan/snyk-workspaces.json +55 -0
- package/deliver-great-systems/bin/lib/frontmatter.cjs +1 -1
- package/deliver-great-systems/bin/lib/governance.cjs +211 -0
- package/deliver-great-systems/bin/lib/governance.test.cjs +339 -0
- package/deliver-great-systems/bin/lib/health-untracked-phase.test.cjs +269 -0
- package/deliver-great-systems/bin/lib/init.cjs +107 -37
- package/deliver-great-systems/bin/lib/init.test.cjs +212 -5
- package/deliver-great-systems/bin/lib/jobs.cjs +7 -4
- package/deliver-great-systems/bin/lib/milestone.cjs +101 -3
- package/deliver-great-systems/bin/lib/milestone.test.cjs +203 -0
- package/deliver-great-systems/bin/lib/package-adapters.cjs +530 -0
- package/deliver-great-systems/bin/lib/package-adapters.test.cjs +618 -0
- package/deliver-great-systems/bin/lib/package-ecosystems.cjs +350 -0
- package/deliver-great-systems/bin/lib/package-ecosystems.test.cjs +348 -0
- package/deliver-great-systems/bin/lib/package-runner.cjs +199 -0
- package/deliver-great-systems/bin/lib/package-runner.test.cjs +198 -0
- package/deliver-great-systems/bin/lib/package-scan-provenance.cjs +56 -0
- package/deliver-great-systems/bin/lib/package-scan-provenance.test.cjs +103 -0
- package/deliver-great-systems/bin/lib/package-scan-report.cjs +1140 -0
- package/deliver-great-systems/bin/lib/package-scan-report.test.cjs +1963 -0
- package/deliver-great-systems/bin/lib/package-scan-skill.cjs +96 -0
- package/deliver-great-systems/bin/lib/package-scan-skill.test.cjs +136 -0
- package/deliver-great-systems/bin/lib/package-scan.cjs +919 -0
- package/deliver-great-systems/bin/lib/package-scan.test.cjs +2147 -0
- package/deliver-great-systems/bin/lib/phase.cjs +18 -1
- package/deliver-great-systems/bin/lib/plan-number-validity.test.cjs +48 -0
- package/deliver-great-systems/bin/lib/projects.cjs +38 -3
- package/deliver-great-systems/bin/lib/projects.test.cjs +112 -2
- package/deliver-great-systems/bin/lib/quick.cjs +178 -23
- package/deliver-great-systems/bin/lib/quick.test.cjs +138 -4
- package/deliver-great-systems/bin/lib/repos.cjs +12 -12
- package/deliver-great-systems/bin/lib/review.cjs +1821 -0
- package/deliver-great-systems/bin/lib/state.cjs +7 -3
- package/deliver-great-systems/bin/lib/summary-frontmatter.cjs +54 -0
- package/deliver-great-systems/bin/lib/summary-frontmatter.test.cjs +78 -0
- package/deliver-great-systems/bin/lib/sweep-scope.test.cjs +263 -0
- package/deliver-great-systems/bin/lib/sync.cjs +2 -6
- package/deliver-great-systems/bin/lib/verify.cjs +120 -7
- package/deliver-great-systems/bin/lib/verify.test.cjs +82 -0
- package/deliver-great-systems/bin/lib/wave-0-template-rename.test.cjs +40 -0
- package/deliver-great-systems/bin/lib/worktrees.cjs +27 -1
- package/deliver-great-systems/bin/lib/worktrees.test.cjs +76 -0
- package/deliver-great-systems/references/agent-step-reliability.md +60 -0
- package/deliver-great-systems/references/conflict-resolution.md +4 -0
- package/deliver-great-systems/references/context-tiers.md +4 -0
- package/deliver-great-systems/references/package-scan-config.md +151 -0
- package/deliver-great-systems/references/questioning.md +0 -30
- package/deliver-great-systems/references/spec-review-loop.md +1 -2
- package/deliver-great-systems/references/workflow-conventions.md +29 -0
- package/deliver-great-systems/skills/dgs-tests/package-scan.md +44 -0
- package/deliver-great-systems/templates/REVIEW.md +35 -0
- package/deliver-great-systems/templates/VALIDATION.md +1 -1
- package/deliver-great-systems/templates/claude-md.md +11 -0
- package/deliver-great-systems/templates/package-scan-report.md +108 -0
- package/deliver-great-systems/templates/project.md +6 -170
- package/deliver-great-systems/templates/summary.md +3 -1
- package/deliver-great-systems/workflows/add-phase.md +5 -0
- package/deliver-great-systems/workflows/audit-milestone.md +66 -10
- package/deliver-great-systems/workflows/cancel-job.md +1 -1
- package/deliver-great-systems/workflows/codereview.md +103 -9
- package/deliver-great-systems/workflows/complete-milestone.md +26 -7
- package/deliver-great-systems/workflows/complete-quick.md +40 -2
- package/deliver-great-systems/workflows/discuss-phase.md +3 -2
- package/deliver-great-systems/workflows/execute-phase.md +89 -2
- package/deliver-great-systems/workflows/execute-plan.md +10 -1
- package/deliver-great-systems/workflows/help.md +51 -18
- package/deliver-great-systems/workflows/import-spec.md +65 -7
- package/deliver-great-systems/workflows/init-product.md +46 -152
- package/deliver-great-systems/workflows/new-milestone.md +115 -14
- package/deliver-great-systems/workflows/new-project.md +60 -331
- package/deliver-great-systems/workflows/package-scan.md +59 -0
- package/deliver-great-systems/workflows/plan-phase.md +79 -1
- package/deliver-great-systems/workflows/quick-complete.md +40 -2
- package/deliver-great-systems/workflows/quick.md +183 -10
- package/deliver-great-systems/workflows/research-idea.md +80 -142
- package/deliver-great-systems/workflows/run-job.md +21 -35
- package/deliver-great-systems/workflows/settings.md +13 -77
- package/deliver-great-systems/workflows/write-spec.md +9 -11
- package/hooks/dist/dgs-enforce-discipline.js +196 -0
- package/package.json +1 -1
- package/scripts/build-hooks.js +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Review: {title}
|
|
2
|
+
|
|
3
|
+
{stats_banner}
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
{goal}
|
|
8
|
+
|
|
9
|
+
## What Was Built
|
|
10
|
+
|
|
11
|
+
{what_was_built}
|
|
12
|
+
|
|
13
|
+
## Code Changes
|
|
14
|
+
|
|
15
|
+
{code_changes}
|
|
16
|
+
|
|
17
|
+
## Aggregate Statistics
|
|
18
|
+
|
|
19
|
+
{aggregate_stats}
|
|
20
|
+
|
|
21
|
+
## Verification
|
|
22
|
+
|
|
23
|
+
{verification}
|
|
24
|
+
|
|
25
|
+
## Risk Flags
|
|
26
|
+
|
|
27
|
+
{risk_flags}
|
|
28
|
+
|
|
29
|
+
## Overall
|
|
30
|
+
|
|
31
|
+
{overall}
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
*Generated: {date}*
|
|
35
|
+
*Mode: {mode}*
|
|
@@ -88,3 +88,14 @@ When the user mentions work for later (not for immediate execution):
|
|
|
88
88
|
- Specific tasks to remember: `/dgs:add-todo`
|
|
89
89
|
|
|
90
90
|
These capture without executing.
|
|
91
|
+
|
|
92
|
+
## 6. Completion Gates? Stop and Report
|
|
93
|
+
|
|
94
|
+
Never take these actions without explicit user instruction:
|
|
95
|
+
|
|
96
|
+
- **`/dgs:quick-complete`** or **`/dgs:quick-abandon`** -- merging or discarding a quick task is the user's decision
|
|
97
|
+
- **`/dgs:complete-milestone`** -- milestone completion involves branch merging, tagging, and archival
|
|
98
|
+
- **`--force`** flags on any command -- force flags bypass safety checks (e.g., four-eyes governance)
|
|
99
|
+
- **`git push --force`**, **`git reset --hard`**, or other destructive git operations
|
|
100
|
+
|
|
101
|
+
When a gate blocks execution (e.g., four-eyes enforcement, missing REVIEW.md), **stop and report the error**. Tell the user what command to run with what flag. Do not retry with the bypass flag yourself.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Package Scan Report Template
|
|
2
|
+
|
|
3
|
+
> Reference: the output format `/dgs:package-scan` produces.
|
|
4
|
+
> This file is documentation — the emitter composes programmatically, not via template substitution.
|
|
5
|
+
|
|
6
|
+
## Frontmatter + Body Skeleton
|
|
7
|
+
|
|
8
|
+
```markdown
|
|
9
|
+
---
|
|
10
|
+
type: package-scan
|
|
11
|
+
date: {{YYYY-MM-DD}}
|
|
12
|
+
tool: {{snyk|osv-scanner|npm-audit|pip-audit|govulncheck|bundler-audit|mixed|none}}
|
|
13
|
+
repos_scanned: {{N}}
|
|
14
|
+
critical: {{N}}
|
|
15
|
+
high: {{N}}
|
|
16
|
+
medium: {{N}}
|
|
17
|
+
low: {{N}}
|
|
18
|
+
duration: {{seconds}}
|
|
19
|
+
findings:
|
|
20
|
+
- id: "pkg-001"
|
|
21
|
+
test_source: "package-scan"
|
|
22
|
+
gap_type: "dependency-security"
|
|
23
|
+
severity: "critical"
|
|
24
|
+
resource_id: "{{package}}@{{version}}"
|
|
25
|
+
repo: "{{repo-name}}"
|
|
26
|
+
manifest_path: "{{manifest-path-or-null}}"
|
|
27
|
+
title: "{{title}}"
|
|
28
|
+
description: "{{description-or-null}}"
|
|
29
|
+
remediation: "{{remediation-or-null}}"
|
|
30
|
+
reference: "{{reference-url-or-null}}"
|
|
31
|
+
cve: "{{CVE-id-or-null}}"
|
|
32
|
+
cvss: {{score-or-null}}
|
|
33
|
+
dependency_chain:
|
|
34
|
+
- "{{dep1}}"
|
|
35
|
+
- "{{dep2}}"
|
|
36
|
+
chain_available: true
|
|
37
|
+
direct_or_transitive: "{{direct-or-transitive}}"
|
|
38
|
+
tool: "{{scanner-tool}}"
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Package Scan Report
|
|
42
|
+
|
|
43
|
+
## Summary
|
|
44
|
+
|
|
45
|
+
| Repo | Ecosystem | Tool | Critical | High | Medium | Low | Status |
|
|
46
|
+
|------|-----------|------|----------|------|--------|-----|--------|
|
|
47
|
+
| {{repo}} | {{node|python|go|ruby|java|yarn}} | {{tool}} | {{N}} | {{N}} | {{N}} | {{N}} | ok |
|
|
48
|
+
| {{repo}} | {{ecosystem}} | — | — | — | — | — | skipped (no manifests) |
|
|
49
|
+
|
|
50
|
+
## Critical
|
|
51
|
+
|
|
52
|
+
### {{repo}}: {{package}}@{{version}} — {{title}}
|
|
53
|
+
- **CVE:** {{CVE-id-or-'unavailable'}}
|
|
54
|
+
- **CVSS:** {{score-or-'unavailable'}}
|
|
55
|
+
- **Tool:** {{scanner-tool}}
|
|
56
|
+
- **Manifest:** `{{manifest-path}}` (or `repo root`)
|
|
57
|
+
- **Direct/Transitive:** {{direct-or-transitive-or-'unknown'}}
|
|
58
|
+
- **Dependency chain:** {{a → b → c}} (or `unavailable (chain_available: false — recommend Snyk for full chain analysis)`)
|
|
59
|
+
- **Fix:** {{remediation-or-'no upgrade path available — manual review required'}}
|
|
60
|
+
- **Reference:** {{URL-or-'unavailable'}}
|
|
61
|
+
|
|
62
|
+
> {{description-blockquote-if-present}}
|
|
63
|
+
|
|
64
|
+
## High
|
|
65
|
+
(per-finding format same as Critical)
|
|
66
|
+
|
|
67
|
+
## Medium
|
|
68
|
+
(per-finding format same as Critical)
|
|
69
|
+
|
|
70
|
+
## Low
|
|
71
|
+
(per-finding format same as Critical)
|
|
72
|
+
|
|
73
|
+
## Diagnostics
|
|
74
|
+
(present only when runResult.diagnostics is non-empty)
|
|
75
|
+
- {{diagnostic.kind}}: {{diagnostic.message-or-hint}}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Field reference
|
|
79
|
+
|
|
80
|
+
| Field | Type | Notes |
|
|
81
|
+
|-------|------|-------|
|
|
82
|
+
| `id` | string | `pkg-NNN` (zero-padded, assigned by orchestrator at merge time) |
|
|
83
|
+
| `test_source` | string | Always `"package-scan"` (constant) |
|
|
84
|
+
| `gap_type` | string | `"dependency-security"` or `"dependency-licence"` (Phase 153 extends to licence) |
|
|
85
|
+
| `severity` | string | `critical|high|medium|low` (null/unknown collapses to `medium` — conservative bias) |
|
|
86
|
+
| `resource_id` | string | `{{package_name}}@{{installed_version}}` (omit `@` if version empty) |
|
|
87
|
+
| `repo` | string | Repo name from REPOS.md (or `_product_root`) |
|
|
88
|
+
| `manifest_path` | string\|null | Relative POSIX path of manifest that produced the finding (null when scanning repo root) |
|
|
89
|
+
| `title` | string | Vulnerability title from scanner |
|
|
90
|
+
| `description` | string\|null | Vulnerability description (may be multi-line) |
|
|
91
|
+
| `remediation` | string\|null | Fix command from scanner |
|
|
92
|
+
| `reference` | string\|null | Advisory URL |
|
|
93
|
+
| `cve` | string\|null | CVE identifier |
|
|
94
|
+
| `cvss` | number\|null | CVSS score (v3 preferred) |
|
|
95
|
+
| `dependency_chain` | array\|null | e.g., `[your-app, auth-lib, lodash]` |
|
|
96
|
+
| `chain_available` | boolean | `false` when the scanner didn't provide a chain (OSV / native) |
|
|
97
|
+
| `direct_or_transitive` | string\|null | `direct` or `transitive` |
|
|
98
|
+
| `tool` | string | Scanner that produced this finding (for disambiguation when frontmatter `tool` is `mixed`) |
|
|
99
|
+
|
|
100
|
+
## Placement cascade
|
|
101
|
+
|
|
102
|
+
1. Active phase → `{phase-dir}/{phase-number}-PACKAGE-SCAN.md`
|
|
103
|
+
2. Active milestone → `{planning-root}/milestones/v{X}.{Y}-PACKAGE-SCAN.md`
|
|
104
|
+
3. No active context → `{planning-root}/PACKAGE-SCAN-{YYYY-MM-DD-HHmm}.md`
|
|
105
|
+
|
|
106
|
+
## Related
|
|
107
|
+
- `deliver-great-systems/references/package-scan-config.md` — config reference
|
|
108
|
+
- `specs/spec-package-dependency-scanning.md` — the source spec
|
|
@@ -1,186 +1,22 @@
|
|
|
1
1
|
# PROJECT.md Template
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Thin skeleton for `PROJECT.md` (in `${project_path}`). Projects are holders —
|
|
4
|
+
product-level vision lives in `docs/product/PRODUCT-SUMMARY.md` (Tier 1), and
|
|
5
|
+
product architecture lives in `docs/product/ARCHITECTURE.md` (Tier 2).
|
|
6
6
|
|
|
7
7
|
<template>
|
|
8
8
|
|
|
9
9
|
```markdown
|
|
10
10
|
# [Project Name]
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[Current accurate description — 2-3 sentences. What does this product do and who is it for?
|
|
15
|
-
Use the user's language and framing. Update whenever reality drifts from this description.]
|
|
16
|
-
|
|
17
|
-
## Core Value
|
|
18
|
-
|
|
19
|
-
[The ONE thing that matters most. If everything else fails, this must work.
|
|
20
|
-
One sentence that drives prioritization when tradeoffs arise.]
|
|
21
|
-
|
|
22
|
-
## Requirements
|
|
23
|
-
|
|
24
|
-
### Validated
|
|
25
|
-
|
|
26
|
-
<!-- Shipped and confirmed valuable. -->
|
|
27
|
-
|
|
28
|
-
(None yet — ship to validate)
|
|
29
|
-
|
|
30
|
-
### Active
|
|
31
|
-
|
|
32
|
-
<!-- Current scope. Building toward these. -->
|
|
33
|
-
|
|
34
|
-
- [ ] [Requirement 1]
|
|
35
|
-
- [ ] [Requirement 2]
|
|
36
|
-
- [ ] [Requirement 3]
|
|
37
|
-
|
|
38
|
-
### Out of Scope
|
|
39
|
-
|
|
40
|
-
<!-- Explicit boundaries. Includes reasoning to prevent re-adding. -->
|
|
41
|
-
|
|
42
|
-
- [Exclusion 1] — [why]
|
|
43
|
-
- [Exclusion 2] — [why]
|
|
44
|
-
|
|
45
|
-
## Context
|
|
46
|
-
|
|
47
|
-
[Background information that informs implementation:
|
|
48
|
-
- Technical environment or ecosystem
|
|
49
|
-
- Relevant prior work or experience
|
|
50
|
-
- User research or feedback themes
|
|
51
|
-
- Known issues to address]
|
|
52
|
-
|
|
53
|
-
## Constraints
|
|
54
|
-
|
|
55
|
-
- **[Type]**: [What] — [Why]
|
|
56
|
-
- **[Type]**: [What] — [Why]
|
|
57
|
-
|
|
58
|
-
Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Performance, Security
|
|
59
|
-
|
|
60
|
-
## Key Decisions
|
|
61
|
-
|
|
62
|
-
<!-- Decisions that constrain future work. Add throughout project lifecycle. -->
|
|
63
|
-
|
|
64
|
-
| Decision | Rationale | Outcome |
|
|
65
|
-
|----------|-----------|---------|
|
|
66
|
-
| [Choice] | [Why] | [✓ Good / ⚠️ Revisit / — Pending] |
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
*Last updated: [date] after [trigger]*
|
|
12
|
+
<One-line purpose — fill in to anchor this project.>
|
|
70
13
|
```
|
|
71
14
|
|
|
72
15
|
</template>
|
|
73
16
|
|
|
74
|
-
<guidelines>
|
|
75
|
-
|
|
76
|
-
**What This Is:**
|
|
77
|
-
- Current accurate description of the product
|
|
78
|
-
- 2-3 sentences capturing what it does and who it's for
|
|
79
|
-
- Use the user's words and framing
|
|
80
|
-
- Update when the product evolves beyond this description
|
|
81
|
-
|
|
82
|
-
**Core Value:**
|
|
83
|
-
- The single most important thing
|
|
84
|
-
- Everything else can fail; this cannot
|
|
85
|
-
- Drives prioritization when tradeoffs arise
|
|
86
|
-
- Rarely changes; if it does, it's a significant pivot
|
|
87
|
-
|
|
88
|
-
**Requirements — Validated:**
|
|
89
|
-
- Requirements that shipped and proved valuable
|
|
90
|
-
- Format: `- ✓ [Requirement] — [version/phase]`
|
|
91
|
-
- These are locked — changing them requires explicit discussion
|
|
92
|
-
|
|
93
|
-
**Requirements — Active:**
|
|
94
|
-
- Current scope being built toward
|
|
95
|
-
- These are hypotheses until shipped and validated
|
|
96
|
-
- Move to Validated when shipped, Out of Scope if invalidated
|
|
97
|
-
|
|
98
|
-
**Requirements — Out of Scope:**
|
|
99
|
-
- Explicit boundaries on what we're not building
|
|
100
|
-
- Always include reasoning (prevents re-adding later)
|
|
101
|
-
- Includes: considered and rejected, deferred to future, explicitly excluded
|
|
102
|
-
|
|
103
|
-
**Context:**
|
|
104
|
-
- Background that informs implementation decisions
|
|
105
|
-
- Technical environment, prior work, user feedback
|
|
106
|
-
- Known issues or technical debt to address
|
|
107
|
-
- Update as new context emerges
|
|
108
|
-
|
|
109
|
-
**Constraints:**
|
|
110
|
-
- Hard limits on implementation choices
|
|
111
|
-
- Tech stack, timeline, budget, compatibility, dependencies
|
|
112
|
-
- Include the "why" — constraints without rationale get questioned
|
|
113
|
-
|
|
114
|
-
**Key Decisions:**
|
|
115
|
-
- Significant choices that affect future work
|
|
116
|
-
- Add decisions as they're made throughout the project
|
|
117
|
-
- Track outcome when known:
|
|
118
|
-
- ✓ Good — decision proved correct
|
|
119
|
-
- ⚠️ Revisit — decision may need reconsideration
|
|
120
|
-
- — Pending — too early to evaluate
|
|
121
|
-
|
|
122
|
-
**Last Updated:**
|
|
123
|
-
- Always note when and why the document was updated
|
|
124
|
-
- Format: `after Phase 2` or `after v1.0 milestone`
|
|
125
|
-
- Triggers review of whether content is still accurate
|
|
126
|
-
|
|
127
|
-
</guidelines>
|
|
128
|
-
|
|
129
|
-
<evolution>
|
|
130
|
-
|
|
131
|
-
PROJECT.md evolves throughout the project lifecycle.
|
|
132
|
-
|
|
133
|
-
**After each phase transition:**
|
|
134
|
-
1. Requirements invalidated? → Move to Out of Scope with reason
|
|
135
|
-
2. Requirements validated? → Move to Validated with phase reference
|
|
136
|
-
3. New requirements emerged? → Add to Active
|
|
137
|
-
4. Decisions to log? → Add to Key Decisions
|
|
138
|
-
5. "What This Is" still accurate? → Update if drifted
|
|
139
|
-
|
|
140
|
-
**After each milestone:**
|
|
141
|
-
1. Full review of all sections
|
|
142
|
-
2. Core Value check — still the right priority?
|
|
143
|
-
3. Audit Out of Scope — reasons still valid?
|
|
144
|
-
4. Update Context with current state (users, feedback, metrics)
|
|
145
|
-
|
|
146
|
-
</evolution>
|
|
147
|
-
|
|
148
|
-
<brownfield>
|
|
149
|
-
|
|
150
|
-
For existing codebases:
|
|
151
|
-
|
|
152
|
-
1. **Map codebase first** via `/dgs:map-codebase`
|
|
153
|
-
|
|
154
|
-
2. **Infer Validated requirements** from existing code:
|
|
155
|
-
- What does the codebase actually do?
|
|
156
|
-
- What patterns are established?
|
|
157
|
-
- What's clearly working and relied upon?
|
|
158
|
-
|
|
159
|
-
3. **Gather Active requirements** from user:
|
|
160
|
-
- Present inferred current state
|
|
161
|
-
- Ask what they want to build next
|
|
162
|
-
|
|
163
|
-
4. **Initialize:**
|
|
164
|
-
- Validated = inferred from existing code
|
|
165
|
-
- Active = user's goals for this work
|
|
166
|
-
- Out of Scope = boundaries user specifies
|
|
167
|
-
- Context = includes current codebase state
|
|
168
|
-
|
|
169
|
-
</brownfield>
|
|
170
|
-
|
|
171
17
|
<state_reference>
|
|
172
18
|
|
|
173
|
-
STATE.md references PROJECT.md
|
|
174
|
-
|
|
175
|
-
```markdown
|
|
176
|
-
## Project Reference
|
|
177
|
-
|
|
178
|
-
See: PROJECT.md (updated [date])
|
|
179
|
-
|
|
180
|
-
**Core value:** [One-liner from Core Value section]
|
|
181
|
-
**Current focus:** [Current phase name]
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
This ensures Claude reads current PROJECT.md context.
|
|
19
|
+
STATE.md references PROJECT.md by path; the thin skeleton still satisfies
|
|
20
|
+
`dgs-tools health` Check 2 (file exists + top-level heading).
|
|
185
21
|
|
|
186
22
|
</state_reference>
|
|
@@ -40,7 +40,9 @@ patterns-established:
|
|
|
40
40
|
- "Pattern 1: description"
|
|
41
41
|
- "Pattern 2: description"
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
requirements_completed: [] # MANDATORY — Copy ALL requirement IDs from this plan's `requirements` frontmatter field VERBATIM. Empty array allowed only when PLAN's `requirements:` is also empty. Pre-commit precondition (REL-08) aborts the executor with `summary-frontmatter-mismatch` if non-empty PLAN paired with empty `requirements_completed`.
|
|
44
|
+
# Canonical key: `requirements_completed` (underscore — pinned by Phase 157 / 157-Q2-FINDINGS.md).
|
|
45
|
+
# The legacy hyphen variant is still readable by `cmdSummaryExtract` for backwards-compat with archived v23.1 SUMMARYs (REL-10 dual-read), but MUST NOT be used for new SUMMARYs.
|
|
44
46
|
|
|
45
47
|
# Metrics
|
|
46
48
|
duration: Xmin
|
|
@@ -76,6 +76,11 @@ Update STATE.md to reflect the new phase:
|
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
If "Roadmap Evolution" section doesn't exist, create it.
|
|
79
|
+
|
|
80
|
+
3. Commit both ROADMAP.md and STATE.md:
|
|
81
|
+
```bash
|
|
82
|
+
node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" commit "docs: add phase {N} to roadmap" --push --files ${roadmap_path} ${state_path}
|
|
83
|
+
```
|
|
79
84
|
</step>
|
|
80
85
|
|
|
81
86
|
<step name="completion">
|
|
@@ -45,6 +45,19 @@ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" phases list
|
|
|
45
45
|
- Extract milestone definition of done from ROADMAP.md
|
|
46
46
|
- Extract requirements mapped to this milestone from REQUIREMENTS.md
|
|
47
47
|
|
|
48
|
+
### Parse `--strict-audit` flag (REL-10)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
STRICT_AUDIT=$(echo "$ARGUMENTS" | grep -oE -- '--strict-audit' | head -1)
|
|
52
|
+
if [ -n "$STRICT_AUDIT" ]; then
|
|
53
|
+
STRICT_AUDIT=true
|
|
54
|
+
else
|
|
55
|
+
STRICT_AUDIT=false
|
|
56
|
+
fi
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
When `STRICT_AUDIT=true`, the cross-reference matrix in Section 5d preserves the OLD strict behaviour: empty `requirements_completed` → `partial` regardless of VERIFICATION state. When `STRICT_AUDIT=false` (default), Section 5d applies the soft-tolerance via `bin/lib/audit-tolerance.cjs::applyMatrix` and logs the `summary-frontmatter-empty-but-verified` warning under a separate channel (`soft_warnings`) — distinct from real partials.
|
|
60
|
+
|
|
48
61
|
## 2. Read All Phase Verifications
|
|
49
62
|
|
|
50
63
|
For each phase directory, read the VERIFICATION.md:
|
|
@@ -143,21 +156,30 @@ done
|
|
|
143
156
|
|
|
144
157
|
### 5d. Status Determination Matrix
|
|
145
158
|
|
|
146
|
-
For each REQ-ID, determine status using all three sources:
|
|
159
|
+
For each REQ-ID, determine status using all three sources, routed through `bin/lib/audit-tolerance.cjs::applyMatrix(input)` (REL-10):
|
|
160
|
+
|
|
161
|
+
| VERIFICATION.md Status | SUMMARY Frontmatter | requirements_claimed in VERIFICATION | --strict-audit | → Final Status |
|
|
162
|
+
|------------------------|---------------------|--------------------------------------|----------------|----------------|
|
|
163
|
+
| passed | listed | any | any | **satisfied** |
|
|
164
|
+
| passed | empty | lists ID | false (default) | **satisfied** + soft-warning `summary-frontmatter-empty-but-verified` |
|
|
165
|
+
| passed | empty | lists ID | true | **partial** (preserves old strict behaviour; opt-in via `--strict-audit`) |
|
|
166
|
+
| passed | empty | does NOT list ID | any | **partial** (real partial — tolerance must NOT mask this) |
|
|
167
|
+
| gaps_found | any | any | any | **unsatisfied** |
|
|
168
|
+
| missing | listed | any | any | **partial** (verification gap) |
|
|
169
|
+
| missing | missing | any | any | **unsatisfied** |
|
|
170
|
+
|
|
171
|
+
**Soft-warning channel:** Entries with status `satisfied` AND `softWarning: 'summary-frontmatter-empty-but-verified'` are collected in a SEPARATE list under `soft_warnings.summary_frontmatter_empty_but_verified` in the audit JSON output. They are NOT included under `gaps.requirements` — that channel is reserved for real `unsatisfied` and real `partial`. The soft-warning channel is shown as an info-level note in the markdown report.
|
|
147
172
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
| passed | listed | `[ ]` | **satisfied** (update checkbox) |
|
|
152
|
-
| passed | missing | any | **partial** (verify manually) |
|
|
153
|
-
| gaps_found | any | any | **unsatisfied** |
|
|
154
|
-
| missing | listed | any | **partial** (verification gap) |
|
|
155
|
-
| missing | missing | any | **unsatisfied** |
|
|
173
|
+
**Implementation:** Section 5d invokes `applyMatrix({ verificationStatus, requirementsClaimed, summaryRequirementsCompleted, reqId, strictAudit })` for each REQ-ID. The output `{ status, softWarning }` populates the per-requirement row.
|
|
174
|
+
|
|
175
|
+
**Removal trigger (REL-10 band-aid):** When 3 consecutive milestones ship with zero `summary-frontmatter-empty-but-verified` warnings, this row should be removed from the matrix and the strict behaviour restored as default.
|
|
156
176
|
|
|
157
177
|
### 5e. FAIL Gate and Orphan Detection
|
|
158
178
|
|
|
159
179
|
**REQUIRED:** Any `unsatisfied` requirement MUST force `gaps_found` status on the milestone audit.
|
|
160
180
|
|
|
181
|
+
**Soft-warning entries (`softWarning: 'summary-frontmatter-empty-but-verified'`) MUST NOT force `gaps_found`** — they are `satisfied` with a recoverable provenance gap. They surface in `soft_warnings.summary_frontmatter_empty_but_verified` and in the markdown info-level notes only.
|
|
182
|
+
|
|
161
183
|
**Orphan detection:** Requirements present in REQUIREMENTS.md traceability table but absent from ALL phase VERIFICATION.md files MUST be flagged as orphaned. Orphaned requirements are treated as `unsatisfied` — they were assigned but never verified by any phase.
|
|
162
184
|
|
|
163
185
|
## 5.5. Nyquist Compliance Discovery
|
|
@@ -207,6 +229,11 @@ gaps: # Critical blockers
|
|
|
207
229
|
completed_by_plans: ["{plan files whose SUMMARY marks it complete}"]
|
|
208
230
|
verification_status: "passed | gaps_found | missing | orphaned"
|
|
209
231
|
evidence: "{specific evidence or lack thereof}"
|
|
232
|
+
soft_warnings: # REL-10: recoverable provenance issues — NOT blockers
|
|
233
|
+
summary_frontmatter_empty_but_verified:
|
|
234
|
+
- id: "{REQ-ID}"
|
|
235
|
+
phase: "{phase}"
|
|
236
|
+
reason: "VERIFICATION.md status: passed and requirements_claimed lists ID; SUMMARY.md requirements_completed is empty"
|
|
210
237
|
integration: [...]
|
|
211
238
|
flows: [...]
|
|
212
239
|
tech_debt: # Non-critical, deferred
|
|
@@ -227,7 +254,35 @@ Plus full markdown report with tables for requirements, phases, integration, tec
|
|
|
227
254
|
- `gaps_found` — critical blockers exist
|
|
228
255
|
- `tech_debt` — no blockers but accumulated deferred items need review
|
|
229
256
|
|
|
230
|
-
## 7.
|
|
257
|
+
## 7. Generate REVIEW.md
|
|
258
|
+
|
|
259
|
+
After audit scoring completes, generate the milestone review report so it is available before reviewers run complete-milestone.
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Generate REVIEW.md using the CLI command — always regenerates even if prior version exists
|
|
263
|
+
REVIEW_RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" jobs generate-review "${milestone_version}" --raw 2>&1)
|
|
264
|
+
REVIEW_EXIT=$?
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**If generation succeeds** (`REVIEW_EXIT` is 0):
|
|
268
|
+
|
|
269
|
+
Parse the JSON output to get the file path:
|
|
270
|
+
```bash
|
|
271
|
+
REVIEW_PATH=$(echo "$REVIEW_RESULT" | node -e "const d=require('fs').readFileSync('/dev/stdin','utf-8');try{const j=JSON.parse(d);console.log(j.relativePath||'')}catch{console.log('')}")
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Display: `Review report: ${REVIEW_PATH}`
|
|
275
|
+
|
|
276
|
+
**If generation fails** (`REVIEW_EXIT` is non-zero):
|
|
277
|
+
|
|
278
|
+
Log warning and continue — do NOT block the audit:
|
|
279
|
+
```
|
|
280
|
+
Warning: Review generation failed: ${REVIEW_RESULT}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
The audit report is complete regardless of review generation status. The review report is supplementary context for four-eyes reviewers.
|
|
284
|
+
|
|
285
|
+
## 8. Present Results
|
|
231
286
|
|
|
232
287
|
Route by status (see `<offer_next>`).
|
|
233
288
|
|
|
@@ -360,5 +415,6 @@ All requirements met. No critical blockers. Accumulated tech debt needs review.
|
|
|
360
415
|
- [ ] FAIL gate enforced — any unsatisfied requirement forces gaps_found status
|
|
361
416
|
- [ ] Nyquist compliance scanned for all milestone phases (if enabled)
|
|
362
417
|
- [ ] Missing VALIDATION.md phases flagged with validate-phase suggestion
|
|
418
|
+
- [ ] REVIEW.md generated as final step (or warning logged on failure)
|
|
363
419
|
- [ ] Results presented with actionable next steps
|
|
364
420
|
</success_criteria>
|
|
@@ -65,7 +65,7 @@ Display the result based on the response:
|
|
|
65
65
|
|
|
66
66
|
**If `cancelled: true`:**
|
|
67
67
|
```
|
|
68
|
-
Job {version} cancelled. {steps_reset} in-progress step(s) reset. Job
|
|
68
|
+
Job {version} cancelled. {steps_reset} in-progress step(s) reset. Job status set to pending -- re-run with /dgs:run-job {version}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
**If `reason: 'not_found'`:**
|