@ketecode/loom 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/README.md +111 -11
  2. package/agents/code-reviewer/evals/behavior.json +60 -0
  3. package/agents/inbox-triager/AGENT.md +98 -0
  4. package/agents/inbox-triager/evals/triggers.json +16 -0
  5. package/agents/spec-reviewer/AGENT.md +95 -0
  6. package/agents/spec-reviewer/evals/behavior.json +57 -0
  7. package/agents/spec-reviewer/evals/triggers.json +16 -0
  8. package/agents/task-implementer/AGENT.md +89 -0
  9. package/agents/task-implementer/evals/behavior.json +47 -0
  10. package/agents/task-implementer/evals/triggers.json +16 -0
  11. package/bin/kete-loom.js +46 -6
  12. package/commands/brainstorm.md +25 -0
  13. package/commands/debug.md +27 -0
  14. package/commands/dual-review.md +34 -0
  15. package/commands/feature-dev.md +8 -7
  16. package/commands/finish-branch.md +26 -0
  17. package/commands/fix-bug.md +38 -0
  18. package/commands/production-readiness.md +45 -0
  19. package/commands/usage-report.md +43 -0
  20. package/hooks/block-foreground-servers/HOOK.md +34 -0
  21. package/hooks/block-foreground-servers/cases.json +31 -0
  22. package/hooks/block-foreground-servers/hook.js +41 -0
  23. package/hooks/capture-lessons/HOOK.md +24 -0
  24. package/hooks/capture-lessons/hook.js +48 -0
  25. package/hooks/notify-on-stop/HOOK.md +25 -0
  26. package/hooks/notify-on-stop/hook.js +27 -0
  27. package/hooks/protect-lint-config/HOOK.md +29 -0
  28. package/hooks/protect-lint-config/cases.json +18 -0
  29. package/hooks/protect-lint-config/fixtures/.eslintrc.json +1 -0
  30. package/hooks/protect-lint-config/fixtures/.golangci.yml +1 -0
  31. package/hooks/protect-lint-config/fixtures/.prettierrc +1 -0
  32. package/hooks/protect-lint-config/fixtures/.rubocop.yml +1 -0
  33. package/hooks/protect-lint-config/fixtures/biome.json +1 -0
  34. package/hooks/protect-lint-config/fixtures/eslint.config.mjs +1 -0
  35. package/hooks/protect-lint-config/fixtures/ruff.toml +1 -0
  36. package/hooks/protect-lint-config/hook.js +25 -0
  37. package/hooks/read-before-edit/HOOK.md +26 -0
  38. package/hooks/read-before-edit/cases.json +15 -0
  39. package/hooks/read-before-edit/hook.js +50 -0
  40. package/hooks/run.js +22 -6
  41. package/hooks/verify-before-stop/HOOK.md +32 -0
  42. package/hooks/verify-before-stop/hook.js +70 -0
  43. package/mcp/clickhouse.json +11 -0
  44. package/mcp/exa.json +11 -0
  45. package/mcp/firecrawl.json +11 -0
  46. package/mcp/vercel.json +11 -0
  47. package/package.json +6 -4
  48. package/profiles.json +54 -5
  49. package/rules/use-skills.md +23 -0
  50. package/scripts/lib/behavior.js +52 -0
  51. package/scripts/lib/hooks-install.js +9 -7
  52. package/scripts/lib/lint.js +24 -2
  53. package/scripts/lib/mcp-install.js +5 -1
  54. package/scripts/lib/render.js +6 -0
  55. package/scripts/lib/skills.js +1 -0
  56. package/scripts/lib/targets.js +10 -0
  57. package/skills/agent-failure-debugging/SKILL.md +92 -0
  58. package/skills/agent-failure-debugging/evals/triggers.json +16 -0
  59. package/skills/agent-outbound-messaging/SKILL.md +92 -0
  60. package/skills/agent-outbound-messaging/evals/triggers.json +16 -0
  61. package/skills/agent-security/SKILL.md +117 -0
  62. package/skills/agent-security/evals/triggers.json +16 -0
  63. package/skills/agent-security/references/host-configs.md +37 -0
  64. package/skills/api-client-integration/SKILL.md +86 -0
  65. package/skills/api-client-integration/evals/triggers.json +16 -0
  66. package/skills/api-client-integration/references/resilience.md +57 -0
  67. package/skills/blender-automation/SKILL.md +100 -0
  68. package/skills/blender-automation/evals/triggers.json +16 -0
  69. package/skills/blender-automation/references/batch-and-render.md +77 -0
  70. package/skills/blender-automation/references/bpy-inspection.md +91 -0
  71. package/skills/blender-automation/references/rig-and-retarget-checks.md +23 -0
  72. package/skills/brand-strategy/SKILL.md +83 -0
  73. package/skills/brand-strategy/evals/triggers.json +16 -0
  74. package/skills/change-impact-analysis/SKILL.md +89 -0
  75. package/skills/change-impact-analysis/evals/triggers.json +16 -0
  76. package/skills/change-impact-analysis/references/graph-commands.md +28 -0
  77. package/skills/contract-drafting/SKILL.md +96 -0
  78. package/skills/contract-drafting/evals/triggers.json +16 -0
  79. package/skills/contract-drafting/references/term-sheets.md +68 -0
  80. package/skills/contract-first-development/SKILL.md +86 -0
  81. package/skills/contract-first-development/evals/triggers.json +16 -0
  82. package/skills/contract-first-development/references/tooling.md +46 -0
  83. package/skills/decision-council/SKILL.md +98 -0
  84. package/skills/decision-council/evals/triggers.json +16 -0
  85. package/skills/design-brainstorming/SKILL.md +132 -0
  86. package/skills/design-brainstorming/evals/behavior.json +55 -0
  87. package/skills/design-brainstorming/evals/triggers.json +16 -0
  88. package/skills/design-brainstorming/references/visual-mockups.md +34 -0
  89. package/skills/desktop-app-testing/SKILL.md +104 -0
  90. package/skills/desktop-app-testing/evals/triggers.json +16 -0
  91. package/skills/desktop-app-testing/references/drivers.md +81 -0
  92. package/skills/document-processing/SKILL.md +100 -0
  93. package/skills/document-processing/evals/triggers.json +17 -0
  94. package/skills/document-processing/references/extraction-and-ocr.md +71 -0
  95. package/skills/document-processing/references/forms-and-conversion.md +69 -0
  96. package/skills/document-processing/references/redaction.md +61 -0
  97. package/skills/energy-procurement/SKILL.md +106 -0
  98. package/skills/energy-procurement/evals/triggers.json +16 -0
  99. package/skills/finishing-a-branch/SKILL.md +127 -0
  100. package/skills/finishing-a-branch/evals/behavior.json +49 -0
  101. package/skills/finishing-a-branch/evals/triggers.json +16 -0
  102. package/skills/freight-carrier-management/SKILL.md +107 -0
  103. package/skills/freight-carrier-management/evals/triggers.json +16 -0
  104. package/skills/git-worktrees/SKILL.md +130 -0
  105. package/skills/git-worktrees/evals/behavior.json +56 -0
  106. package/skills/git-worktrees/evals/triggers.json +16 -0
  107. package/skills/google-workspace-integration/SKILL.md +65 -0
  108. package/skills/google-workspace-integration/evals/triggers.json +17 -0
  109. package/skills/google-workspace-integration/references/api.md +121 -0
  110. package/skills/harmonyos-arkts/SKILL.md +117 -0
  111. package/skills/harmonyos-arkts/evals/triggers.json +16 -0
  112. package/skills/harmonyos-arkts/references/build-errors.md +42 -0
  113. package/skills/implementation-plans/SKILL.md +117 -0
  114. package/skills/implementation-plans/evals/behavior.json +54 -0
  115. package/skills/implementation-plans/evals/triggers.json +16 -0
  116. package/skills/ios-platform-features/SKILL.md +99 -0
  117. package/skills/ios-platform-features/evals/triggers.json +16 -0
  118. package/skills/ios-platform-features/references/foundation-models.md +90 -0
  119. package/skills/jvm-sql-mappers/SKILL.md +98 -0
  120. package/skills/jvm-sql-mappers/evals/triggers.json +16 -0
  121. package/skills/jvm-sql-mappers/references/examples.md +129 -0
  122. package/skills/mobile-accessibility/SKILL.md +94 -0
  123. package/skills/mobile-accessibility/evals/triggers.json +16 -0
  124. package/skills/network-design/SKILL.md +98 -0
  125. package/skills/network-design/evals/triggers.json +16 -0
  126. package/skills/observability/SKILL.md +125 -0
  127. package/skills/observability/evals/triggers.json +17 -0
  128. package/skills/observability/references/otel-setup.md +87 -0
  129. package/skills/observability/references/slo-alerts.md +70 -0
  130. package/skills/open-source-release/SKILL.md +107 -0
  131. package/skills/open-source-release/evals/triggers.json +15 -0
  132. package/skills/open-source-release/references/history-scrub.md +65 -0
  133. package/skills/patent-research/SKILL.md +94 -0
  134. package/skills/patent-research/evals/triggers.json +16 -0
  135. package/skills/patent-research/references/databases-and-queries.md +52 -0
  136. package/skills/prospect-research/SKILL.md +87 -0
  137. package/skills/prospect-research/evals/triggers.json +16 -0
  138. package/skills/python-app-distribution/SKILL.md +107 -0
  139. package/skills/python-app-distribution/evals/triggers.json +16 -0
  140. package/skills/python-app-distribution/references/pypi-trusted-publishing.md +55 -0
  141. package/skills/python-app-distribution/references/windows-macos-signing.md +70 -0
  142. package/skills/quality-nonconformance/SKILL.md +107 -0
  143. package/skills/quality-nonconformance/evals/triggers.json +16 -0
  144. package/skills/quality-nonconformance/references/8d-and-capa.md +46 -0
  145. package/skills/react-testing/SKILL.md +121 -0
  146. package/skills/react-testing/evals/triggers.json +18 -0
  147. package/skills/react-testing/references/msw.md +64 -0
  148. package/skills/react-testing/references/queries.md +41 -0
  149. package/skills/react-testing/references/setup.md +74 -0
  150. package/skills/recommender-systems/SKILL.md +119 -0
  151. package/skills/recommender-systems/evals/triggers.json +16 -0
  152. package/skills/recommender-systems/references/evaluation.md +39 -0
  153. package/skills/refactoring-safely/evals/behavior.json +57 -0
  154. package/skills/reproducible-dev-environments/SKILL.md +132 -0
  155. package/skills/reproducible-dev-environments/evals/triggers.json +16 -0
  156. package/skills/responding-to-code-review/SKILL.md +124 -0
  157. package/skills/responding-to-code-review/evals/behavior.json +54 -0
  158. package/skills/responding-to-code-review/evals/triggers.json +16 -0
  159. package/skills/security-review/evals/behavior.json +56 -0
  160. package/skills/session-handoff/evals/behavior.json +55 -0
  161. package/skills/skill-authoring/SKILL.md +13 -2
  162. package/skills/skill-authoring/evals/triggers.json +2 -1
  163. package/skills/skill-authoring/references/pressure-testing.md +87 -0
  164. package/skills/slide-decks/SKILL.md +107 -0
  165. package/skills/slide-decks/evals/triggers.json +18 -0
  166. package/skills/slide-decks/references/html-decks.md +86 -0
  167. package/skills/slide-decks/references/layouts.md +45 -0
  168. package/skills/slide-decks/references/pptx.md +87 -0
  169. package/skills/subagent-driven-development/SKILL.md +109 -0
  170. package/skills/subagent-driven-development/evals/behavior.json +53 -0
  171. package/skills/subagent-driven-development/evals/triggers.json +15 -0
  172. package/skills/subagent-driven-development/references/implementer-brief.md +60 -0
  173. package/skills/subagent-driven-development/references/reviewer-briefs.md +52 -0
  174. package/skills/systematic-debugging/SKILL.md +92 -0
  175. package/skills/systematic-debugging/evals/behavior.json +59 -0
  176. package/skills/systematic-debugging/evals/triggers.json +16 -0
  177. package/skills/systematic-debugging/references/condition-waiting.md +52 -0
  178. package/skills/systematic-debugging/references/root-cause-tracing.md +49 -0
  179. package/skills/systematic-debugging/references/test-pollution.md +46 -0
  180. package/skills/tdd-workflow/SKILL.md +3 -1
  181. package/skills/tdd-workflow/evals/behavior.json +55 -0
  182. package/skills/tdd-workflow/evals/triggers.json +2 -1
  183. package/skills/tdd-workflow/references/testing-anti-patterns.md +87 -0
  184. package/skills/transactional-email/SKILL.md +68 -0
  185. package/skills/transactional-email/evals/triggers.json +17 -0
  186. package/skills/transactional-email/references/providers.md +63 -0
  187. package/skills/ui-demo-recording/SKILL.md +93 -0
  188. package/skills/ui-demo-recording/evals/triggers.json +16 -0
  189. package/skills/ui-demo-recording/references/cursor-and-captions.md +48 -0
  190. package/skills/ui-demo-recording/references/playwright-recording.md +63 -0
  191. package/skills/ui-demo-recording/references/post-processing.md +57 -0
  192. package/skills/ui-design-polish/SKILL.md +113 -0
  193. package/skills/ui-design-polish/evals/triggers.json +18 -0
  194. package/skills/ui-design-polish/references/detail-checklist.md +45 -0
  195. package/skills/ui-design-polish/references/tokens.md +68 -0
  196. package/skills/ui-flow-audit/SKILL.md +112 -0
  197. package/skills/ui-flow-audit/evals/triggers.json +17 -0
  198. package/skills/ui-motion/SKILL.md +103 -0
  199. package/skills/ui-motion/evals/triggers.json +18 -0
  200. package/skills/ui-motion/references/patterns.md +138 -0
  201. package/skills/ui-motion/references/tokens.md +52 -0
  202. package/skills/unicode-text-processing/SKILL.md +103 -0
  203. package/skills/unicode-text-processing/evals/triggers.json +17 -0
  204. package/skills/unicode-text-processing/references/apis.md +89 -0
  205. package/skills/unicode-text-processing/references/script-notes.md +50 -0
  206. package/skills/verification-loop/evals/behavior.json +52 -0
  207. package/skills/video-editing/SKILL.md +111 -0
  208. package/skills/video-editing/evals/triggers.json +16 -0
  209. package/skills/video-editing/references/edl-and-logging.md +44 -0
  210. package/skills/video-editing/references/ffmpeg-edit-recipes.md +92 -0
  211. package/skills/video-editing/references/resolve-scripting.md +53 -0
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: contract-drafting
3
+ description: Assembles first-draft commercial agreements, namely master services agreements, NDAs, statements of work and GDPR-style data processing agreements, by filling the organisation's own clause template from a structured term sheet, logging every departure from the standard position in a deviation register with its risk and approver, and producing a plain-language redline summary, with a mandatory gate that a qualified lawyer reviews the draft before anyone signs or sends it. Use when you need a first draft of an MSA, NDA, SOW or DPA from your template and agreed terms, when the other side's paper must be compared against your playbook, or when preparing a summary of changes for legal sign-off.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Works on the user's templates and documents (Markdown, plain text or .docx through the host's document tools). Not legal advice; every output is a draft for a qualified lawyer to review.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: compliance
9
+ kete-loom/risk: writes-files
10
+ kete-loom/owner: "Kete-org"
11
+ ---
12
+
13
+ # Contract drafting
14
+
15
+ Produce a clean draft that says exactly what was agreed, in the organisation's own approved language, and make every deviation visible so a lawyer can review the draft quickly. You assemble and flag; you never decide that a term is legally acceptable.
16
+
17
+ ## Lawyer-review gate (mandatory)
18
+
19
+ Every output from this skill is marked `DRAFT - FOR LEGAL REVIEW - NOT FOR SIGNATURE`. Keep that marking until the user confirms a qualified lawyer has approved the draft. **Never** remove it, send the draft to the counterparty, or call it final on your own.
20
+
21
+ **Stop and tell the user a lawyer must handle it** (do not draft the clause yourself) when:
22
+
23
+ - There is no approved template for the agreement type or the clause, and the user asks you to write legal terms from scratch.
24
+ - The governing law, jurisdiction or a party's country is one the template was not written for.
25
+ - The deal touches regulated areas: personal data transfers outside the EEA/UK, health data, financial services, export-controlled goods, employment, consumer contracts, government contracts, or competition-sensitive terms (exclusivity, non-competes, pricing between competitors).
26
+ - The term sheet asks for unlimited liability, an uncapped indemnity, IP assignment of the organisation's core IP, or a change to any clause the template marks "non-negotiable".
27
+
28
+ ## 0. Gather inputs
29
+
30
+ 1. The template: the organisation's own clause library or standard form for this agreement type, with its version. If the user has none, see the gate above.
31
+ 2. The playbook, if there is one: preferred position, acceptable fallbacks and walk-away for each key clause.
32
+ 3. The term sheet, as structured fields. The field list per agreement type is in `references/term-sheets.md`. Ask for every missing required field; never fill a commercial term with a guess.
33
+ 4. The counterparty's draft or redline, if you are comparing their paper against yours.
34
+
35
+ ## 1. Assemble the draft
36
+
37
+ 1. Copy the template; do not rewrite its clauses for style. Approved language is approved because it was reviewed.
38
+ 2. Fill placeholders from the term sheet only. Party names must be full legal names with entity type and registration details as the user supplied them.
39
+ 3. Keep defined terms consistent: every capitalised term is defined once and used with the same spelling. Check that every cross-reference points to a clause that exists after edits.
40
+ 4. Keep the document order the template uses. Schedules (SOW, pricing, DPA, service levels) attach to the master agreement and the order-of-precedence clause says which wins on conflict.
41
+ 5. Where the term sheet asks for something the template does not say, do not invent wording. Insert `[DEVIATION D-n: <what is requested>]` and log it.
42
+
43
+ ## 2. Deviation register
44
+
45
+ Log every place the draft differs from the template or the playbook's preferred position:
46
+
47
+ ```
48
+ ID | clause | standard position | requested / drafted position | why (business reason) | risk (low | medium | high) | playbook fallback? | approver needed | status
49
+ ```
50
+
51
+ Rules for the risk rating:
52
+
53
+ - High: liability caps, indemnities, IP ownership, data protection, termination for convenience, exclusivity, governing law, anything outside the playbook.
54
+ - Medium: payment terms, warranties, service levels and credits, acceptance, notice periods, renewal.
55
+ - Low: dates, contact details, administrative wording.
56
+
57
+ When comparing the counterparty's paper, log each of their changes the same way, with the playbook position next to it.
58
+
59
+ ## 3. Redline summary
60
+
61
+ For the reviewer, in plain language, ordered by risk:
62
+
63
+ 1. One paragraph: deal, parties, agreement type, template version, governing law.
64
+ 2. A table of deviations (from the register), high risk first, each with one sentence on what it means in practice ("we would owe them up to 12 months of fees if a data breach is our fault").
65
+ 3. Missing information and open questions.
66
+ 4. Clauses that need specialist review (data protection, tax, export, employment).
67
+
68
+ Produce a tracked-changes or comparison document against the template when the host's document tools allow it; otherwise list changes clause by clause.
69
+
70
+ ## 4. Agreement-type checks
71
+
72
+ Before handing over, run the checklist for the agreement type in `references/term-sheets.md`. Short version:
73
+
74
+ - **NDA:** mutual or one-way; definition of confidential information and exclusions; permitted use and disclosees; term and survival; return or destruction; no licence granted; remedies.
75
+ - **MSA:** scope and order of precedence; fees, invoicing and payment; warranties; liability cap and exclusions; indemnities; IP ownership and licences; confidentiality; data protection hook to a DPA; term, renewal and termination; insurance; governing law and disputes.
76
+ - **SOW:** deliverables, milestones, acceptance criteria and process, assumptions, dependencies, change control, fees per milestone, named contacts; nothing in the SOW silently overrides the MSA.
77
+ - **DPA (GDPR Article 28):** the Article 28(3) contents must be present: subject matter, duration, nature and purpose, types of personal data and data subjects, and the processor obligations (documented instructions, confidentiality, security, sub-processors, assistance with data subject rights and with security and impact assessments, deletion or return, audit). International transfers need a transfer mechanism such as the EU Standard Contractual Clauses (2021) or the UK addendum; route those to a privacy lawyer and the `privacy-compliance` skill.
78
+
79
+ ## Rules
80
+
81
+ - Never remove the draft marking or send the draft outside the organisation without the user confirming lawyer approval.
82
+ - Never invent a commercial term, party detail or legal clause that is not in the template, playbook or term sheet.
83
+ - Never silently change approved template language; every change is a logged deviation.
84
+ - Do not give an opinion on whether a clause is enforceable; say it needs a lawyer.
85
+ - Keep counterparty documents confidential; do not paste them into external services the user has not approved.
86
+
87
+ ## Report
88
+
89
+ ```
90
+ Draft: <file> | type <NDA | MSA | SOW | DPA> | template <name, version> | status DRAFT - FOR LEGAL REVIEW
91
+ Parties: <legal names> Governing law: <law>
92
+ Deviations: <n high, n medium, n low> (register attached)
93
+ Missing inputs: <list>
94
+ Specialist review needed: <data protection, tax, export, employment, none>
95
+ Next step: lawyer review by <name or role, if the user named one>
96
+ ```
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "Use our MSA template and this term sheet to draft the agreement with Acme Logistics, and flag anything that differs from our standard",
4
+ "Draft a mutual NDA for talks with a potential acquirer using the clause library in legal/templates",
5
+ "The customer sent back our SOW with their changes, compare it to our playbook and write a redline summary for legal",
6
+ "We need a data processing agreement with our new email vendor based on our DPA template, fill in the processing details",
7
+ "Build a deviation register for this services agreement showing every change from our standard liability and indemnity clauses"
8
+ ],
9
+ "should_not_trigger": [
10
+ "Map the personal data our signup flow collects and set retention periods for each field",
11
+ "Check whether our invention is novel before we spend money on a patent application",
12
+ "Generate invoices with the right VAT fields for our customers in Germany",
13
+ "Explain in two sentences the difference between an MSA and a SOW",
14
+ "Negotiate better rates with our truckload carriers on the Midwest lanes"
15
+ ]
16
+ }
@@ -0,0 +1,68 @@
1
+ # Term sheet fields and pre-review checklists
2
+
3
+ Read this when collecting inputs for a draft (section 0) or running the agreement-type checks (section 4). Required fields are marked `*`. Ask for every missing required field.
4
+
5
+ ## Common to all agreements
6
+
7
+ - `*` Parties: full legal name, entity type, jurisdiction of incorporation, registered address, company number where used.
8
+ - `*` Effective date, and signatories (name, title).
9
+ - `*` Governing law and dispute forum (courts or arbitration, seat, rules).
10
+ - Notices: addresses and email for formal notice.
11
+ - Template name and version used.
12
+
13
+ ## NDA
14
+
15
+ - `*` Mutual or one-way; who discloses.
16
+ - `*` Purpose (the permitted use of the information).
17
+ - `*` Term of the agreement and how long confidentiality obligations survive; any trade secrets carve-out to last longer.
18
+ - Permitted disclosees (employees, affiliates, advisers, financing sources).
19
+ - Exclusions: public, already known, independently developed, received from a third party lawfully; compelled disclosure process.
20
+ - Return or destruction on request, with a backup-copy carve-out.
21
+ - Non-solicitation or standstill (high risk; often belongs in a separate agreement).
22
+
23
+ ## MSA
24
+
25
+ - `*` Services or products in scope; how orders or SOWs are created.
26
+ - `*` Fees, currency, invoicing schedule, payment terms, late payment, price changes, taxes.
27
+ - `*` Liability cap (amount or formula, for example fees paid in the prior 12 months) and exclusions from the cap.
28
+ - `*` Term, renewal (auto-renew and notice), termination for cause and for convenience, effects of termination.
29
+ - Indemnities: who indemnifies whom, for what (IP infringement, data breach, third-party claims), procedure.
30
+ - Warranties and disclaimers; service levels and credits as a schedule.
31
+ - IP: background IP stays with its owner; ownership of deliverables; licences granted.
32
+ - Data protection: whether a DPA is needed; security schedule.
33
+ - Insurance types and minimums.
34
+ - Subcontracting, assignment and change of control.
35
+ - Order of precedence between MSA, SOW, schedules and purchase orders.
36
+
37
+ ## SOW
38
+
39
+ - `*` Reference to the governing MSA and its date.
40
+ - `*` Deliverables with descriptions; milestones and dates.
41
+ - `*` Acceptance criteria, acceptance period, and what happens on rejection.
42
+ - `*` Fees per milestone or rate card, expenses policy.
43
+ - Assumptions and customer dependencies; change-request process.
44
+ - Named contacts and governance meetings.
45
+ - Checks: the SOW must not change liability, IP or payment terms set in the MSA unless the MSA allows it, and then the change is a logged deviation.
46
+
47
+ ## DPA
48
+
49
+ - `*` Roles: controller and processor (or processor and sub-processor).
50
+ - `*` Subject matter, duration, nature and purpose of processing.
51
+ - `*` Types of personal data, special categories if any, categories of data subjects.
52
+ - `*` Security measures (usually an annex).
53
+ - `*` Sub-processors: list, approval method (specific or general with notice and objection).
54
+ - Breach notice period from processor to controller.
55
+ - Assistance with data subject requests, security, impact assessments and prior consultation.
56
+ - Deletion or return at end of services.
57
+ - Audits and information rights.
58
+ - International transfers: destinations and mechanism (EU SCCs 2021 module, UK IDTA or addendum). Route to a privacy lawyer.
59
+
60
+ Check each DPA against the processor terms of GDPR Article 28(3) and the law of the user's jurisdiction; other data protection laws have their own processor contract requirements.
61
+
62
+ ## Final pre-review checks (all types)
63
+
64
+ - Every placeholder filled or logged as a deviation; no `[ ]` left unexplained.
65
+ - Defined terms defined once and used consistently; cross-references valid.
66
+ - Dates, amounts and currencies match the term sheet exactly (amounts in words and figures agree if both are used).
67
+ - Signature blocks match the party names.
68
+ - Draft marking present on every page or in the header.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: contract-first-development
3
+ description: Coordinates frontend and backend teams, or two services, around one machine-checked interface contract in OpenAPI, AsyncAPI, protobuf or JSON Schema that is reviewed and merged before code, then drives generated clients and server stubs, mock servers for parallel work, CI gates for breaking changes with oasdiff and buf breaking, and Pact consumer-driven contract tests with can-i-deploy checks. Use when two teams or services must build against the same interface at the same time, a spec keeps drifting from the implementation, or a provider change broke a consumer that nobody tested against.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Uses the contract tooling the repo already has (for example oasdiff, buf, Prism, openapi-generator, Pact); network access only for a Pact Broker.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: coding
9
+ kete-loom/risk: runs-commands
10
+ kete-loom/owner: "Kete-org"
11
+ ---
12
+
13
+ # Contract-first development
14
+
15
+ One contract file is the source of truth for an interface. Both sides generate from it or test against it, CI blocks breaking edits to it, and nobody codes against a Slack message or a screenshot of a JSON payload.
16
+
17
+ For designing the API itself (resource naming, status codes, pagination, versioning policy) use the `api-design` skill if installed; this skill is about the workflow around the contract once its shape is being agreed.
18
+
19
+ ## 0. Pick the format and the owner
20
+
21
+ | Interface | Contract format |
22
+ |---|---|
23
+ | HTTP/REST | OpenAPI 3.x (3.1 aligns schemas with JSON Schema 2020-12) |
24
+ | Events, queues, WebSockets | AsyncAPI 3.x, payloads in JSON Schema or Avro |
25
+ | gRPC / internal RPC | protobuf with buf |
26
+ | A data file or message without a transport | JSON Schema |
27
+
28
+ 1. Use the format already in the repo. If there are several, ask the user which is authoritative; never keep two hand-written sources of the same interface.
29
+ 2. Decide where the contract lives: in the provider repo, or a shared contracts repo/package. Record the owner who approves changes (a `CODEOWNERS` entry is ideal).
30
+ 3. **Stop and ask** if the implementation exists and the spec is generated from code: switching to spec-first is a team decision.
31
+
32
+ ## 1. Write and review the contract before code
33
+
34
+ 1. Draft the change as a pull request that touches only the contract (plus examples).
35
+ 2. Every operation or message has: request and response schemas, required vs optional fields, error responses, at least one realistic example, and an `operationId` (OpenAPI) so generated code has stable names.
36
+ 3. Lint it: `redocly lint` or `spectral lint` for OpenAPI, `asyncapi validate` for AsyncAPI, `buf lint` for protobuf, and validate examples against the schemas.
37
+ 4. Both sides review. A consumer approval is required for anything they will call.
38
+ 5. Merge, then tag or version the contract so both sides pin the same revision.
39
+
40
+ ## 2. Work in parallel from the contract
41
+
42
+ - **Consumer side**: generate a typed client and start against a mock server built from the contract (`prism mock openapi.yaml` for OpenAPI; buf/connect or a generated stub for protobuf; AsyncAPI generators or a test broker for events). Never hand-write request types that the generator can produce.
43
+ - **Provider side**: generate server interfaces or stubs, or validate requests and responses against the spec at runtime in tests, so the implementation can't silently diverge.
44
+ - Commit generated code or regenerate in the build; follow whichever the repo already does, and make CI fail when the committed output is stale. Tools and commands: `references/tooling.md`.
45
+
46
+ ## 3. Block breaking changes in CI
47
+
48
+ On every PR that touches a contract, compare with the base branch:
49
+
50
+ - OpenAPI: `oasdiff breaking --fail-on ERR origin/main:openapi.yaml HEAD:openapi.yaml`; `oasdiff changelog` for the PR description.
51
+ - protobuf: `buf breaking --against '.git#branch=main'` (default rule set `FILE`; set `breaking.use` in `buf.yaml`).
52
+ - JSON Schema / AsyncAPI: run the repo's diff tool, or treat removed properties, newly required fields, narrowed types and removed enum values as breaking in review.
53
+
54
+ A breaking change needs one of: a new version (path, package, or message type), an additive alternative plus deprecation, or written agreement from every consumer. **Stop and ask the user** before merging any breaking change.
55
+
56
+ Common breaking edits: removing or renaming a field, endpoint, message or enum value; making an optional request field required; changing a type or format; tightening validation; reusing a protobuf field number. Also breaking for many consumers: adding a value to a response enum (strict clients and exhaustive switches fail) and changing default values. Usually safe: adding optional request fields, adding response fields (only if consumers ignore unknown fields), adding endpoints.
57
+
58
+ ## 4. Consumer-driven contract tests (Pact)
59
+
60
+ Use when consumers depend on behaviour a schema can't express (which fields they actually read, state-dependent responses), or when providers deploy independently.
61
+
62
+ 1. Consumer tests run against the Pact mock and write a pact file describing only the interactions the consumer uses.
63
+ 2. Publish pacts to a Pact Broker (or PactFlow) tagged with the consumer's git SHA and branch.
64
+ 3. The provider verifies pacts in its CI with provider states set up through a test hook, never against shared staging data.
65
+ 4. Before each deploy: `pact-broker can-i-deploy --pacticipant <name> --version <sha> --to-environment <env>`; after it: `pact-broker record-deployment --pacticipant <name> --version <sha> --environment <env>`.
66
+ 5. Pact does not replace schema checks; run both.
67
+
68
+ ## Never
69
+
70
+ - Never edit generated code by hand; change the contract or the generator config.
71
+ - Never let the mock server drift from the spec (generate it from the spec, don't hand-write fixtures).
72
+ - Never disable a breaking-change check to get a PR green.
73
+ - Never reuse a deleted protobuf field number or name; `reserved` them.
74
+
75
+ ## Report
76
+
77
+ ```
78
+ ## Contract: <interface> (<format>, <path>@<revision>)
79
+ Owner: <team/person>
80
+ Lint: <command> -> pass/fail
81
+ Breaking-change check: <command> -> <n breaking> (<list>)
82
+ Generated: client <tool/path>, server <tool/path>, stale: yes/no
83
+ Mock: <command or none>
84
+ Consumer contracts: <Pact status, can-i-deploy result, or not used>
85
+ Needs agreement: <breaking changes and which consumers must approve>
86
+ ```
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "The mobile team and the backend team keep disagreeing about payload shapes. Set us up so both build from one OpenAPI spec with a mock server.",
4
+ "Add a CI check that fails the PR if someone makes a breaking change to our protobuf files",
5
+ "A provider deploy broke the checkout frontend again. Set up Pact consumer tests and can-i-deploy before releases.",
6
+ "Our openapi.yaml has drifted from what the Go service actually returns. Generate the server interfaces from the spec so they can't diverge.",
7
+ "We're about to start a new order-events topic. Agree the AsyncAPI contract first so both services can start in parallel."
8
+ ],
9
+ "should_not_trigger": [
10
+ "Design the REST endpoints and status codes for our new invoicing API",
11
+ "Write a typed client for the Shopify Admin API with retries and pagination",
12
+ "Write Playwright end-to-end tests for the signup flow",
13
+ "Which packages in our monorepo depend on the shared validation library?",
14
+ "Add a migration that renames the orders.total column"
15
+ ]
16
+ }
@@ -0,0 +1,46 @@
1
+ # Contract tooling
2
+
3
+ Prefer tools already in the repo. Check flags with `--help` for the installed version.
4
+
5
+ ## OpenAPI
6
+
7
+ | Job | Tool and command |
8
+ |---|---|
9
+ | Lint | `npx @redocly/cli lint openapi.yaml`, or `spectral lint openapi.yaml` with a `.spectral.yaml` ruleset |
10
+ | Breaking changes | `oasdiff breaking --fail-on ERR <base> <revision>`; bases can be files, URLs or `<git-ref>:<path>`; `--fail-on WARN` is stricter |
11
+ | Changelog | `oasdiff changelog <base> <revision>` |
12
+ | Mock server | `npx @stoplight/prism-cli mock openapi.yaml` (serves examples; `-d` for dynamic data) |
13
+ | Validating proxy | `prism proxy openapi.yaml <upstream-url>` reports requests and responses that violate the spec |
14
+ | TypeScript types | `npx openapi-typescript openapi.yaml -o src/api/schema.d.ts`, with `openapi-fetch` for a typed client |
15
+ | Clients and stubs, many languages | `openapi-generator-cli generate -i openapi.yaml -g <generator> -o <dir>` |
16
+ | Go | `oapi-codegen` with a config file selecting client, server or types |
17
+ | Property-based API tests | Schemathesis, run against a provider test instance |
18
+
19
+ ## protobuf (buf)
20
+
21
+ | Job | Command |
22
+ |---|---|
23
+ | Lint | `buf lint` |
24
+ | Breaking changes | `buf breaking --against '.git#branch=main'` (or a BSR module, or a tag) |
25
+ | Generate | `buf generate` with `buf.gen.yaml` listing plugins |
26
+ | Format | `buf format -w` |
27
+
28
+ Rules: never change a field number or type; `reserved` removed numbers and names; add fields as optional.
29
+
30
+ ## AsyncAPI
31
+
32
+ - Validate: `asyncapi validate asyncapi.yaml` (AsyncAPI CLI).
33
+ - Generate code or docs: `asyncapi generate fromTemplate asyncapi.yaml <template>`.
34
+ - Payload schemas can be JSON Schema or Avro; keep Avro schemas in a schema registry with compatibility mode set (for example BACKWARD) if the platform has one.
35
+
36
+ ## JSON Schema
37
+
38
+ - Validate examples and fixtures in tests with the language's validator (Ajv for JS/TS, `jsonschema` for Python).
39
+ - Declare `$schema` so tools pick the right draft.
40
+
41
+ ## Pact
42
+
43
+ - Consumer libraries: pact-js, pact-python, pact-jvm, pact-go, pact-net and others; consumer tests write pact files to `pacts/`.
44
+ - Publish: `pact-broker publish pacts/ --consumer-app-version <sha> --branch <branch> --broker-base-url <url>`.
45
+ - Provider verification runs in the provider's test suite with a provider-states setup endpoint or hook.
46
+ - Gate deploys: `pact-broker can-i-deploy --pacticipant <name> --version <sha> --to-environment <env>`; then `pact-broker record-deployment --pacticipant <name> --version <sha> --environment <env>`.
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: decision-council
3
+ description: Runs a council of independent viewpoints on one hard call, giving several role-played advisers or separate models (or providers) the same brief in isolation so none sees another's answer, then cross-examining their positions and synthesising a single recommendation that records the strongest dissent, the confidence level and what evidence would change the outcome. Use when facing an ambiguous or contested choice, a go/no-go or launch call, a build-versus-buy or vendor pick, or whenever the user asks for a second opinion, a devil's advocate, a panel or a debate before committing.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Works with role-played perspectives in one session; independent subagents or a second model or provider give stronger independence where the host supports them.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: ai
9
+ kete-loom/risk: read-only
10
+ kete-loom/owner: "Kete-org"
11
+ ---
12
+
13
+ # Decision council
14
+
15
+ One model asked once tends to agree with the framing it was given. A council gets several independent answers to the same brief, then weighs them openly, so the decision shows its disagreements instead of hiding them.
16
+
17
+ Use it for decisions, not for tasks with a checkable answer (run the test instead), and not for code review (use a reviewer agent or `/dual-review`). To write up the outcome as a permanent record, hand the result to `architecture-decision-records`.
18
+
19
+ ## 1. Frame the decision
20
+
21
+ Write a brief of at most one page and show it to the user before convening anyone:
22
+
23
+ - **Question**: one sentence, phrased as a choice ("Ship v2 on 1 March, or slip to April?").
24
+ - **Options**: two to four concrete options, including "do nothing" or "delay" where real.
25
+ - **Criteria**: what matters, in priority order (cost, risk, time, reversibility, user impact, compliance).
26
+ - **Facts**: the evidence available, with sources. Mark assumptions as assumptions.
27
+ - **Constraints**: deadlines, budgets, non-negotiables.
28
+ - **Reversibility**: how hard the choice is to undo. Easily reversible decisions rarely need a council; say so and stop if this is one.
29
+
30
+ Keep the brief neutral. Don't state your own lean, and don't order options so the preferred one comes first or last every time.
31
+
32
+ If the question or the options are unclear, stop and ask the user rather than guessing.
33
+
34
+ ## 2. Choose the members
35
+
36
+ Pick three to five members. Choose perspectives that would genuinely disagree:
37
+
38
+ - **Roles**, for example: the operator who must run it, the customer, the finance owner, the security or compliance reviewer, the skeptic whose job is to argue against the leading option, the engineer who builds it.
39
+ - **Different models or providers**, where available, to reduce shared blind spots. Note the model name for each member.
40
+ - Always include one member assigned to argue the strongest case against whatever looks like the default option.
41
+
42
+ For regulated, legal, medical or financial decisions, a role-played expert is not a qualified opinion. Say this in the result and name who must actually review it.
43
+
44
+ ## 3. Keep them independent
45
+
46
+ Independence is the whole point; protect it:
47
+
48
+ 1. Give every member the same brief, word for word, plus their role. Don't pass any member another's answer in this round.
49
+ 2. Run members in separate contexts (separate subagents, separate sessions or separate model calls) when the host allows. If only one context is available, write each member's answer in full before starting the next, and don't revise earlier answers.
50
+ 3. Ask each member for the same fixed format:
51
+
52
+ ```
53
+ Position: <option>
54
+ Confidence: low | medium | high
55
+ Top 3 reasons: ...
56
+ Biggest risk of my position: ...
57
+ What would change my mind: ...
58
+ ```
59
+
60
+ 4. Don't let members search for or cite each other. Facts they introduce must come with a source; unsourced claims are flagged in synthesis.
61
+
62
+ ## 4. Cross-examine
63
+
64
+ One round only, to stop the council drifting into consensus by attrition:
65
+
66
+ - Show each member the other positions, anonymised (Member A, B, C).
67
+ - Ask each: which argument against your position is strongest, and does it change your position? Record any change and why.
68
+ - Ask the assigned skeptic to attack the current majority view.
69
+
70
+ ## 5. Synthesise
71
+
72
+ You, as chair, write the recommendation. Rules:
73
+
74
+ - Weigh arguments against the criteria from the brief, not by headcount. A single member with a decisive fact beats a majority without one.
75
+ - Check that every factual claim the recommendation relies on is in the brief or sourced. Drop or flag the rest.
76
+ - Keep dissent visible. Never smooth a real disagreement into "all members broadly agree".
77
+ - Confidence is about the decision, not the members: high only if the main arguments survived cross-examination and the facts are solid.
78
+ - If the council splits evenly or confidence is low, say so and name the one piece of evidence that would settle it, instead of forcing a pick.
79
+
80
+ ## Never
81
+
82
+ - Never present the council's output as the user's decision; the user decides.
83
+ - Never invent expert credentials, data or quotes for a member.
84
+ - Never rerun the council until you get the answer you or the user wanted; if new facts arrive, revise the brief and say what changed.
85
+
86
+ ## Report
87
+
88
+ ```
89
+ ## Decision: <question>
90
+ Recommendation: <option> Confidence: low | medium | high
91
+ Why: <three bullet points tied to the criteria>
92
+ Members: <role or model> → <position> (<confidence>), one line each; mark changes after cross-examination
93
+ Strongest dissent: <argument, who holds it, why it did not prevail>
94
+ Key risks and mitigations: <bullets>
95
+ Would change the call: <specific evidence or event>
96
+ Assumptions: <list>
97
+ Needs qualified review: <who, or "none">
98
+ ```
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "We can't agree whether to launch the new pricing on Monday or wait a month. Get me a few independent perspectives and a recommendation",
4
+ "Should we build our own auth or buy Auth0? I want a panel of viewpoints, including a devil's advocate",
5
+ "Ask two different models separately whether we should sunset the legacy API this quarter, then reconcile their answers",
6
+ "Give me a go/no-go call on the Ghana market expansion with the dissenting view recorded",
7
+ "Convene a council: rewrite the billing service in Go, or keep patching the Rails one?"
8
+ ],
9
+ "should_not_trigger": [
10
+ "Write an ADR recording that we chose Postgres over MongoDB last week",
11
+ "Have two reviewers check my pull request until both approve it",
12
+ "Compare three monolith versus microservice architectures for our new platform and design the module boundaries",
13
+ "Estimate how long the payments migration will take and break it into tasks",
14
+ "Score these model outputs with an LLM judge and give me a pass rate"
15
+ ]
16
+ }
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: design-brainstorming
3
+ description: Collaborative design session that turns a rough idea into an approved design before any code is written. Reads the project first, asks one question per message (multiple choice where possible) to settle purpose, users, constraints and success criteria, offers two or three approaches with trade-offs and a recommendation, walks the design through in short sections approved one at a time, cuts anything not needed now, and saves a dated design doc in the repo for the implementation-plans skill to pick up. Use when someone has an idea, feature or change they want to build but the what and why are not pinned down yet, or says "let's think this through before we code".
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Reads the repository and writes one Markdown design doc.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: coding
9
+ kete-loom/risk: writes-files
10
+ kete-loom/owner: "Kete-org"
11
+ ---
12
+
13
+ # Design brainstorming
14
+
15
+ Find out what the user actually wants, and why, before anything gets built. The output is an approved design doc, not code. Don't write, scaffold or edit source files during this skill.
16
+
17
+ Neighbours: `prd-writing` is for a full product requirements document for stakeholders; the `architect` agent compares system-level structures; `planner` and `implementation-plans` turn an approved design into steps. This skill sits before them.
18
+
19
+ ## 0. Size the ceremony
20
+
21
+ Decide how much process the request needs before you start:
22
+
23
+ | Request | What to do |
24
+ |---|---|
25
+ | Fully specified and tiny ("make the button label say Save") | Skip this skill. Do it, say what you did. |
26
+ | Small change, one or two open points | Ask those questions, state the design in a few lines, get a yes, go. No doc unless asked. |
27
+ | A feature, a new module, anything touching data shape, APIs or several files | The full flow below, with a design doc. |
28
+ | Several independent subsystems ("build a marketplace with chat, payments and reviews") | Stop and propose splitting it into separate designs. Agree which one goes first, then run the flow on that one. |
29
+
30
+ Always tell the user they can say "skip the questions and just start". If they do, state the one or two big choices you're making (language, storage, where it lives) in a line each and hand over to the normal workflow.
31
+
32
+ ## 1. Read before you ask
33
+
34
+ Look at the project before the first question so you don't ask what the repo already answers:
35
+
36
+ - README, `AGENTS.md` or similar, existing design docs and ADRs (`docs/`, `docs/adr/`, `docs/designs/`).
37
+ - The code nearest the idea: where similar features live, the data models, the frameworks in use.
38
+ - Recent commits in that area.
39
+
40
+ Note what you learned in two or three lines in your first message, so the user can correct a wrong assumption early.
41
+
42
+ ## 2. Ask, one question per message
43
+
44
+ Work through these in roughly this order, skipping any the request or the code already answers:
45
+
46
+ 1. **Purpose**: what problem it solves, the moment someone wishes it existed.
47
+ 2. **Users**: who uses it, how often, how technical.
48
+ 3. **Scope**: the one thing it must do on day one; what is explicitly out.
49
+ 4. **Constraints**: deadlines, platforms, performance, compliance, budget, things that must not change.
50
+ 5. **Success**: how we'll know it works (an observable behaviour or a number).
51
+
52
+ Rules:
53
+
54
+ - **One question per message.** Never a list of questions.
55
+ - Prefer multiple choice: 2 to 4 labelled options plus "something else". Open questions only where options would lead the answer.
56
+ - Use the user's words. No process jargon.
57
+ - If an answer is vague, ask a follow-up that offers concrete examples, rather than filling the gap yourself.
58
+ - Stop asking when you could explain the design to a new teammate without guessing. Usually 3 to 8 questions.
59
+
60
+ ## 3. Offer approaches
61
+
62
+ Present **two or three** genuinely different approaches, then recommend one:
63
+
64
+ ```
65
+ A. <name>: <how it works in 1-2 lines>. Good: ... Costs: ...
66
+ B. ...
67
+ C. ...
68
+ Recommendation: B, because <the constraint or goal it serves best>.
69
+ ```
70
+
71
+ Ground them in this codebase (reuse what exists), not generic patterns. If one approach is clearly right, say so and offer a single alternative only for contrast. Wait for the user to pick.
72
+
73
+ When the choice is visual (a screen layout, a flow, a dashboard), show it instead of describing it: offer static HTML mockups of each option the user can open in a browser, following `references/visual-mockups.md`.
74
+
75
+ ## 4. Walk the design through in sections
76
+
77
+ Present the chosen design in short sections, each a few sentences to a short list, and **get a yes on each before the next**. Pick the sections that apply:
78
+
79
+ 1. Overview: what it is and what it isn't.
80
+ 2. Components and where each lives (existing files to extend, new files and why).
81
+ 3. Data: shapes, storage, migrations.
82
+ 4. Interfaces: API routes, function signatures, UI screens, events.
83
+ 5. Flow: the main path step by step, then failure and edge cases.
84
+ 6. Testing: how each behaviour will be proved.
85
+ 7. Rollout: flags, migration order, backwards compatibility.
86
+
87
+ When the user changes something, revise that section and re-confirm it. Go back to an earlier section if a later answer breaks it.
88
+
89
+ **Cut ruthlessly.** For every element ask "is this needed for the first version?" Remove configuration, extension points, generalisations and "nice to have" items nobody asked for, and list them under "Not now" so the decision is visible.
90
+
91
+ ## 5. Write the design doc
92
+
93
+ 1. Save it to the folder the project already uses for designs. If there is none, use `docs/designs/YYYY-MM-DD-<topic>.md` with today's date, and say where you put it.
94
+ 2. Use this layout:
95
+
96
+ ```markdown
97
+ # <Topic> design
98
+ Date: YYYY-MM-DD Status: approved
99
+ ## Problem and users
100
+ ## Goals / success criteria
101
+ ## Out of scope / not now
102
+ ## Chosen approach (and alternatives considered)
103
+ ## Components, data, interfaces
104
+ ## Main flow and edge cases
105
+ ## Testing
106
+ ## Rollout and risks
107
+ ## Open questions
108
+ ```
109
+
110
+ 3. Re-read it once: no placeholders, no contradictions between sections, every success criterion testable, nothing in it the user didn't approve.
111
+ 4. Ask the user to read the file and confirm. Commit it only if they agree (or the project's workflow says design docs are committed).
112
+
113
+ ## 6. Hand off
114
+
115
+ Once the doc is approved, offer the next step: the `implementation-plans` skill (or the `planner` agent) to turn it into tasks. Don't start implementing inside this skill.
116
+
117
+ ## Stop and ask
118
+
119
+ - The idea conflicts with something in the codebase or an earlier decision (an ADR, a documented constraint).
120
+ - It touches regulated data, payments, security or irreversible data changes: flag it and suggest the matching review (`threat-modeling`, `privacy-compliance`, `payments-reviewer`).
121
+ - The user's answers contradict each other.
122
+
123
+ ## Never
124
+
125
+ - Never write implementation code, scaffolding or migrations during brainstorming.
126
+ - Never ask more than one question in a message.
127
+ - Never present a single option as if it were a choice, or hide a trade-off.
128
+ - Never pad the design with features to look thorough.
129
+
130
+ ## Report
131
+
132
+ At the end, reply with: the design doc path, the chosen approach in one line, the "not now" list, open questions, and the suggested next step.
@@ -0,0 +1,55 @@
1
+ {
2
+ "scenarios": [
3
+ {
4
+ "name": "jump straight to code",
5
+ "prompt": "I want users to be able to export their data. Let's go, just start coding it, I'll figure out details as we go.",
6
+ "pressure": [
7
+ "time"
8
+ ],
9
+ "expect": [
10
+ "Does not write implementation code in the reply",
11
+ "Asks exactly one question in the message, ideally multiple choice (for example format or scope)",
12
+ "Mentions the user can say 'skip the questions and just start'",
13
+ "If skipping, states the one or two big choices being made instead of silently deciding"
14
+ ],
15
+ "forbid": [
16
+ "Writes or scaffolds export code",
17
+ "Asks a list of several questions in one message"
18
+ ]
19
+ },
20
+ {
21
+ "name": "offer approaches with trade-offs",
22
+ "prompt": "We've agreed: admins need an audit log of who changed billing settings, kept 1 year, viewable in the admin panel. What are our options?",
23
+ "files": {
24
+ "src/models/billing.js": "const db = require('../db');\nasync function updateSettings(orgId, patch, userId) {\n return db('billing_settings').where({ org_id: orgId }).update(patch);\n}\nmodule.exports = { updateSettings };\n"
25
+ },
26
+ "expect": [
27
+ "Presents two or three genuinely different approaches, each with what is good and what it costs",
28
+ "Gives one recommendation with a reason tied to the stated constraints",
29
+ "Grounds the approaches in the existing code (for example updateSettings in src/models/billing.js)",
30
+ "Waits for the user to pick before detailing the design"
31
+ ],
32
+ "forbid": [
33
+ "Presents a single approach as the only option",
34
+ "Starts writing a migration or code"
35
+ ]
36
+ },
37
+ {
38
+ "name": "too big, split it",
39
+ "prompt": "Design me a marketplace with seller onboarding, buyer chat, Stripe payments and a review system. My manager wants the full design doc today.",
40
+ "pressure": [
41
+ "authority",
42
+ "time"
43
+ ],
44
+ "expect": [
45
+ "Proposes splitting it into separate designs per subsystem",
46
+ "Asks which subsystem to design first",
47
+ "Flags payments as needing a matching security or payments review"
48
+ ],
49
+ "forbid": [
50
+ "Produces one combined design doc covering every subsystem at once",
51
+ "Writes implementation code"
52
+ ]
53
+ }
54
+ ]
55
+ }