@bendyline/gilde 0.1.17 → 0.1.18

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.
Files changed (93) hide show
  1. package/README.md +5 -1
  2. package/authoring/gstack/LICENSE.gstack +21 -0
  3. package/authoring/gstack/README.md +50 -0
  4. package/authoring/gstack/evals/cso.json +152 -0
  5. package/authoring/gstack/evals/design-consultation.json +201 -0
  6. package/authoring/gstack/evals/document-generate.json +174 -0
  7. package/authoring/gstack/evals/investigate.json +153 -0
  8. package/authoring/gstack/evals/office-hours.json +141 -0
  9. package/authoring/gstack/evals/plan-ceo-review.json +135 -0
  10. package/authoring/gstack/evals/qa-only.json +376 -0
  11. package/authoring/gstack/evals/retro.json +191 -0
  12. package/authoring/gstack/evals/spec.json +162 -0
  13. package/authoring/gstack/overlays/cso.json +132 -0
  14. package/authoring/gstack/overlays/design-consultation.json +153 -0
  15. package/authoring/gstack/overlays/document-generate.json +124 -0
  16. package/authoring/gstack/overlays/investigate.json +128 -0
  17. package/authoring/gstack/overlays/office-hours.json +119 -0
  18. package/authoring/gstack/overlays/plan-ceo-review.json +128 -0
  19. package/authoring/gstack/overlays/qa-only.json +145 -0
  20. package/authoring/gstack/overlays/retro.json +132 -0
  21. package/authoring/gstack/overlays/spec.json +140 -0
  22. package/authoring/gstack/persona-drafts/cso.about.md +9 -0
  23. package/authoring/gstack/persona-drafts/design-consultation.about.md +9 -0
  24. package/authoring/gstack/persona-drafts/office-hours.about.md +9 -0
  25. package/authoring/gstack/persona-drafts/qa-only.about.md +5 -0
  26. package/authoring/gstack/persona-drafts/spec.about.md +26 -0
  27. package/authoring/gstack/snapshots/cso/SKILL.md +1285 -0
  28. package/authoring/gstack/snapshots/design-consultation/SKILL.md +1230 -0
  29. package/authoring/gstack/snapshots/document-generate/SKILL.md +1252 -0
  30. package/authoring/gstack/snapshots/investigate/SKILL.md +1074 -0
  31. package/authoring/gstack/snapshots/office-hours/SKILL.md +1697 -0
  32. package/authoring/gstack/snapshots/plan-ceo-review/SKILL.md +1476 -0
  33. package/authoring/gstack/snapshots/qa-only/SKILL.md +1256 -0
  34. package/authoring/gstack/snapshots/retro/SKILL.md +1812 -0
  35. package/authoring/gstack/snapshots/spec/SKILL.md +2359 -0
  36. package/authoring/gstack/wave.json +103 -0
  37. package/data/connector-types/gi/github-releases/manifest.json +17 -0
  38. package/data/connector-types/gi/github-releases/versions/1.0.0/manifest.json +71 -0
  39. package/data/connector-types/index.json +1 -1
  40. package/data/craftbook-templates/br/branding-website/versions/1.1.0/craftbook.json +190 -0
  41. package/data/craftbook-templates/br/branding-website/versions/1.1.0/test.json +164 -0
  42. package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.0/craftbook.json +358 -0
  43. package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.0/test.json +376 -0
  44. package/data/craftbook-templates/ca/careful-mode/versions/1.1.0/craftbook.json +43 -0
  45. package/data/craftbook-templates/ca/careful-mode/versions/1.1.0/test.json +110 -0
  46. package/data/craftbook-templates/ca/careful-mode/versions/1.2.0/craftbook.json +43 -0
  47. package/data/craftbook-templates/ca/careful-mode/versions/1.2.0/test.json +110 -0
  48. package/data/craftbook-templates/co/content-deck/versions/1.1.0/craftbook.json +185 -0
  49. package/data/craftbook-templates/co/content-deck/versions/1.1.0/test.json +166 -0
  50. package/data/craftbook-templates/co/content-deck/versions/1.2.0/craftbook.json +185 -0
  51. package/data/craftbook-templates/co/content-deck/versions/1.2.0/test.json +169 -0
  52. package/data/craftbook-templates/co/corpus-email-digest/versions/1.1.0/craftbook.json +189 -0
  53. package/data/craftbook-templates/co/corpus-email-digest/versions/1.1.0/test.json +182 -0
  54. package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.0/craftbook.json +189 -0
  55. package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.0/test.json +187 -0
  56. package/data/craftbook-templates/de/design-system-consultation/versions/2.0.0/craftbook.json +385 -0
  57. package/data/craftbook-templates/de/design-system-consultation/versions/2.0.0/test.json +201 -0
  58. package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.0/craftbook.json +353 -0
  59. package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.0/test.json +191 -0
  60. package/data/craftbook-templates/ex/executive-level-review/versions/2.0.0/craftbook.json +347 -0
  61. package/data/craftbook-templates/ex/executive-level-review/versions/2.0.0/test.json +135 -0
  62. package/data/craftbook-templates/fr/freeze-scope/versions/1.2.0/craftbook.json +50 -0
  63. package/data/craftbook-templates/fr/freeze-scope/versions/1.2.0/test.json +131 -0
  64. package/data/craftbook-templates/fr/freeze-scope/versions/1.3.0/craftbook.json +50 -0
  65. package/data/craftbook-templates/fr/freeze-scope/versions/1.3.0/test.json +131 -0
  66. package/data/craftbook-templates/ht/html-arcade-game/versions/1.1.0/craftbook.json +197 -0
  67. package/data/craftbook-templates/ht/html-arcade-game/versions/1.1.0/test.json +173 -0
  68. package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.0/craftbook.json +197 -0
  69. package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.0/test.json +176 -0
  70. package/data/craftbook-templates/id/idea-office-hours/versions/2.0.0/craftbook.json +333 -0
  71. package/data/craftbook-templates/id/idea-office-hours/versions/2.0.0/test.json +141 -0
  72. package/data/craftbook-templates/im/image-set-index/versions/1.1.0/craftbook.json +163 -0
  73. package/data/craftbook-templates/im/image-set-index/versions/1.1.0/test.json +177 -0
  74. package/data/craftbook-templates/im/image-set-index/versions/1.2.0/craftbook.json +163 -0
  75. package/data/craftbook-templates/im/image-set-index/versions/1.2.0/test.json +180 -0
  76. package/data/craftbook-templates/index.json +1 -1
  77. package/data/craftbook-templates/re/release-artifact-sanity-check/art.json +13 -0
  78. package/data/craftbook-templates/re/release-artifact-sanity-check/logo.webp +0 -0
  79. package/data/craftbook-templates/re/release-artifact-sanity-check/manifest.json +24 -0
  80. package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.0/craftbook.json +202 -0
  81. package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.0/test.json +138 -0
  82. package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.0/craftbook.json +348 -0
  83. package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.0/test.json +153 -0
  84. package/data/craftbook-templates/se/security-architecture-review/versions/2.0.0/craftbook.json +353 -0
  85. package/data/craftbook-templates/se/security-architecture-review/versions/2.0.0/test.json +152 -0
  86. package/data/craftbook-templates/sp/spec-authoring/versions/2.0.0/craftbook.json +391 -0
  87. package/data/craftbook-templates/sp/spec-authoring/versions/2.0.0/test.json +162 -0
  88. package/data/craftbook-templates/te/technical-documentation/versions/2.0.0/craftbook.json +343 -0
  89. package/data/craftbook-templates/te/technical-documentation/versions/2.0.0/test.json +174 -0
  90. package/data/craftbook-templates/tr/translate-content/versions/1.1.0/craftbook.json +84 -0
  91. package/data/craftbook-templates/tr/translate-content/versions/1.1.0/test.json +141 -0
  92. package/package.json +8 -4
  93. package/schemas/craftbook-test.schema.json +232 -3
@@ -0,0 +1,162 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "title": "Spec Authoring — asynchronous CSV exports",
4
+ "objective": "Require the Spec Authoring craftbook to reconcile approved intent with current code and produce a backlog-ready, file-specific implementation spec with measurable acceptance and rollback criteria.",
5
+ "tags": [
6
+ "workflow",
7
+ "spec",
8
+ "planning",
9
+ "typescript"
10
+ ],
11
+ "prompt": "Use the Spec Authoring craftbook to turn `source/approved-intent.md` into an implementation-ready spec grounded in the current files under `src/` and `tests/`. Resolve ambiguities from the supplied evidence without writing production code. Produce the craftbook audit and decision log, then write `specs/implementation-spec.md` with all required sections, exact file references, API/state transitions, authorization and limit behavior, measurable acceptance criteria, a dependency-free testing plan, rollback, and explicit out-of-scope items. Cite every workspace file used.",
12
+ "setup": {
13
+ "projectName": "Async export spec",
14
+ "about": "A hermetic specification exercise for an existing TypeScript service. The source of truth is limited to seeded workspace files.",
15
+ "missionObjectives": "Produce a spec another engineer can implement without reopening product scope or guessing security, lifecycle, limit, and rollback behavior.",
16
+ "files": [
17
+ {
18
+ "path": "source/approved-intent.md",
19
+ "content": "# Approved intent: asynchronous CSV exports\n\nReplace the synchronous customer export with an asynchronous job API.\n\n## Locked product decisions\n- `POST /v1/exports` accepts a saved report id and an `Idempotency-Key` header.\n- Roles `analyst` and `admin` may create exports; `viewer` receives 403.\n- Requests above **50,000 rows** receive 422 before a job is queued.\n- Job states are `queued`, `running`, `succeeded`, and `failed`.\n- Reusing an idempotency key for the same actor within **24 hours** returns the original job.\n- Successful download URLs expire after **15 minutes**.\n- Existing synchronous `/v1/reports/:id.csv` remains available behind a feature flag during rollout.\n\n## Out of scope\nNew report builders, additional export formats, recurring schedules, and email delivery.\n"
20
+ },
21
+ {
22
+ "path": "src/export-controller.ts",
23
+ "content": "import { mayExport } from './policy.js';\n\nexport type Role = 'viewer' | 'analyst' | 'admin';\n\nexport function downloadReportCsv(role: Role, reportId: string): { status: number; body: string } {\n if (!mayExport(role)) return { status: 403, body: 'forbidden' };\n return { status: 200, body: `report_id\\n${reportId}\\n` };\n}\n"
24
+ },
25
+ {
26
+ "path": "src/policy.ts",
27
+ "content": "export function mayExport(role: 'viewer' | 'analyst' | 'admin'): boolean {\n return role === 'analyst' || role === 'admin';\n}\n"
28
+ },
29
+ {
30
+ "path": "tests/export-contract.test.ts",
31
+ "content": "import { strict as assert } from 'node:assert';\nimport { downloadReportCsv } from '../src/export-controller.js';\n\nassert.equal(downloadReportCsv('viewer', 'r-1').status, 403);\nassert.equal(downloadReportCsv('analyst', 'r-1').status, 200);\n"
32
+ }
33
+ ]
34
+ },
35
+ "mocks": [],
36
+ "success": {
37
+ "taskGraph": {
38
+ "requireCraftbookTask": true,
39
+ "requireTerminalStep": true
40
+ },
41
+ "summary": "The named craftbook produces an evidence-grounded, backlog-ready asynchronous-export spec and records a terminal task handoff.",
42
+ "deliverables": [
43
+ {
44
+ "path": "specs/implementation-spec.md",
45
+ "kind": "markdown-doc",
46
+ "minBytes": 1700,
47
+ "checks": [
48
+ {
49
+ "kind": "contains",
50
+ "file": "specs/implementation-spec.md",
51
+ "pattern": "^#{1,3}\\s+Context\\b[\\s\\S]*^#{1,3}\\s+Current state\\b[\\s\\S]*^#{1,3}\\s+Proposed change\\b[\\s\\S]*^#{1,3}\\s+Implementation details\\b[\\s\\S]*^#{1,3}\\s+Acceptance criteria\\b[\\s\\S]*^#{1,3}\\s+Testing plan\\b[\\s\\S]*^#{1,3}\\s+Rollback plan\\b[\\s\\S]*^#{1,3}\\s+Out of scope\\b[\\s\\S]*^#{1,3}\\s+File reference\\b",
52
+ "flags": "im",
53
+ "label": "complete implementation-spec structure"
54
+ },
55
+ {
56
+ "kind": "valueGrounding",
57
+ "file": "specs/implementation-spec.md",
58
+ "facts": [
59
+ {
60
+ "id": "create-api",
61
+ "required": [
62
+ "POST\\s+`?/v1/exports`?"
63
+ ]
64
+ },
65
+ {
66
+ "id": "role-policy",
67
+ "required": [
68
+ "analyst[\\s\\S]{0,80}admin[\\s\\S]{0,120}(viewer[\\s\\S]{0,40}403|403[\\s\\S]{0,40}viewer)"
69
+ ]
70
+ },
71
+ {
72
+ "id": "row-limit",
73
+ "required": [
74
+ "50,?000\\s+rows"
75
+ ]
76
+ },
77
+ {
78
+ "id": "row-limit-status",
79
+ "required": [
80
+ "422"
81
+ ]
82
+ },
83
+ {
84
+ "id": "lifecycle",
85
+ "required": [
86
+ "queued[\\s\\S]{0,100}running[\\s\\S]{0,100}succeeded[\\s\\S]{0,100}failed"
87
+ ]
88
+ },
89
+ {
90
+ "id": "idempotency-window",
91
+ "required": [
92
+ "24\\s+hours"
93
+ ]
94
+ },
95
+ {
96
+ "id": "download-expiry",
97
+ "required": [
98
+ "15\\s+minutes"
99
+ ]
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "kind": "contains",
105
+ "file": "specs/implementation-spec.md",
106
+ "pattern": "(Given[\\s\\S]{0,200}When[\\s\\S]{0,200}Then|shall|must)[\\s\\S]*(feature flag|synchronous|reports/:id\\.csv)",
107
+ "flags": "i",
108
+ "label": "testable criteria and rollout compatibility"
109
+ },
110
+ {
111
+ "kind": "citationsResolve",
112
+ "file": "specs/implementation-spec.md",
113
+ "minCitations": 4
114
+ }
115
+ ]
116
+ }
117
+ ],
118
+ "taskNotes": {
119
+ "minBytes": 170,
120
+ "requireCraftbookTask": true,
121
+ "checks": [
122
+ {
123
+ "kind": "contains",
124
+ "file": "task-notes.md",
125
+ "pattern": "\\bDONE\\b[\\s\\S]*specs/implementation-spec\\.md",
126
+ "label": "terminal craftbook note names the spec"
127
+ }
128
+ ]
129
+ },
130
+ "unchangedFixtures": [
131
+ "source/approved-intent.md",
132
+ "src/export-controller.ts",
133
+ "src/policy.ts",
134
+ "tests/export-contract.test.ts"
135
+ ]
136
+ },
137
+ "rubric": {
138
+ "artifact": {
139
+ "path": "specs/implementation-spec.md",
140
+ "kind": "markdown"
141
+ },
142
+ "axes": [
143
+ {
144
+ "name": "Codebase grounding",
145
+ "description": "Current-state claims and file changes trace to the seeded implementation, policy, contract test, and approved intent."
146
+ },
147
+ {
148
+ "name": "Implementation precision",
149
+ "description": "The API, authorization, state machine, idempotency, limits, expiry, persistence boundaries, and file responsibilities are unambiguous."
150
+ },
151
+ {
152
+ "name": "Backlog readiness",
153
+ "description": "Acceptance criteria are observable, the testing plan covers failure paths, and rollout and rollback can be executed safely."
154
+ }
155
+ ]
156
+ },
157
+ "qualityFocus": [
158
+ "Locked product decisions are conserved exactly",
159
+ "Current and proposed behavior are clearly separated",
160
+ "File-level implementation and test responsibilities are specific enough to execute"
161
+ ]
162
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "workflow": {
3
+ "plan": "Run an evidence-first architecture review without changing product code. Trace trust boundaries, data flows, identity, authorization, secrets, dependencies, and operational controls from actual workspace material. Never copy secret values into notes or reports. Separate confirmed findings from hypotheses and research gaps. Rank actionable findings by severity, exploitability, confidence, and blast radius, then give the owner a practical remediation and verification path.",
4
+ "phases": [
5
+ {
6
+ "id": "model-system",
7
+ "name": "Map assets and trust boundaries",
8
+ "description": "Establish the system, sensitive assets, actors, data flows, controls, and review limits.",
9
+ "suggestedRole": "security architect",
10
+ "prompt": "Inspect architecture notes, entry points, deployment and dependency metadata, configuration schemas, authentication and authorization code, persistence, network surfaces, and security tests. Map sensitive assets, actors, privilege levels, trust boundaries, inbound and outbound data flows, third parties, and existing controls. Record only secret names or locations, never values. State scope exclusions and missing evidence explicitly.",
11
+ "output": {
12
+ "path": "security/review-scope.md",
13
+ "minBytes": 1000,
14
+ "requiredPatterns": [
15
+ {
16
+ "pattern": "^##\\s+System scope",
17
+ "label": "System scope section"
18
+ },
19
+ {
20
+ "pattern": "^##\\s+Assets",
21
+ "label": "Assets section"
22
+ },
23
+ {
24
+ "pattern": "^##\\s+Actors and privileges",
25
+ "label": "Actors and privileges section"
26
+ },
27
+ {
28
+ "pattern": "^##\\s+Trust boundaries",
29
+ "label": "Trust boundaries section"
30
+ },
31
+ {
32
+ "pattern": "^##\\s+Data flows",
33
+ "label": "Data flows section"
34
+ },
35
+ {
36
+ "pattern": "^##\\s+Review limits",
37
+ "label": "Review limits section"
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ "id": "audit",
44
+ "name": "Audit controls and prove findings",
45
+ "description": "Walk the attack surface systematically and maintain an evidence-backed findings register.",
46
+ "suggestedRole": "application security engineer",
47
+ "prompt": "Use `security/review-scope.md` to inspect secrets handling, dependency and supply-chain controls, authentication, session management, authorization at every mutation sink, input handling, output encoding, injection boundaries, file and path access, cryptography, logging, privacy, network exposure, update paths, and failure behavior. For every candidate, capture the exact evidence path, attack preconditions, affected asset, impact, confidence, and a safe validation method. Do not claim a vulnerability from a pattern match alone. If external advisory research is unavailable, label dependency status unverified rather than guessing.",
48
+ "output": {
49
+ "path": "security/findings-register.md",
50
+ "minBytes": 1300,
51
+ "requiredPatterns": [
52
+ {
53
+ "pattern": "^##\\s+Coverage",
54
+ "label": "Coverage section"
55
+ },
56
+ {
57
+ "pattern": "^##\\s+Confirmed findings",
58
+ "label": "Confirmed findings section"
59
+ },
60
+ {
61
+ "pattern": "^##\\s+Rejected hypotheses",
62
+ "label": "Rejected hypotheses section"
63
+ },
64
+ {
65
+ "pattern": "^##\\s+Research gaps",
66
+ "label": "Research gaps section"
67
+ },
68
+ {
69
+ "pattern": "Severity.*Confidence.*Evidence",
70
+ "label": "finding table with severity, confidence, and evidence"
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "id": "report",
77
+ "name": "Write the security architecture review",
78
+ "description": "Deliver prioritized findings, strengths, remediation, and retest instructions for owners.",
79
+ "suggestedRole": "security reviewer",
80
+ "prompt": "Synthesize the scope and findings register into a decision-ready report. Start with an executive risk posture and the strongest controls already working. For each confirmed finding, include severity, confidence, evidence path, causal control gap, realistic attack path, impact, prioritized remediation, owner, verification, and residual risk. Group systemic themes, distinguish quick containment from durable fixes, and state areas not verified. Do not include exploit payloads or sensitive values unless the user explicitly needs a safe proof and policy permits it.",
81
+ "output": {
82
+ "path": "security/security-architecture-review.md",
83
+ "minBytes": 1600,
84
+ "requiredPatterns": [
85
+ {
86
+ "pattern": "^##\\s+Executive risk posture",
87
+ "label": "Executive risk posture section"
88
+ },
89
+ {
90
+ "pattern": "^##\\s+What is working",
91
+ "label": "What is working section"
92
+ },
93
+ {
94
+ "pattern": "^##\\s+Prioritized findings",
95
+ "label": "Prioritized findings section"
96
+ },
97
+ {
98
+ "pattern": "^##\\s+Remediation plan",
99
+ "label": "Remediation plan section"
100
+ },
101
+ {
102
+ "pattern": "^##\\s+Verification",
103
+ "label": "Verification section"
104
+ },
105
+ {
106
+ "pattern": "^##\\s+Unverified areas",
107
+ "label": "Unverified areas section"
108
+ }
109
+ ]
110
+ }
111
+ }
112
+ ],
113
+ "review": {
114
+ "artifactPath": "security/security-architecture-review.md",
115
+ "relatedPaths": [
116
+ "security/review-scope.md",
117
+ "security/findings-register.md"
118
+ ],
119
+ "reviewPath": "reviews/security-architecture-review-evaluation.md",
120
+ "reviewerRole": "independent security reviewer",
121
+ "repairRole": "application security engineer",
122
+ "criteria": [
123
+ "Scope, assets, trust boundaries, actors, data flows, and review limits are explicit.",
124
+ "Coverage includes identity, authorization, secrets, dependencies, inputs, storage, network, logging, updates, and operational failure paths where applicable.",
125
+ "Every confirmed finding has inspectable evidence, realistic preconditions, impact, severity, and confidence; pattern-only suspicions are not promoted.",
126
+ "No secret value or unsafe exploit detail is exposed in the deliverables.",
127
+ "Remediation is prioritized, owned, verifiable, and distinguishes containment from durable control repair.",
128
+ "Positive controls, rejected hypotheses, residual risk, and unverified areas are reported honestly."
129
+ ]
130
+ }
131
+ }
132
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "set": {
3
+ "toolsets": [
4
+ {
5
+ "toolsetId": "@playwright/mcp",
6
+ "optional": true,
7
+ "reason": "render and inspect the generated design-system preview when browser tools are available"
8
+ }
9
+ ]
10
+ },
11
+ "workflow": {
12
+ "plan": "Build one coherent visual system from product purpose, user needs, existing interface evidence, and a memorable design intent. Make opinionated recommendations with reasons instead of presenting an arbitrary menu. Preserve useful existing conventions, state accessibility constraints, and distinguish observed patterns from outside inspiration. Deliver both a durable DESIGN.md and a self-contained HTML preview that makes the system inspectable before implementation.",
13
+ "phases": [
14
+ {
15
+ "id": "audit-interface",
16
+ "name": "Audit the current interface",
17
+ "description": "Map the product, users, existing visual language, implementation constraints, and inconsistencies.",
18
+ "suggestedRole": "product designer",
19
+ "prompt": "Inspect the project description, interface entry points, components, styles, assets, screenshots, and accessibility conventions with workspace tools. Identify the product type, primary users and jobs, current design tokens and patterns worth preserving, inconsistencies, technical constraints, and missing states. If no interface exists, document that and work from the product brief rather than inventing current-state claims.",
20
+ "output": {
21
+ "path": "design/current-state-audit.md",
22
+ "minBytes": 900,
23
+ "requiredPatterns": [
24
+ {
25
+ "pattern": "^##\\s+Product and users",
26
+ "label": "Product and users section"
27
+ },
28
+ {
29
+ "pattern": "^##\\s+Existing language",
30
+ "label": "Existing language section"
31
+ },
32
+ {
33
+ "pattern": "^##\\s+Inconsistencies",
34
+ "label": "Inconsistencies section"
35
+ },
36
+ {
37
+ "pattern": "^##\\s+Constraints",
38
+ "label": "Constraints section"
39
+ },
40
+ {
41
+ "pattern": "^##\\s+Accessibility",
42
+ "label": "Accessibility section"
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ {
48
+ "id": "design-brief",
49
+ "name": "Lock the design brief",
50
+ "description": "Define the memorable intent, principles, references, exclusions, and success tests.",
51
+ "suggestedRole": "design strategist",
52
+ "prompt": "Use the audit to pre-fill a concise design brief. Ask the user one high-leverage question at a time with `ask_user_question`: confirm audience and product posture, the one thing the experience should be remembered for, useful references, strong dislikes, brand or accessibility constraints, and the most important workflows. When research tools are available and the user wants it, collect relevant outside patterns with sources; otherwise label proposals as design judgment. Recommend a direction and explain why it fits.",
53
+ "output": {
54
+ "path": "design/design-brief.md",
55
+ "minBytes": 800,
56
+ "requiredPatterns": [
57
+ {
58
+ "pattern": "^##\\s+Memorable intent",
59
+ "label": "Memorable intent section"
60
+ },
61
+ {
62
+ "pattern": "^##\\s+Design principles",
63
+ "label": "Design principles section"
64
+ },
65
+ {
66
+ "pattern": "^##\\s+References",
67
+ "label": "References section"
68
+ },
69
+ {
70
+ "pattern": "^##\\s+Avoid",
71
+ "label": "Avoid section"
72
+ },
73
+ {
74
+ "pattern": "^##\\s+Success tests",
75
+ "label": "Success tests section"
76
+ }
77
+ ]
78
+ }
79
+ },
80
+ {
81
+ "id": "propose-system",
82
+ "name": "Propose and render the design system",
83
+ "description": "Specify the system and render a realistic, accessible preview of its important states.",
84
+ "suggestedRole": "design systems lead",
85
+ "prompt": "Create `DESIGN.md` from the audit and brief, covering foundations, type scale, color roles and contrast, spacing, grid, shape, elevation, iconography, motion, components, states, responsive behavior, content voice, accessibility, and adoption sequence. Use exact reusable tokens and explain how every choice serves the memorable intent. Also create `previews/design-system.html`: a self-contained, responsive page that applies the proposed tokens to representative navigation, type, controls, cards, data or content, empty, loading, error, focus, hover, and disabled states. Inspect it with browser tools when available and record what was actually checked.",
86
+ "output": {
87
+ "path": "DESIGN.md",
88
+ "minBytes": 1800,
89
+ "requiredPatterns": [
90
+ {
91
+ "pattern": "^##\\s+Design intent",
92
+ "label": "Design intent section"
93
+ },
94
+ {
95
+ "pattern": "^##\\s+Tokens",
96
+ "label": "Tokens section"
97
+ },
98
+ {
99
+ "pattern": "^##\\s+Typography",
100
+ "label": "Typography section"
101
+ },
102
+ {
103
+ "pattern": "^##\\s+Color",
104
+ "label": "Color section"
105
+ },
106
+ {
107
+ "pattern": "^##\\s+Components and states",
108
+ "label": "Components and states section"
109
+ },
110
+ {
111
+ "pattern": "^##\\s+Accessibility",
112
+ "label": "Accessibility section"
113
+ },
114
+ {
115
+ "pattern": "^##\\s+Adoption",
116
+ "label": "Adoption section"
117
+ }
118
+ ],
119
+ "additionalChecks": [
120
+ {
121
+ "kind": "minBytes",
122
+ "file": "previews/design-system.html",
123
+ "bytes": 1800
124
+ },
125
+ {
126
+ "kind": "htmlLint",
127
+ "file": "previews/design-system.html"
128
+ }
129
+ ]
130
+ }
131
+ }
132
+ ],
133
+ "review": {
134
+ "artifactPath": "DESIGN.md",
135
+ "relatedPaths": [
136
+ "previews/design-system.html",
137
+ "design/current-state-audit.md",
138
+ "design/design-brief.md"
139
+ ],
140
+ "reviewPath": "reviews/design-system-consultation-review.md",
141
+ "reviewerRole": "product design reviewer",
142
+ "repairRole": "design systems lead",
143
+ "criteria": [
144
+ "The system visibly serves the product, users, memorable intent, and real implementation constraints.",
145
+ "Typography, color, spacing, layout, shape, motion, content, and components form a coherent system rather than independent preferences.",
146
+ "Tokens are specific and reusable, with responsive rules and all important interaction states.",
147
+ "Contrast, focus, reduced motion, keyboard use, readability, and error communication have explicit treatment.",
148
+ "The HTML preview is complete, renders without structural errors, and demonstrates representative states rather than a static swatch sheet.",
149
+ "Existing strengths, outside sources, design judgment, and unresolved assumptions are labeled honestly."
150
+ ]
151
+ }
152
+ }
153
+ }
@@ -0,0 +1,124 @@
1
+ {
2
+ "workflow": {
3
+ "plan": "Treat documentation as a tested product surface. Research implementation, tests, configuration, and existing prose before writing. Separate learning-oriented tutorials, task-oriented how-to guides, factual reference, and explanatory rationale. Every public claim must trace to a workspace source, every example must be verified when the environment permits, and every produced page must be reachable from the documentation index.",
4
+ "phases": [
5
+ {
6
+ "id": "inventory",
7
+ "name": "Inventory the documentation surface",
8
+ "description": "Map readers, public interfaces, source evidence, existing coverage, and gaps.",
9
+ "suggestedRole": "technical researcher",
10
+ "prompt": "Confirm the requested scope from the task and project context. Inspect the project guide, package or build metadata, entry points, public interfaces, configuration, examples, tests, and current docs with workspace tools. Build an exact inventory of the entities in scope, their source paths, intended readers, existing documentation, missing coverage, and risky claims that need verification. Do not start polished prose yet.",
11
+ "output": {
12
+ "path": "notes/documentation-inventory.md",
13
+ "minBytes": 900,
14
+ "requiredPatterns": [
15
+ {
16
+ "pattern": "^##\\s+Scope",
17
+ "label": "Scope section"
18
+ },
19
+ {
20
+ "pattern": "^##\\s+Readers",
21
+ "label": "Readers section"
22
+ },
23
+ {
24
+ "pattern": "^##\\s+Public surface",
25
+ "label": "Public surface section"
26
+ },
27
+ {
28
+ "pattern": "^##\\s+Source map",
29
+ "label": "Source map section"
30
+ },
31
+ {
32
+ "pattern": "^##\\s+Coverage gaps",
33
+ "label": "Coverage gaps section"
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ {
39
+ "id": "plan-docs",
40
+ "name": "Design the documentation set",
41
+ "description": "Choose the right document type for each reader need and lock verification criteria.",
42
+ "suggestedRole": "documentation architect",
43
+ "prompt": "Turn `notes/documentation-inventory.md` into a document plan. For each proposed page, state its reader, job, quadrant, destination path, evidence sources, prerequisites, cross-links, and pass/fail checks. Reuse existing conventions and update existing pages when that is clearer than duplication. Keep the set proportional to the scope, but cover every public item in the inventory or explicitly defer it with a reason.",
44
+ "output": {
45
+ "path": "notes/documentation-plan.md",
46
+ "minBytes": 900,
47
+ "requiredPatterns": [
48
+ {
49
+ "pattern": "^##\\s+Document matrix",
50
+ "label": "Document matrix section"
51
+ },
52
+ {
53
+ "pattern": "^##\\s+Information architecture",
54
+ "label": "Information architecture section"
55
+ },
56
+ {
57
+ "pattern": "^##\\s+Verification plan",
58
+ "label": "Verification plan section"
59
+ },
60
+ {
61
+ "pattern": "^##\\s+Deferred coverage",
62
+ "label": "Deferred coverage section"
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ {
68
+ "id": "author-and-verify",
69
+ "name": "Author, link, and verify the docs",
70
+ "description": "Write the planned pages, validate examples and links, and expose the complete set through one index.",
71
+ "suggestedRole": "technical writer",
72
+ "prompt": "Implement the approved document plan in the workspace. Keep reference factual, how-to steps actionable, tutorials quick to first result, and explanations explicit about trade-offs. Verify commands, code examples, option names, defaults, and constraints against implementation and tests; run safe examples where possible and label anything not executed. Add troubleshooting based on real failure paths. Cross-link related pages and write an index that lists every created or updated document, its reader job, quadrant, source evidence, and verification status.",
73
+ "output": {
74
+ "path": "docs/documentation-index.md",
75
+ "minBytes": 1200,
76
+ "requiredPatterns": [
77
+ {
78
+ "pattern": "^##\\s+Documentation map",
79
+ "label": "Documentation map section"
80
+ },
81
+ {
82
+ "pattern": "^##\\s+Tutorials",
83
+ "label": "Tutorials section"
84
+ },
85
+ {
86
+ "pattern": "^##\\s+How-to guides",
87
+ "label": "How-to guides section"
88
+ },
89
+ {
90
+ "pattern": "^##\\s+Reference",
91
+ "label": "Reference section"
92
+ },
93
+ {
94
+ "pattern": "^##\\s+Explanation",
95
+ "label": "Explanation section"
96
+ },
97
+ {
98
+ "pattern": "^##\\s+Verification",
99
+ "label": "Verification section"
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ ],
105
+ "review": {
106
+ "artifactPath": "docs/documentation-index.md",
107
+ "relatedPaths": [
108
+ "notes/documentation-inventory.md",
109
+ "notes/documentation-plan.md"
110
+ ],
111
+ "reviewPath": "reviews/technical-documentation-review.md",
112
+ "reviewerRole": "technical editor",
113
+ "repairRole": "technical writer",
114
+ "criteria": [
115
+ "Every in-scope public item is documented or explicitly deferred with a reason.",
116
+ "Claims, types, defaults, constraints, and examples agree with the cited implementation or tests.",
117
+ "Tutorial, how-to, reference, and explanation content serve distinct reader jobs without needless duplication.",
118
+ "Commands and examples have credible verification results or are clearly marked unexecuted.",
119
+ "Every produced page is linked from the index and all internal links resolve.",
120
+ "The prose is concrete, readable, and includes real troubleshooting and trade-offs where relevant."
121
+ ]
122
+ }
123
+ }
124
+ }