@pantion/mcp-server 0.1.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 (160) hide show
  1. package/dist/feature-set.d.ts +14 -0
  2. package/dist/feature-set.d.ts.map +1 -0
  3. package/dist/feature-set.js +38 -0
  4. package/dist/feature-set.js.map +1 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +56 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/prompts/convergence-prompts.d.ts +4 -0
  10. package/dist/prompts/convergence-prompts.d.ts.map +1 -0
  11. package/dist/prompts/convergence-prompts.js +76 -0
  12. package/dist/prompts/convergence-prompts.js.map +1 -0
  13. package/dist/prompts/index.d.ts +4 -0
  14. package/dist/prompts/index.d.ts.map +1 -0
  15. package/dist/prompts/index.js +7 -0
  16. package/dist/prompts/index.js.map +1 -0
  17. package/dist/prompts/workflow-prompts.d.ts +9 -0
  18. package/dist/prompts/workflow-prompts.d.ts.map +1 -0
  19. package/dist/prompts/workflow-prompts.js +249 -0
  20. package/dist/prompts/workflow-prompts.js.map +1 -0
  21. package/dist/resources/canon-resources.d.ts +4 -0
  22. package/dist/resources/canon-resources.d.ts.map +1 -0
  23. package/dist/resources/canon-resources.js +160 -0
  24. package/dist/resources/canon-resources.js.map +1 -0
  25. package/dist/server.d.ts +9 -0
  26. package/dist/server.d.ts.map +1 -0
  27. package/dist/server.js +47 -0
  28. package/dist/server.js.map +1 -0
  29. package/dist/tools/amend.d.ts +4 -0
  30. package/dist/tools/amend.d.ts.map +1 -0
  31. package/dist/tools/amend.js +106 -0
  32. package/dist/tools/amend.js.map +1 -0
  33. package/dist/tools/approve.d.ts +4 -0
  34. package/dist/tools/approve.d.ts.map +1 -0
  35. package/dist/tools/approve.js +60 -0
  36. package/dist/tools/approve.js.map +1 -0
  37. package/dist/tools/check-convergence.d.ts +4 -0
  38. package/dist/tools/check-convergence.d.ts.map +1 -0
  39. package/dist/tools/check-convergence.js +50 -0
  40. package/dist/tools/check-convergence.js.map +1 -0
  41. package/dist/tools/check.d.ts +4 -0
  42. package/dist/tools/check.d.ts.map +1 -0
  43. package/dist/tools/check.js +190 -0
  44. package/dist/tools/check.js.map +1 -0
  45. package/dist/tools/create-skill.d.ts +4 -0
  46. package/dist/tools/create-skill.d.ts.map +1 -0
  47. package/dist/tools/create-skill.js +58 -0
  48. package/dist/tools/create-skill.js.map +1 -0
  49. package/dist/tools/decompose.d.ts +4 -0
  50. package/dist/tools/decompose.d.ts.map +1 -0
  51. package/dist/tools/decompose.js +56 -0
  52. package/dist/tools/decompose.js.map +1 -0
  53. package/dist/tools/index.d.ts +4 -0
  54. package/dist/tools/index.d.ts.map +1 -0
  55. package/dist/tools/index.js +47 -0
  56. package/dist/tools/index.js.map +1 -0
  57. package/dist/tools/list-canons.d.ts +4 -0
  58. package/dist/tools/list-canons.d.ts.map +1 -0
  59. package/dist/tools/list-canons.js +28 -0
  60. package/dist/tools/list-canons.js.map +1 -0
  61. package/dist/tools/migrate.d.ts +4 -0
  62. package/dist/tools/migrate.d.ts.map +1 -0
  63. package/dist/tools/migrate.js +38 -0
  64. package/dist/tools/migrate.js.map +1 -0
  65. package/dist/tools/onboard.d.ts +4 -0
  66. package/dist/tools/onboard.d.ts.map +1 -0
  67. package/dist/tools/onboard.js +27 -0
  68. package/dist/tools/onboard.js.map +1 -0
  69. package/dist/tools/reconverge.d.ts +4 -0
  70. package/dist/tools/reconverge.d.ts.map +1 -0
  71. package/dist/tools/reconverge.js +68 -0
  72. package/dist/tools/reconverge.js.map +1 -0
  73. package/dist/tools/reject.d.ts +4 -0
  74. package/dist/tools/reject.d.ts.map +1 -0
  75. package/dist/tools/reject.js +57 -0
  76. package/dist/tools/reject.js.map +1 -0
  77. package/dist/tools/reskill.d.ts +4 -0
  78. package/dist/tools/reskill.d.ts.map +1 -0
  79. package/dist/tools/reskill.js +63 -0
  80. package/dist/tools/reskill.js.map +1 -0
  81. package/dist/tools/resume.d.ts +4 -0
  82. package/dist/tools/resume.d.ts.map +1 -0
  83. package/dist/tools/resume.js +56 -0
  84. package/dist/tools/resume.js.map +1 -0
  85. package/dist/tools/reverse.d.ts +4 -0
  86. package/dist/tools/reverse.d.ts.map +1 -0
  87. package/dist/tools/reverse.js +32 -0
  88. package/dist/tools/reverse.js.map +1 -0
  89. package/dist/tools/save-canon.d.ts +4 -0
  90. package/dist/tools/save-canon.d.ts.map +1 -0
  91. package/dist/tools/save-canon.js +97 -0
  92. package/dist/tools/save-canon.js.map +1 -0
  93. package/dist/tools/start.d.ts +4 -0
  94. package/dist/tools/start.d.ts.map +1 -0
  95. package/dist/tools/start.js +83 -0
  96. package/dist/tools/start.js.map +1 -0
  97. package/dist/tools/translate.d.ts +4 -0
  98. package/dist/tools/translate.d.ts.map +1 -0
  99. package/dist/tools/translate.js +102 -0
  100. package/dist/tools/translate.js.map +1 -0
  101. package/dist/tools/update.d.ts +4 -0
  102. package/dist/tools/update.d.ts.map +1 -0
  103. package/dist/tools/update.js +42 -0
  104. package/dist/tools/update.js.map +1 -0
  105. package/dist/utils/response.d.ts +12 -0
  106. package/dist/utils/response.d.ts.map +1 -0
  107. package/dist/utils/response.js +18 -0
  108. package/dist/utils/response.js.map +1 -0
  109. package/package.json +37 -0
  110. package/protocol/commands/amend.md +188 -0
  111. package/protocol/commands/build.md +90 -0
  112. package/protocol/commands/check.md +255 -0
  113. package/protocol/commands/create-skill.md +81 -0
  114. package/protocol/commands/decompose.md +230 -0
  115. package/protocol/commands/dialog.md +173 -0
  116. package/protocol/commands/help.md +121 -0
  117. package/protocol/commands/migrate.md +173 -0
  118. package/protocol/commands/onboard.md +210 -0
  119. package/protocol/commands/quick.md +170 -0
  120. package/protocol/commands/redialog.md +252 -0
  121. package/protocol/commands/reskill.md +73 -0
  122. package/protocol/commands/resume.md +148 -0
  123. package/protocol/commands/reverse.md +312 -0
  124. package/protocol/commands/start.md +220 -0
  125. package/protocol/commands/translate.md +157 -0
  126. package/protocol/commands/update.md +205 -0
  127. package/protocol/commands/validate.md +137 -0
  128. package/protocol/core-advanced.md +188 -0
  129. package/protocol/core.md +273 -0
  130. package/protocol/pantion-future-prompt.md +88 -0
  131. package/protocol/pantion-intent.md +78 -0
  132. package/protocol/templates/acceptance-tests.md +116 -0
  133. package/protocol/templates/behavior-map.md +135 -0
  134. package/protocol/templates/traceability-map.md +56 -0
  135. package/skills/image/convergence-rules.md +55 -0
  136. package/skills/image/prompts/convergence-intro.md +25 -0
  137. package/skills/image/prompts/translate-intro.md +37 -0
  138. package/skills/image/skill.json +12 -0
  139. package/skills/image/translate.md +67 -0
  140. package/skills/skill-builder/convergence-rules.md +64 -0
  141. package/skills/skill-builder/prompts/convergence-intro.md +21 -0
  142. package/skills/skill-builder/prompts/translate-intro.md +17 -0
  143. package/skills/skill-builder/skill.json +10 -0
  144. package/skills/skill-builder/translate.md +46 -0
  145. package/skills/software/convergence-rules.md +29 -0
  146. package/skills/software/prompts/convergence-intro.md +22 -0
  147. package/skills/software/prompts/translate-intro.md +19 -0
  148. package/skills/software/skill.json +12 -0
  149. package/skills/software/translate.md +74 -0
  150. package/skills/software-brownfield/convergence-rules.md +109 -0
  151. package/skills/software-brownfield/prompts/convergence-intro.md +26 -0
  152. package/skills/software-brownfield/prompts/translate-intro.md +13 -0
  153. package/skills/software-brownfield/skill.json +12 -0
  154. package/skills/software-brownfield/translate.md +56 -0
  155. package/souls/beginner/rules.md +34 -0
  156. package/souls/beginner/soul.json +6 -0
  157. package/souls/default/rules.md +25 -0
  158. package/souls/default/soul.json +6 -0
  159. package/souls/young/rules.md +67 -0
  160. package/souls/young/soul.json +6 -0
@@ -0,0 +1,255 @@
1
+ # /pantion-check — Quality control on canons
2
+
3
+ Check whether canons are complete, consistent, and build-ready.
4
+
5
+ ---
6
+
7
+ ## STEP 1: FIND AND CLASSIFY CANONS
8
+
9
+ Scan the `canon/` directory and classify what's there. Look for dialog files (the canon) and their derived summaries:
10
+
11
+ - Standalone canon? (subdirectory with `dialog.md` + `summary.md`)
12
+ - Architect Canon + Interface Canons + Component Canons? (subdirectories in canon/)
13
+ - Quick canon? (subdirectory with `dialog.md` containing `STATUS: CONVERGED (QUICK)`)
14
+ - Legacy format? (flat `*-dialog.md` files without folder structure)
15
+
16
+ Report: "I found: [overview]"
17
+
18
+ If only legacy-format canons are found (no dialog files): warn the user that the dialog is missing and recommend re-converging or accepting limited traceability.
19
+
20
+ ---
21
+
22
+ ## STEP 2: PER-CANON CHECKLIST
23
+
24
+ For EACH canon, run through the following checklist:
25
+
26
+ ### Basic requirements
27
+ - [ ] Has a DIALOGSPEC STAMP
28
+ - [ ] STATUS is explicit (DRAFT / CONVERGED / CONVERGED (QUICK) / CONVERGED (REVERSE) / AMENDED / RECONVERGED)
29
+ - [ ] CANON TYPE is filled in
30
+ - [ ] PARENT is filled in (or "none")
31
+
32
+ ### 1. Intent clarity (WAT, not HOE)
33
+ - [ ] Primary goal is unambiguous
34
+ - [ ] Formulated from user perspective
35
+ - [ ] No technology dependency
36
+ - [ ] Goal remains stable despite reformulations
37
+
38
+ **Fail-signals:**
39
+ - "That depends on the implementation"
40
+ - "We'll see about that later"
41
+ - "You should do it roughly like this"
42
+
43
+ ### 2. Observable success
44
+ - [ ] Success criteria are externally verifiable
45
+ - [ ] "It works" has been translated to concrete effects
46
+ - [ ] Multiple persons would independently reach the same conclusion
47
+
48
+ **Fail-signals:**
49
+ - Success is internally felt, not externally observable
50
+ - No concrete effects described
51
+
52
+ ### 3. Inputs complete (explicit + implicit)
53
+ - [ ] All required information is named or logically derivable
54
+ - [ ] Implicit inputs discussed (context, identity, time, authorization)
55
+ - [ ] No hidden assumptions about what "will be known"
56
+ - [ ] Uncertainty about inputs is made explicit
57
+
58
+ **Fail-signal:**
59
+ - "The system will know that."
60
+
61
+ ### 4. Outputs unambiguous
62
+ - [ ] Clear what the system produces
63
+ - [ ] Outputs are visible, audible, readable, or observable
64
+ - [ ] Distinction between: direct output, side effects, confirmations, silent failure
65
+ - [ ] No output is "implicit" without being named
66
+
67
+ ### 5. Failure specified (not happy-path-only)
68
+ - [ ] Clear what happens when the goal is not achievable
69
+ - [ ] System fails gracefully, not silently
70
+ - [ ] User is informed on failure
71
+ - [ ] Distinction between: temporary failure, permanent failure, partial success
72
+
73
+ **Fail-signal:**
74
+ - An agent may not invent how failure feels.
75
+
76
+ ### 6. Constraints absolute
77
+ - [ ] Boundaries are explicitly stated
78
+ - [ ] Constraints are: not context-dependent, not negotiable, not "unless convenient"
79
+ - [ ] Security, privacy, ethics, and resources are named
80
+ - [ ] No implicit escalation of rights
81
+
82
+ **Litmus test:** Can an agent hide behind this to add "smart" behavior? If yes: **not ready**.
83
+
84
+ ### 7. Non-goals documented
85
+ - [ ] Clear what the system does NOT do
86
+ - [ ] Tempting extensions are explicitly excluded
87
+ - [ ] "That could also work" is explicitly rejected
88
+ - [ ] Boundaries are sharpened through negation
89
+
90
+ ### 8. Ambiguity consciously handled
91
+ - [ ] Contradictory statements are discussed
92
+ - [ ] Uncertainties are: resolved, or explicitly recorded as OPEN QUESTIONS
93
+ - [ ] No "let the agent decide"
94
+
95
+ ### 9. Authority Budget — Rights (ceiling, not additive)
96
+ - [ ] Allowed actions ✅ | ❌
97
+ - [ ] Forbidden actions ✅ | ❌
98
+ - [ ] Data access ✅ | ❌
99
+ - [ ] Data retention ✅ | ❌
100
+ - [ ] User notification ✅ | ❌
101
+ - [ ] Auditability ✅ | ❌
102
+
103
+ > If this is missing: **not ready** for an autonomous agent.
104
+
105
+ ### 10. Persistence / restart behavior
106
+ - [ ] Clear what data/state survives a restart
107
+ - [ ] Clear what is ephemeral (lost on crash/restart)
108
+ - [ ] If stateful: recovery behavior specified
109
+
110
+ **Fail-signal:**
111
+ - "It just keeps running" (no restart scenario considered)
112
+
113
+ ### 11. Authority Budget — Consumption (allocatable, additive)
114
+ - [ ] Rate limits ✅ | ❌ | n/a
115
+ - [ ] Cost limits ✅ | ❌ | n/a
116
+ - [ ] Budget allocation (during decomposition) ✅ | ❌ | n/a
117
+
118
+ ### 12. Inference Policy
119
+ - [ ] Explicitly chosen (strict or conservative)
120
+ - [ ] The 5 inference rules are known and applicable
121
+ - [ ] Multiple plausible interpretations → OPEN QUESTION, not "agent decides"
122
+
123
+ ### 13. Dialog stability (convergence test)
124
+ - [ ] New questions yield no new behavior
125
+ - [ ] Reformulations don't change the intent
126
+ - [ ] The dialog would be read identically today or in 5 years
127
+ - [ ] The intent "no longer moves"
128
+
129
+ **Stop criterion:** The assistant has nothing meaningful left to ask.
130
+
131
+ ### Agent Readiness Test (final check)
132
+
133
+ Ask this question:
134
+
135
+ > "Can a competent coding agent, without further interaction, build a functionally equivalent system?"
136
+
137
+ - [ ] Yes — without assumptions outside inference policy
138
+ - [ ] Yes — without extra specs
139
+ - [ ] Yes — without interpretive freedom
140
+ - [ ] Yes — with auditable behavior (tests + traceability)
141
+
142
+ **If any "no": not ready.**
143
+
144
+ ### Scorecard
145
+
146
+ | Score | Status |
147
+ |-------|--------|
148
+ | 0–5 | Idea phase — not ready |
149
+ | 6–9 | Almost, but dangerous |
150
+ | 10–13 | DialogSpec-worthy |
151
+
152
+ ---
153
+
154
+ ## STEP 3: HIERARCHICAL CHECKS (only during decomposition)
155
+
156
+ ### Architect Canon
157
+ - [ ] Decomposition is clear (each part has a clear area of responsibility)
158
+ - [ ] Shared constraints defined
159
+ - [ ] Authority Budget ceiling defined
160
+ - [ ] Interface descriptions present for every coupling
161
+
162
+ ### Component Canons
163
+ - [ ] Inherited constraints explicitly named
164
+ - [ ] No inherited constraint violated
165
+ - [ ] Authority Budget within ceiling
166
+ - [ ] Interface Canons respected
167
+
168
+ ### Interface Canons (during decomposition)
169
+ - [ ] All 5 core fields present (parties, value, guarantees, expectations, failure behavior)
170
+ - [ ] Data Shape described (enumeratively, in natural language)
171
+ - [ ] Versioning/Compat defined (what breaks compatibility?)
172
+ - [ ] Error Semantics described (which failure categories?)
173
+ - [ ] Privacy/Classification addressed (what is PII, who may see what?)
174
+ - [ ] Rate/Cost Expectations documented (what is normal, what is a peak?)
175
+
176
+ ### System-wide consistency
177
+ - [ ] COVERAGE: all Component Canons together cover the system intent
178
+ - [ ] NO GAPS: every behavior is owned by exactly one component
179
+ - [ ] NO OVERLAP: no behavior appears in multiple components
180
+ - [ ] INTERFACE CONSISTENCY: what A promises = what B expects
181
+ - [ ] CONSTRAINT PROPAGATION: no component violates inherited constraints
182
+ - [ ] **AUTHORITY BUDGET — Rights**: no component exceeds the ceiling from the Architect Canon
183
+ - [ ] **AUTHORITY BUDGET — Consumption**: sum of component allocations fits within system budget
184
+ - [ ] **AUTHORITY BUDGET — Allocation**: if the Architect Canon includes a budget distribution, it is complete and consistent
185
+ - [ ] NON-GOALS: system-wide non-goals do not appear as goals in components
186
+
187
+ ---
188
+
189
+ ## STEP 4: CANON INDEX CHECK
190
+
191
+ Check if `canon/index.md` exists and is current:
192
+
193
+ - [ ] `canon/index.md` exists
194
+ - [ ] All found canons are listed
195
+ - [ ] STATUS per canon is correct
196
+ - [ ] Open Questions backlog is current (no resolved questions still listed)
197
+ - [ ] Amendments are logged
198
+
199
+ ---
200
+
201
+ ## STEP 5: FILES CHECK (always-on traceability)
202
+
203
+ Check if derived files are in sync with the canons:
204
+
205
+ - [ ] Dialog file (canon) exists for each canon (`canon/{naam}/dialog.md`)
206
+ - [ ] Summary file exists and is marked as derived (`<!-- Derived from: ... -->`)
207
+ - [ ] Summary is not newer than dialog without a regeneration comment
208
+ - [ ] canon/{naam}/spec/requirements.md matches canon intent (if generated)
209
+ - [ ] canon/{naam}/spec/constraints.md matches canon constraints (if generated)
210
+ - [ ] canon/{naam}/spec/success-criteria.md matches canon success criteria (if generated)
211
+ - [ ] canon/{naam}/traceability.md exists and is current
212
+ - [ ] Each derived file contains a `<!-- Derived from: canon/{naam}/dialog.md, ... -->` comment
213
+ - [ ] Traceability has been updated after last amend/decompose/translate (not only at translate)
214
+ - [ ] For hierarchical: component spec files match Component Canons
215
+ - [ ] For hierarchical: interface spec files match Interface Canons
216
+
217
+ ---
218
+
219
+ ## STEP 6: REPORT
220
+
221
+ Produce a report:
222
+
223
+ ```markdown
224
+ # Pantion Check Report — [date]
225
+
226
+ ## Canons found
227
+ [overview]
228
+
229
+ ## Per-canon result
230
+ ### [Canon name]: ✅ PASS | ⚠️ WARNING | ❌ FAIL
231
+ [details per failed item]
232
+
233
+ ## Hierarchical consistency (if applicable)
234
+ ✅ PASS | ❌ FAIL
235
+ [details]
236
+
237
+ ## Files sync
238
+ ✅ IN SYNC | ⚠️ OUT OF SYNC
239
+ [list of files that need to be regenerated]
240
+
241
+ ## Canon Index
242
+ ✅ CURRENT | ⚠️ OUTDATED | ❌ MISSING
243
+
244
+ ## Traceability
245
+ ✅ CURRENT | ⚠️ OUTDATED | ❌ MISSING
246
+
247
+ ## Recommendations
248
+ [what needs to happen to get everything to ✅]
249
+ ```
250
+
251
+ ### If all ✅:
252
+ "All canons are complete and consistent. The system is ready to be built."
253
+
254
+ ### On problems:
255
+ "There are [N] open items. Would you like to resolve them now? I can reopen the dialog for the items that have not yet converged. If the issues are about convergence depth rather than missing information, consider `/pantion-redialog` to re-evaluate with a better model."
@@ -0,0 +1,81 @@
1
+ # /pantion-create-skill — Create a new Pantion skill through convergence
2
+
3
+ You are creating a new Pantion skill. A skill is a domain-specific knowledge module that guides future convergence dialogs. You will extract the user's domain expertise through a convergence dialog, and the resulting canon will be the source of truth for the skill.
4
+
5
+ ---
6
+
7
+ ## WHEN YOU ARRIVE HERE
8
+
9
+ - The user wants to create a new skill for a domain not covered by existing skills
10
+ - The user has domain expertise they want to codify
11
+ - An existing bundled skill is insufficient for the user's domain
12
+
13
+ ---
14
+
15
+ ## RULES (skill-builder specific)
16
+
17
+ 1. Ask ONE question at a time — wait for the answer before asking the next
18
+ 2. The user is the domain expert — extract their knowledge, do not assume it
19
+ 3. If the user is unsure, mark it as FLEX with a sensible default
20
+ 4. Focus on WHAT the skill should teach, not HOW it will be implemented
21
+ 5. Cover anti-patterns just as thoroughly as patterns
22
+
23
+ ---
24
+
25
+ ## STEP 1: DOMAIN EXPLORATION
26
+
27
+ Using the skill-builder's convergence rules, guide the user through:
28
+
29
+ 1. **Domain identity**: What is this domain? Who are the users? What is out of scope?
30
+ 2. **Critical questions**: What must always be asked when converging in this domain?
31
+ 3. **Common mistakes**: What do agents get wrong in this domain?
32
+ 4. **Domain-specific guidance**: What HARD/FLEX boundaries are specific to this domain?
33
+ 5. **Output specification**: What should translation produce?
34
+ 6. **Vocabulary**: What domain-specific terms exist?
35
+ 7. **Keywords**: What terms should trigger this skill?
36
+
37
+ ---
38
+
39
+ ## STEP 2: CONVERGENCE
40
+
41
+ Apply the full convergence protocol to the skill dialog. The convergence elements adapted for skills:
42
+
43
+ - **Intent**: What domain knowledge does this skill capture?
44
+ - **Inputs**: What information does the agent need from the user?
45
+ - **Outputs**: What files does translation produce?
46
+ - **Success criteria**: How to verify the skill works?
47
+ - **Failure behavior**: What happens when the skill guides incorrectly?
48
+ - **Non-goals**: What does this skill explicitly NOT cover?
49
+
50
+ ---
51
+
52
+ ## STEP 3: SAVE SKILL CANON
53
+
54
+ When converged, save the skill canon using `pantion_save-canon` with the `skill_name` parameter. This writes to `skills/{name}/canon/skill-dialog.md`.
55
+
56
+ ---
57
+
58
+ ## STEP 4: TRANSLATE TO SKILL FILES
59
+
60
+ Use `pantion_translate` to generate the skill files:
61
+
62
+ 1. `skills/{name}/skill.json` — manifest
63
+ 2. `skills/{name}/convergence-rules.md` — domain convergence guidance
64
+ 3. `skills/{name}/translate.md` — translation instructions
65
+ 4. `skills/{name}/prompts/convergence-intro.md` — opening prompt
66
+ 5. `skills/{name}/prompts/translate-intro.md` — translation opening prompt
67
+
68
+ All files are derived from the skill canon dialog. Each contains a derivation comment.
69
+
70
+ ---
71
+
72
+ ## STEP 5: REPORT
73
+
74
+ "Your new skill '{name}' has been created. It contains:
75
+ - Domain-specific convergence rules
76
+ - Translation instructions for {domain} outputs
77
+ - Opening prompts for convergence and translation
78
+
79
+ The skill canon is stored in skills/{name}/canon/ — this is the source of truth. The skill files are derived and can be regenerated.
80
+
81
+ To use this skill, start a new dialog with domain hint '{name}' or its keywords. To improve this skill later, use `/pantion-reskill`."
@@ -0,0 +1,230 @@
1
+ # /pantion-decompose — Split system into subsystems
2
+
3
+ You are now in Pantion Decompose mode. The system is too large for a single canon.
4
+ You will split it into subsystems, each with their own canon.
5
+
6
+ ---
7
+
8
+ ## WHEN YOU ARRIVE HERE
9
+
10
+ - From /pantion-start (decomposition signals detected)
11
+ - Directly invoked by the user
12
+ - After a previous quick session that turned out to be too large
13
+
14
+ ### Across multiple sessions
15
+
16
+ Decomposition often spans multiple sessions. That is normal. If the session can't be completed in one go:
17
+ - Save all canons with their current STATUS (CONVERGED or DRAFT)
18
+ - Note OPEN QUESTIONS per canon in `canon/index.md`
19
+ - Use `/pantion-resume` to continue later
20
+
21
+ ---
22
+
23
+ ## STEP 1: CONVERGE ARCHITECT CANON
24
+
25
+ ### If a dialog is already in progress:
26
+ Use the existing dialog as a starting point. Summarize what you already know and focus on decomposition now.
27
+
28
+ ### If starting fresh:
29
+ Say:
30
+
31
+ "Your system is large enough to split up. Let's first get the whole picture clear before we define the parts. Describe the complete system at a high level."
32
+
33
+ ### Convergence rules
34
+ 1. Ask ONE question at a time — wait for the answer before asking the next
35
+ 2. If something has multiple interpretations → ask, don't guess
36
+
37
+ ### Convergence questions now focus on:
38
+
39
+ 1. **System intent**: What is the overarching goal?
40
+ 2. **Decomposition**: What logical parts do you see? (let the user lead)
41
+ 3. **Shared constraints**: Which rules apply EVERYWHERE? (security, privacy, cost)
42
+ 4. **System-wide Authority Budget - Rights**: What is the maximum power level? (ceiling per component)
43
+ 5. **System-wide Authority Budget - Consumption**: What is the total rate/cost budget? How is it distributed across components?
44
+ 6. **Interfaces**: How do the parts interact? What does A send to B?
45
+ 7. **System-wide non-goals**: What does the whole system explicitly NOT do?
46
+
47
+ ### After convergence:
48
+
49
+ Produce the Architect Canon stamp:
50
+
51
+ ```
52
+ === DIALOGSPEC STAMP ===
53
+ STATUS: CONVERGED
54
+ DATE: [today]
55
+ MODEL: [model-id (Display Name), e.g. claude-opus-4-6 (Claude Opus 4.6)]
56
+ CANON TYPE: architect
57
+ PARENT: none
58
+ OPEN QUESTIONS: none
59
+ INFERENCE POLICY: conservative
60
+ AUTHORITY BUDGET RIGHTS: complete (ceiling per component)
61
+ AUTHORITY BUDGET CONSUMPTION: complete | n/a (allocation across components)
62
+ STABILITY ZONES: [system-wide HARD invariants]
63
+ FLEX ZONES: [system-wide FLEX defaults]
64
+ COMPONENTS: [list of identified subsystems]
65
+ INTERFACES: [list of interfaces between subsystems]
66
+ === /DIALOGSPEC STAMP ===
67
+ ```
68
+
69
+ Save the verbatim dialog as `canon/architect-dialog.md` (THE CANON).
70
+ Generate the derived summary as `canon/architect-summary.md`.
71
+ Update `canon/index.md` with the Architect Canon (type, status, date).
72
+
73
+ Generate the system-wide spec files:
74
+ - `spec/requirements.md` — from system intent + overview of components
75
+ - `spec/constraints.md` — shared constraints
76
+ - `spec/architecture.md` — system-wide ceiling and component boundaries
77
+
78
+ ---
79
+
80
+ ## STEP 2: CONVERGE INTERFACE CANONS
81
+
82
+ For each identified interface, conduct a short dialog:
83
+
84
+ Say:
85
+
86
+ "Now I'll describe the interfaces. Let's start with the coupling between [Component A] and [Component B]. What does A deliver to B? And what does B expect from A?"
87
+
88
+ Per interface, converge these core fields:
89
+ - Parties
90
+ - Delivered value (both directions)
91
+ - Guarantees
92
+ - Expectations
93
+ - Failure behavior
94
+ - Interface-specific constraints
95
+
96
+ Plus these five additional contract fields:
97
+ - **Data Shape**: what is exchanged? Describe enumeratively in natural language (not as a schema, but concretely: "A delivers a list of tasks with a title, status, and owner per task")
98
+ - **Versioning/Compat**: what breaks compatibility? What may change without breaking the other side?
99
+ - **Error Semantics**: what specific errors may B expect from A? How are they signaled? (not just "it fails", but which failure categories)
100
+ - **Privacy/Classification**: which data in this interface is PII, confidential, or classified? Which side may see what?
101
+ - **Rate/Cost Expectations**: what is "normal" usage of this interface? What is a peak? Where are the limits?
102
+
103
+ Produce a stamp per interface:
104
+
105
+ ```
106
+ === DIALOGSPEC STAMP ===
107
+ STATUS: CONVERGED
108
+ DATE: [today]
109
+ MODEL: [model-id (Display Name), e.g. claude-opus-4-6 (Claude Opus 4.6)]
110
+ CANON TYPE: interface
111
+ PARENT: architect-canon.md
112
+ PARTIES: [Component A] ↔ [Component B]
113
+ === /DIALOGSPEC STAMP ===
114
+ ```
115
+
116
+ Save the verbatim dialog as `canon/interfaces/interface-[A]-[B]-dialog.md` (THE CANON).
117
+ Generate the derived summary as `canon/interfaces/interface-[A]-[B]-summary.md`.
118
+ Update `canon/index.md` with the Interface Canon (type, status, parties).
119
+ Generate `spec/interfaces/interface-[A]-[B].md` (including data shape, error semantics, privacy/classification, versioning, rate/cost expectations).
120
+ Update `canon/traceability.md`.
121
+
122
+ ---
123
+
124
+ ## STEP 3: CONVERGE COMPONENT CANONS
125
+
126
+ For each subsystem, conduct a full convergence dialog.
127
+
128
+ Begin each component dialog with:
129
+
130
+ "Now we're going to work out [Component name].
131
+
132
+ Inherited constraints (non-negotiable):
133
+ - [constraint 1 from Architect Canon]
134
+ - [constraint 2 from Architect Canon]
135
+
136
+ Authority Budget ceiling:
137
+ - [ceiling from Architect Canon]
138
+
139
+ Interfaces:
140
+ - With [Component X]: [short description]
141
+ - With [Component Y]: [short description]
142
+
143
+ Describe what this part of the system should do."
144
+
145
+ ### Rules during component convergence:
146
+ - Inherited constraints are NOT negotiable
147
+ - If the user wants something that violates an inherited constraint: "This conflicts with [constraint] from the Architect Canon. That can only be changed via /pantion-amend on the Architect Canon."
148
+ - Authority Budget of this component may be LESS than the ceiling, never MORE
149
+ - Interface Canons must be respected
150
+
151
+ Produce a stamp per component:
152
+
153
+ ```
154
+ === DIALOGSPEC STAMP ===
155
+ STATUS: CONVERGED
156
+ DATE: [today]
157
+ MODEL: [model-id (Display Name), e.g. claude-opus-4-6 (Claude Opus 4.6)]
158
+ CANON TYPE: component
159
+ PARENT: architect-canon.md
160
+ INHERITED CONSTRAINTS: [list]
161
+ INTERFACE CANONS: [list]
162
+ === /DIALOGSPEC STAMP ===
163
+ ```
164
+
165
+ Save the verbatim dialog as `canon/components/component-[name]-dialog.md` (THE CANON).
166
+ Generate the derived summary as `canon/components/component-[name]-summary.md`.
167
+ Update `canon/index.md` with the Component Canon (type, status, parent).
168
+
169
+ Generate:
170
+ - `spec/components/[name]/requirements.md`
171
+ - Component-specific spec files if needed
172
+ Update `canon/traceability.md`.
173
+
174
+ ---
175
+
176
+ ## STEP 4: CONSISTENCY CHECK
177
+
178
+ After ALL canons have converged, automatically run the consistency check:
179
+
180
+ ### Check:
181
+ - [ ] **COVERAGE**: Do all Component Canons together cover the full system intent?
182
+ - [ ] **NO GAPS**: Is every aspect of system behavior owned by exactly one component?
183
+ - [ ] **NO OVERLAP**: Does no behavior appear in multiple components?
184
+ - [ ] **INTERFACE CONSISTENCY**: Does what A promises match what B expects?
185
+ - [ ] **CONSTRAINT PROPAGATION**: Does no component violate an inherited constraint?
186
+ - [ ] **AUTHORITY BUDGET — Rights**: no component exceeds the ceiling
187
+ - [ ] **AUTHORITY BUDGET — Consumption**: sum of allocations fits within system budget
188
+ - [ ] **NON-GOALS**: Do system-wide non-goals not appear as goals in components?
189
+
190
+ ### On problems:
191
+ Report each problem and ask the user how it should be resolved.
192
+ Resolve via amendments to the affected canons.
193
+
194
+ ### On success:
195
+ Save the result as `canon/consistency-report.md`.
196
+
197
+ Say:
198
+ "All canons have converged and are consistent. The system consists of [N] components with [M] interfaces. Would you like me to build? I can build all components sequentially, or you can have them built separately."
199
+
200
+ ---
201
+
202
+ ## STEP 5: BUILD
203
+
204
+ ### Option A — Sequential (one agent builds everything)
205
+ Build each component in order, respecting the interfaces.
206
+
207
+ ### Option B — Independent (user builds parts separately)
208
+ Produce per component a build instruction the user can give to any agent:
209
+
210
+ ```markdown
211
+ ## Build instruction for [Component name]
212
+
213
+ Read the following files:
214
+ - spec/components/[name]/requirements.md (your primary source)
215
+ - spec/constraints.md (inherited boundaries)
216
+ - spec/interfaces/interface-[name]-[X].md (your interfaces)
217
+
218
+ Build the component. Respect all constraints and interfaces.
219
+ Produce interface stubs/mocks so other components can test independently.
220
+ ```
221
+
222
+ ---
223
+
224
+ ## RECURSION
225
+
226
+ If a Component Canon itself becomes too large, say:
227
+
228
+ "Component [name] is complex enough to split up on its own. I'm going to apply /pantion-decompose recursively to this component."
229
+
230
+ The component then becomes an Architect Canon for a sub-decomposition.