@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,288 @@
1
+ ---
2
+ name: deft-directive-sync
3
+ description: >-
4
+ Session-start framework sync skill. Pulls latest deft submodule, validates
5
+ vBRIEF lifecycle structure, checks folder/status consistency, detects stale
6
+ origins (RFC D12), and summarizes changes.
7
+ triggers:
8
+ - good morning
9
+ - update deft
10
+ - update vbrief
11
+ - sync frameworks
12
+ ---
13
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
14
+ <!-- Purpose: rendered skill -->
15
+ <!-- Source of truth: packs/skills/skills-pack-0.1.json -->
16
+ <!-- Regenerate with: task packs:render -->
17
+ <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
18
+
19
+ # Deft Directive Sync
20
+
21
+ Session-start framework sync -- pull latest deft submodule updates, validate vBRIEF lifecycle structure, and detect stale origins.
22
+
23
+ > **Canonical bootstrap / update path (post #1334 Epic, #1409):** Use the published Go installer binary (`deft-install` / platform-specific `install-*` from releases) to (re)bootstrap or update the framework payload. The canonical headless one-command refresh for an existing install is `deft-install --yes --upgrade --repo-root . --json` (drop `--json` for human-readable output) -- it actually replaces the framework payload in `.deft/core/` plus the manifest and AGENTS.md. After install the canonical `scripts/doctor.py --session --json` (or `task doctor`) runs automatically and, when the manifest sha shows the payload is stale, recommends that exact command. Legacy `run upgrade` / `task upgrade` are metadata-only acknowledgment (they do NOT replace the payload); git-submodule / `task framework:doctor` paths are back-compat only. See UPGRADING.md and the installer-doctor handoff in #1339/#1340.
24
+
25
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
26
+
27
+ ## Platform Requirements
28
+
29
+ ! This skill requires **GitHub** as the SCM platform and the **GitHub CLI (`gh`)** to be installed and authenticated. Origin freshness checks (Phase 5) fetch issue data via `gh issue view`.
30
+
31
+ ## When to Use
32
+
33
+ - User says "good morning", "update deft", "update vbrief", or "sync frameworks"
34
+ - Beginning of a new session where framework updates may be available
35
+ - After a known upstream deft release
36
+
37
+ ## Framework Events Emitted Here
38
+
39
+ ! When this skill responds to a context-window shift or an explicit "are you using Deft?" probe (per AGENTS.md Deft Alignment Confirmation), emit the paired `session:interrupted` -> `session:resumed` framework events via `scripts/_events.py` so observability of agent-runtime state transitions is structural, not prose-only:
40
+
41
+ - ! Before re-confirming alignment: `python -m scripts._events emit session:interrupted --session-id <id> --reason context-window-shift`
42
+ - ! Immediately after the alignment confirmation line: `python -m scripts._events emit session:resumed --session-id <id> --interrupted-id <id-from-prior-emit>`
43
+ - ⊗ Emit a `session:resumed` whose `interrupted_id` does not reference a prior `session:interrupted` -- such records are orphan and rejected by `scripts._events.validate_pairing` (#635 events behavioral wiring)
44
+
45
+ ## Pre-Cutover Detection Guard
46
+
47
+ ! Before proceeding with sync, detect whether the project uses the pre-v0.20 document model and report model state.
48
+
49
+ ### Detection Criteria
50
+
51
+ A project is **pre-cutover** if ANY of the following are true. This prose mirrors the executable helper in `scripts/_precutover.py`; when in doubt, the helper is canonical.
52
+
53
+ 1. `SPECIFICATION.md` exists and is neither a deprecation redirect nor a current generated spec export. A current generated spec export contains `<!-- Purpose: rendered specification -->` and `<!-- Source of truth: vbrief/specification.vbrief.json -->`, and `vbrief/specification.vbrief.json` plus all five lifecycle folders exist.
54
+ 2. `PROJECT.md` exists and contains neither the legacy `<!-- deft:deprecated-redirect -->` sentinel NOR the current `Purpose: deprecation redirect` canonical-banner marker (real content, not a deprecation redirect)
55
+ 3. `vbrief/specification.vbrief.json` exists but the lifecycle folders (`vbrief/proposed/`, `vbrief/pending/`, `vbrief/active/`, `vbrief/completed/`, `vbrief/cancelled/`) do NOT exist
56
+
57
+ ### Action on Detection
58
+
59
+ ! If pre-cutover state is detected, display the actionable migration message, then **skip Phases 1-6** and proceed directly to Phase 7 with the Document Model line set to "pre-v0.20 (legacy)":
60
+
61
+ > "This project uses the pre-v0.20 document model. Run `task migrate:vbrief` to upgrade to the vBRIEF-centric model."
62
+
63
+ ! Include specific details about what was detected:
64
+
65
+ - Missing lifecycle folders: "Run `task migrate:vbrief` to create the lifecycle folder structure"
66
+ - `SPECIFICATION.md` with real content: "SPECIFICATION.md contains non-redirect content -- this file is deprecated; use scope vBRIEFs in `vbrief/` instead"
67
+ - `PROJECT.md` with real content: "PROJECT.md contains non-redirect content -- this file is deprecated; use `PROJECT-DEFINITION.vbrief.json` instead"
68
+ - Missing `PROJECT-DEFINITION.vbrief.json`: "Run `task project:render` to generate the project definition"
69
+ - Scope vBRIEF in wrong folder: "Status is '{status}' but file is in {folder}/ -- run `task scope:activate <file>` to fix"
70
+
71
+ ### Model State in Sync Output
72
+
73
+ ! Include a **Document Model** line in the Phase 7 summary:
74
+
75
+ - Pre-cutover detected: "**Document Model**: pre-v0.20 (legacy) -- run `task migrate:vbrief` to upgrade"
76
+ - Post-cutover (lifecycle folders present, no stale artifacts): "**Document Model**: v0.20+ (vBRIEF-centric) -- OK"
77
+ - Post-cutover with tampered placeholders: "**Document Model**: v0.20+ with warnings -- SPECIFICATION.md or PROJECT.md contains non-redirect content"
78
+
79
+ ⊗ Skip model state detection during sync -- always report the document model state.
80
+ ⊗ Silently ignore pre-cutover artifacts -- the user must be informed with an actionable command to fix the state.
81
+
82
+ ## Phase 1 -- Pre-flight
83
+
84
+ ! Check that the deft/ submodule working tree is clean before attempting any update.
85
+
86
+ 1. ! Run `git -C deft status --porcelain`
87
+ 2. ! If output is non-empty (dirty working tree): **stop** and ask user whether to stash (`git -C deft stash`) or abort the sync entirely. Do NOT proceed with a dirty submodule.
88
+ 3. ! Record the current DEFT commit for later comparison:
89
+ ```
90
+ git -C deft log --oneline -1
91
+ ```
92
+ 4. ! Present the current state to the user:
93
+ - Current DEFT commit (hash + subject)
94
+ - Clean/dirty status
95
+ - Confirmation that pre-flight passed (or the blocker if dirty)
96
+
97
+ ## Phase 2 -- Update DEFT Submodule
98
+
99
+ 1. ! Run the submodule update:
100
+ ```
101
+ git submodule update --remote --merge deft
102
+ ```
103
+ 2. ! Show what changed by comparing before/after:
104
+ ```
105
+ git -C deft log --oneline <old-hash>..HEAD
106
+ ```
107
+ 3. ~ If no new commits, report "deft submodule already up to date" and proceed to Phase 3.
108
+
109
+ ## Phase 3 -- Structure Validation
110
+
111
+ ! Validate the vBRIEF lifecycle folder structure and project files.
112
+
113
+ ### 3a: Lifecycle Folder Structure
114
+
115
+ ! Verify all required lifecycle folders exist:
116
+
117
+ 1. ! Check that the following directories exist under `./vbrief/`:
118
+ - `proposed/`
119
+ - `pending/`
120
+ - `active/`
121
+ - `completed/`
122
+ - `cancelled/`
123
+ 2. ! Report any missing folders with a clear warning:
124
+ - "WARNING: vbrief/{folder}/ does not exist -- lifecycle structure is incomplete"
125
+ 3. ~ If folders are missing, suggest running `task migrate:vbrief` or creating them manually
126
+
127
+ ### 3b: PROJECT-DEFINITION.vbrief.json Validation
128
+
129
+ ! Validate the project identity gestalt file:
130
+
131
+ 1. ! Check that `./vbrief/PROJECT-DEFINITION.vbrief.json` exists
132
+ - If missing: "WARNING: PROJECT-DEFINITION.vbrief.json not found -- run `task project:render` to create"
133
+ 2. ! If the file exists, validate it is well-formed:
134
+ - Valid JSON (`python3 -m json.tool` or equivalent)
135
+ - Top-level `vBRIEFInfo` envelope with `version` field equal to `"0.6"`
136
+ - `plan` object with `title`, `status`, and `items` fields present
137
+ - `plan.narratives` values are plain strings (not objects or arrays)
138
+ 3. ! **Freshness check**: Compare `vBRIEFInfo.updated` (or `vBRIEFInfo.created` if no `updated`) against recent scope completions:
139
+ - Scan `vbrief/completed/` for vBRIEFs with `vBRIEFInfo.updated` timestamps newer than the PROJECT-DEFINITION timestamp
140
+ - If stale: "WARNING: PROJECT-DEFINITION.vbrief.json may be stale -- {N} scopes completed since last update. Run `task project:render` to refresh."
141
+
142
+ ### 3c: Validate Root-Level vBRIEF Files
143
+
144
+ ! Validate all `./vbrief/*.vbrief.json` files at the vbrief root:
145
+
146
+ 1. ! Check each file is valid JSON
147
+ 2. ! Verify structural conformance:
148
+ - Top-level `vBRIEFInfo` envelope with `version` field present
149
+ - `plan` object with `title`, `status`, and `items` fields present
150
+ - `plan.status` values from valid enum: draft, proposed, approved, pending, running, completed, blocked, cancelled
151
+ 3. ~ Use `task vbrief:validate` if available for deeper validation
152
+ 4. ! Report any validation failures with file name and specific violation
153
+
154
+ ⊗ Overwrite or modify project-level `./vbrief/*.vbrief.json` files -- those are project data, not framework files. Report issues and let the user decide how to fix them.
155
+
156
+ ## Phase 4 -- Lifecycle Consistency Check
157
+
158
+ ! Verify that each scope vBRIEF's `plan.status` matches its folder location.
159
+
160
+ 1. ! Scan all scope vBRIEFs in lifecycle folders (`proposed/`, `pending/`, `active/`, `completed/`, `cancelled/`)
161
+ 2. ! For each vBRIEF, check `plan.status` against the expected statuses for its folder:
162
+ - `proposed/`: status should be `draft` or `proposed`
163
+ - `pending/`: status should be `approved` or `pending`
164
+ - `active/`: status should be `running` or `blocked`
165
+ - `completed/`: status should be `completed`
166
+ - `cancelled/`: status should be `cancelled`
167
+ 3. ! Report any mismatches:
168
+ - "MISMATCH: {filename} in {folder}/ has status '{status}' -- expected one of [{expected_statuses}]"
169
+ 4. ~ Per vbrief.md convention, trust the status field and suggest correcting the folder location:
170
+ - "Suggested fix: move {filename} to {correct_folder}/ (status '{status}' is authoritative)"
171
+
172
+ ⊗ Auto-move vBRIEFs to fix folder/status mismatches -- report only; user decides during refinement or ad-hoc
173
+
174
+ ## Phase 5 -- Origin Freshness (RFC D12)
175
+
176
+ ! For vBRIEFs with external origin references, detect staleness and externally-closed origins.
177
+
178
+ ### Step 1: Scan Origins
179
+
180
+ 1. ! For each vBRIEF in `proposed/` and `pending/` with a `github-issue` reference in `plan.references` or top-level `references`:
181
+ - Extract the issue number from the reference URL or `id` field
182
+ - Fetch the issue: `gh issue view {N} --repo {owner/repo} --json updatedAt,state`
183
+ 2. ! Compare the issue's `updatedAt` against the vBRIEF's `vBRIEFInfo.updated` (or `vBRIEFInfo.created` if no `updated` field)
184
+
185
+ ### Step 2: Categorize and Report
186
+
187
+ 1. ! **Stale origins** -- issue `updatedAt` is newer than vBRIEF `updated` timestamp:
188
+ - "{N} vBRIEFs have origins updated since last sync"
189
+ - List each: "{filename}: Issue #{N} updated {time_delta} ago"
190
+ 2. ! **Externally closed origins** -- issue state is `CLOSED`:
191
+ - "{N} vBRIEFs have origins that were closed externally"
192
+ - List each: "{filename}: Issue #{N} is closed ({close_reason})"
193
+ 3. ~ **Current origins** -- no changes detected (report count only)
194
+
195
+ ### Step 3: Recommendation
196
+
197
+ - ! Report only -- never auto-update vBRIEFs based on origin changes
198
+ - ~ If stale or externally-closed vBRIEFs are found, suggest: "Run a refinement session (`skills/deft-directive-refinement/SKILL.md`) to reconcile stale origins with user approval."
199
+
200
+ ⊗ Auto-update vBRIEFs based on origin freshness checks -- report only; user decides during refinement
201
+
202
+ ## Phase 6 -- Framework Sync
203
+
204
+ After structure validation, sync framework-level assets.
205
+
206
+ ### 6a: Check AGENTS.md freshness
207
+
208
+ ~ Compare the project's `AGENTS.md` against the deft template (if a template exists in the updated `deft/` submodule):
209
+
210
+ 1. ~ Diff the structure (section headings, key rules) rather than expecting byte-identical content
211
+ 2. ~ Report any new sections or rules added upstream that are missing locally
212
+ 3. ~ Do NOT auto-overwrite -- present differences and let the user decide
213
+
214
+ ### 6b: Check codebase MAP freshness
215
+
216
+ ~ If `./.planning/codebase/MAP.md` exists, or `PROJECT-DEFINITION.vbrief.json` declares a `projectionManifest[]` entry with `kind: "codebase-map"`, run `task verify:codebase-map-fresh` when the command resolves. If it reports drift, recommend `task codebase:map` and note that the generated MAP is advisory unless the operator asked to refresh projections.
217
+
218
+ - ! Keep `plan.architecture.codeStructure` and configured provider artifacts authoritative; the MAP is a generated projection.
219
+ - ⊗ Auto-edit canonical vBRIEF metadata to make the MAP fresh during sync -- report drift and let the operator choose a follow-up.
220
+
221
+ ### 6c: List new skills
222
+
223
+ ! Compare the `skills/` directory before and after the update:
224
+
225
+ 1. ! List any new skill directories added in the update
226
+ 2. ~ For each new skill, read its frontmatter `description` field and present a one-liner
227
+ 3. ~ Mention if any existing skills were updated (changed files)
228
+
229
+ ## Phase 6d -- Legacy Artifact Review (post-migration, one-time)
230
+
231
+ ! If `vbrief/migration/LEGACY-REPORT.md` exists (and has NOT been renamed to `LEGACY-REPORT.reviewed.md`), walk the operator through each captured legacy section and record their disposition inline in the same file. This phase surfaces the non-canonical content that `task migrate:vbrief` preserved via the `LegacyArtifacts` narrative mechanism (#505).
232
+
233
+ ### Detection
234
+
235
+ 1. ! Check for `vbrief/migration/LEGACY-REPORT.md` in the project root.
236
+ 2. ! If the file is absent or `LEGACY-REPORT.reviewed.md` exists (reviewed form), skip Phase 6d silently and proceed to Phase 7.
237
+ 3. ! If `LEGACY-REPORT.md` is present and has NOT been renamed, begin the review loop below.
238
+
239
+ ### Review loop
240
+
241
+ 1. ! Present the report summary (sources + per-bucket section counts) to the user.
242
+ 2. ! For each captured section listed under `## specification.vbrief.json -> LegacyArtifacts`, `## PROJECT-DEFINITION.vbrief.json -> LegacyArtifacts`, and `## PRD.md content (flagged: hand-edited)`:
243
+ - Restate the section title, source file + line range, and size.
244
+ - Offer exactly three disposition options: **Keep** (leave inside `LegacyArtifacts`), **Fold into {suggested narrative}** (move into a canonical narrative key), or **Drop** (remove from `LegacyArtifacts`, with explicit user confirmation).
245
+ - ~ If a sidecar pointer is present (`vbrief/legacy/{stem}-{slug}.md`), open the sidecar for the user before offering options so the full content is visible.
246
+ 3. ! Record each disposition inline in the same `LEGACY-REPORT.md` file under a new `## Reviewed` section with one entry per legacy item: original section, user's decision, target location (if folded) or confirmation note (if kept/dropped), and the reviewer's timestamp.
247
+ 4. ! For a **Fold** decision, the agent updates the target vBRIEF's narrative key AND deletes only the corresponding section from the `LegacyArtifacts` narrative -- never the file.
248
+ 5. ! For a **Drop** decision, the agent removes only the corresponding section from the `LegacyArtifacts` narrative.
249
+ 6. ! Once all sections carry a recorded disposition, rename the file to `LEGACY-REPORT.reviewed.md`. The file is kept so the audit trail remains -- ⊗ MUST NOT delete either form.
250
+
251
+ ### Anti-patterns
252
+
253
+ - ⊗ Delete `LEGACY-REPORT.md` or `LEGACY-REPORT.reviewed.md` -- these are the migration audit trail and MUST persist.
254
+ - ⊗ Auto-dispose of legacy artifacts without user input -- every section requires an explicit decision.
255
+ - ⊗ Rename to `.reviewed.md` before every captured section has a recorded disposition in the `## Reviewed` section.
256
+ - ⊗ Drop a legacy section without explicit user confirmation (even if the section looks obviously stale).
257
+ - ⊗ Silently delete sidecar files under `vbrief/legacy/` -- they are referenced from `LegacyArtifacts` and are part of the audit trail.
258
+
259
+ ## Phase 7 -- Summary
260
+
261
+ ! Present a consolidated summary to the user covering:
262
+
263
+ 1. **DEFT version change**: old commit -> new commit (or "already up to date")
264
+ 2. **Structure validation**: lifecycle folders status (all present / missing folders listed)
265
+ 3. **PROJECT-DEFINITION status**: valid / missing / stale (with freshness details)
266
+ 4. **vBRIEF validation results**: pass/fail per file, with details on any failures
267
+ 5. **Lifecycle consistency**: all consistent / N mismatches found (with details)
268
+ 6. **Origin freshness**: N stale / N externally-closed / N current (with details)
269
+ 7. **Document Model**: pre-v0.20 (legacy) / v0.20+ (vBRIEF-centric) OK / v0.20+ with warnings (see Pre-Cutover Detection Guard)
270
+ 8. **AGENTS.md status**: current / has upstream changes / needs review
271
+ 9. **Codebase MAP status**: current / stale / absent / not configured (advisory)
272
+ 10. **New skills**: list any newly added skills with descriptions
273
+
274
+ ! Ask the user: "Shall I commit the submodule update?" -- do NOT auto-commit.
275
+
276
+ ? If the user confirms, commit with message:
277
+ ```
278
+ chore(deft): update deft submodule to <short-hash>
279
+ ```
280
+
281
+ ## Anti-Patterns
282
+
283
+ - ⊗ Auto-commit submodule changes without user approval
284
+ - ⊗ Overwrite project-level `./vbrief/*.vbrief.json` files -- those are project data
285
+ - ⊗ Skip the pre-flight dirty check -- a dirty submodule can cause merge conflicts or data loss
286
+ - ⊗ Include a separate fetch of the vBRIEF schema from upstream deftai/vBRIEF -- that is a CI concern (see #128), not a user sync task
287
+ - ⊗ Auto-move vBRIEFs to fix folder/status mismatches -- report only; never auto-fix
288
+ - ⊗ Auto-update vBRIEFs based on origin freshness -- report only; user decides during refinement
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: deft-directive-triage
3
+ description: >-
4
+ Triage-cache hygiene and "what's next?" queue selection -- the agent-facing
5
+ playbook for syncing the triage cache, classifying candidates, presenting a
6
+ ranked queue, walking per-item decisions (accept / reject / defer / needs-ac
7
+ / mark-duplicate), and auditing the session. Use when the operator asks what
8
+ to work on next, wants to build a cohort, work the cache, or run a triage
9
+ hygiene pass.
10
+ triggers:
11
+ - triage
12
+ - triage hygiene
13
+ - work the cache
14
+ - what's next
15
+ - whats next
16
+ - what should I work on
17
+ - queue
18
+ - build a cohort
19
+ - build cohort
20
+ ---
21
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
22
+ <!-- Purpose: rendered skill -->
23
+ <!-- Source of truth: packs/skills/skills-pack-0.1.json -->
24
+ <!-- Regenerate with: task packs:render -->
25
+ <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
26
+
27
+ # Deft Directive Triage
28
+
29
+ Triage-cache hygiene + "what's next?" queue selection. Operates against the unified `.deft-cache/github-issue/` mirror (#883 Story 2) and the append-only `vbrief/.eval/candidates.jsonl` audit log (#845 Story 2); writes only via the canonical `task triage:*` verbs.
30
+
31
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
32
+
33
+ ## Platform Requirements
34
+
35
+ ! Requires **GitHub** as the SCM platform and the **GitHub CLI (`gh`)** authenticated against the active project's repo -- the cache surface (`task cache:fetch-all`) and the read-side gate (`task verify:cache-fresh`) both depend on it.
36
+
37
+ ## Deterministic Questions Contract
38
+
39
+ ! Every numbered-menu prompt rendered in this skill (Phase 2 candidate selection, Phase 3 per-item decision walk) ! MUST follow [`../../contracts/deterministic-questions.md`](../../contracts/deterministic-questions.md): render the canonical numbered menu in chat unless the host UI visibly preserves numeric option labels and returns numeric selections or exact displayed option text. The final two numbered options are `Discuss` and `Back`, in that order, and the Discuss-pause semantic from the contract applies verbatim -- on `Discuss` the agent halts the in-progress sequence and resumes only on an explicit user signal.
40
+
41
+ ## Phase 0 -- Sync
42
+
43
+ ! Probe cache freshness before doing any classification or selection. Stale cache reads produce stale decisions; the gate is the contract.
44
+
45
+ 1. ! Run `task verify:cache-fresh` (D5 / #1127). Exit 0 -> proceed to Phase 1. Exit 1 (stale or blocked) -> refresh per the printed remediation. Exit 2 (no bootstrap) -> run `task triage:bootstrap` first.
46
+ 2. ~ Refresh path: `task cache:fetch-all -- --source=github-issue --repo OWNER/NAME` for an already-bootstrapped project (idempotent, TTL-aware, re-applies the #883 scanner v2 quarantine rules); `task triage:bootstrap` for a first-time seed.
47
+ 3. ~ If `vbrief/active/*.vbrief.json` references are in play, run `task triage:refresh-active` to compare cached `meta.json.fetched_at` against live upstream `updatedAt` and surface drift before the queue is rendered.
48
+ 4. ~ When the one-liner emitted by the session-start ritual carries a `[scope-drift] N` segment (D14 / #1133), run `task triage:scope-drift` to see the per-label / per-milestone breakdown of upstream signals on cached open issues that fall outside the active `plan.policy.triageScope[]` subscription. The output documents both opt-in (`task triage:subscribe -- --label=<L>`) and opt-out (`task triage:scope-drift -- --ignore-label=<L>`) paths -- pick one before walking the queue so the cohort reflects the operator's current intent rather than a stale subscription.
49
+ 5. ⊗ Walk the queue against a stale cache -- the audit log will record decisions against bodies the operator never actually saw.
50
+
51
+ ## Phase 1 -- Classify
52
+
53
+ ! Inspect the auto-classification audit log so manually-decided items are not re-walked, and surface anomalies before the queue render.
54
+
55
+ 1. ! Run `task triage:classify --list` (D10 / #1129) to render the effective universal + consumer auto-classification rules and the active hold-marker list.
56
+ 2. ! Walk recent entries in `vbrief/.eval/candidates.jsonl` for anomalies: classifier disagreements against the operator's prior decisions, repeated `defer` cycles on the same issue, or `needs-ac` records older than the freshness window. Surface anomalies to the operator before Phase 2; do NOT auto-fix.
57
+ 3. ~ When the operator wants to widen / narrow the corpus, consult `task triage:scope --list` (D12 / #1131) to see the active `plan.policy.triageScope[]` subscription. Subscription edits belong in PROJECT-DEFINITION.vbrief.json, not in this skill.
58
+ 4. ~ Issue-label hygiene: labels feed triage queue ranking, issue gauges, hygiene sweeps, and lifecycle reconciliation. When this skill exposes an unlabeled issue or a downstream issue-creation step, recommend choosing one or more suitable labels from the repository's existing label set via `gh label list` or the labels API, or explicitly note that no label was applied. This is a recommendation, not a gate.
59
+ 5. ⊗ Re-classify items already terminally decided (accept / reject / mark-duplicate) without explicit operator approval -- the audit log is append-only and supersession runs through Layer 5 (`task triage:reset <N>`), not through silent re-walks.
60
+ 6. ⊗ Block issue creation solely because no label was selected, or invent ad hoc labels outside the repository's existing label set.
61
+
62
+ ## Phase 2 -- Present
63
+
64
+ ! Render the ranked queue before suggesting any specific issue. The cache-as-authoritative rule in AGENTS.md (`## Cache-as-authoritative work selection (#1149)`) is binding: the agent ! MUST consult `task triage:queue` and surface the result before proposing work from memory.
65
+
66
+ 1. ! Run `task triage:queue --limit=N` (D11 / #1128) -- default `N=10` per the umbrella Current Shape v3 WIP cap. Output is grouped `[RESUME]` -> `[URGENT]` -> untriaged -> other; within-group ordering follows the consumer-supplied `plan.policy.triageRankingLabels[]` (framework default empty per §12 boundary), tiebroken by `updated_at` descending.
67
+ 2. ! For per-item detail, run `task triage:show <N>` -- prints the cached upstream payload, the latest triage decision, the audit timeline, and the active-vBRIEF reference flag. Exit 0 on hit, 1 on cache miss (re-sync per Phase 0).
68
+ 3. ~ Present the ranked queue verbatim; do NOT silently re-rank, drop, or annotate beyond what the canonical renderer emits. If the operator wants a different ordering they edit `plan.policy.triageRankingLabels[]` and re-run.
69
+ 4. ⊗ Recommend a specific issue without consulting `task triage:queue` first, or recommend an issue absent from the queue without first running `task triage:show` to surface why (cache miss / outside subscription / terminal decision).
70
+
71
+ ## Phase 3 -- Decide
72
+
73
+ ! Walk per-item decisions through the canonical `task triage:*` verbs. The skill does NOT reimplement the audit-log append, schema validation, or `vbrief/proposed/` write inline -- the tasks are the canonical implementation (mirrors the #537 ingest-task discipline).
74
+
75
+ For each candidate the operator selects from the Phase 2 queue, render the canonical numbered action menu and dispatch the matching verb:
76
+
77
+ ```
78
+ What would you like to do with this candidate?
79
+ 1. Accept -- `task triage:accept <N>` (writes proposed/ vBRIEF + audit-log entry)
80
+ 2. Reject -- `task triage:reject <N>` (audit-log entry only; terminal)
81
+ 3. Defer -- `task triage:defer <N> [--resume-on <event>]` (non-terminal; resurfaces)
82
+ 4. Needs-AC -- `task triage:needs-ac <N>` (non-terminal; flags missing acceptance criteria)
83
+ 5. Mark duplicate -- `task triage:mark-duplicate <N> <of-issue>` (terminal; cross-links target)
84
+ 6. Discuss
85
+ 7. Back
86
+ ```
87
+
88
+ - ! `--resume-on <event>` on `task triage:defer` (D3 / #1123 -- ships in parallel; reference but do not hard-depend) records a resume condition with the defer entry; the resume condition surfaces in `task triage:queue` once met. When D3 has not landed yet, omit the flag -- the verb stays terminal-shape-compatible.
89
+ - ! Map user replies only to the displayed number (`1`-`7`) or exact displayed option text. ⊗ Do NOT infer from alphabetic host affordances or bare letters such as `d` / `b` unless those letters were visibly rendered as choices.
90
+ - ! On `Discuss`, halt the action sequence immediately, prompt `What would you like to discuss?`, and resume only on an explicit user signal. ⊗ Implicit resumption.
91
+ - ! On `Back`, un-buffer the prior candidate's selection and re-render its action menu -- permitted only before the action has dispatched to a `task triage:*` command. Once dispatched, the audit entry is committed; revisions go through Layer 5 (`task triage:reset`).
92
+ - ~ Bulk patterns: `task triage:bulk-{accept,reject,defer,needs-ac}` (#845 Story 4) for clear label-driven sweeps; bulk results still flow through the audit log so history stays coherent.
93
+ - ⊗ Write to `vbrief/proposed/` directly -- only `task triage:accept` (which delegates to `task issue:ingest`) is authorised for that surface.
94
+
95
+ ## Phase 4 -- Audit
96
+
97
+ ! Confirm the session's decisions landed coherently before exiting the skill.
98
+
99
+ 1. ! Run `task triage:audit --format=json` (D11 / #1128) -- emits the stable `{generated_at, repo, vbrief_staleness, entry_count, entries: [...]}` schema; pipe through `jq` to surface this session's appended entries. For historical look-back, add the #1180 filters: `task triage:audit --since=30d --action=demote --format=json | jq` answers "how many demotes in the last 30 days?" in one call. `--since=<window>` accepts the framework duration grammar (`Nd` / `Nh` / `Nm` / `Nw` / `Ns` or ISO-8601 `PnDTnHnMnS`); `--action=<verb>` filters to a single decision verb (`accept` / `reject` / `defer` / `needs-ac` / `mark-duplicate` / `reset` / `resume-eligible`). Both filters compose with `--format=text` and `--format=json`. The framework deliberately does NOT compute trend lines or apply falsification gates -- the contract is read raw, transform with `jq`.
100
+ 2. ! Run `task triage:summary` (D2 / #1122) -- prints the canonical one-liner `[triage] N untriaged · S stale-defer · M in-flight · WIP X/Y [⚠] [· [scope-drift] N]`. The WIP cap default is 10 per the umbrella Current Shape v3 (overridable via typed `plan.policy.wipCap`). The `⚠` glyph fires only at-or-above cap. The `[scope-drift] N` segment (D14 / #1133) appears only when at least one unsubscribed label/milestone meets the framework `_DRIFT_MIN_ISSUES = 3` threshold; suppressed at zero.
101
+ 3. ~ When the summary surfaces a non-zero `[scope-drift] N` (D14 / #1133), surface it to the operator alongside `task triage:scope-drift` output and the matching `task triage:subscribe` / `task triage:unsubscribe` / `task triage:scope-drift -- --ignore-label=<L>` remediation. Subscription mutations record a `subscription-change` audit entry under `vbrief/.eval/subscription-history.jsonl` (sidecar of the existing `candidates.jsonl` audit surface) so future operators can replay how the subscription evolved. After every mutation, run `task triage:bootstrap -- --resume` to backfill newly-subscribed entries / mark newly-out-of-scope entries.
102
+ 4. ~ When the audit surfaces a stale acceptance (`accept` decision whose issue is no longer referenced by any `vbrief/active/`), surface it to the operator -- the typical fix is a fresh ingest via `task issue:ingest -- <N>` or a `task triage:reset <N>` if the acceptance was in error.
103
+ 5. ⊗ Skip the Phase 4 audit -- silent exit leaves the operator without a record of what landed in `vbrief/proposed/` this session, which is the typical recurrence vector for "what did I just accept?" confusion.
104
+
105
+ ## Reversibility
106
+
107
+ ! To undo a decision, run `task triage:reset <N>`. This writes a `reset` audit entry referencing the prior decision id; history is **never** deleted. `task triage:reset` is the canonical Layer 5 reversibility verb (resolves the V3 audit from 2026-05-13). After a reset, the candidate re-enters the untriaged group on the next `task triage:queue` render so it can be re-walked through Phase 3.
108
+
109
+ ⊗ Edit or delete prior entries in `vbrief/.eval/candidates.jsonl` to "undo" a decision -- the log is append-only by design and any external mutation breaks the `merge=union` rebase ergonomic (#1144 / N4).
110
+
111
+ ## Anti-Patterns
112
+
113
+ - ⊗ Recommend a specific issue without first consulting `task triage:queue` (binding under AGENTS.md `## Cache-as-authoritative work selection (#1149)`).
114
+ - ⊗ Walk the queue against a stale cache (Phase 0 gate skipped).
115
+ - ⊗ Reimplement audit-log append / `proposed/` write inline -- the `task triage:*` verbs own those surfaces (#845, #883).
116
+ - ⊗ Treat `defer` / `needs-ac` as terminal -- they intentionally resurface on the next pass.
117
+ - ⊗ Edit `vbrief/.eval/candidates.jsonl` directly to revoke a decision -- use `task triage:reset <N>`.
118
+
119
+ ## EXIT
120
+
121
+ ! When the operator opts out (queue exhausted, mid-session stop, or explicit "done"), confirm skill exit with the canonical phrasing: `deft-directive-triage complete -- exiting skill.`
122
+
123
+ ! Provide chaining instructions:
124
+
125
+ - **Ingestion / evaluation of accepted items**: chain into `skills/deft-directive-refinement/SKILL.md` -- refinement's Phase 1 ingests the `vbrief/proposed/` items this skill just wrote into the rest of the lifecycle.
126
+ - **Cohort dispatch**: chain into `skills/deft-directive-swarm/SKILL.md` -- swarm Phase 0 is queue-driven (N2 / #1142) and consumes the same `task triage:queue` ordering you just walked.
127
+ - **Fresh-state refresh before re-entry**: run `task cache:fetch-all -- --source=github-issue --repo OWNER/NAME` then re-enter this skill when ready to continue.
128
+
129
+ ⊗ Exit silently without the canonical confirmation + chaining instruction -- the Skill Completion Gate in AGENTS.md is binding.
130
+
131
+ ## References
132
+
133
+ - Umbrella: #1119 (Wave-1 D6, this skill)
134
+ - D2 #1122 (`task triage:summary`), D3 #1123 (`--resume-on`, parallel), D5 #1127 (`task verify:cache-fresh`), D10 #1129 (auto-classification), D11 #1128 (`task triage:queue` / `triage:show` / `triage:audit`), D12 #1131 (subscription scope)
135
+ - Layer 5 reversibility verb: `scripts/triage_actions.py::reset` (already shipped under #845)
136
+ - Sibling skills: `skills/deft-directive-refinement/SKILL.md`, `skills/deft-directive-swarm/SKILL.md`, `skills/deft-directive-sync/SKILL.md`
137
+ - Stub author (replaced): #1149 (N9)
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: deft-directive-write-skill
3
+ description: >-
4
+ Create new deft skills with proper structure, RFC2119 notation, triggers,
5
+ and progressive disclosure. Use when user wants to create, write, or build a
6
+ new deft skill.
7
+ triggers:
8
+ - write a skill
9
+ - create a skill
10
+ - new skill
11
+ - build a skill
12
+ ---
13
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
14
+ <!-- Purpose: rendered skill -->
15
+ <!-- Source of truth: packs/skills/skills-pack-0.1.json -->
16
+ <!-- Regenerate with: task packs:render -->
17
+ <!-- Edit the source, not this file. Slice instead of loading every SKILL.md: task packs:slice skills by-trigger --trigger <kw> (or list) -->
18
+
19
+ # Deft Write Skill
20
+
21
+ Create new deft skills that follow directive's conventions: RFC2119 notation, YAML frontmatter with triggers, clear When-to-Use sections, and proper naming.
22
+
23
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
24
+
25
+ > Inspired by [write-a-skill](https://github.com/mattpocock/skills/tree/main/write-a-skill) from [mattpocock/skills](https://github.com/mattpocock/skills). Adapted to deft's SKILL.md conventions, RFC2119 notation, and naming patterns.
26
+
27
+ ## When to Use
28
+
29
+ - User wants to create a new skill for a workflow directive doesn't cover yet
30
+ - Formalizing an ad-hoc process that keeps repeating into a reusable skill
31
+ - Extending directive with project-specific or domain-specific skills
32
+
33
+ ---
34
+
35
+ ## Deft Skill Naming Conventions
36
+
37
+ | Skill type | Naming pattern | Example |
38
+ |---|---|---|
39
+ | Framework / meta | `deft-{verb}` | `deft-build`, `deft-setup` |
40
+ | GitHub-integrated | `deft-directive-gh-{verb}` | `deft-directive-gh-slice` (triage verb reclaims to `deft-directive-refinement`) |
41
+ | Domain / project-specific | `{project}-{verb}` | `my-app-deploy` |
42
+
43
+ ---
44
+
45
+ ## Process
46
+
47
+ ### Step 1: Gather requirements
48
+
49
+ Ask the user (one question at a time):
50
+
51
+ 1. What task or domain does this skill cover?
52
+ 2. What specific use cases should it handle?
53
+ 3. Does it require external tools (e.g., `gh`, `docker`, database CLIs)?
54
+ 4. Should it produce files, run commands, or guide a conversation?
55
+ 5. Any reference material or existing workflows to model from?
56
+
57
+ ### Step 2: Draft the skill
58
+
59
+ - ! Follow the deft SKILL.md template below
60
+ - ! Keep SKILL.md under 150 lines — split long templates into `references/*.md` (see [`references/composer-skill-porting.md`](../../references/composer-skill-porting.md))
61
+ - ! Write the `description` field as if it's the only thing the agent will see when deciding whether to invoke this skill
62
+ - ! Include negative triggers in `description` (`Do NOT trigger on …`) so near-miss phrases do not load the wrong skill
63
+ - ~ Use the trigger words the user would naturally say
64
+ - ! Use RFC2119 notation throughout (!=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY)
65
+ - ~ Include attribution blockquote if inspired by an external source
66
+ - ~ When porting Warp-tuned playbooks, read [`references/composer-skill-porting.md`](../../references/composer-skill-porting.md) for fast-path vs isolation, short-chat expectations, and Composer naming
67
+
68
+ ### Step 3: Review with user
69
+
70
+ Present the draft and ask:
71
+ - Does this cover your use cases?
72
+ - Anything missing or unclear?
73
+ - Should any section be more or less detailed?
74
+
75
+ Iterate until approved.
76
+
77
+ ### Step 4: Create the skill
78
+
79
+ - ! Create the directory `skills/{skill-name}/`
80
+ - ! Write `skills/{skill-name}/SKILL.md`
81
+ - ~ Create `skills/{skill-name}/REFERENCE.md` or `references/{topic}.md` if content exceeds 150 lines
82
+ - ~ Create `skills/{skill-name}/scripts/` for deterministic helper scripts
83
+ - ! When the skill creates GitHub issues or PRs, instruct authors to use `--body-file` with OS-temp paths — never inline multi-line `--body` strings (see `scm/github.md`)
84
+
85
+ ---
86
+
87
+ ## Deft SKILL.md Template
88
+
89
+ ```markdown
90
+ ---
91
+ name: {skill-name}
92
+ description: >
93
+ {What it does in 1–2 sentences}. Use when {specific triggers —
94
+ what the user would say or what context activates this skill}.
95
+ Do NOT trigger on {near-miss phrase 1} or {near-miss phrase 2}.
96
+ triggers:
97
+ - {trigger phrase 1}
98
+ - {trigger phrase 2}
99
+ [metadata:
100
+ clawdbot:
101
+ requires:
102
+ bins: ["gh"] # only if external CLI is needed]
103
+ ---
104
+
105
+ # {Skill Title}
106
+
107
+ {One-line description of what this skill does.}
108
+
109
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
110
+
111
+ [> Inspired by ... — optional attribution]
112
+
113
+ ## When to Use
114
+
115
+ - {Use case 1}
116
+ - {Use case 2}
117
+
118
+ [## Prerequisites
119
+
120
+ - ! Verify {tool} is available — stop and report if not]
121
+
122
+ ---
123
+
124
+ ## Process
125
+
126
+ ### Step 1: {Name}
127
+
128
+ - ! {mandatory action}
129
+ - ~ {recommended action}
130
+ - ⊗ {forbidden action}
131
+
132
+ ### Step 2: {Name}
133
+
134
+ ...
135
+
136
+ ---
137
+
138
+ ## Anti-Patterns
139
+
140
+ - ⊗ {what NOT to do}
141
+ - ⊗ {what NOT to do}
142
+ ```
143
+
144
+ ---
145
+
146
+ ## Description Writing Rules
147
+
148
+ The description is **the only thing the agent sees** when deciding whether to load this skill. Write it to answer:
149
+ 1. What capability does this provide?
150
+ 2. When should it trigger? (use "Use when..." pattern)
151
+ 3. What near-miss phrases must NOT trigger it? (use "Do NOT trigger on..." pattern)
152
+
153
+ - ! Max 1024 characters
154
+ - ! Include "Use when [specific triggers]" in the description
155
+ - ! Include "Do NOT trigger on [near-miss phrases]" when triggers could overlap another skill
156
+ - ⊗ Vague descriptions ("helps with things") — the agent can't distinguish between skills
157
+ - ! First sentence: what it does. Second sentence: when to use it. Third (when needed): what not to trigger on.
158
+
159
+ ---
160
+
161
+ ## Anti-Patterns
162
+
163
+ - ⊗ Omitting RFC2119 notation — deft skills use it consistently
164
+ - ⊗ Putting all content in SKILL.md when it exceeds 150 lines — split into `references/*.md` or `REFERENCE.md`
165
+ - ⊗ Vague trigger phrases — use phrases the user would actually type
166
+ - ⊗ Overlapping triggers without negative triggers — add `Do NOT trigger on …` to the description
167
+ - ⊗ Naming a GitHub-integrated skill without `gh` in the name
168
+ - ⊗ Writing the description without a "Use when..." clause
169
+ - ⊗ Inline multi-line `gh --body` strings in skill steps — use `--body-file` per `scm/github.md`
@@ -0,0 +1,16 @@
1
+ # Deprecated skill path — v0.19 → v0.20 bridge
2
+
3
+ <!-- deft:deprecated-skill-redirect -->
4
+
5
+ This skill path is deprecated. Read `deft/QUICK-START.md` for current routing.
6
+ The current replacement skill is `deft-directive-interview` (at `skills/deft-directive-interview/SKILL.md`).
7
+
8
+ Do not add real content here. This file exists so that stale v0.19 `AGENTS.md` files
9
+ that reference old `deft/skills/deft-*` paths keep working through one release cycle.
10
+ QUICK-START.md refreshes the Deft-managed section of `AGENTS.md` to the current
11
+ v0.20 `deft-directive-*` skill paths.
12
+
13
+ See:
14
+ - [../../QUICK-START.md](../../QUICK-START.md) — agent bootstrap + upgrade detection
15
+ - [../../UPGRADING.md](../../UPGRADING.md) — version-by-version upgrade guide
16
+ - [../../docs/BROWNFIELD.md](../../docs/BROWNFIELD.md) — brownfield adoption / migration
@@ -0,0 +1,16 @@
1
+ # Deprecated skill path — v0.19 → v0.20 bridge
2
+
3
+ <!-- deft:deprecated-skill-redirect -->
4
+
5
+ This skill path is deprecated. Read `deft/QUICK-START.md` for current routing.
6
+ The current replacement skill is `deft-directive-pre-pr` (at `skills/deft-directive-pre-pr/SKILL.md`).
7
+
8
+ Do not add real content here. This file exists so that stale v0.19 `AGENTS.md` files
9
+ that reference old `deft/skills/deft-*` paths keep working through one release cycle.
10
+ QUICK-START.md refreshes the Deft-managed section of `AGENTS.md` to the current
11
+ v0.20 `deft-directive-*` skill paths.
12
+
13
+ See:
14
+ - [../../QUICK-START.md](../../QUICK-START.md) — agent bootstrap + upgrade detection
15
+ - [../../UPGRADING.md](../../UPGRADING.md) — version-by-version upgrade guide
16
+ - [../../docs/BROWNFIELD.md](../../docs/BROWNFIELD.md) — brownfield adoption / migration
@@ -0,0 +1,16 @@
1
+ # Deprecated skill path — v0.19 → v0.20 bridge
2
+
3
+ <!-- deft:deprecated-skill-redirect -->
4
+
5
+ This skill path is deprecated. Read `deft/QUICK-START.md` for current routing.
6
+ The current replacement skill is `deft-directive-review-cycle` (at `skills/deft-directive-review-cycle/SKILL.md`).
7
+
8
+ Do not add real content here. This file exists so that stale v0.19 `AGENTS.md` files
9
+ that reference old `deft/skills/deft-*` paths keep working through one release cycle.
10
+ QUICK-START.md refreshes the Deft-managed section of `AGENTS.md` to the current
11
+ v0.20 `deft-directive-*` skill paths.
12
+
13
+ See:
14
+ - [../../QUICK-START.md](../../QUICK-START.md) — agent bootstrap + upgrade detection
15
+ - [../../UPGRADING.md](../../UPGRADING.md) — version-by-version upgrade guide
16
+ - [../../docs/BROWNFIELD.md](../../docs/BROWNFIELD.md) — brownfield adoption / migration