sdtk-spec-kit 0.3.13 → 0.3.14
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/assets/manifest/toolkit-bundle.manifest.json +44 -39
- package/assets/manifest/toolkit-bundle.sha256.txt +19 -18
- package/assets/toolkit/toolkit/README.md +3 -2
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +8 -2
- package/assets/toolkit/toolkit/scripts/agents/run-claude-task.ps1 +110 -51
- package/assets/toolkit/toolkit/scripts/agents/run-codex-task.ps1 +102 -43
- package/assets/toolkit/toolkit/scripts/agents/validate-mailbox-formal-artifact.py +87 -0
- package/assets/toolkit/toolkit/scripts/generate-code-handoff.ps1 +9 -0
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +7 -0
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +1 -0
- package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +5 -4
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +22 -13
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +9 -1
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +1 -0
- package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +5 -4
- package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +9 -0
- package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +140 -0
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md +26 -0
- package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +2 -2
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md +12 -8
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +6 -2
- package/package.json +48 -48
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import re
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
PHASE_RULES = {
|
|
9
|
+
'controller-dev-review': {
|
|
10
|
+
'filename': re.compile(r'^SDTK_BK\d{3}_CONTROLLER_DEV_REVIEW_R\d+_\d{8}\.md$'),
|
|
11
|
+
'verdicts': {
|
|
12
|
+
'APPROVED FOR QA HANDOFF',
|
|
13
|
+
'CHANGES REQUIRED BEFORE QA',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
'qa-review': {
|
|
17
|
+
'filename': re.compile(r'^SDTK_BK\d{3}_QA_CHECKPOINT_REPORT_R\d+_\d{8}\.md$'),
|
|
18
|
+
'verdicts': {
|
|
19
|
+
'APPROVED FOR CONTROLLER ACCEPTANCE',
|
|
20
|
+
'CHANGES REQUIRED BEFORE CONTROLLER ACCEPTANCE',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
'controller-acceptance': {
|
|
24
|
+
'filename': re.compile(r'^SDTK_BK\d{3}_CONTROLLER_ACCEPTANCE_R\d+_\d{8}\.md$'),
|
|
25
|
+
'verdicts': {
|
|
26
|
+
'APPROVED FOR COMMIT-READY STATE',
|
|
27
|
+
'NOT APPROVED FOR COMMIT-READY STATE',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
FORBIDDEN_TOKENS = (
|
|
33
|
+
'QA_REVIEW',
|
|
34
|
+
'APPROVED FOR CLOSE',
|
|
35
|
+
)
|
|
36
|
+
PHASE_RE = re.compile(r'(?mi)^(?:\*\*Phase:\*\*|Phase:)\s*`?([a-z\-]+)`?\s*$')
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def main() -> int:
|
|
40
|
+
parser = argparse.ArgumentParser(description='Validate canonical mailbox review artifact naming and verdict vocabulary.')
|
|
41
|
+
parser.add_argument('--phase', required=True, choices=sorted(PHASE_RULES.keys()))
|
|
42
|
+
parser.add_argument('--artifact', required=True, type=Path)
|
|
43
|
+
args = parser.parse_args()
|
|
44
|
+
|
|
45
|
+
artifact = args.artifact.resolve()
|
|
46
|
+
if not artifact.exists():
|
|
47
|
+
print(f'[FAIL] mailbox-artifact-check missing artifact: {artifact}')
|
|
48
|
+
return 1
|
|
49
|
+
|
|
50
|
+
rule = PHASE_RULES[args.phase]
|
|
51
|
+
failures: list[str] = []
|
|
52
|
+
if not rule['filename'].match(artifact.name):
|
|
53
|
+
failures.append(
|
|
54
|
+
f'Artifact name {artifact.name} does not match canonical filename family for phase {args.phase}.'
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
text = artifact.read_text(encoding='utf-8', errors='replace')
|
|
58
|
+
|
|
59
|
+
phase_match = PHASE_RE.search(text)
|
|
60
|
+
if not phase_match:
|
|
61
|
+
failures.append('Artifact does not declare a Phase line.')
|
|
62
|
+
elif phase_match.group(1).strip() != args.phase:
|
|
63
|
+
failures.append(
|
|
64
|
+
f'Artifact phase {phase_match.group(1).strip()} does not match expected phase {args.phase}.'
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
if not any(verdict in text for verdict in rule['verdicts']):
|
|
68
|
+
failures.append(
|
|
69
|
+
'Artifact does not contain a canonical verdict phrase for the selected phase.'
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
forbidden_hits = [token for token in FORBIDDEN_TOKENS if token in text or token in artifact.name]
|
|
73
|
+
if forbidden_hits:
|
|
74
|
+
failures.append('Artifact contains forbidden legacy tokens: ' + ', '.join(forbidden_hits))
|
|
75
|
+
|
|
76
|
+
if failures:
|
|
77
|
+
print('[FAIL] mailbox-artifact-check failed:')
|
|
78
|
+
for failure in failures:
|
|
79
|
+
print(f'- {failure}')
|
|
80
|
+
return 1
|
|
81
|
+
|
|
82
|
+
print(f'[OK] mailbox-artifact-check passed for {artifact.name} ({args.phase})')
|
|
83
|
+
return 0
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
if __name__ == '__main__':
|
|
87
|
+
sys.exit(main())
|
|
@@ -132,6 +132,15 @@ function Assert-RequiredRefCoverage {
|
|
|
132
132
|
throw "Implementation slices reference flow scope, so required_refs must include docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md."
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
+
|
|
136
|
+
if ($sliceText -match '\b(workflow|state|transition|approval|policy|actor|permission|role)\b') {
|
|
137
|
+
if (-not ($RequiredRefs | Where-Object { $_ -like 'docs/specs/*_FLOW_ACTION_SPEC.md' })) {
|
|
138
|
+
throw "Implementation slices reference workflow or state-transition scope, so required_refs must include docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md."
|
|
139
|
+
}
|
|
140
|
+
if (-not ($RequiredRefs | Where-Object { $_ -like 'docs/database/*' })) {
|
|
141
|
+
throw "Implementation slices reference workflow or state-transition scope, so required_refs must include at least one docs/database/* source."
|
|
142
|
+
}
|
|
143
|
+
}
|
|
135
144
|
}
|
|
136
145
|
|
|
137
146
|
function Get-ImpactMap {
|
|
@@ -22,6 +22,13 @@ The condensed package is a DRAFT accelerator only. All derived actors, entities,
|
|
|
22
22
|
rules, and acceptance criteria require human review before adoption. Do not treat
|
|
23
23
|
draft content as authoritative without explicit PM or maintainer confirmation.
|
|
24
24
|
|
|
25
|
+
For approval/workflow domain packages, the condensed package also includes a
|
|
26
|
+
Role Matrix, State Set, State Transitions, and Policy And Approval Rules
|
|
27
|
+
sections. When producing BR-xx and UC-xx items in BA_SPEC, read these sections
|
|
28
|
+
alongside the Actors and Workflow Entities sections. Any unresolved open
|
|
29
|
+
questions from the Open Questions For Human Review section must be carried
|
|
30
|
+
forward as explicit OQ-xx items in BA_SPEC rather than silently resolved.
|
|
31
|
+
|
|
25
32
|
## Process
|
|
26
33
|
1. Read `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md` and any source requirements.
|
|
27
34
|
2. Produce:
|
|
@@ -43,6 +43,7 @@ Use them only when the user explicitly requests a manual legacy review or delega
|
|
|
43
43
|
- If an existing `CODE_HANDOFF_*` file is non-canonical, regenerate it with the script and `-Force` instead of editing keys by hand.
|
|
44
44
|
- Use the script-owned snake_case contract only. Do not emit legacy camelCase keys such as `featureKey`, `requiredRefs`, `optionalRefs`, `openBlockers`, `implementationSlices`, `testObligations`, or `suggestedNextCommand`.
|
|
45
45
|
- Current canonical emission is schema `0.2`; the generator auto-derives `impact_map` from the current handoff refs and may include optional `recovery_notes`.
|
|
46
|
+
- For approval/workflow features, follow `toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md` as the authoritative domain note. Keep state-machine-first slice ordering, populate workflow `impact_map` refs explicitly, cover all four workflow test-obligation categories, and carry unresolved workflow `OQ-xx` items as `open_blockers` instead of hiding them.
|
|
46
47
|
7. Mirror the same readiness decision in the final `SDTK-CODE Handoff` section of `FEATURE_IMPL_PLAN`.
|
|
47
48
|
- Do not copy placeholder `UPDATE_ME` commands from `sdtk-spec.config.json` into the handoff plan as if they were executable proof.
|
|
48
49
|
8. After CODE_HANDOFF is generated and the feature has been implemented and verified by SDTK-CODE,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---
|
|
1
|
+
---
|
|
2
2
|
name: sdtk-mailbox-dispatch
|
|
3
3
|
description: Controller-owned mailbox delegation for SDTK-SPEC. Use when PM or Orchestrator needs to assign a bounded phase to Claude or Codex, preserve exact include/exclude boundaries, review raw reports against formal artifacts, and run a mandatory post-issue mailbox retrospective.
|
|
4
4
|
---
|
|
@@ -42,8 +42,9 @@ Read these shipped toolkit surfaces before dispatching or reviewing a run:
|
|
|
42
42
|
3. Write the task packet with exact boundary truth, boundary mode, carryover findings, formal artifact write expectation, an explicit runtime-stall budget plus fallback trigger, and a clear closeout mode (`full-issue` or `phase-only`).
|
|
43
43
|
4. Dispatch through the mailbox launcher into `governance/ai/agent-mailbox/runtime/...`.
|
|
44
44
|
5. Review the raw report against git truth and the formal artifact on disk. Prefer the formal artifact when console output is lossy.
|
|
45
|
-
6.
|
|
46
|
-
7.
|
|
45
|
+
6. For `controller-dev-review`, `qa-review`, and `controller-acceptance`, keep the primary formal artifact on the canonical filename family and canonical verdict vocabulary for that phase. The launcher validates `toolkit/scripts/agents/validate-mailbox-formal-artifact.py` automatically when the artifact exists.
|
|
46
|
+
7. Promote only approved code/docs/tests/artifacts into tracked paths.
|
|
47
|
+
8. Run a default post-issue retrospective before the next mailbox-driven issue:
|
|
47
48
|
- update the mailbox contract/spec if a real new lesson appeared
|
|
48
49
|
- otherwise record `no new mailbox lessons` in the closeout summary
|
|
49
50
|
|
|
@@ -67,4 +68,4 @@ Read these shipped toolkit surfaces before dispatching or reviewing a run:
|
|
|
67
68
|
4. `qa-review`
|
|
68
69
|
5. `controller-acceptance`
|
|
69
70
|
6. `commit/push`
|
|
70
|
-
7. `post-issue-retrospective`
|
|
71
|
+
7. `post-issue-retrospective`
|
|
@@ -39,19 +39,28 @@ The condensed package is a DRAFT accelerator only. It seeds PM initiation; it
|
|
|
39
39
|
does not replace PM or BA judgment. Deliver the condensed output as:
|
|
40
40
|
`docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
For approval/workflow domain briefs, apply the Approval/Workflow Domain
|
|
43
|
+
Extension defined in the template. The extended condensed package must include
|
|
44
|
+
the Role Matrix, State Set, State Transitions, and Policy And Approval Rules
|
|
45
|
+
sections, plus an Open Questions For Human Review section in place of the
|
|
46
|
+
standard Gaps section. Gate H3 (Policy Open Questions Review) applies to all
|
|
47
|
+
approval/workflow condensed outputs and requires explicit PM or maintainer review
|
|
48
|
+
of all open policy questions before the SPEC phase proceeds. Open questions must
|
|
49
|
+
not be silently dropped.
|
|
50
|
+
|
|
51
|
+
## Optional: Mailbox Delegation
|
|
52
|
+
|
|
53
|
+
Use `sdtk-mailbox-dispatch` when PM needs bounded external-agent help without
|
|
54
|
+
opening a full orchestration platform loop.
|
|
55
|
+
|
|
56
|
+
Rules:
|
|
57
|
+
- keep PM planning local when the controller already has enough context
|
|
58
|
+
- delegate only one bounded phase at a time with exact include/exclude truth
|
|
59
|
+
- prefer Claude for controller-spec, wording-heavy review, and SDTK-SPEC shaping
|
|
60
|
+
- prefer Codex for code, tests, harness, or verification-heavy implementation
|
|
61
|
+
- review the formal artifact on disk before trusting raw console output
|
|
62
|
+
- keep governance/ai/agent-mailbox/runtime/ transient and out of feature commits
|
|
63
|
+
- run the post-issue mailbox retrospective before the next mailbox-driven issue
|
|
55
64
|
## Phase 6 Closure Truth
|
|
56
65
|
- Review the final QA and controller decisions before closing the issue.
|
|
57
66
|
- Treat `SHARED_PLANNING.md`, `QUALITY_CHECKLIST.md`, and `governance/ai/core/IMPROVEMENT_BACKLOG.md` as closure-state surfaces that must stay synchronized.
|
|
@@ -40,7 +40,15 @@ alongside `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`. The package is at:
|
|
|
40
40
|
`docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
41
41
|
|
|
42
42
|
The condensed package is a DRAFT accelerator only. All derived actors, entities,
|
|
43
|
-
rules, and acceptance criteria require human review before adoption.
|
|
43
|
+
rules, and acceptance criteria require human review before adoption. Do not treat
|
|
44
|
+
draft content as authoritative without explicit PM or maintainer confirmation.
|
|
45
|
+
|
|
46
|
+
For approval/workflow domain packages, the condensed package also includes a
|
|
47
|
+
Role Matrix, State Set, State Transitions, and Policy And Approval Rules
|
|
48
|
+
sections. When producing BR-xx and UC-xx items in BA_SPEC, read these sections
|
|
49
|
+
alongside the Actors and Workflow Entities sections. Any unresolved open
|
|
50
|
+
questions from the Open Questions For Human Review section must be carried
|
|
51
|
+
forward as explicit OQ-xx items in BA_SPEC rather than silently resolved.
|
|
44
52
|
|
|
45
53
|
## Process
|
|
46
54
|
1. Read `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md` and any source requirements.
|
|
@@ -52,6 +52,7 @@ If no arguments provided, read current feature context from SHARED_PLANNING.md.
|
|
|
52
52
|
- If an existing `CODE_HANDOFF_*` file is non-canonical, regenerate it with the script and `-Force` instead of editing keys by hand.
|
|
53
53
|
- Use the script-owned snake_case contract only. Do not emit legacy camelCase keys such as `featureKey`, `requiredRefs`, `optionalRefs`, `openBlockers`, `implementationSlices`, `testObligations`, or `suggestedNextCommand`.
|
|
54
54
|
- Current canonical emission is schema `0.2`; the generator auto-derives `impact_map` from the current handoff refs and may include optional `recovery_notes`.
|
|
55
|
+
- For approval/workflow features, follow `toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md` as the authoritative domain note. Keep state-machine-first slice ordering, populate workflow `impact_map` refs explicitly, cover all four workflow test-obligation categories, and carry unresolved workflow `OQ-xx` items as `open_blockers` instead of hiding them.
|
|
55
56
|
7. Update `SHARED_PLANNING.md` + `QUALITY_CHECKLIST.md` Phase 4.
|
|
56
57
|
8. If ready, suggest:
|
|
57
58
|
- `sdtk-code start --feature-key <KEY> --lane <feature|bugfix> --project-path .`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
---
|
|
1
|
+
---
|
|
2
2
|
name: mailbox-dispatch
|
|
3
3
|
description: Controller-owned mailbox delegation for SDTK-SPEC. Use when PM or Orchestrator needs to assign a bounded phase to Claude or Codex, preserve exact include/exclude boundaries, review raw reports against formal artifacts, and run a mandatory post-issue mailbox retrospective.
|
|
4
4
|
---
|
|
@@ -42,8 +42,9 @@ Read these shipped toolkit surfaces before dispatching or reviewing a run:
|
|
|
42
42
|
3. Write the task packet with exact boundary truth, boundary mode, carryover findings, formal artifact write expectation, an explicit runtime-stall budget plus fallback trigger, and a clear closeout mode (`full-issue` or `phase-only`).
|
|
43
43
|
4. Dispatch through the mailbox launcher into `governance/ai/agent-mailbox/runtime/...`.
|
|
44
44
|
5. Review the raw report against git truth and the formal artifact on disk. Prefer the formal artifact when console output is lossy.
|
|
45
|
-
6.
|
|
46
|
-
7.
|
|
45
|
+
6. For `controller-dev-review`, `qa-review`, and `controller-acceptance`, keep the primary formal artifact on the canonical filename family and canonical verdict vocabulary for that phase. The launcher validates `toolkit/scripts/agents/validate-mailbox-formal-artifact.py` automatically when the artifact exists.
|
|
46
|
+
7. Promote only approved code/docs/tests/artifacts into tracked paths.
|
|
47
|
+
8. Run a default post-issue retrospective before the next mailbox-driven issue:
|
|
47
48
|
- update the mailbox contract/spec if a real new lesson appeared
|
|
48
49
|
- otherwise record `no new mailbox lessons` in the closeout summary
|
|
49
50
|
|
|
@@ -67,4 +68,4 @@ Read these shipped toolkit surfaces before dispatching or reviewing a run:
|
|
|
67
68
|
4. `qa-review`
|
|
68
69
|
5. `controller-acceptance`
|
|
69
70
|
6. `commit/push`
|
|
70
|
-
7. `post-issue-retrospective`
|
|
71
|
+
7. `post-issue-retrospective`
|
|
@@ -59,6 +59,15 @@ stop and surface a boundary flag (Gate H1) rather than proceeding.
|
|
|
59
59
|
Deliver the condensed output as:
|
|
60
60
|
`docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
61
61
|
|
|
62
|
+
For approval/workflow domain briefs, apply the Approval/Workflow Domain
|
|
63
|
+
Extension defined in the template. The extended condensed package must include
|
|
64
|
+
the Role Matrix, State Set, State Transitions, and Policy And Approval Rules
|
|
65
|
+
sections, plus an Open Questions For Human Review section in place of the
|
|
66
|
+
standard Gaps section. Gate H3 (Policy Open Questions Review) applies to all
|
|
67
|
+
approval/workflow condensed outputs and requires explicit PM or maintainer review
|
|
68
|
+
of all open policy questions before the SPEC phase proceeds. Open questions must
|
|
69
|
+
not be silently dropped.
|
|
70
|
+
|
|
62
71
|
## Optional: Mailbox Delegation
|
|
63
72
|
|
|
64
73
|
Use `mailbox-dispatch` when PM needs bounded external-agent help without
|
|
@@ -123,6 +123,146 @@ that were not explicit in the brief. List them as numbered items.
|
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|
|
126
|
+
## Approval/Workflow Domain Extension
|
|
127
|
+
|
|
128
|
+
> **Use this extension only for approval/workflow domain briefs.**
|
|
129
|
+
> For service/request tracker and other non-approval/workflow domains, omit
|
|
130
|
+
> this section entirely.
|
|
131
|
+
>
|
|
132
|
+
> When the source brief describes a request-approval pattern (e.g., leave
|
|
133
|
+
> approval, purchase approval, access request), the condensed upstream output
|
|
134
|
+
> document must use a **flat eight-section structure** rather than the base
|
|
135
|
+
> six-section structure above. The output document begins with the same
|
|
136
|
+
> REQUIRES_HUMAN_REVIEW header, Input Statement, and Next Step blocks, but
|
|
137
|
+
> replaces all numbered sections with the eight sections below, numbered
|
|
138
|
+
> consecutively. Do not append these subsections after a completed base
|
|
139
|
+
> six-section document; instead, produce the approval/workflow flat structure
|
|
140
|
+
> as the single unified output document.
|
|
141
|
+
>
|
|
142
|
+
> Section mapping from base to approval/workflow flat structure:
|
|
143
|
+
> - Section 1 Actors: same content and purpose as base Section 1. No change.
|
|
144
|
+
> - Section 2 Role Matrix: new section. Supplements Section 1 Actors with a
|
|
145
|
+
> permission table. Must surface ambiguities rather than silently resolving
|
|
146
|
+
> them.
|
|
147
|
+
> - Section 3 Workflow Entities: replaces base Section 2 Entities. Same
|
|
148
|
+
> purpose but must include workflow-state-carrying fields explicitly.
|
|
149
|
+
> - Section 4 State Set: new section. Makes the workflow state machine
|
|
150
|
+
> explicit with named states and terminal flags.
|
|
151
|
+
> - Section 5 State Transitions: new section. Lists all allowed and blocked
|
|
152
|
+
> transitions with guard conditions and policy constraints.
|
|
153
|
+
> - Section 6 Policy And Approval Rules: replaces base Section 5 Business
|
|
154
|
+
> Rules. Same DRAFT-labelled purpose; approval-specific rule set.
|
|
155
|
+
> - Section 7 Screens And Interaction Points: replaces base Sections 3 and 4
|
|
156
|
+
> (Screen Candidates and Flows). For approval/workflow domains, named
|
|
157
|
+
> screens and interaction points provide sufficient upstream structure.
|
|
158
|
+
> - Section 8 Draft Acceptance Criteria: same as base Section 6 but the last
|
|
159
|
+
> column header is "Linked Transition" (not "Linked Flow") because criteria
|
|
160
|
+
> anchor to state transitions rather than named flows in this domain.
|
|
161
|
+
> - Open Questions For Human Review: replaces the base Gaps section. Must
|
|
162
|
+
> surface unresolved policy items explicitly with phase-owner tagging.
|
|
163
|
+
>
|
|
164
|
+
> Gate H3 (Policy Open Questions Review): all open questions in the Open
|
|
165
|
+
> Questions section must be reviewed by the PM or maintainer before the SPEC
|
|
166
|
+
> phase proceeds. Each question must be resolved with an explicit decision or
|
|
167
|
+
> carried forward as a named OQ-xx item into the BA_SPEC phase. Questions
|
|
168
|
+
> must not be silently dropped.
|
|
169
|
+
>
|
|
170
|
+
> For approval/workflow outputs, replace the generic Next Step instruction
|
|
171
|
+
> "Resolve all gaps listed above" with explicit review and resolution of the
|
|
172
|
+
> Open Questions For Human Review section under Gate H3.
|
|
173
|
+
|
|
174
|
+
### 2. Role Matrix
|
|
175
|
+
|
|
176
|
+
> A table mapping each actor to their permitted actions within the workflow.
|
|
177
|
+
> Mark each cell as YES, NO, or POLICY (permission depends on a configurable
|
|
178
|
+
> rule not fully specified in the brief). Surface any permission ambiguity;
|
|
179
|
+
> do not silently resolve it. At least one POLICY-tagged cell or one open
|
|
180
|
+
> question must appear if the brief does not fully specify all permissions.
|
|
181
|
+
|
|
182
|
+
| Actor | Can Submit | Can Approve | Can Reject | Can Request Revision | Can Resubmit | Can Delegate | Can Admin-Configure |
|
|
183
|
+
|-------|-----------|-------------|------------|---------------------|-------------|-------------|---------------------|
|
|
184
|
+
| Add actor rows here | YES / NO / POLICY | YES / NO / POLICY | YES / NO / POLICY | YES / NO / POLICY | YES / NO / POLICY | YES / NO / POLICY | YES / NO / POLICY |
|
|
185
|
+
|
|
186
|
+
### 3. Workflow Entities
|
|
187
|
+
|
|
188
|
+
> Named data entities with key attributes at summary level. Must include
|
|
189
|
+
> workflow-state-carrying fields explicitly. Minimum: Request entity (with
|
|
190
|
+
> state attribute), Submitter entity, Approver entity, WorkflowState entity
|
|
191
|
+
> or enumeration. No full normalized data model required at this stage.
|
|
192
|
+
|
|
193
|
+
| Entity | Key Attributes | Relationships |
|
|
194
|
+
|--------|----------------|---------------|
|
|
195
|
+
| Add entity rows here | Key attributes including state field | Relationship notes |
|
|
196
|
+
|
|
197
|
+
### 4. State Set
|
|
198
|
+
|
|
199
|
+
> An explicit named list of all workflow states the Request entity can occupy.
|
|
200
|
+
> Each state must have a name, brief description, responsible actor, and a
|
|
201
|
+
> terminal flag (YES or NO). Minimum required states: Draft, Submitted, Under
|
|
202
|
+
> Review, Approved (terminal: YES), Rejected, Revision Required.
|
|
203
|
+
|
|
204
|
+
| State | Description | Responsible Actor | Terminal |
|
|
205
|
+
|-------|-------------|------------------|----------|
|
|
206
|
+
| Add state rows here | One-line description | Actor responsible at this state | YES / NO |
|
|
207
|
+
|
|
208
|
+
### 5. State Transitions
|
|
209
|
+
|
|
210
|
+
> An explicit named list of allowed state transitions. Each transition must
|
|
211
|
+
> have: from-state, to-state, triggering actor, triggering action, and any
|
|
212
|
+
> guard condition or policy constraint. Mark policy-dependent transitions as
|
|
213
|
+
> POLICY and flag for human review. Explicitly list blocked transitions with
|
|
214
|
+
> the block reason.
|
|
215
|
+
|
|
216
|
+
| From State | To State | Triggering Actor | Triggering Action | Guard / Constraint |
|
|
217
|
+
|-----------|----------|-----------------|------------------|-------------------|
|
|
218
|
+
| Add transition rows here | | | | |
|
|
219
|
+
|
|
220
|
+
### 6. Policy And Approval Rules (DRAFT)
|
|
221
|
+
|
|
222
|
+
> All rules below are DRAFT and require human review before adoption. These
|
|
223
|
+
> rules govern approval logic, delegation, escalation, and boundary conditions.
|
|
224
|
+
> Each rule must carry the DRAFT label.
|
|
225
|
+
|
|
226
|
+
| ID | Rule | DRAFT |
|
|
227
|
+
|----|------|-------|
|
|
228
|
+
| APR-D01 | Add derived approval policy rule | DRAFT |
|
|
229
|
+
|
|
230
|
+
### 7. Screens And Interaction Points
|
|
231
|
+
|
|
232
|
+
> Named candidate screens and interaction points with one-sentence purpose,
|
|
233
|
+
> mapped to at least one actor. This replaces the base Screen Candidates and
|
|
234
|
+
> Flows sections for approval/workflow domains. Minimum required screens:
|
|
235
|
+
> Submit Request Form, Submitter Status View, Approver Work Queue, Request
|
|
236
|
+
> Detail with Action Panel, Revision Detail View.
|
|
237
|
+
|
|
238
|
+
| Screen | Purpose | Primary Actor |
|
|
239
|
+
|--------|---------|---------------|
|
|
240
|
+
| Add candidate screen rows here | One-sentence purpose | Actor |
|
|
241
|
+
|
|
242
|
+
### 8. Draft Acceptance Criteria (DRAFT)
|
|
243
|
+
|
|
244
|
+
> All criteria below are DRAFT and require human review before adoption.
|
|
245
|
+
> Express in Given/When/Then form. The last column is "Linked Transition"
|
|
246
|
+
> because criteria anchor to state transitions in this domain.
|
|
247
|
+
|
|
248
|
+
| ID | Given | When | Then | Linked Transition |
|
|
249
|
+
|----|-------|------|------|------------------|
|
|
250
|
+
| AC-D01 | Precondition | Action | Expected result | Transition name |
|
|
251
|
+
|
|
252
|
+
### Open Questions For Human Review
|
|
253
|
+
|
|
254
|
+
> Use this section instead of the standard Gaps section for approval/workflow
|
|
255
|
+
> domain condensed packages. Each open question must be numbered, described in
|
|
256
|
+
> one sentence, and tagged with the phase that owns resolution (PM or BA). At
|
|
257
|
+
> least two unresolved policy questions must appear if the brief does not
|
|
258
|
+
> explicitly answer quorum rules and delegation rules.
|
|
259
|
+
|
|
260
|
+
| ID | Open Question | Phase Owner |
|
|
261
|
+
|----|--------------|-------------|
|
|
262
|
+
| OQ-01 | Describe an unresolved policy or domain question | PM / BA |
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
126
266
|
## Next Step
|
|
127
267
|
|
|
128
268
|
After human review of this document:
|
|
@@ -28,6 +28,32 @@ Current canonical generator output is schema `0.2`; downstream `SDTK-CODE` still
|
|
|
28
28
|
- test obligations are implementation-ready acceptance mapping statements, not vague labels.
|
|
29
29
|
- suggested next command appears only when the handoff status is `READY_FOR_SDTK_CODE`.
|
|
30
30
|
|
|
31
|
+
## Workflow-Domain Guidance (Approval/Workflow Features Only)
|
|
32
|
+
Use this section only when the current feature includes approval states, state transitions, role-based gates, or policy-sensitive workflow behavior.
|
|
33
|
+
|
|
34
|
+
- Keep `implementation_slices` in state-machine-first order. The recommended seven-slice pattern is:
|
|
35
|
+
1. workflow state machine and domain invariants
|
|
36
|
+
2. API and transition contracts
|
|
37
|
+
3. RBAC and actor-to-transition permissions
|
|
38
|
+
4. transition guards and policy enforcement
|
|
39
|
+
5. submitter-facing UI
|
|
40
|
+
6. approver-facing UI
|
|
41
|
+
7. downstream integration or notification hooks
|
|
42
|
+
- Populate all four `impact_map` keys (`api_refs`, `database_refs`, `ui_refs`, `flow_refs`) with concrete refs when they exist. If `database_refs` is missing for a workflow-domain handoff, carry that gap as an explicit `open_blocker`. For other intentionally absent surfaces, make the gap explicit in planning notes instead of leaving the surface implied.
|
|
43
|
+
- Write `test_obligations` that cover all four workflow categories:
|
|
44
|
+
- valid positive transitions
|
|
45
|
+
- blocked or invalid transitions
|
|
46
|
+
- role-permission boundaries
|
|
47
|
+
- policy-sensitive edge cases
|
|
48
|
+
- Add `recovery_notes` when the workflow has fragile coupling points, especially state-machine changes or cases where an unresolved OQ can invalidate current transition assumptions mid-implementation.
|
|
49
|
+
- Required source inputs for workflow-domain handoff authoring:
|
|
50
|
+
- `docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md`
|
|
51
|
+
- `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md`
|
|
52
|
+
- `docs/product/BACKLOG_[FEATURE_KEY].md`
|
|
53
|
+
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
|
|
54
|
+
- at least one `docs/database/*` source
|
|
55
|
+
- Carry unresolved workflow decisions that still affect implementation truth as `open_blockers`. Do not emit `READY_FOR_SDTK_CODE` if an unresolved `OQ-xx` still changes role permissions, transition legality, or policy outcome semantics.
|
|
56
|
+
|
|
31
57
|
## Forbidden Shortcuts
|
|
32
58
|
- Do not auto-run `sdtk-code` from `/dev`.
|
|
33
59
|
- Do not emit `READY_FOR_SDTK_CODE` with hidden blockers.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
- source requirement notes or attachments
|
|
6
6
|
- current `SHARED_PLANNING.md`
|
|
7
7
|
- (Optional) `docs/product/CONDENSED_UPSTREAM_INPUT_[FEATURE_KEY].md` if a
|
|
8
|
-
condensation step was run before PM initiation
|
|
8
|
+
condensation step was run before PM initiation. If present, BA must
|
|
9
9
|
read it alongside the Project Initiation doc. All condensed content is DRAFT
|
|
10
10
|
and requires human review before adoption.
|
|
11
11
|
|
|
@@ -27,4 +27,4 @@
|
|
|
27
27
|
- Feature: `[FEATURE_KEY]`
|
|
28
28
|
- PM scope summary: 3 to 7 bullets
|
|
29
29
|
- Known open questions: `OQ-xx` list or `None`
|
|
30
|
-
- Expected BA focus: rules, use cases, acceptance criteria, NFRs
|
|
30
|
+
- Expected BA focus: rules, use cases, acceptance criteria, NFRs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AGENT REPORT TEMPLATE
|
|
1
|
+
# AGENT REPORT TEMPLATE
|
|
2
2
|
1. Metadata
|
|
3
3
|
- Worker
|
|
4
4
|
- Runtime
|
|
@@ -19,28 +19,32 @@
|
|
|
19
19
|
- primary formal artifact path
|
|
20
20
|
- written by agent or controller fallback
|
|
21
21
|
- fallback reason when controller authored the artifact
|
|
22
|
-
6.
|
|
22
|
+
6. Phase Artifact Validation
|
|
23
|
+
- canonical filename pass or fail or skipped
|
|
24
|
+
- canonical verdict vocabulary pass or fail or skipped
|
|
25
|
+
- validator output summary or skip reason
|
|
26
|
+
7. Exact Verification Results
|
|
23
27
|
- <command> -> <result>
|
|
24
28
|
- <command> -> <result>
|
|
25
|
-
|
|
29
|
+
8. Boundary Truth
|
|
26
30
|
- included surfaces actually touched
|
|
27
31
|
- excluded surfaces not touched
|
|
28
32
|
- formal artifacts created
|
|
29
33
|
- boundary mode actually executed
|
|
30
34
|
- parent issue status after this batch (`DONE` | `IN_PROGRESS`)
|
|
31
|
-
|
|
35
|
+
9. Git Truth
|
|
32
36
|
- git status --short --untracked-files=all
|
|
33
37
|
- git diff --name-only
|
|
34
38
|
- git diff --cached --name-only
|
|
35
39
|
- git rev-parse HEAD
|
|
36
40
|
- git branch --show-current
|
|
37
|
-
|
|
41
|
+
10. Fallback Truth
|
|
38
42
|
- fallback trigger reached or not
|
|
39
43
|
- fallback path used or not
|
|
40
44
|
- stalled runtime diff accepted: yes or no
|
|
41
|
-
|
|
45
|
+
11. Blockers / Open Questions
|
|
42
46
|
- <item>
|
|
43
|
-
|
|
47
|
+
12. Ready State
|
|
44
48
|
- <ready / not ready>
|
|
45
49
|
- <reason>
|
|
46
|
-
- <next step>
|
|
50
|
+
- <next step>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# AGENT TASK TEMPLATE
|
|
1
|
+
# AGENT TASK TEMPLATE
|
|
2
2
|
Issue:
|
|
3
3
|
- <ISSUE_KEY> | <TITLE>
|
|
4
4
|
Runtime:
|
|
@@ -31,6 +31,10 @@ Boundary Mode:
|
|
|
31
31
|
- <canonical-only|canonical+distribution|other>
|
|
32
32
|
Primary Formal Artifact:
|
|
33
33
|
- <tracked artifact path that controller will trust first>
|
|
34
|
+
Canonical Review-Phase Artifact Rules:
|
|
35
|
+
- controller-dev-review => `SDTK_BK###_CONTROLLER_DEV_REVIEW_R#_YYYYMMDD.md` + `APPROVED FOR QA HANDOFF` or `CHANGES REQUIRED BEFORE QA`
|
|
36
|
+
- qa-review => `SDTK_BK###_QA_CHECKPOINT_REPORT_R#_YYYYMMDD.md` + `APPROVED FOR CONTROLLER ACCEPTANCE` or `CHANGES REQUIRED BEFORE CONTROLLER ACCEPTANCE`
|
|
37
|
+
- controller-acceptance => `SDTK_BK###_CONTROLLER_ACCEPTANCE_R#_YYYYMMDD.md` + `APPROVED FOR COMMIT-READY STATE` or `NOT APPROVED FOR COMMIT-READY STATE`
|
|
34
38
|
Carryover Findings / Fixed Truth To Preserve:
|
|
35
39
|
- <prior blocker ID or prior approved truth>
|
|
36
40
|
- <prior blocker ID or prior approved truth>
|
|
@@ -56,4 +60,4 @@ Return Format:
|
|
|
56
60
|
5. exact verification results
|
|
57
61
|
6. boundary truth
|
|
58
62
|
7. blockers or open questions
|
|
59
|
-
8. explicit readiness statement
|
|
63
|
+
8. explicit readiness statement
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sdtk-spec-kit",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "SDTK-SPEC CLI toolkit for deterministic software documentation workflows via the sdtk-spec command",
|
|
5
|
-
"bin": {
|
|
6
|
-
"sdtk-spec": "
|
|
7
|
-
},
|
|
8
|
-
"main": "src/index.js",
|
|
9
|
-
"type": "commonjs",
|
|
10
|
-
"files": [
|
|
11
|
-
"bin/",
|
|
12
|
-
"src/",
|
|
13
|
-
"assets/"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "npm run verify:payload && npm run pack:smoke",
|
|
17
|
-
"build:payload": "powershell -ExecutionPolicy Bypass -File scripts/sync-toolkit-assets.ps1 && powershell -ExecutionPolicy Bypass -File scripts/build-toolkit-manifest.ps1",
|
|
18
|
-
"verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
|
|
19
|
-
"pack:smoke": "npm pack --dry-run",
|
|
20
|
-
"pack:release": "npm pack",
|
|
21
|
-
"prepublishOnly": "node -e \"require('./src/lib/toolkit-payload').verify()\""
|
|
22
|
-
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=18.13.0"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"sdtk",
|
|
28
|
-
"sdtk-spec",
|
|
29
|
-
"sdtk-spec-kit",
|
|
30
|
-
"cli",
|
|
31
|
-
"documentation",
|
|
32
|
-
"toolkit",
|
|
33
|
-
"dockkit"
|
|
34
|
-
],
|
|
35
|
-
"license": "MIT",
|
|
36
|
-
"repository": {
|
|
37
|
-
"type": "git",
|
|
38
|
-
"url": "https://github.com/codexsdtk/sdtk-toolkit.git",
|
|
39
|
-
"directory": "products/sdtk-spec/distribution/sdtk-spec-kit"
|
|
40
|
-
},
|
|
41
|
-
"homepage": "https://agenttoolkits.dev",
|
|
42
|
-
"bugs": {
|
|
43
|
-
"url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
|
|
44
|
-
},
|
|
45
|
-
"publishConfig": {
|
|
46
|
-
"access": "public"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sdtk-spec-kit",
|
|
3
|
+
"version": "0.3.14",
|
|
4
|
+
"description": "SDTK-SPEC CLI toolkit for deterministic software documentation workflows via the sdtk-spec command",
|
|
5
|
+
"bin": {
|
|
6
|
+
"sdtk-spec": "bin/sdtk.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "src/index.js",
|
|
9
|
+
"type": "commonjs",
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/",
|
|
12
|
+
"src/",
|
|
13
|
+
"assets/"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "npm run verify:payload && npm run pack:smoke",
|
|
17
|
+
"build:payload": "powershell -ExecutionPolicy Bypass -File scripts/sync-toolkit-assets.ps1 && powershell -ExecutionPolicy Bypass -File scripts/build-toolkit-manifest.ps1",
|
|
18
|
+
"verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
|
|
19
|
+
"pack:smoke": "npm pack --dry-run",
|
|
20
|
+
"pack:release": "npm pack",
|
|
21
|
+
"prepublishOnly": "node -e \"require('./src/lib/toolkit-payload').verify()\""
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.13.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"sdtk",
|
|
28
|
+
"sdtk-spec",
|
|
29
|
+
"sdtk-spec-kit",
|
|
30
|
+
"cli",
|
|
31
|
+
"documentation",
|
|
32
|
+
"toolkit",
|
|
33
|
+
"dockkit"
|
|
34
|
+
],
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
|
|
39
|
+
"directory": "products/sdtk-spec/distribution/sdtk-spec-kit"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://agenttoolkits.dev",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|