@bendyline/gilde 0.1.24 → 0.1.26
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/authoring/gstack/evals/cso.json +2 -0
- package/authoring/gstack/overlays/cso.json +1 -0
- package/authoring/gstack/wave.json +2 -2
- package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.1/craftbook.json +358 -0
- package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.1/test.json +376 -0
- package/data/craftbook-templates/de/design-system-consultation/versions/2.0.1/craftbook.json +385 -0
- package/data/craftbook-templates/de/design-system-consultation/versions/2.0.1/test.json +201 -0
- package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.1/craftbook.json +353 -0
- package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.1/test.json +191 -0
- package/data/craftbook-templates/ex/executive-level-review/versions/2.0.1/craftbook.json +347 -0
- package/data/craftbook-templates/ex/executive-level-review/versions/2.0.1/test.json +135 -0
- package/data/craftbook-templates/id/idea-office-hours/versions/2.0.1/craftbook.json +333 -0
- package/data/craftbook-templates/id/idea-office-hours/versions/2.0.1/test.json +141 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/pu/pull-request-review/manifest.json +1 -1
- package/data/craftbook-templates/pu/pull-request-review/versions/1.4.0/craftbook.json +179 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.4.0/test.json +123 -0
- package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.1/craftbook.json +348 -0
- package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.1/test.json +153 -0
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.1/craftbook.json +390 -0
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.1/test.json +154 -0
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.2/craftbook.json +450 -0
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.2/test.json +154 -0
- package/data/craftbook-templates/sp/spec-authoring/versions/2.0.1/craftbook.json +391 -0
- package/data/craftbook-templates/sp/spec-authoring/versions/2.0.1/test.json +162 -0
- package/data/craftbook-templates/te/technical-documentation/versions/2.0.1/craftbook.json +343 -0
- package/data/craftbook-templates/te/technical-documentation/versions/2.0.1/test.json +174 -0
- package/package.json +1 -1
- package/schemas/craftbook-doc.schema.json +170 -0
- package/schemas/craftbook-template-version.schema.json +170 -0
- package/schemas/craftbook-test.schema.json +143 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Security Architecture Review — admin export surface",
|
|
4
|
+
"objective": "Exercise the Security Architecture Review craftbook against a self-contained service slice and require a prioritized, evidence-linked report that includes both confirmed vulnerabilities and working controls.",
|
|
5
|
+
"tags": [
|
|
6
|
+
"workflow",
|
|
7
|
+
"security",
|
|
8
|
+
"architecture-review",
|
|
9
|
+
"typescript"
|
|
10
|
+
],
|
|
11
|
+
"prompt": "Use the Security Architecture Review craftbook to review the seeded service slice. This is report-only: do not modify source files. Model assets, actors, trust boundaries, and data flows; audit authorization, command/SQL construction, secrets handling, and relevant common vulnerability classes. Produce the scope and findings register, then write `security/security-architecture-review.md`. Every confirmed finding must name severity, confidence, concrete workspace evidence, exploit preconditions, impact, and a specific remediation plus verification. Include working controls and rejected hypotheses. Do not invent CVEs, dependency versions, scans, or tests you did not run, and do not reproduce the example secret value in the report.",
|
|
12
|
+
"setup": {
|
|
13
|
+
"projectName": "Admin export security review",
|
|
14
|
+
"about": "A hermetic source-review fixture. No network or dependency lookup is needed or authorized; conclusions must come from seeded files.",
|
|
15
|
+
"missionObjectives": "Deliver an actionable risk posture that distinguishes confirmed source defects, positive controls, and unverified areas without changing implementation.",
|
|
16
|
+
"managedWorkspaceWritePolicy": "deny",
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"path": "docs/architecture.md",
|
|
20
|
+
"content": "# Service slice\n\nAn authenticated HTTP handler receives an export name and email filter from a browser operated by support staff. The handler calls local process and database adapters. `requireUser` is the shared authentication boundary. Only administrators should reach backup export; ordinary authenticated users may search their own customer records. Deployment injects `SESSION_SECRET` from environment configuration.\n"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "src/auth.ts",
|
|
24
|
+
"content": "export interface User { id: string; role: 'member' | 'admin' }\n\nexport function requireUser(value: User | undefined): User {\n if (!value) throw new Error('unauthorized');\n return value;\n}\n\nexport function requireAdmin(user: User): void {\n if (user.role !== 'admin') throw new Error('forbidden');\n}\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "src/admin-export.ts",
|
|
28
|
+
"content": "import { exec } from 'node:child_process';\nimport type { User } from './auth.js';\nimport { requireAdmin, requireUser } from './auth.js';\n\nexport function exportBackup(currentUser: User | undefined, requestedName: string): void {\n const user = requireUser(currentUser);\n requireAdmin(user);\n exec(`tar -czf backups/${requestedName}.tgz data/`);\n}\n"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "src/customer-search.ts",
|
|
32
|
+
"content": "export interface Db { query(sql: string): Promise<unknown[]> }\n\nexport function findCustomerByEmail(db: Db, email: string): Promise<unknown[]> {\n return db.query(`SELECT id, email FROM customers WHERE email = '${email}'`);\n}\n"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"path": "src/safe-audit-log.ts",
|
|
36
|
+
"content": "export interface AuditSink { write(event: { actorId: string; action: string; target: string }): void }\n\nexport function recordExport(sink: AuditSink, actorId: string, target: string): void {\n sink.write({ actorId, action: 'backup.exported', target });\n}\n"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "config/example.env",
|
|
40
|
+
"content": "# Example only; deployment replaces this value\nSESSION_SECRET=local-dev-only-not-a-real-secret\n"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"mocks": [],
|
|
45
|
+
"success": {
|
|
46
|
+
"summary": "The named craftbook produces a source-grounded risk posture with prioritized findings, positive controls, remediation, verification, and terminal task evidence.",
|
|
47
|
+
"deliverables": [
|
|
48
|
+
{
|
|
49
|
+
"path": "security/security-architecture-review.md",
|
|
50
|
+
"kind": "security-report",
|
|
51
|
+
"artifact": true,
|
|
52
|
+
"minBytes": 1700,
|
|
53
|
+
"checks": [
|
|
54
|
+
{
|
|
55
|
+
"kind": "contains",
|
|
56
|
+
"file": "security/security-architecture-review.md",
|
|
57
|
+
"pattern": "^#{1,3}\\s+Executive risk posture\\b[\\s\\S]*^#{1,3}\\s+What is working\\b[\\s\\S]*^#{1,3}\\s+Prioritized findings\\b[\\s\\S]*^#{1,3}\\s+Remediation plan\\b[\\s\\S]*^#{1,3}\\s+Verification\\b[\\s\\S]*^#{1,3}\\s+Unverified areas\\b",
|
|
58
|
+
"flags": "im",
|
|
59
|
+
"label": "complete security-review structure"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"kind": "contains",
|
|
63
|
+
"file": "security/security-architecture-review.md",
|
|
64
|
+
"pattern": "(command injection|shell injection)[\\s\\S]{0,500}src/admin-export\\.ts[\\s\\S]*(severity)[\\s\\S]*(confidence)",
|
|
65
|
+
"flags": "is",
|
|
66
|
+
"label": "command-injection finding with evidence metadata"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "contains",
|
|
70
|
+
"file": "security/security-architecture-review.md",
|
|
71
|
+
"pattern": "(SQL injection|parameteri[sz]ed quer)[\\s\\S]{0,500}src/customer-search\\.ts",
|
|
72
|
+
"flags": "is",
|
|
73
|
+
"label": "SQL-injection finding and remediation"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"kind": "contains",
|
|
77
|
+
"file": "security/security-architecture-review.md",
|
|
78
|
+
"pattern": "(requireUser|requireAdmin)[\\s\\S]{0,300}(working|control|authorization|authentication)[\\s\\S]*(safe-audit-log|audit)",
|
|
79
|
+
"flags": "is",
|
|
80
|
+
"label": "positive auth and audit controls"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "citationsResolve",
|
|
84
|
+
"file": "security/security-architecture-review.md",
|
|
85
|
+
"minCitations": 4
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"kind": "notContains",
|
|
89
|
+
"file": "security/security-architecture-review.md",
|
|
90
|
+
"pattern": "CVE-\\d{4}-\\d+",
|
|
91
|
+
"label": "no invented CVEs"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"kind": "notContains",
|
|
95
|
+
"file": "security/security-architecture-review.md",
|
|
96
|
+
"pattern": "local-dev-only-not-a-real-secret",
|
|
97
|
+
"label": "example secret value is not reproduced"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"taskNotes": {
|
|
103
|
+
"minBytes": 180,
|
|
104
|
+
"checks": [
|
|
105
|
+
{
|
|
106
|
+
"kind": "contains",
|
|
107
|
+
"file": "task-notes.md",
|
|
108
|
+
"pattern": "\\bDONE\\b[\\s\\S]*security/security-architecture-review\\.md[\\s\\S]*(command|SQL)",
|
|
109
|
+
"flags": "i",
|
|
110
|
+
"label": "terminal note records report and principal risks"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"requireCraftbookTask": true
|
|
114
|
+
},
|
|
115
|
+
"taskGraph": {
|
|
116
|
+
"requireCraftbookTask": true,
|
|
117
|
+
"requireTerminalStep": true
|
|
118
|
+
},
|
|
119
|
+
"unchangedFixtures": [
|
|
120
|
+
"docs/architecture.md",
|
|
121
|
+
"src/auth.ts",
|
|
122
|
+
"src/admin-export.ts",
|
|
123
|
+
"src/customer-search.ts",
|
|
124
|
+
"src/safe-audit-log.ts",
|
|
125
|
+
"config/example.env"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"rubric": {
|
|
129
|
+
"artifact": {
|
|
130
|
+
"path": "security/security-architecture-review.md",
|
|
131
|
+
"kind": "markdown"
|
|
132
|
+
},
|
|
133
|
+
"axes": [
|
|
134
|
+
{
|
|
135
|
+
"name": "Threat-model coverage",
|
|
136
|
+
"description": "The report connects assets, actors, trust boundaries, privileges, and data flows to the reviewed attack surface."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "Finding rigor",
|
|
140
|
+
"description": "Confirmed findings cite exact source evidence, state preconditions and impact, and calibrate severity and confidence without overclaiming."
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "Remediation utility",
|
|
144
|
+
"description": "Recommendations are prioritized, source-specific, verifiable, and preserve or strengthen the controls that already work."
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"contextNote": "No live dependency or dynamic scan is part of this hermetic source-review scenario; the report should say so."
|
|
148
|
+
},
|
|
149
|
+
"qualityFocus": [
|
|
150
|
+
"Both injection paths are found and tied to exact source",
|
|
151
|
+
"Working authentication, authorization, and audit controls are recognized",
|
|
152
|
+
"Unverified areas and evidence limits are explicit"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "spec-authoring",
|
|
3
|
+
"name": "Spec Authoring",
|
|
4
|
+
"description": "Turn a rough intent into a backlog-ready spec: interrogate scope and requirements against the real code, then file a well-formed, unambiguous issue.",
|
|
5
|
+
"basedOn": {
|
|
6
|
+
"name": "gstack",
|
|
7
|
+
"url": "https://github.com/garrytan/gstack"
|
|
8
|
+
},
|
|
9
|
+
"plan": "Turn an already-approved intent into an implementation-ready workspace specification. Inspect the real project before asking questions, resolve one consequential decision at a time, and leave no hidden architecture choice to the implementer. Acceptance criteria must be pass/fail, references must use real paths, and risky changes need verification and rollback. The canonical deliverable stays in the workspace; publishing it elsewhere is a separate user-authorized action.",
|
|
10
|
+
"entryStepId": "inspect",
|
|
11
|
+
"triggers": [
|
|
12
|
+
"spec this out",
|
|
13
|
+
"file an issue",
|
|
14
|
+
"write up a ticket",
|
|
15
|
+
"turn this into an issue",
|
|
16
|
+
"make this a github issue",
|
|
17
|
+
"turn this into a backlog item"
|
|
18
|
+
],
|
|
19
|
+
"command": "spec-authoring",
|
|
20
|
+
"steps": [
|
|
21
|
+
{
|
|
22
|
+
"id": "inspect",
|
|
23
|
+
"name": "Inspect the current system",
|
|
24
|
+
"description": "Map present behavior, relevant code, conventions, dependencies, tests, and constraints.",
|
|
25
|
+
"prompt": "Read the approved intent and inspect the relevant workspace before asking the user anything. Trace current behavior through entry points, interfaces, data models, dependencies, tests, and adjacent patterns. Record exact paths and what each proves. Identify root cause for bugs, compatibility boundaries, security or migration risks, and unknowns that cannot be answered from the project. Do not design the change yet.\n\nObservable handoff: write the completed result to `specs/source-audit.md` in the workspace. Do not merely describe what the file would contain. Re-read it before finishing this phase and repair any incomplete sections.",
|
|
26
|
+
"suggestedRole": "principal engineer",
|
|
27
|
+
"advanceWhen": {
|
|
28
|
+
"file": "specs/source-audit.md",
|
|
29
|
+
"minBytes": 1000,
|
|
30
|
+
"sniff": "nonempty",
|
|
31
|
+
"requireChange": true,
|
|
32
|
+
"goto": "resolve-decisions"
|
|
33
|
+
},
|
|
34
|
+
"gate": {
|
|
35
|
+
"at": "completion",
|
|
36
|
+
"checks": [
|
|
37
|
+
{
|
|
38
|
+
"kind": "minBytes",
|
|
39
|
+
"file": "specs/source-audit.md",
|
|
40
|
+
"bytes": 1000
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "sniff",
|
|
44
|
+
"file": "specs/source-audit.md",
|
|
45
|
+
"sniff": "nonempty"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"kind": "contains",
|
|
49
|
+
"file": "specs/source-audit.md",
|
|
50
|
+
"pattern": "^##\\s+Current behavior",
|
|
51
|
+
"flags": "im",
|
|
52
|
+
"label": "Current behavior section"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "contains",
|
|
56
|
+
"file": "specs/source-audit.md",
|
|
57
|
+
"pattern": "^##\\s+Source map",
|
|
58
|
+
"flags": "im",
|
|
59
|
+
"label": "Source map section"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"kind": "contains",
|
|
63
|
+
"file": "specs/source-audit.md",
|
|
64
|
+
"pattern": "^##\\s+Conventions",
|
|
65
|
+
"flags": "im",
|
|
66
|
+
"label": "Conventions section"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "contains",
|
|
70
|
+
"file": "specs/source-audit.md",
|
|
71
|
+
"pattern": "^##\\s+Constraints",
|
|
72
|
+
"flags": "im",
|
|
73
|
+
"label": "Constraints section"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"kind": "contains",
|
|
77
|
+
"file": "specs/source-audit.md",
|
|
78
|
+
"pattern": "^##\\s+Unknowns",
|
|
79
|
+
"flags": "im",
|
|
80
|
+
"label": "Unknowns section"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"onReject": "inspect",
|
|
84
|
+
"maxAttempts": 3
|
|
85
|
+
},
|
|
86
|
+
"next": "resolve-decisions"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "resolve-decisions",
|
|
90
|
+
"name": "Resolve scope and design decisions",
|
|
91
|
+
"description": "Close consequential ambiguities and record alternatives, rationale, and boundaries.",
|
|
92
|
+
"prompt": "Use `specs/source-audit.md` to enumerate only decisions the workspace cannot settle. Ask the user one consequential question at a time with `ask_user_question`, supplying a recommendation and trade-offs. In unattended mode, make only reversible assumptions and label them. Record the selected architecture, data and interface shapes, compatibility choices, dependency order, out-of-scope items, alternatives rejected, and decisions still blocked.\n\nObservable handoff: write the completed result to `specs/decision-log.md` in the workspace. Do not merely describe what the file would contain. Re-read it before finishing this phase and repair any incomplete sections.",
|
|
93
|
+
"suggestedRole": "solution architect",
|
|
94
|
+
"advanceWhen": {
|
|
95
|
+
"file": "specs/decision-log.md",
|
|
96
|
+
"minBytes": 900,
|
|
97
|
+
"sniff": "nonempty",
|
|
98
|
+
"requireChange": true,
|
|
99
|
+
"goto": "write-spec"
|
|
100
|
+
},
|
|
101
|
+
"gate": {
|
|
102
|
+
"at": "completion",
|
|
103
|
+
"checks": [
|
|
104
|
+
{
|
|
105
|
+
"kind": "minBytes",
|
|
106
|
+
"file": "specs/decision-log.md",
|
|
107
|
+
"bytes": 900
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"kind": "sniff",
|
|
111
|
+
"file": "specs/decision-log.md",
|
|
112
|
+
"sniff": "nonempty"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "contains",
|
|
116
|
+
"file": "specs/decision-log.md",
|
|
117
|
+
"pattern": "^##\\s+Scope",
|
|
118
|
+
"flags": "im",
|
|
119
|
+
"label": "Scope section"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"kind": "contains",
|
|
123
|
+
"file": "specs/decision-log.md",
|
|
124
|
+
"pattern": "^##\\s+Decisions",
|
|
125
|
+
"flags": "im",
|
|
126
|
+
"label": "Decisions section"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"kind": "contains",
|
|
130
|
+
"file": "specs/decision-log.md",
|
|
131
|
+
"pattern": "^##\\s+Alternatives",
|
|
132
|
+
"flags": "im",
|
|
133
|
+
"label": "Alternatives section"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"kind": "contains",
|
|
137
|
+
"file": "specs/decision-log.md",
|
|
138
|
+
"pattern": "^##\\s+Out of scope",
|
|
139
|
+
"flags": "im",
|
|
140
|
+
"label": "Out of scope section"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"kind": "contains",
|
|
144
|
+
"file": "specs/decision-log.md",
|
|
145
|
+
"pattern": "^##\\s+Open blockers",
|
|
146
|
+
"flags": "im",
|
|
147
|
+
"label": "Open blockers section"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"onReject": "resolve-decisions",
|
|
151
|
+
"maxAttempts": 3
|
|
152
|
+
},
|
|
153
|
+
"next": "write-spec"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "write-spec",
|
|
157
|
+
"name": "Write the implementation specification",
|
|
158
|
+
"description": "Produce a backlog-ready spec with concrete interfaces, sequencing, tests, and rollback.",
|
|
159
|
+
"prompt": "Synthesize the source audit and decision log into a self-contained implementation specification. Include current versus proposed behavior, precise file changes, actual schema or API shapes where relevant, dependency-ordered work, measurable acceptance criteria, a testing pyramid, observability, rollout and rollback, effort by component, and explicit exclusions. Split work that cannot be completed safely as one bounded change. Use real workspace paths; never manufacture line numbers or execution results.\n\nObservable handoff: write the completed result to `specs/implementation-spec.md` in the workspace. Do not merely describe what the file would contain. Re-read it before finishing this phase and repair any incomplete sections.",
|
|
160
|
+
"suggestedRole": "specification writer",
|
|
161
|
+
"advanceWhen": {
|
|
162
|
+
"file": "specs/implementation-spec.md",
|
|
163
|
+
"minBytes": 1800,
|
|
164
|
+
"sniff": "nonempty",
|
|
165
|
+
"requireChange": true,
|
|
166
|
+
"goto": "evaluate"
|
|
167
|
+
},
|
|
168
|
+
"gate": {
|
|
169
|
+
"at": "completion",
|
|
170
|
+
"checks": [
|
|
171
|
+
{
|
|
172
|
+
"kind": "minBytes",
|
|
173
|
+
"file": "specs/implementation-spec.md",
|
|
174
|
+
"bytes": 1800
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"kind": "sniff",
|
|
178
|
+
"file": "specs/implementation-spec.md",
|
|
179
|
+
"sniff": "nonempty"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"kind": "contains",
|
|
183
|
+
"file": "specs/implementation-spec.md",
|
|
184
|
+
"pattern": "^##\\s+Context",
|
|
185
|
+
"flags": "im",
|
|
186
|
+
"label": "Context section"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"kind": "contains",
|
|
190
|
+
"file": "specs/implementation-spec.md",
|
|
191
|
+
"pattern": "^##\\s+Current state",
|
|
192
|
+
"flags": "im",
|
|
193
|
+
"label": "Current state section"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"kind": "contains",
|
|
197
|
+
"file": "specs/implementation-spec.md",
|
|
198
|
+
"pattern": "^##\\s+Proposed change",
|
|
199
|
+
"flags": "im",
|
|
200
|
+
"label": "Proposed change section"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"kind": "contains",
|
|
204
|
+
"file": "specs/implementation-spec.md",
|
|
205
|
+
"pattern": "^##\\s+Implementation details",
|
|
206
|
+
"flags": "im",
|
|
207
|
+
"label": "Implementation details section"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"kind": "contains",
|
|
211
|
+
"file": "specs/implementation-spec.md",
|
|
212
|
+
"pattern": "^##\\s+Acceptance criteria",
|
|
213
|
+
"flags": "im",
|
|
214
|
+
"label": "Acceptance criteria section"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"kind": "contains",
|
|
218
|
+
"file": "specs/implementation-spec.md",
|
|
219
|
+
"pattern": "^##\\s+Testing plan",
|
|
220
|
+
"flags": "im",
|
|
221
|
+
"label": "Testing plan section"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"kind": "contains",
|
|
225
|
+
"file": "specs/implementation-spec.md",
|
|
226
|
+
"pattern": "^##\\s+Rollback plan",
|
|
227
|
+
"flags": "im",
|
|
228
|
+
"label": "Rollback plan section"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"kind": "contains",
|
|
232
|
+
"file": "specs/implementation-spec.md",
|
|
233
|
+
"pattern": "^##\\s+Out of scope",
|
|
234
|
+
"flags": "im",
|
|
235
|
+
"label": "Out of scope section"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "contains",
|
|
239
|
+
"file": "specs/implementation-spec.md",
|
|
240
|
+
"pattern": "^##\\s+File reference",
|
|
241
|
+
"flags": "im",
|
|
242
|
+
"label": "File reference section"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"onReject": "write-spec",
|
|
246
|
+
"maxAttempts": 3
|
|
247
|
+
},
|
|
248
|
+
"next": "evaluate"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "evaluate",
|
|
252
|
+
"name": "Evaluate the deliverable",
|
|
253
|
+
"description": "Independently grade the observable deliverable and route it to finish, repair, or user escalation.",
|
|
254
|
+
"prompt": "Review `specs/implementation-spec.md`, `specs/source-audit.md`, `specs/decision-log.md` against every criterion below. Inspect the underlying evidence files named by the workflow; do not grade from the author's summary alone.\n\n1. Every material current-state claim and file reference traces to inspected workspace evidence.\n2. The proposed architecture, interfaces, data shapes, and sequencing leave no hidden design decision to the implementer.\n3. Acceptance criteria are individually observable and pass/fail rather than subjective.\n4. The testing plan covers unit, integration, and end-to-end layers in proportion to risk.\n5. Migration, compatibility, observability, rollout, and rollback are addressed when relevant.\n6. Scope is bounded, exclusions are explicit, and unresolved blockers are not disguised as assumptions.\n\nWrite an evidence-backed review to `reviews/spec-authoring-review.md`. Give each criterion a PASS or FAIL with a concrete path, excerpt, measurement, or observed behavior. End with exactly `Verdict: PASS` or `Verdict: REVISE`. Then use `advance_task_step` for the active task: PASS routes to `finish`; REVISE routes to `repair` for review rounds 1 through 2, and the 3th REVISE routes to `needs-user`. Never route to finish while a criterion is unmet.",
|
|
255
|
+
"suggestedRole": "engineering reviewer",
|
|
256
|
+
"gate": {
|
|
257
|
+
"at": "completion",
|
|
258
|
+
"checks": [
|
|
259
|
+
{
|
|
260
|
+
"kind": "minBytes",
|
|
261
|
+
"file": "reviews/spec-authoring-review.md",
|
|
262
|
+
"bytes": 400
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"kind": "contains",
|
|
266
|
+
"file": "reviews/spec-authoring-review.md",
|
|
267
|
+
"pattern": "Verdict:\\s*(?:PASS|REVISE)",
|
|
268
|
+
"flags": "i",
|
|
269
|
+
"label": "explicit PASS or REVISE verdict"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"onReject": "evaluate",
|
|
273
|
+
"maxAttempts": 3
|
|
274
|
+
},
|
|
275
|
+
"next": "repair"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"id": "repair",
|
|
279
|
+
"name": "Repair the deliverable",
|
|
280
|
+
"description": "Fix only the concrete gaps from the latest independent review.",
|
|
281
|
+
"prompt": "Read `reviews/spec-authoring-review.md` and repair every failed criterion in `specs/implementation-spec.md`, `specs/source-audit.md`, `specs/decision-log.md`. Make the changes in the actual workspace files, not just in task notes or a reply. Preserve evidence that already passed. Re-run or re-check anything the reviewer found unproven. Ensure `specs/implementation-spec.md` is genuinely updated this turn so the repair is observable, then hand it back for independent evaluation.",
|
|
282
|
+
"suggestedRole": "specification writer",
|
|
283
|
+
"advanceWhen": {
|
|
284
|
+
"file": "specs/implementation-spec.md",
|
|
285
|
+
"minBytes": 1800,
|
|
286
|
+
"sniff": "nonempty",
|
|
287
|
+
"requireChange": true,
|
|
288
|
+
"goto": "evaluate"
|
|
289
|
+
},
|
|
290
|
+
"gate": {
|
|
291
|
+
"at": "completion",
|
|
292
|
+
"checks": [
|
|
293
|
+
{
|
|
294
|
+
"kind": "minBytes",
|
|
295
|
+
"file": "specs/implementation-spec.md",
|
|
296
|
+
"bytes": 1800
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"kind": "sniff",
|
|
300
|
+
"file": "specs/implementation-spec.md",
|
|
301
|
+
"sniff": "nonempty"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"kind": "contains",
|
|
305
|
+
"file": "specs/implementation-spec.md",
|
|
306
|
+
"pattern": "^##\\s+Context",
|
|
307
|
+
"flags": "im",
|
|
308
|
+
"label": "Context section"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"kind": "contains",
|
|
312
|
+
"file": "specs/implementation-spec.md",
|
|
313
|
+
"pattern": "^##\\s+Current state",
|
|
314
|
+
"flags": "im",
|
|
315
|
+
"label": "Current state section"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"kind": "contains",
|
|
319
|
+
"file": "specs/implementation-spec.md",
|
|
320
|
+
"pattern": "^##\\s+Proposed change",
|
|
321
|
+
"flags": "im",
|
|
322
|
+
"label": "Proposed change section"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "contains",
|
|
326
|
+
"file": "specs/implementation-spec.md",
|
|
327
|
+
"pattern": "^##\\s+Implementation details",
|
|
328
|
+
"flags": "im",
|
|
329
|
+
"label": "Implementation details section"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"kind": "contains",
|
|
333
|
+
"file": "specs/implementation-spec.md",
|
|
334
|
+
"pattern": "^##\\s+Acceptance criteria",
|
|
335
|
+
"flags": "im",
|
|
336
|
+
"label": "Acceptance criteria section"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"kind": "contains",
|
|
340
|
+
"file": "specs/implementation-spec.md",
|
|
341
|
+
"pattern": "^##\\s+Testing plan",
|
|
342
|
+
"flags": "im",
|
|
343
|
+
"label": "Testing plan section"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"kind": "contains",
|
|
347
|
+
"file": "specs/implementation-spec.md",
|
|
348
|
+
"pattern": "^##\\s+Rollback plan",
|
|
349
|
+
"flags": "im",
|
|
350
|
+
"label": "Rollback plan section"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"kind": "contains",
|
|
354
|
+
"file": "specs/implementation-spec.md",
|
|
355
|
+
"pattern": "^##\\s+Out of scope",
|
|
356
|
+
"flags": "im",
|
|
357
|
+
"label": "Out of scope section"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"kind": "contains",
|
|
361
|
+
"file": "specs/implementation-spec.md",
|
|
362
|
+
"pattern": "^##\\s+File reference",
|
|
363
|
+
"flags": "im",
|
|
364
|
+
"label": "File reference section"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"onReject": "repair",
|
|
368
|
+
"maxAttempts": 3
|
|
369
|
+
},
|
|
370
|
+
"next": "evaluate"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"id": "finish",
|
|
374
|
+
"name": "Finish",
|
|
375
|
+
"description": "All deterministic and reviewer criteria passed.",
|
|
376
|
+
"prompt": "The independent review passed. Read `reviews/spec-authoring-review.md`, then use `write_task_note` to record a concise DONE summary with the final deliverable paths (`specs/implementation-spec.md`, `specs/source-audit.md`, `specs/decision-log.md`) and the evidence that each acceptance criterion passed. Report DONE without starting new work.",
|
|
377
|
+
"suggestedRole": "project lead",
|
|
378
|
+
"terminal": true
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"id": "needs-user",
|
|
382
|
+
"name": "Escalate unresolved concerns",
|
|
383
|
+
"description": "The bounded repair loop ended without a defensible pass.",
|
|
384
|
+
"prompt": "The deliverable did not pass after 3 review rounds. Do not claim success. Read `reviews/spec-authoring-review.md`, then use `write_task_note` to record DONE_WITH_CONCERNS: the unmet criteria, what was attempted, the affected paths, and the smallest user decision or missing input needed to continue.",
|
|
385
|
+
"suggestedRole": "project lead",
|
|
386
|
+
"terminal": true
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"version": "2.0.1",
|
|
390
|
+
"releasedAt": "2026-08-13T00:00:00Z"
|
|
391
|
+
}
|