sdd-flow 1.3.3 → 2.0.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/CHANGELOG.md +33 -0
- package/CONTRIBUTING.md +25 -0
- package/LICENSE +21 -21
- package/README.md +113 -168
- package/README.pt-BR.md +100 -0
- package/bin/cli.js +162 -424
- package/docs/architecture.md +91 -0
- package/docs/distribution.md +64 -0
- package/docs/formats.md +212 -0
- package/docs/local-testing.pt-BR.md +195 -0
- package/docs/methodology.pt-BR.md +133 -0
- package/docs/migration.md +75 -0
- package/docs/quality-gates.pt-BR.md +160 -0
- package/docs/quality.md +56 -0
- package/docs/releases.pt-BR.md +186 -0
- package/docs/setup-documents.pt-BR.md +120 -0
- package/docs/usage.pt-BR.md +305 -0
- package/docs/validation.md +95 -0
- package/lib/adapters.js +115 -0
- package/lib/check.js +221 -0
- package/lib/context.js +117 -0
- package/lib/documents.js +71 -0
- package/lib/handoff.js +81 -0
- package/lib/history.js +16 -0
- package/lib/install.js +181 -0
- package/lib/io.js +119 -0
- package/lib/legacy-hashes.json +31 -0
- package/lib/markdown.js +71 -0
- package/lib/project.js +200 -0
- package/lib/quality.js +24 -0
- package/lib/revisions.js +79 -0
- package/lib/verification.js +267 -0
- package/package.json +55 -32
- package/templates/AGENTS.md +12 -50
- package/templates/QUICKSTART.md +16 -70
- package/templates/agents/AGENTS.md +54 -92
- package/templates/agents/DECISIONS.md +5 -21
- package/templates/agents/POLICIES.md +14 -0
- package/templates/agents/PROJECT.md +35 -145
- package/templates/agents/QUALITY.md +19 -0
- package/templates/agents/RULES.md +22 -132
- package/templates/agents/SETUP.md +38 -224
- package/templates/agents/config.yaml +13 -0
- package/templates/agents/current/_template.md +19 -0
- package/templates/agents/decisions/_template.md +22 -0
- package/templates/agents/prompts/conventional-commit.md +11 -51
- package/templates/agents/prompts/intake.md +23 -0
- package/templates/agents/prompts/pr-template.md +12 -21
- package/templates/agents/prompts/quality.md +57 -0
- package/templates/agents/prompts/rpi-close.md +23 -0
- package/templates/agents/prompts/rpi-implement.md +31 -68
- package/templates/agents/prompts/rpi-plan.md +87 -117
- package/templates/agents/prompts/rpi-research.md +21 -67
- package/templates/agents/prompts/rpi-validate.md +40 -103
- package/templates/agents/prompts/skill-call.md +11 -29
- package/templates/agents/prompts/task-create.md +13 -42
- package/templates/agents/skills/_template/SKILL.md +11 -37
- package/templates/agents/harness/claude-code/.hooks/guard-delete.sh +0 -22
- package/templates/agents/harness/claude-code/.hooks/guard-deps.sh +0 -25
- package/templates/agents/harness/claude-code/.hooks/guard-git.sh +0 -24
- package/templates/agents/harness/claude-code/commands/sdd-implement.md +0 -3
- package/templates/agents/harness/claude-code/commands/sdd-plan.md +0 -3
- package/templates/agents/harness/claude-code/commands/sdd-research.md +0 -3
- package/templates/agents/harness/claude-code/commands/sdd-validate.md +0 -3
- package/templates/agents/harness/claude-code/settings.json +0 -34
- package/templates/agents/harness/opencode/commands/sdd-implement.md +0 -3
- package/templates/agents/harness/opencode/commands/sdd-plan.md +0 -3
- package/templates/agents/harness/opencode/commands/sdd-research.md +0 -3
- package/templates/agents/harness/opencode/commands/sdd-validate.md +0 -3
- package/templates/agents/harness/opencode/opencode.json +0 -18
|
@@ -1,117 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
| Task | Status | Notes |
|
|
89
|
-
|---|---|---|
|
|
90
|
-
| T01 | Pending | |
|
|
91
|
-
| T02 | Pending | |
|
|
92
|
-
|
|
93
|
-
## History
|
|
94
|
-
|
|
95
|
-
(updated during implementation)
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### TEST.md
|
|
99
|
-
```markdown
|
|
100
|
-
# TEST — [Feature Name]
|
|
101
|
-
|
|
102
|
-
## Acceptance Test Cases
|
|
103
|
-
|
|
104
|
-
### TC01 — [Behavior being tested]
|
|
105
|
-
- **Given** [initial state]
|
|
106
|
-
- **When** [action performed]
|
|
107
|
-
- **Then** [expected outcome]
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Constraints
|
|
113
|
-
|
|
114
|
-
- Do not write code in this phase
|
|
115
|
-
- Do not implement any task — only plan
|
|
116
|
-
- If the RESEARCH.md has unresolved open questions, **stop and ask** before planning
|
|
117
|
-
- After delivering all artifacts, **wait for approval** before advancing to Implement
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
kind: procedure
|
|
4
|
+
phase: plan
|
|
5
|
+
description: Define scoped requirements, acceptance and cohesive tasks.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Plan
|
|
9
|
+
|
|
10
|
+
Read the actual sources, applicable current capability contracts and code. Run sdd context ID --phase plan when available.
|
|
11
|
+
Use the change mode from change.yaml. Resolve only ambiguities that affect behavior or scope; state routine technical assumptions.
|
|
12
|
+
For a multi-feature request or oversized context packet, follow intake.md and propose cohesive linked deliveries.
|
|
13
|
+
|
|
14
|
+
## Contract
|
|
15
|
+
|
|
16
|
+
SPEC.md front matter is the structured contract. Keep rationale and prose detail in its body.
|
|
17
|
+
Preserve IDs when editing. Use local IDs qualified externally by the change ID.
|
|
18
|
+
|
|
19
|
+
~~~yaml
|
|
20
|
+
---
|
|
21
|
+
schema_version: 2
|
|
22
|
+
artifact: spec
|
|
23
|
+
id: 001-example
|
|
24
|
+
requirements:
|
|
25
|
+
- id: REQ01
|
|
26
|
+
description: State an observable requirement, including important failure behavior.
|
|
27
|
+
acceptance:
|
|
28
|
+
- id: AC01
|
|
29
|
+
covers: [REQ01]
|
|
30
|
+
description: State concrete inputs and expected outcomes.
|
|
31
|
+
method: automated
|
|
32
|
+
checks: [unit]
|
|
33
|
+
---
|
|
34
|
+
~~~
|
|
35
|
+
|
|
36
|
+
Automated checks must name real checks configured in agents/config.yaml.
|
|
37
|
+
Use method: manual or inspection for cases that require observed evidence rather than a command.
|
|
38
|
+
Automated command success is execution evidence; review assertions to establish semantic coverage.
|
|
39
|
+
|
|
40
|
+
## Tasks
|
|
41
|
+
|
|
42
|
+
Standard and rigorous modes use TASK.md. Light mode may omit it.
|
|
43
|
+
Keep task status only in its front matter. One task is a cohesive verifiable outcome and may change multiple files.
|
|
44
|
+
|
|
45
|
+
~~~yaml
|
|
46
|
+
---
|
|
47
|
+
schema_version: 2
|
|
48
|
+
artifact: tasks
|
|
49
|
+
id: 001-example
|
|
50
|
+
tasks:
|
|
51
|
+
- id: T01
|
|
52
|
+
title: Implement the behavior and its regression checks.
|
|
53
|
+
status: pending
|
|
54
|
+
covers: [REQ01, AC01]
|
|
55
|
+
depends_on: []
|
|
56
|
+
verify: The acceptance scenario and relevant regression checks pass.
|
|
57
|
+
---
|
|
58
|
+
~~~
|
|
59
|
+
|
|
60
|
+
Plan tests with implementation; permit TDD and incremental verification.
|
|
61
|
+
Use concrete initial-state/action/outcome examples in acceptance, including relevant failure/boundary cases.
|
|
62
|
+
Follow config quality.tdd; use quality.md when defining strategy or project-specific gates.
|
|
63
|
+
Classify external checks/criteria accurately before approval. Separate implementation from external-only verification tasks.
|
|
64
|
+
Missing environment access calls for a safe user handoff, not mandatory production testing or an impossible completion gate.
|
|
65
|
+
Allow many-to-many relationships among requirements, acceptance, tasks and tests.
|
|
66
|
+
Retain cancelled records with status: cancelled and cancellation containing reason and by.
|
|
67
|
+
Do not infer that cancellation requests deleting code.
|
|
68
|
+
|
|
69
|
+
## Context and authorization
|
|
70
|
+
|
|
71
|
+
In change.yaml select capabilities, decisions, skills and dependency spec IDs.
|
|
72
|
+
Use context entries as a project-relative path or {path: ..., section: Exact heading}.
|
|
73
|
+
Keep sources as paths or explicit path/section references to original requirements, which remain discoverable.
|
|
74
|
+
Do not populate every project artifact merely because a template exists.
|
|
75
|
+
For meaningful changes, add a short impact/regression note in SPEC's body: affected consumers/shared contracts,
|
|
76
|
+
behavior to preserve, relevant regression checks and any migration/cache/integration considerations.
|
|
77
|
+
Inspect only applicable areas; a small isolated change may need one sentence. Do not create a duplicate impact document.
|
|
78
|
+
|
|
79
|
+
Run sdd check ID and fix structural gaps. Explain the outcome, assumptions and material choices.
|
|
80
|
+
When the user has authorized this scope, record it with sdd approve ID --by NAME.
|
|
81
|
+
Never claim a human authorization that did not occur. Follow the existing conversation's authorization;
|
|
82
|
+
do not repeatedly ask for permission already given for the same scope.
|
|
83
|
+
|
|
84
|
+
When an approved business rule or policy changes, update the contract and affected task definitions while
|
|
85
|
+
preserving IDs. Run sdd revise ID --by NAME --reason REASON --dry-run to inspect impact, then record the revision.
|
|
86
|
+
Affected completed tasks and their dependents are reopened; policy/prose changes may conservatively reopen all.
|
|
87
|
+
Review and authorize the revised scope before continuing. Use a new linked spec for a separate deliverable.
|
|
@@ -1,67 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Deliverable: RESEARCH.md
|
|
24
|
-
|
|
25
|
-
Produce **only** the file `agents/specs/NNN-name/RESEARCH.md` with the structure below.
|
|
26
|
-
Be concise — this file will be read in future sessions as compressed context.
|
|
27
|
-
|
|
28
|
-
```markdown
|
|
29
|
-
# RESEARCH — [Feature Name]
|
|
30
|
-
|
|
31
|
-
## Goal
|
|
32
|
-
One clear sentence stating what this feature delivers.
|
|
33
|
-
|
|
34
|
-
## Entities and data structures
|
|
35
|
-
List the entities involved, data structures to be created or modified,
|
|
36
|
-
and their expected fields/schema.
|
|
37
|
-
|
|
38
|
-
## Relevant business rules
|
|
39
|
-
Only the rules that directly impact implementation.
|
|
40
|
-
Reference by number if the PRD uses numbered rules.
|
|
41
|
-
|
|
42
|
-
## Dependencies
|
|
43
|
-
Features or specs that must be complete before this one.
|
|
44
|
-
List `None` if there are none.
|
|
45
|
-
|
|
46
|
-
## Scope decisions
|
|
47
|
-
What is explicitly inside and outside the scope of this spec.
|
|
48
|
-
Be explicit about edge cases.
|
|
49
|
-
|
|
50
|
-
## Risks and attention points
|
|
51
|
-
Resolved ambiguities, identified trade-offs, and warnings for the implementation phase.
|
|
52
|
-
|
|
53
|
-
## Open questions
|
|
54
|
-
List only questions that block the Plan phase.
|
|
55
|
-
If none, write `None`.
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Constraints
|
|
61
|
-
|
|
62
|
-
- Produce only RESEARCH.md — no other file must be created
|
|
63
|
-
- Do not create SPEC.md, TASK.md, PROGRESS.md, TEST.md or any code file
|
|
64
|
-
- Do not write code in this phase
|
|
65
|
-
- Do not anticipate implementation decisions
|
|
66
|
-
- If there are open questions, **stop and wait for answers** before delivering RESEARCH.md
|
|
67
|
-
- After delivering RESEARCH.md, **wait for approval** before advancing to Plan
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
kind: procedure
|
|
4
|
+
phase: research
|
|
5
|
+
description: Resolve uncertainty using requirements sources and the actual code.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research
|
|
9
|
+
|
|
10
|
+
Use the active change manifest and project map. Inspect only the modules, source requirements and integrations relevant to this change.
|
|
11
|
+
Preserve source paths and distinguish facts, assumptions, alternatives and unresolved questions.
|
|
12
|
+
Do not replace the source requirements with an unsupported summary.
|
|
13
|
+
For a change to existing behavior, inspect direct consumers, shared contracts and relevant callers/tests,
|
|
14
|
+
not only the function being edited. Establish available baseline results; separate pre-existing failures,
|
|
15
|
+
introduced regressions and unavailable-environment checks. Keep the impact note short and source-linked.
|
|
16
|
+
|
|
17
|
+
Create RESEARCH.md only when research adds useful information. It is required in rigorous mode.
|
|
18
|
+
Use front matter with schema_version: 2, artifact: research and id matching the change ID.
|
|
19
|
+
In the body record the goal, relevant evidence, scope, risks and unresolved blocking questions.
|
|
20
|
+
Do not implement code. If a material question blocks planning, ask it while continuing independent investigation.
|
|
21
|
+
No separate approval of research/progress/empty decisions files is required; authorization applies to the normative scope bundle.
|
|
@@ -1,103 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
For each test case in `TEST.md`, assess whether the implementation satisfies
|
|
42
|
-
the Given/When/Then scenario. Read the relevant code directly.
|
|
43
|
-
|
|
44
|
-
### Step 4 — Produce VALIDATION.md
|
|
45
|
-
Write `agents/specs/NNN-name/VALIDATION.md` with the structure below.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Deliverable: VALIDATION.md
|
|
50
|
-
|
|
51
|
-
```markdown
|
|
52
|
-
# VALIDATION — [Feature Name]
|
|
53
|
-
|
|
54
|
-
## Status: [✅ Approved | ⚠️ Partial | ❌ Failed]
|
|
55
|
-
|
|
56
|
-
## Scope
|
|
57
|
-
[Full — all tasks complete] or [Partial — tasks T01..TNN validated; TXX..TYY pending implementation]
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Task Verification
|
|
62
|
-
|
|
63
|
-
| Task | verify: condition | Status |
|
|
64
|
-
|---|---|---|
|
|
65
|
-
| T01 | [condition from TASK.md] | ✅ Met / ❌ Not met / ⚠️ Partial |
|
|
66
|
-
| T02 | ... | ... |
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Acceptance Test Coverage
|
|
71
|
-
|
|
72
|
-
| Test Case | Description | Status | Evidence |
|
|
73
|
-
|---|---|---|---|
|
|
74
|
-
| TC01 | [behavior being tested] | ✅ Verified / ❌ Not met / ⚠️ Partial | [file and line or behavior observed in code] |
|
|
75
|
-
| TC02 | ... | ... | ... |
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Gaps Found
|
|
80
|
-
|
|
81
|
-
List any `verify:` conditions or test cases that are not fully met.
|
|
82
|
-
Write `None` if everything is satisfied.
|
|
83
|
-
|
|
84
|
-
- [ ] [Gap description — what is missing or incorrect]
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Recommendation
|
|
89
|
-
|
|
90
|
-
[Approve — all criteria met]
|
|
91
|
-
[Request fixes — list the gaps that must be resolved before approval]
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Constraints
|
|
97
|
-
|
|
98
|
-
- Do not write or modify any code in this phase
|
|
99
|
-
- Do not mark gaps as acceptable — report them, even if minor
|
|
100
|
-
- If a test case cannot be verified from static code analysis alone, flag it explicitly:
|
|
101
|
-
`⚠️ Requires runtime verification — cannot confirm from code alone`
|
|
102
|
-
- After delivering VALIDATION.md, **wait for developer review**
|
|
103
|
-
- If gaps are found and fixed, a new Validate session must be run — do not reuse this report
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
kind: procedure
|
|
4
|
+
phase: validate
|
|
5
|
+
description: Verify actual behavior and record execution tied to the tested inputs.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Validate
|
|
9
|
+
|
|
10
|
+
Choose partial feedback or final verification explicitly. Pending tasks do not block partial verification.
|
|
11
|
+
Review the requirement-to-acceptance links and actual test assertions, failure cases and relevant integrations.
|
|
12
|
+
Compare available baseline results with the changed behavior and affected consumers. Identify pre-existing issues
|
|
13
|
+
without silently weakening required acceptance, changing expected results, or expanding scope into unrelated repairs.
|
|
14
|
+
Inspect the diff, existing work and untracked files; do not attribute unrelated changes to this spec without evidence.
|
|
15
|
+
|
|
16
|
+
Run sdd verify ID --scope partial for diagnostic feedback or sdd verify ID for the final check.
|
|
17
|
+
The CLI executes only the configured commands. It records exit codes, timeouts, logs and an input digest.
|
|
18
|
+
A failed required command fails verification. Advisory failures remain visible warnings.
|
|
19
|
+
External commands are skipped unless --run-external is explicitly authorized. An unexecuted case remains unverified.
|
|
20
|
+
|
|
21
|
+
For manual/inspection cases, run sdd evidence ID to create a template for current inputs.
|
|
22
|
+
Execute the scenario or inspect the relevant code, then record result, by, at and notes in EVIDENCE.json.
|
|
23
|
+
Reference supporting artifacts when available. Run sdd verify ID --evidence PATH.
|
|
24
|
+
A manual case can pass; its method and result are separate fields.
|
|
25
|
+
If inputs changed, regenerate evidence and repeat affected checks rather than reusing an old result.
|
|
26
|
+
The evidence command preserves existing files and returns a new path when necessary; use that path with --evidence.
|
|
27
|
+
|
|
28
|
+
During validation, preserve the code and contract under review. Report fixes for implementation and rerun verification after fixes.
|
|
29
|
+
Tests may produce expected artifacts in an isolated environment; they are not intrinsically read-only.
|
|
30
|
+
Do not run production operations or install dependencies merely to satisfy validation.
|
|
31
|
+
|
|
32
|
+
Separate attribution, severity and impact on the intended delivery. Keep scope controlled while escalating findings
|
|
33
|
+
that compromise the delivery, even when their origin predates this change.
|
|
34
|
+
A passing receipt records execution and declared links; it does not prove that every assertion matches the intended behavior.
|
|
35
|
+
|
|
36
|
+
For unavailable environments follow quality.md and sdd handoff ID. Fill the generated JSON and run
|
|
37
|
+
sdd verify ID --handoff PATH. USER_TESTS.md contains the recorded steps and safety constraints.
|
|
38
|
+
A full limited result permits implementation closure while retaining pending verification; it never means passed external tests.
|
|
39
|
+
If no safe test is possible without production side effects, record unavailable and the condition for resuming.
|
|
40
|
+
Known failures for the same inputs remain failures when evidence or external execution is omitted later.
|
|
@@ -1,29 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
- `agents/RULES.md`
|
|
13
|
-
- `agents/specs/<SPEC_NUMBER>/SPEC.md`
|
|
14
|
-
- `agents/specs/<SPEC_NUMBER>/TASK.md`
|
|
15
|
-
- `agents/specs/<SPEC_NUMBER>/PROGRESS.md`
|
|
16
|
-
- `agents/skills/<SKILL_NAME>/SKILL.md`
|
|
17
|
-
|
|
18
|
-
Now implement ONLY the task: `<TASK_ID>`
|
|
19
|
-
|
|
20
|
-
Use the skill as the mandatory pattern source for this task.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Rules
|
|
25
|
-
|
|
26
|
-
- Do not run git commands
|
|
27
|
-
- Do not add comments or documentation unless explicitly required by the skill
|
|
28
|
-
- Update PROGRESS.md upon completion
|
|
29
|
-
- Stop and wait for confirmation before the next task
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
kind: utility
|
|
4
|
+
description: Apply a selected project skill during the canonical implementation procedure.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Apply a skill
|
|
8
|
+
|
|
9
|
+
Use sdd skills list to discover metadata, then sdd skills show NAME for the selected body.
|
|
10
|
+
Follow rpi-implement.md for the requested spec/task. A skill does not bypass scope approval,
|
|
11
|
+
execution permissions or verification. Read referenced resources only when they are relevant.
|
|
@@ -1,42 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Task generation rules
|
|
17
|
-
|
|
18
|
-
- One task = one file created or modified, or one isolated function
|
|
19
|
-
- Order must respect dependencies:
|
|
20
|
-
- Schema / config → data access → business logic → routing → UI
|
|
21
|
-
- Tasks that are consumed by other tasks must come first
|
|
22
|
-
- No task should have a circular dependency on another
|
|
23
|
-
- Each task must be independently reviewable and verifiable
|
|
24
|
-
|
|
25
|
-
## Required format
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
# TASK — [Feature Name]
|
|
29
|
-
|
|
30
|
-
## Tasks
|
|
31
|
-
|
|
32
|
-
- [ ] T01 — [Verb + object + target file] (e.g. Add User schema to config module)
|
|
33
|
-
- [ ] T02 — ...
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Preferred verbs
|
|
37
|
-
|
|
38
|
-
`Add`, `Create`, `Implement`, `Update`, `Extract`, `Register`, `Remove`, `Move`
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
**After generating TASK.md, stop and wait for approval before implementing.**
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
kind: utility
|
|
4
|
+
description: Revise the canonical task plan without maintaining a parallel format.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Revise tasks
|
|
8
|
+
|
|
9
|
+
Follow rpi-plan.md and the existing SPEC.md contract.
|
|
10
|
+
Preserve task IDs. Use canonical TASK.md front matter with title, status, covers, depends_on and verify.
|
|
11
|
+
Add cohesive verifiable tasks rather than a task per file. Do not duplicate status in PROGRESS.md.
|
|
12
|
+
Changes to the normative task plan invalidate scope approval. Run sdd check, explain the change
|
|
13
|
+
and record actual user authorization for the revised scope before implementation when required.
|
|
@@ -1,37 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
[Correct approach with code examples from this project's stack]
|
|
13
|
-
|
|
14
|
-
```language
|
|
15
|
-
// example
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Anti-patterns
|
|
21
|
-
|
|
22
|
-
| Anti-pattern | Why to avoid |
|
|
23
|
-
|---|---|
|
|
24
|
-
| [What NOT to do] | [Reason] |
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Constraints
|
|
29
|
-
|
|
30
|
-
- [Hard rule specific to this capability]
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Checklist
|
|
35
|
-
|
|
36
|
-
- [ ] [Item the agent must verify before finishing a task using this skill]
|
|
37
|
-
- [ ] [Another verification item]
|
|
1
|
+
---
|
|
2
|
+
name: project-capability
|
|
3
|
+
description: Describe the recurring procedure and the specific task types that should activate it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project capability
|
|
7
|
+
|
|
8
|
+
Replace the name and rename the containing folder to match it.
|
|
9
|
+
State the necessary procedure, project-specific constraints and observable completion checks.
|
|
10
|
+
Link longer examples, scripts or domain references relative to this directory.
|
|
11
|
+
Keep discovery conditions in description, not in an arbitrary body excerpt.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# guard-delete.sh
|
|
3
|
-
# Asks for confirmation before running destructive delete commands (rm -rf, rm -r, rm -f).
|
|
4
|
-
# Exit 0 = allow | Exit 2 = block (Claude Code convention)
|
|
5
|
-
|
|
6
|
-
INPUT=$(cat)
|
|
7
|
-
|
|
8
|
-
COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
|
|
9
|
-
|
|
10
|
-
# Intercept rm with recursive or force flags
|
|
11
|
-
if echo "$COMMAND" | grep -qE "rm\s+(-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)"; then
|
|
12
|
-
echo "⚠️ Agent wants to run: $COMMAND" >&2
|
|
13
|
-
read -r -p "Allow destructive delete? [y/N] " response < /dev/tty
|
|
14
|
-
if [[ "$response" =~ ^[Yy]$ ]]; then
|
|
15
|
-
exit 0
|
|
16
|
-
else
|
|
17
|
-
echo "Blocked by guard-delete.sh" >&2
|
|
18
|
-
exit 2
|
|
19
|
-
fi
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
exit 0
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# guard-deps.sh
|
|
3
|
-
# Asks for confirmation before installing new packages.
|
|
4
|
-
# Reinforces R08: no new dependency without justification in DECISIONS.md.
|
|
5
|
-
# Exit 0 = allow | Exit 2 = block (Claude Code convention)
|
|
6
|
-
|
|
7
|
-
INPUT=$(cat)
|
|
8
|
-
|
|
9
|
-
COMMAND=$(echo "$INPUT" | grep -o '"command":"[^"]*"' | head -1 | sed 's/"command":"//;s/"//')
|
|
10
|
-
|
|
11
|
-
# Intercept install commands that add NEW packages (not bare installs like "npm install" with no args)
|
|
12
|
-
if echo "$COMMAND" | grep -qE "^(npm install|npm i|yarn add|pnpm add|bun add) .+" || \
|
|
13
|
-
echo "$COMMAND" | grep -qE "^(pip install|pip3 install|uv add) .+"; then
|
|
14
|
-
echo "⚠️ Agent wants to install a new dependency: $COMMAND" >&2
|
|
15
|
-
echo " Remember: R08 requires justification in DECISIONS.md before adding packages." >&2
|
|
16
|
-
read -r -p "Allow? [y/N] " response < /dev/tty
|
|
17
|
-
if [[ "$response" =~ ^[Yy]$ ]]; then
|
|
18
|
-
exit 0
|
|
19
|
-
else
|
|
20
|
-
echo "Blocked by guard-deps.sh" >&2
|
|
21
|
-
exit 2
|
|
22
|
-
fi
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
exit 0
|