@deftai/directive-content 0.55.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 (250) hide show
  1. package/.agents/skills/deft/SKILL.md +6 -0
  2. package/.agents/skills/deft-directive-article-review/SKILL.md +11 -0
  3. package/.agents/skills/deft-directive-build/SKILL.md +10 -0
  4. package/.agents/skills/deft-directive-cost/SKILL.md +12 -0
  5. package/.agents/skills/deft-directive-debug/SKILL.md +13 -0
  6. package/.agents/skills/deft-directive-gh-arch/SKILL.md +11 -0
  7. package/.agents/skills/deft-directive-gh-slice/SKILL.md +10 -0
  8. package/.agents/skills/deft-directive-glossary/SKILL.md +10 -0
  9. package/.agents/skills/deft-directive-interview/SKILL.md +9 -0
  10. package/.agents/skills/deft-directive-pre-pr/SKILL.md +9 -0
  11. package/.agents/skills/deft-directive-refinement/SKILL.md +10 -0
  12. package/.agents/skills/deft-directive-release/SKILL.md +12 -0
  13. package/.agents/skills/deft-directive-review-cycle/SKILL.md +10 -0
  14. package/.agents/skills/deft-directive-setup/SKILL.md +10 -0
  15. package/.agents/skills/deft-directive-swarm/SKILL.md +10 -0
  16. package/.agents/skills/deft-directive-sync/SKILL.md +9 -0
  17. package/.agents/skills/deft-directive-triage/SKILL.md +9 -0
  18. package/.agents/skills/deft-directive-write-skill/SKILL.md +9 -0
  19. package/LICENSE.md +22 -0
  20. package/QUICK-START.md +167 -0
  21. package/UPGRADING.md +517 -0
  22. package/coding/build-output.md +28 -0
  23. package/coding/coding.md +235 -0
  24. package/coding/debugging.md +110 -0
  25. package/coding/holzmann.md +96 -0
  26. package/coding/hygiene.md +127 -0
  27. package/coding/security.md +158 -0
  28. package/coding/testing.md +162 -0
  29. package/coding/toolchain.md +44 -0
  30. package/commands.md +300 -0
  31. package/context/context.md +57 -0
  32. package/context/deterministic-split.md +67 -0
  33. package/context/examples.md +26 -0
  34. package/context/fractal-summaries.md +69 -0
  35. package/context/long-horizon.md +46 -0
  36. package/context/spec-deltas.md +177 -0
  37. package/context/tool-design.md +34 -0
  38. package/context/working-memory.md +62 -0
  39. package/contracts/boundary-maps.md +65 -0
  40. package/contracts/deterministic-questions.md +59 -0
  41. package/contracts/hierarchy.md +77 -0
  42. package/conventions/content-manifest.json +399 -0
  43. package/conventions/machine-generated-banner.md +130 -0
  44. package/conventions/references.md +120 -0
  45. package/conventions/rule-ownership.json +382 -0
  46. package/conventions/task-caching.md +43 -0
  47. package/conventions/vbrief-filenames.md +70 -0
  48. package/deployments/README.md +37 -0
  49. package/deployments/agentuity/README.md +138 -0
  50. package/deployments/agentuity/via-cli.md +380 -0
  51. package/deployments/agentuity/via-cloud.md +425 -0
  52. package/deployments/agentuity/via-github-actions.md +664 -0
  53. package/deployments/agentuity/via-gravity-network.md +606 -0
  54. package/deployments/agentuity/via-vpc.md +607 -0
  55. package/deployments/aws/README.md +38 -0
  56. package/deployments/aws/via-app-runner.md +612 -0
  57. package/deployments/aws/via-ecs-fargate.md +561 -0
  58. package/deployments/aws/via-elastic-beanstalk.md +628 -0
  59. package/deployments/aws/via-lambda.md +649 -0
  60. package/deployments/azure/README.md +37 -0
  61. package/deployments/azure/via-aks.md +390 -0
  62. package/deployments/azure/via-app-service.md +564 -0
  63. package/deployments/azure/via-container-apps.md +599 -0
  64. package/deployments/azure/via-functions.md +552 -0
  65. package/deployments/cloud-gov/README.md +63 -0
  66. package/deployments/cloud-gov/agents/compliance-docs.md +154 -0
  67. package/deployments/cloud-gov/agents.md +39 -0
  68. package/deployments/cloud-gov/cicd.md +64 -0
  69. package/deployments/cloud-gov/deployment.md +150 -0
  70. package/deployments/cloud-gov/logging.md +43 -0
  71. package/deployments/cloud-gov/manifest.md +121 -0
  72. package/deployments/cloud-gov/overview.md +58 -0
  73. package/deployments/cloud-gov/security.md +46 -0
  74. package/deployments/cloud-gov/services.md +72 -0
  75. package/deployments/cloud-gov/upstream/README.md +18 -0
  76. package/deployments/cloudflare/README.md +33 -0
  77. package/deployments/cloudflare/via-dashboard.md +83 -0
  78. package/deployments/cloudflare/via-git.md +90 -0
  79. package/deployments/cloudflare/via-github-actions.md +185 -0
  80. package/deployments/cloudflare/via-terraform.md +157 -0
  81. package/deployments/cloudflare/via-wrangler.md +165 -0
  82. package/deployments/fly-io/README.md +37 -0
  83. package/deployments/fly-io/via-dockerfile.md +648 -0
  84. package/deployments/fly-io/via-flyctl.md +653 -0
  85. package/deployments/fly-io/via-github-actions.md +695 -0
  86. package/deployments/fly-io/via-multi-region.md +598 -0
  87. package/deployments/google/README.md +34 -0
  88. package/deployments/google/via-app-engine.md +42 -0
  89. package/deployments/google/via-cloud-functions.md +23 -0
  90. package/deployments/google/via-cloud-run.md +330 -0
  91. package/deployments/google/via-gke.md +23 -0
  92. package/deployments/netlify/README.md +99 -0
  93. package/deployments/netlify/via-cli.md +17 -0
  94. package/deployments/netlify/via-functions.md +19 -0
  95. package/deployments/netlify/via-git.md +25 -0
  96. package/deployments/vercel/README.md +90 -0
  97. package/deployments/vercel/via-api.md +16 -0
  98. package/deployments/vercel/via-cli.md +17 -0
  99. package/deployments/vercel/via-git.md +24 -0
  100. package/docs/BROWNFIELD.md +179 -0
  101. package/docs/getting-started.md +137 -0
  102. package/docs/good-agents-md.md +137 -0
  103. package/events/README.md +89 -0
  104. package/events/event-record.schema.json +26 -0
  105. package/events/registry.json +166 -0
  106. package/events/registry.schema.json +71 -0
  107. package/glossary.md +145 -0
  108. package/incidents/README.md +81 -0
  109. package/incidents/_template.md +38 -0
  110. package/interfaces/cli.md +104 -0
  111. package/interfaces/rest.md +212 -0
  112. package/interfaces/tui.md +242 -0
  113. package/interfaces/web.md +123 -0
  114. package/languages/6502-DASM.md +132 -0
  115. package/languages/c.md +235 -0
  116. package/languages/commands.md +23 -0
  117. package/languages/cpp.md +132 -0
  118. package/languages/csharp.md +259 -0
  119. package/languages/dart.md +183 -0
  120. package/languages/delphi.md +218 -0
  121. package/languages/elixir.md +208 -0
  122. package/languages/go.md +78 -0
  123. package/languages/java.md +278 -0
  124. package/languages/javascript.md +163 -0
  125. package/languages/julia.md +175 -0
  126. package/languages/kotlin.md +193 -0
  127. package/languages/markdown.md +168 -0
  128. package/languages/mermaid.md +146 -0
  129. package/languages/officejs.md +392 -0
  130. package/languages/python.md +209 -0
  131. package/languages/r.md +163 -0
  132. package/languages/rust.md +216 -0
  133. package/languages/sql.md +216 -0
  134. package/languages/swift.md +153 -0
  135. package/languages/typescript.md +132 -0
  136. package/languages/vba.md +279 -0
  137. package/languages/vhdl.md +180 -0
  138. package/languages/visual-basic.md +151 -0
  139. package/languages/zig.md +196 -0
  140. package/meta/SOUL.md +27 -0
  141. package/meta/code-field.md +44 -0
  142. package/meta/morals.md +40 -0
  143. package/meta/philosophy.md +39 -0
  144. package/meta/project.md +49 -0
  145. package/meta/ralph.md +223 -0
  146. package/meta/security.md +80 -0
  147. package/meta/versioning.md +326 -0
  148. package/package.json +22 -0
  149. package/packs/lessons/lessons-pack-0.1.json +553 -0
  150. package/packs/patterns/patterns-pack-0.1.json +57 -0
  151. package/packs/rules/rules-pack-0.1.json +4767 -0
  152. package/packs/skills/skills-pack-0.1.json +262 -0
  153. package/packs/strategies/strategies-pack-0.1.json +167 -0
  154. package/packs/swarm-spec/swarm-spec-pack-0.1.json +17 -0
  155. package/patterns/executor-layer-credentials.md +227 -0
  156. package/patterns/llm-app.md +156 -0
  157. package/patterns/multi-agent.md +278 -0
  158. package/patterns/prompt-assembly-layer-ordering.md +154 -0
  159. package/patterns/role-as-overlay.md +179 -0
  160. package/platforms/2600.md +137 -0
  161. package/platforms/unity.md +329 -0
  162. package/references/composer-skill-porting.md +152 -0
  163. package/references/cost-models.md +163 -0
  164. package/references/ip-risk.md +246 -0
  165. package/references/plain-english-ux.md +275 -0
  166. package/resilience/context-pruning.md +67 -0
  167. package/resilience/continue-here.md +62 -0
  168. package/scm/changelog.md +276 -0
  169. package/scm/git.md +139 -0
  170. package/scm/github.md +265 -0
  171. package/secrets/.gitkeep +0 -0
  172. package/skills/deft-build/SKILL.md +20 -0
  173. package/skills/deft-directive-article-review/SKILL.md +156 -0
  174. package/skills/deft-directive-build/SKILL.md +302 -0
  175. package/skills/deft-directive-cost/SKILL.md +201 -0
  176. package/skills/deft-directive-debug/SKILL.md +140 -0
  177. package/skills/deft-directive-decompose/SKILL.md +96 -0
  178. package/skills/deft-directive-gh-arch/SKILL.md +160 -0
  179. package/skills/deft-directive-gh-slice/SKILL.md +199 -0
  180. package/skills/deft-directive-glossary/SKILL.md +118 -0
  181. package/skills/deft-directive-interview/SKILL.md +528 -0
  182. package/skills/deft-directive-pre-pr/SKILL.md +131 -0
  183. package/skills/deft-directive-probe/SKILL.md +127 -0
  184. package/skills/deft-directive-refinement/SKILL.md +403 -0
  185. package/skills/deft-directive-release/SKILL.md +266 -0
  186. package/skills/deft-directive-review-cycle/SKILL.md +401 -0
  187. package/skills/deft-directive-setup/SKILL.md +717 -0
  188. package/skills/deft-directive-swarm/SKILL.md +989 -0
  189. package/skills/deft-directive-sync/SKILL.md +288 -0
  190. package/skills/deft-directive-triage/SKILL.md +137 -0
  191. package/skills/deft-directive-write-skill/SKILL.md +169 -0
  192. package/skills/deft-interview/SKILL.md +16 -0
  193. package/skills/deft-pre-pr/SKILL.md +16 -0
  194. package/skills/deft-review-cycle/SKILL.md +16 -0
  195. package/skills/deft-roadmap-refresh/SKILL.md +16 -0
  196. package/skills/deft-setup/SKILL.md +20 -0
  197. package/skills/deft-swarm/SKILL.md +16 -0
  198. package/skills/deft-sync/SKILL.md +16 -0
  199. package/strategies/README.md +83 -0
  200. package/strategies/artifact-guards.md +85 -0
  201. package/strategies/bdd.md +115 -0
  202. package/strategies/brownfield.md +7 -0
  203. package/strategies/discuss.md +129 -0
  204. package/strategies/emit-hints.md +69 -0
  205. package/strategies/enterprise.md +193 -0
  206. package/strategies/interview.md +551 -0
  207. package/strategies/map.md +179 -0
  208. package/strategies/probe.md +151 -0
  209. package/strategies/rapid.md +155 -0
  210. package/strategies/research.md +155 -0
  211. package/strategies/roadmap.md +9 -0
  212. package/strategies/speckit.md +437 -0
  213. package/strategies/v0-20-contract.md +134 -0
  214. package/strategies/yolo.md +169 -0
  215. package/swarm/swarm.md +300 -0
  216. package/templates/COST-ESTIMATE.md +114 -0
  217. package/templates/PULL_REQUEST_TEMPLATE.md +35 -0
  218. package/templates/agent-prompt-preamble.md +409 -0
  219. package/templates/agents-entry.md +211 -0
  220. package/templates/agents-entry.placeholders.md +75 -0
  221. package/templates/embed.go +20 -0
  222. package/templates/embed_test.go +36 -0
  223. package/templates/make-spec-example.md +9 -0
  224. package/templates/make-spec.md +246 -0
  225. package/templates/project.md.template +52 -0
  226. package/templates/specification.md +1 -0
  227. package/templates/swarm-greptile-poller-prompt.md +556 -0
  228. package/templates/user.md.template +31 -0
  229. package/tools/RWLDL.md +80 -0
  230. package/tools/greptile.md +141 -0
  231. package/tools/installer.md +23 -0
  232. package/tools/taskfile-migration.md +32 -0
  233. package/tools/taskfile.md +185 -0
  234. package/tools/telemetry.md +285 -0
  235. package/vbrief/schemas/cache-meta.schema.json +137 -0
  236. package/vbrief/schemas/candidates.schema.json +130 -0
  237. package/vbrief/schemas/codebase-map.schema.json +213 -0
  238. package/vbrief/schemas/lessons-pack.schema.json +134 -0
  239. package/vbrief/schemas/patterns-pack.schema.json +84 -0
  240. package/vbrief/schemas/rules-pack.schema.json +105 -0
  241. package/vbrief/schemas/skills-pack.schema.json +94 -0
  242. package/vbrief/schemas/slices.schema.json +87 -0
  243. package/vbrief/schemas/strategies-pack.schema.json +89 -0
  244. package/vbrief/schemas/swarm-spec-pack.schema.json +84 -0
  245. package/vbrief/schemas/vbrief-core.schema.json +1022 -0
  246. package/vbrief/vbrief.md +684 -0
  247. package/verification/integration.md +76 -0
  248. package/verification/plan-checking.md +85 -0
  249. package/verification/uat.md +60 -0
  250. package/verification/verification.md +117 -0
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://deft.dev/schemas/slices-1.0.schema.json",
4
+ "title": "Slicing Cohort Record v1",
5
+ "description": "Frozen interface contract for one line in vbrief/.eval/slices.jsonl. Each line is a single JSON object recording one slicing event: an umbrella issue + the children produced from it. Slices.jsonl is APPEND-ONLY (existing lines are never edited or deleted) AND TRACKED IN GIT (sibling to the gitignored candidates.jsonl per vbrief/.eval/README.md tracking policy). Written by scripts/slice_record.py::write_slice; consumed by task triage:audit --orphans / --slice-stalled / --slice-coverage and by the D3 slice-wave-ready evaluator. Field set, types, and enums are FROZEN -- new fields may only be added in additive, optional positions in a follow-up schema version (D13 / #1132).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "slice_id",
10
+ "umbrella",
11
+ "umbrella_url",
12
+ "sliced_at",
13
+ "actor",
14
+ "children",
15
+ "expected_close_signal"
16
+ ],
17
+ "properties": {
18
+ "slice_id": {
19
+ "type": "string",
20
+ "format": "uuid",
21
+ "description": "RFC 4122 UUID (any version) uniquely identifying this cohort. Used by scripts/slice_record.py::write_slice for retry-dedup -- a re-write with the same slice_id is a no-op so a network blip mid-PR-create does not duplicate the cohort record.",
22
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
23
+ },
24
+ "umbrella": {
25
+ "type": "integer",
26
+ "minimum": 1,
27
+ "description": "Umbrella issue number this cohort was sliced from."
28
+ },
29
+ "umbrella_url": {
30
+ "type": "string",
31
+ "format": "uri",
32
+ "description": "Full URL of the umbrella issue (e.g. https://github.com/owner/repo/issues/1119)."
33
+ },
34
+ "sliced_at": {
35
+ "type": "string",
36
+ "format": "date-time",
37
+ "description": "ISO-8601 UTC timestamp with literal Z suffix (e.g. 2026-05-13T18:00:00Z) when the slicing event was recorded.",
38
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"
39
+ },
40
+ "actor": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "description": "Slicing actor identity. v1 expected values: `skill:gh-slice`, `skill:gh-arch`, `skill:refinement`. The field is open-vocab so future slicing surfaces can append additional tags without a schema bump."
44
+ },
45
+ "children": {
46
+ "type": "array",
47
+ "minItems": 1,
48
+ "description": "Children produced by the slicing event. Order is informational; the consumer joins on `n` (issue number).",
49
+ "items": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["n", "url", "wave", "role"],
53
+ "properties": {
54
+ "n": {
55
+ "type": "integer",
56
+ "minimum": 1,
57
+ "description": "Child issue number."
58
+ },
59
+ "url": {
60
+ "type": "string",
61
+ "format": "uri",
62
+ "description": "Full URL of the child issue."
63
+ },
64
+ "wave": {
65
+ "type": "integer",
66
+ "minimum": 1,
67
+ "description": "1-indexed wave number. Wave-1 children block (transitively) Wave-N>1 children of the same slice_id via the D3 `slice-wave-ready:<slice_id>:<wave>` atomic."
68
+ },
69
+ "role": {
70
+ "type": "string",
71
+ "minLength": 1,
72
+ "description": "Short slicer-supplied tag describing the child's role (e.g. `structural`, `feature`, `docs`). Not semantically interpreted in v1 -- v1 is human readability only."
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "expected_close_signal": {
78
+ "type": "string",
79
+ "enum": ["all-children-merged", "wave-1-merged", "manual"],
80
+ "description": "Operator-declared expected umbrella close signal. `all-children-merged` is the strict default; `wave-1-merged` is the lenient signal used when Wave-N>1 children are explicitly deferred via D3 `slice-wave-ready`; `manual` defers the close decision entirely to the operator."
81
+ },
82
+ "notes": {
83
+ "type": "string",
84
+ "description": "Optional free-form rationale captured at slice time."
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://deft.dev/schemas/strategies-pack-0.1.schema.json",
4
+ "title": "Strategies Pack 0.1",
5
+ "description": "Canonical source schema for the strategies-pack-0.1 tier-3 extension pack (#1296, design #1283, ADR-001, generalizing the #1294 lessons pilot + #1295 skills pack). The structured JSON at packs/strategies/strategies-pack-0.1.json is the SOURCE OF TRUTH for strategy ROUTING METADATA: for every strategies/*.md it records id (the doc stem), title (the leading `# ` heading), description (the leading description paragraph), triggers (the strategy stem as an invocation keyword, used by the `by-trigger` slice), and the path. Exactly one designated proof strategy (strategies/yolo.md) also carries its full body so its markdown can be regenerated as a banner-marked, drift-checked projection (scripts/pack_render.py); every other entry is metadata-only (body null) and keeps its hand-authored markdown. The `x-sliceRegistry` block is the schema-declared, agent-facing slice API (mirrors lessons + skills): a named-slice registry mapping slice name -> { path (a constrained dotted path into the source -- NOT JSONPath), filters[] (the fixed trigger vocabulary), description }. Agents query by slice NAME only. The `x-display` block declares how scripts/packs_slice.py renders an entry as text (heading field, labelled metadata fields, optional body field, and the empty-result noun) so the slice formatter stays pack-agnostic.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["pack", "version", "strategies"],
9
+ "properties": {
10
+ "pack": {
11
+ "const": "strategies-pack-0.1",
12
+ "description": "Versioned pack identifier. The version lives in the name per #1283 Q6 (pack version is part of the pack name)."
13
+ },
14
+ "version": {
15
+ "const": "0.1",
16
+ "description": "Pack major.minor, mirrored from the pack name suffix."
17
+ },
18
+ "generated_from": {
19
+ "type": "string",
20
+ "description": "Provenance: the sources the one-shot migration (scripts/pack_migrate_strategies.py) parsed to build this pack (strategies/*.md)."
21
+ },
22
+ "strategies": {
23
+ "type": "array",
24
+ "description": "One entry per discovered strategy doc (strategies/*.md). Order is the sorted path order.",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["id", "title", "description", "triggers", "path", "body"],
29
+ "properties": {
30
+ "id": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
34
+ "description": "Strategy id: the slugified doc stem (e.g. yolo, bdd, v0-20-contract)."
35
+ },
36
+ "title": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "description": "The strategy's leading `# ` heading text, stored verbatim."
40
+ },
41
+ "description": {
42
+ "type": "string",
43
+ "description": "The leading description paragraph after the title (Legend / See-also / chrome lines skipped), folded to a single normalised string. Empty when the doc has no leading paragraph."
44
+ },
45
+ "triggers": {
46
+ "type": "array",
47
+ "description": "Invocation keywords for this strategy (the doc stem). Empty when the strategy has no derivable trigger. The `by-trigger` slice filters on this field.",
48
+ "items": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ }
52
+ },
53
+ "path": {
54
+ "type": "string",
55
+ "pattern": "^strategies/.+\\.md$",
56
+ "description": "Repo-relative path to the strategy markdown."
57
+ },
58
+ "body": {
59
+ "type": ["string", "null"],
60
+ "description": "Full strategy body (banner-stripped, verbatim) for the ONE designated proof strategy (strategies/yolo.md); null for metadata-only entries. The renderer reconstructs the proof = banner + body."
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "x-display": {
67
+ "heading": "id",
68
+ "fields": ["title", "description", "triggers", "path"],
69
+ "body": null,
70
+ "noun": "strategies"
71
+ },
72
+ "x-sliceRegistry": {
73
+ "by-trigger": {
74
+ "path": "strategies",
75
+ "filters": ["trigger"],
76
+ "description": "Strategies whose invocation keywords include any of the requested --trigger values (case-insensitive, repeatable or comma-listed)."
77
+ },
78
+ "list": {
79
+ "path": "strategies",
80
+ "filters": [],
81
+ "description": "Every strategy with its title, description, triggers, and path."
82
+ },
83
+ "by-id": {
84
+ "path": "strategies",
85
+ "filters": ["id"],
86
+ "description": "Strategies whose id matches any of the requested --id values (e.g. yolo, bdd; case-insensitive, repeatable or comma-listed)."
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://deft.dev/schemas/swarm-spec-pack-0.1.schema.json",
4
+ "title": "Swarm Spec Pack 0.1",
5
+ "description": "Canonical source schema for the swarm-spec-pack-0.1 tier-3 extension pack (#1637, candidate from the #1283 Q-list, design #1283, ADR-001, generalizing the #1294 lessons pilot + #1295 skills pack + #1296 rules/strategies packs). The structured JSON at packs/swarm-spec/swarm-spec-pack-0.1.json is the SOURCE OF TRUTH for swarm-specification ROUTING METADATA: for every swarm/*.md it records id (the doc stem), title (the leading `# ` heading), description (the leading description paragraph), triggers (the doc stem as an invocation keyword, used by the `by-trigger` slice), and the path. The swarm spec is a single canonical document today, so its one entry is the designated proof and carries its full body, regenerated as a banner-marked, drift-checked projection (scripts/pack_render.py). The `x-sliceRegistry` block is the schema-declared, agent-facing slice API (mirrors lessons + skills + strategies + patterns): a named-slice registry mapping slice name -> { path (a constrained dotted path into the source -- NOT JSONPath), filters[] (the fixed trigger vocabulary), description }. Agents query by slice NAME only. The `x-display` block declares how scripts/packs_slice.py renders an entry as text (heading field, labelled metadata fields, optional body field, and the empty-result noun) so the slice formatter stays pack-agnostic.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["pack", "version", "entries"],
9
+ "properties": {
10
+ "pack": {
11
+ "const": "swarm-spec-pack-0.1",
12
+ "description": "Versioned pack identifier. The version lives in the name per #1283 Q6 (pack version is part of the pack name)."
13
+ },
14
+ "version": {
15
+ "const": "0.1",
16
+ "description": "Pack major.minor, mirrored from the pack name suffix."
17
+ },
18
+ "generated_from": {
19
+ "type": "string",
20
+ "description": "Provenance: the sources the one-shot migration (scripts/pack_migrate_swarm_spec.py) parsed to build this pack (swarm/*.md)."
21
+ },
22
+ "entries": {
23
+ "type": "array",
24
+ "description": "One entry per discovered swarm-spec doc (swarm/*.md). Order is the sorted path order.",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["id", "title", "description", "triggers", "path", "body"],
29
+ "properties": {
30
+ "id": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
34
+ "description": "Entry id: the slugified doc stem (e.g. swarm)."
35
+ },
36
+ "title": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "description": "The doc's leading `# ` heading text, stored verbatim."
40
+ },
41
+ "description": {
42
+ "type": "string",
43
+ "description": "The leading description paragraph after the title (Legend / See-also / chrome lines skipped), folded to a single normalised string. Empty when the doc has no leading paragraph."
44
+ },
45
+ "triggers": {
46
+ "type": "array",
47
+ "description": "Invocation keywords for this entry (the doc stem). Empty when the entry has no derivable trigger. The `by-trigger` slice filters on this field.",
48
+ "items": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ }
52
+ },
53
+ "path": {
54
+ "type": "string",
55
+ "pattern": "^swarm/.+\\.md$",
56
+ "description": "Repo-relative path to the swarm-spec markdown."
57
+ },
58
+ "body": {
59
+ "type": ["string", "null"],
60
+ "description": "Full doc body (banner-stripped, verbatim) for entries whose markdown is regenerated as a banner-marked, drift-checked projection; null for metadata-only entries. The single swarm spec doc is the proof and carries its body."
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "x-display": {
67
+ "heading": "id",
68
+ "fields": ["title", "description", "triggers", "path"],
69
+ "body": null,
70
+ "noun": "swarm-spec entries"
71
+ },
72
+ "x-sliceRegistry": {
73
+ "by-trigger": {
74
+ "path": "entries",
75
+ "filters": ["trigger"],
76
+ "description": "Swarm-spec entries whose invocation keywords include any of the requested --trigger values (case-insensitive, repeatable or comma-listed)."
77
+ },
78
+ "list": {
79
+ "path": "entries",
80
+ "filters": [],
81
+ "description": "Every swarm-spec entry with its title, description, triggers, and path."
82
+ }
83
+ }
84
+ }