@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,211 @@
1
+ <!-- deft:managed-section v3 -->
2
+ # Deft — AI Development Framework
3
+
4
+ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
5
+
6
+ ! If any .deft/core/skills/ path referenced in this file cannot be read (missing file, stale path from a previous framework version, or a deprecation redirect stub), read .deft/core/QUICK-START.md instead and follow it. QUICK-START refreshes this section idempotently for the current framework version.
7
+
8
+ ## Pre-Cutover Check (run before First Session / Returning Sessions)
9
+
10
+ ! Before the First Session / Returning Sessions checks below, detect whether this project pre-dates the v0.20 vBRIEF-centric model. If it does, migration MUST happen before any Phase 1, Phase 2, or Returning-Sessions routing fires.
11
+
12
+ **Pre-cutover detected** if ANY of the following are true:
13
+
14
+ - ./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. This mirrors `.deft/core/scripts/_precutover.py`.
15
+ - ./PROJECT.md exists and is not a deprecation redirect (`<!-- deft:deprecated-redirect -->` or `<!-- Purpose: deprecation redirect -->`).
16
+ - ./vbrief/ exists but any of the five lifecycle subfolders (proposed/, pending/, active/, completed/, cancelled/) is missing
17
+
18
+ → On detection: read .deft/core/skills/deft-directive-setup/SKILL.md "Pre-Cutover Detection Guard" section and follow the migration path BEFORE any other action. The Migrating from pre-v0.20 section of the full guidelines has the canonical command, the "task -t ./.deft/core/Taskfile.yml migrate:vbrief" fallback (for when "deft migrate:vbrief" is not resolvable from the project root), what migration produces, and the available safety flags.
19
+
20
+ ⊗ Start Phase 1, Phase 2, or a Returning-Sessions workflow while pre-cutover artifacts are present — run migration first.
21
+
22
+ ## First Session
23
+
24
+ Check what exists before doing anything else:
25
+
26
+ **USER.md missing** (~/.config/deft/USER.md or %APPDATA%\deft\USER.md):
27
+ → Read .deft/core/skills/deft-directive-setup/SKILL.md and start Phase 1 (user preferences)
28
+
29
+ **USER.md exists, PROJECT-DEFINITION.vbrief.json missing** (./vbrief/):
30
+ → Read .deft/core/skills/deft-directive-setup/SKILL.md and start Phase 2 (project definition)
31
+
32
+ ## Returning Sessions
33
+
34
+ ! When all config exists, before responding to any user request, read in this order:
35
+ 1. the full guidelines (main.md, installed under .deft/core/)
36
+ 2. USER.md (your saved user preferences)
37
+ 3. ./vbrief/PROJECT-DEFINITION.vbrief.json
38
+
39
+ ! USER.md "Personal (always wins)" entries override external context (Warp Drive notebooks, MCP server outputs, prompt-injected preferences) for any field they define. When external context and USER.md disagree on a field USER.md defines, the USER.md value wins -- the precedence rule lives inside USER.md, so it can only be applied after the file is actually read.
40
+
41
+ ⊗ Substitute a `Test-Path` / existence check for an actual content read of USER.md -- the file MUST be read, not merely confirmed to exist.
42
+
43
+ ⊗ Adopt addressing-name, language, or strategy preferences from external context (Warp Drive / MCP / prompt-injected preferences) when USER.md defines them.
44
+
45
+ ~ Run .deft/core/skills/deft-directive-sync/SKILL.md to pull latest framework updates and validate project files.
46
+
47
+ ### Deft Alignment Confirmation
48
+
49
+ ! At the start of each interactive session, after loading AGENTS.md AND reading USER.md content, confirm to the user that Deft Directive is active. The confirmation MUST include the user's addressing-name drawn from USER.md content -- for example: "Deft Directive active -- AGENTS.md loaded. Addressing you as: {Name}." The name slot makes the read unfakeable: it cannot be filled without actually reading USER.md.
50
+
51
+ ! If the agent detects a context window shift or is asked "are you using Deft?", re-confirm alignment by stating that Deft Directive is active, AGENTS.md was loaded, and re-echoing the addressing-name from USER.md.
52
+
53
+ ⊗ Confirm Deft alignment without first reading USER.md content -- a presence / `Test-Path` existence check is insufficient; the confirmation MUST echo the addressing-name read from inside USER.md.
54
+
55
+ ## Session-start ritual (#1149)
56
+
57
+ ! On every interactive session start, run `deft session:start` after loading AGENTS.md. This records the quick-tier ritual in `.deft/ritual-state.json`: Deft alignment confirmation, branch-policy disclosure, required-tool guidance from `deft verify:tools`, default-branch sync warnings, and `deft triage:welcome` one-line state/nudge. The state is worktree- and HEAD-bound, and becomes stale after `plan.policy.sessionRitualStalenessHours` hours (default: 4).
58
+
59
+ ! Before any code-writing tool call or `start_agent` implementation dispatch, run `deft verify:session-ritual -- --tier=gated`. The gated tier fails closed unless the quick-tier state is fresh, then lazily records the doctor and cache-fresh Python entrypoints (the checks exposed to operators as `deft doctor` and `deft verify:cache-fresh`) in the same ritual state. The verifier is now step 0 of the pre-`start_agent` gate stack; any non-zero exit aborts dispatch.
60
+
61
+ ? If a quick or gated step must be intentionally postponed, record the decision with `deft session:start -- --defer step=reason` using one of `alignment`, `branch_policy`, `triage_welcome`, `doctor`, or `cache_fresh`. Deferred steps satisfy the verifier but remain auditable in `.deft/ritual-state.json`.
62
+
63
+ ⊗ Self-report the session-start ritual as complete without a fresh `deft session:start` state, or bypass `deft verify:session-ritual` before implementation dispatch. Headless workers and CI MAY set `DEFT_SESSION_RITUAL_SKIP=1`; the verifier exits 0 but warns when the bypass hides a failure.
64
+
65
+ `deft doctor` remains the install-integrity + toolchain + AGENTS.md managed-section freshness probe (#1308). When the managed-section is stale, the doctor points the operator at `deft agents:refresh` to regenerate AGENTS.md from `templates/agents-entry.md`. The canonical `scripts/doctor.py` (single owner post #1335/#1336) also detects payload staleness from the `<install>/VERSION` manifest and, when behind, emits the canonical headless upgrade command `deft-install --yes --upgrade --repo-root . --json` (#1339 / #1409). The installer itself calls `scripts/doctor.py --session --json` at the end of every run for the unified handoff.
66
+
67
+ **Canonical bootstrap / update path (#1339 #1340 #1409 Epic-5/6):** Use the published platform installer binary (from GitHub Releases) as the single deterministic entrypoint. For an existing install, the canonical headless refresh is `deft-install --yes --upgrade --repo-root . --json` (drop `--json` for human-readable output) -- it replaces the payload + manifest + AGENTS.md in one shot. Legacy `deft upgrade` / `run upgrade` are metadata-only acknowledgment (they do NOT replace the payload) and `deft relocate -- --confirm` is back-compat only; git-clone / submodule / legacy doctor surfaces are de-emphasized in UPGRADING.md / README / skills. Agent example: after running the installer command, start your session; the doctor output (or `deft doctor`) tells you the exact state and whether a re-install is needed for freshness.
68
+ `deft triage:welcome` emits the triage one-liner and, when state is incomplete, nudges the operator at `deft triage:welcome --onboard` (#1143). Default mode is non-interactive; the `--onboard` flag runs the 6-phase interactive ritual.
69
+
70
+ ## Resume nudge (conditional, #1269)
71
+
72
+ Reserved placement for the optional 6th conditional step (resume nudge from the ritual sentinel) tracked by #1269. The substance lands with that PR; this anchor exists today so consumers see the canonical placement once #1269 merges and the sentinel becomes available.
73
+
74
+ ⊗ Reorder, skip, or merge the ritual tiers above without an explicit operator override -- the canonical order is what makes the downstream gate stack composable.
75
+
76
+ ## WIP cap
77
+
78
+ The `plan.policy.wipCap` field caps the number of in-flight scope vBRIEFs (`vbrief/pending/` + `vbrief/active/`). The framework default is 10 (per umbrella #1119 Current Shape v3). When the cap is reached, `deft scope:promote` refuses with a relief hint pointing at `deft scope:demote --batch --older-than-days 30` (D1 / #1121). Operators can override the cap from the consumer side via `deft triage:welcome --onboard` (the Phase 4 wipCap prompt) or by inspecting / editing the typed field via `deft policy:show --field=wipCap`.
79
+
80
+ ## Cache-as-authoritative work selection (#1149)
81
+
82
+ ! When the operator asks "what should I work on next?" / "build a cohort" / "what's the queue?", run `deft triage:queue --limit=10` (D11 / #1128) and present the ranked list before suggesting anything else. The agent MUST NOT recommend work from memory or open-GitHub-issue intuition. This is the consumer-side mirror of the maintainer rule of the same name; the triage queue is the source of truth for what to work on next.
83
+
84
+ ⊗ Recommend a specific issue or vBRIEF without consulting `deft triage:queue` (or showing the operator the result of the consultation).
85
+
86
+ ## Content packs
87
+
88
+ Deft ships versioned content packs (e.g. lessons learned from prior work) under `.deft/core/packs/`. Discover and LOAD pack content via the slice surface instead of reading whole pack files into context:
89
+
90
+ - `deft packs:slice --list-packs` -- discover which packs exist (short-name + version + one-line description). Registry-driven, so new packs appear automatically with no edit here.
91
+ - `deft packs:slice <pack> --list` -- discover the named slices a pack exposes.
92
+ - `deft packs:slice <pack> <slice> [-- <filters>]` -- load just the slice you need; read the slice, not the whole file.
93
+
94
+ ! Before improvising on a problem, discover packs with `deft packs:slice --list-packs`, then load the relevant slice. This wiring references the discovery commands on purpose -- it never enumerates pack or slice names, so new packs/slices need no change here.
95
+
96
+ ## Codebase MAP Projection (#1595 / #1498)
97
+
98
+ `vbrief/PROJECT-DEFINITION.vbrief.json` `plan.architecture.codeStructure` is the durable codebase-structure source. `.planning/codebase/MAP.md` is a generated orientation projection from that metadata plus provider/code-derived facts.
99
+
100
+ - ~ If `.planning/codebase/MAP.md` exists, read it as orientation before broad codebase scanning.
101
+ - ~ If it is absent or may be stale, run `deft codebase:map` and `deft verify:codebase-map-fresh` when those commands resolve; treat the result as advisory unless the current task edits `plan.architecture.codeStructure`, a configured provider artifact, or the generated MAP itself.
102
+ - ! When the MAP is wrong, update `plan.architecture.codeStructure` or the selected provider artifact, then regenerate the MAP.
103
+ - ⊗ Treat a stale or absent MAP as an unrelated implementation blocker, hand-edit `.planning/codebase/MAP.md`, or make the generated projection more authoritative than the vBRIEF metadata.
104
+
105
+ ## Skill Routing
106
+
107
+ When user input matches a trigger keyword, read the corresponding skill (paths are relative to the consumer's project root and resolve under `.deft/core/skills/`):
108
+
109
+ - "review cycle" / "check reviews" / "run review cycle" -> `.deft/core/skills/deft-directive-review-cycle/SKILL.md`
110
+ - "swarm" / "parallel agents" / "run agents" -> `.deft/core/skills/deft-directive-swarm/SKILL.md`
111
+ - "decompose" / "story decomposition" / "swarm readiness" -> `.deft/core/skills/deft-directive-decompose/SKILL.md`
112
+ - "refinement" / "reprioritize" / "refine" / "triage" / "pre-ingest" / "action menu" -> `.deft/core/skills/deft-directive-refinement/SKILL.md` -- the `work the cache` phrase routes to the dedicated `deft-directive-triage` entry below (#1130), not here, to keep routing unambiguous.
113
+ - "triage <N>" / "triage issue" / "ingest issue" -> `.deft/core/skills/deft-directive-refinement/SKILL.md`
114
+ - "build" / "implement" / "implement spec" -> `.deft/core/skills/deft-directive-build/SKILL.md`
115
+ - "cost" / "budget" / "pre-build cost" / "how much will this cost" -> `.deft/core/skills/deft-directive-cost/SKILL.md`
116
+ - "setup" / "bootstrap" / "onboard" -> `.deft/core/skills/deft-directive-setup/SKILL.md`
117
+ - "sync" / "good morning" / "update deft" / "update vbrief" / "sync frameworks" -> `.deft/core/skills/deft-directive-sync/SKILL.md`
118
+ - "pre-pr" / "quality loop" / "rwldl" / "self-review" -> `.deft/core/skills/deft-directive-pre-pr/SKILL.md`
119
+ - "interview loop" / "q&a loop" / "run interview loop" -> `.deft/core/skills/deft-directive-interview/SKILL.md`
120
+ - "run probe" / "/deft:directive:run:probe" / "probe" -> `.deft/core/skills/deft-directive-probe/SKILL.md` (deprecated alias: `/deft:run:probe`)
121
+ - "glossary" / "ubiquitous language" / "domain model" / "DDD" / "define terms" -> `.deft/core/skills/deft-directive-glossary/SKILL.md`
122
+ - "improve architecture" / "deep modules" / "interface design" / "refactor RFC" -> `.deft/core/skills/deft-directive-gh-arch/SKILL.md`
123
+ - "debug" / "root cause" / "investigate" / "why did X break" / "why is X slow" / "systematic debugging" / "forensic" -> `.deft/core/skills/deft-directive-debug/SKILL.md`
124
+ - "triage hygiene" / "work the cache" -> `.deft/core/skills/deft-directive-triage/SKILL.md`
125
+ - "what's next" / "queue" / "build a cohort" -> `.deft/core/skills/deft-directive-triage/SKILL.md`
126
+ - "welcome" / "onboard triage" -> invokes `deft triage:welcome --onboard` (N3 / #1143)
127
+ - "lessons" / "prior art" / "what have we learned about X" -> discover packs with `deft packs:slice --list-packs`, then `deft packs:slice <pack> --list` and load the relevant slice before improvising (see Content packs above)
128
+
129
+ The `deft-directive-release` skill is intentionally excluded -- it cuts deft framework releases against a temp clone of `deftai/directive` and is not a consumer-facing surface.
130
+
131
+ ## Branch policy & branch verification
132
+
133
+ Three consumer-facing surfaces enforce the branch-policy contract (#746 / #747):
134
+
135
+ - `deft check` -- authoritative consumer pre-commit quality gate. In vendored `.deft/core` installs it runs consumer-safe Deft install/lifecycle gates and does NOT run framework source-repo self-tests. Run `deft check:framework-source` only when explicitly validating the vendored framework payload itself (#1519).
136
+ - `deft verify:branch` -- branch gate wired into the `deft check` aggregate; refuses a commit on the default branch unless `plan.policy.allowDirectCommitsToMaster = true` (typed) or `DEFT_ALLOW_DEFAULT_BRANCH_COMMIT=1` is set.
137
+ - `.githooks/pre-commit` / `pre-push` -- local hooks installed via `deft setup`; verify via `deft verify:hooks-installed`.
138
+ - `deft policy:show --field=allowDirectCommitsToMaster` -- inspect the resolved policy; `deft policy:allow-direct-commits -- --confirm` writes the typed override with an audit row.
139
+
140
+ ## Branch Policy Disclosure (#746)
141
+
142
+ When the active project's `vbrief/PROJECT-DEFINITION.vbrief.json` has `plan.policy.allowDirectCommitsToMaster = true`, the agent MUST surface the policy state at the start of any interactive session (immediately after the Deft Directive alignment confirmation):
143
+
144
+ > "[deft policy] Direct commits to the default branch are ENABLED (source: typed). Branch-protection policy is OFF."
145
+
146
+ This phrasing comes from `.deft/core/scripts/policy.py::disclosure_line` and stays in lockstep with the typed surface (#746). When the policy is OFF (default; `allowDirectCommitsToMaster=false`), no session-start disclosure is required -- the absence of the disclosure line itself signals the default-enforcing state.
147
+
148
+ Override paths the user may invoke:
149
+ - `deft policy:show` -- inspect resolved policy
150
+ - `deft policy:enforce-branches` -- re-enable branch protection
151
+ - `deft policy:allow-direct-commits -- --confirm` -- re-confirm opt-out (audited)
152
+ - `DEFT_ALLOW_DEFAULT_BRANCH_COMMIT=1` -- emergency env-var bypass
153
+
154
+ ⊗ Begin a session that will commit/push without surfacing the policy state when allowDirectCommitsToMaster=true.
155
+
156
+ ## PowerShell
157
+
158
+ **Grok Build Windows capture limitations (#1353):** When running under the Grok Build runtime on Windows + pwsh 7+, `run_terminal_command` leaks internal wrapper text (Get-Content and redirection fragments) whenever the command string contains `|`, `2>&1`, `| cat`, `>`, or similar metacharacters. Non-piped commands execute cleanly.
159
+
160
+ - ! Never emit commands containing pipes or redirections through the agent shell tool on this platform. For anything requiring a pipe, use one of: Python one-liners with `pathlib` / `subprocess.run(capture_output=True)` (preferred -- bypasses the wrapper at the OS level), run the operation in the user's native terminal and paste the result back, or isolate the work in a dedicated worktree and mark the step as "user shell required".
161
+ - ! This rule applies to the Grok Build runtime (pwsh 7+); Warp + Claude (PTY-based) is not affected.
162
+
163
+ Cross-reference: `.deft/core/docs/analysis/2026-05-26-issue-1353-grok-windows-capture-opensrc-audit.md`. Refs #1353.
164
+
165
+ ## Development Process
166
+
167
+ ### Implementation Intent Gate (#810)
168
+
169
+ - ! Run `deft vbrief:preflight -- <path>` before any code-writing tool call or `start_agent` dispatch -- the gate exits 0 only when the candidate vBRIEF lives in `vbrief/active/` AND `plan.status == "running"`. The Taskfile target resolves the wrapped script via `.deft/core/scripts/_resolve_preflight_path.py` (which probes the canonical, legacy, and in-repo install layouts in priority order) and fails closed with a structured `gate misconfigured` error pointing at `deft framework:doctor` if no candidate resolves -- the gate cannot silently fail open on a misconfigured install (#1046 / #1047). The helper names `deft vbrief:activate <path>` as its idempotent activation companion; story workflows should use the Story Start Gate below to bridge proposed/pending scope through `deft scope:promote` and `deft scope:activate` before invoking preflight.
170
+ - ! Require an explicit action-verb directive (`build`, `implement`, `ship`, `swarm`, `run agents`, `start agent`) from the user before invoking the preflight gate or `start_agent` for implementation. When intent is ambiguous, ask one targeted question instead of inferring.
171
+ - ⊗ Infer implementation intent from lifecycle vocabulary ("do the full PR process", "start the work", "poller agents"), branching language, or workflow shape. Workflow-shape vocabulary is NOT authorization to spawn an implementation agent.
172
+ - ⊗ Treat affirmative continuation phrases (`yes`, `go`, `proceed`, `do it`) as implementation authorization unless the prior turn explicitly proposed implementation. Broad approval is not a substitute for an explicit action-verb directive.
173
+
174
+ **Pre-`start_agent` gate stack (#1149/#1348):** Before dispatching an implementation sub-agent via `start_agent`, run the gates in the canonical order: (0) session ritual gate (#1348, `deft verify:session-ritual -- --tier=gated`) -> (1) story-start Gate 0 (#1378, `deft verify:story-ready -- --vbrief-path <active-story-path> [--allocation-context <dispatch-envelope-file>]`) -> (2) vBRIEF implementation-intent gate (#810, `deft vbrief:preflight -- <path>`) -> (3) `deft verify:cache-fresh` (D5 / #1127) -> (4) branch-policy gate (`deft verify:branch` and the `.githooks/pre-commit` / `pre-push` hooks) -> (5) `start_agent`. Any non-zero exit aborts dispatch.
175
+
176
+ ### Story Start Gate
177
+
178
+ - ! Before starting any new implementation story or switching from one story to another, run `git status --short --branch`.
179
+ - ! If the working tree is dirty, stop and summarize the current branch, modified/untracked files, and whether the changes appear related to the next story. Ask the operator to choose one path: commit existing work, stash existing work, include existing work in the current story, or stop.
180
+ - ⊗ Begin a new story while unrelated dirty work is present without explicit operator approval.
181
+ - ! Resolve exactly one target story vBRIEF path by default. Batching multiple stories requires explicit operator approval and a short rationale.
182
+ - ! When invoked as part of a swarm cohort dispatch, the approved Phase 5 allocation plan satisfies the "explicit operator approval and a short rationale" requirement above -- the dispatched paths and allocation rationale ARE the consent token. Do NOT re-prompt the parent for batching approval mid-cohort; the all-or-nothing dispatch envelope rule (#954) forbids mid-scope user-approval gates.
183
+ - ! Within a swarm cohort, between stories, the working tree MUST be clean (a checkpoint commit + `deft scope:complete` just landed). If `git status --short` shows uncommitted state between stories, checkpoint-commit it and proceed -- do NOT pause to ask the operator. The dirty-tree "ask the operator" branch above applies only at the FIRST story-start of a fresh branch.
184
+ - ! If the target story is in `vbrief/proposed/`, run `deft scope:promote -- <path>` first; if it is in `vbrief/pending/`, run `deft scope:activate -- <path>`. After activation, run `deft vbrief:preflight -- <active-story-path>` before code-writing.
185
+ - ! Default to one story per branch/PR. Create a checkpoint commit after each completed story before beginning another story, unless the operator explicitly approved batching.
186
+ - ! After checks pass for the story, complete the lifecycle with `deft scope:complete -- <active-story-path>` before final PR handoff.
187
+ - ! Before dispatching an implementation sub-agent, run the deterministic Gate 0 `deft verify:story-ready -- --vbrief-path <active-story-path> [--allocation-context <dispatch-envelope-file>]` ahead of `deft vbrief:preflight`. It machine-checks a clean working tree (or `--allow-dirty`), the target vBRIEF in `vbrief/active/` with `plan.status == "running"`, and the dispatch envelope's `## Allocation context` consent token; three-state exit (0 ready / 1 not ready / 2 config error). A `swarm-cohort` section is ready only when `allocation_plan_id` AND `batching_rationale` are non-null; an absent section is the solo path. Any non-zero exit aborts dispatch.
188
+
189
+ ## Commands
190
+
191
+ Directive product commands use the `/deft:directive:*` namespace (#418 / #1670). Prior `/deft:*` product forms remain as deprecation-warning aliases — see `content/commands.md` for the full alias table. Cross-product session commands stay at the umbrella `/deft:*` level.
192
+
193
+ **Directive product (`/deft:directive:*`):**
194
+
195
+ - /deft:directive:change <name> — Propose a scoped change (alias: `/deft:change`, deprecated)
196
+ - /deft:directive:run:interview — Structured spec interview (alias: `/deft:run:interview`, deprecated)
197
+ - /deft:directive:run:speckit — Five-phase spec workflow (alias: `/deft:run:speckit`, deprecated)
198
+ - /deft:directive:run:discuss <topic> — Feynman-style alignment (alias: `/deft:run:discuss`, deprecated)
199
+ - /deft:directive:run:research <topic> — Research before planning (alias: `/deft:run:research`, deprecated)
200
+ - /deft:directive:run:map — Map an existing codebase (alias: `/deft:run:map`, deprecated)
201
+
202
+ **Cross-product (umbrella `/deft:*`):**
203
+
204
+ - /deft:continue — Resume from continue checkpoint
205
+ - /deft:checkpoint — Save session state to `./vbrief/continue.vbrief.json`
206
+
207
+ **CLI compatibility:**
208
+
209
+ - .deft/core/run bootstrap — CLI setup (terminal users)
210
+ - .deft/core/run spec — CLI spec generation
211
+ <!-- /deft:managed-section -->
@@ -0,0 +1,75 @@
1
+ <!-- deft:managed-section v2 marker spec; companion to templates/agents-entry.md -->
2
+ # AGENTS.md Template Placeholder Spec (v2)
3
+
4
+ This document is the canonical spec for placeholder tokens that may appear inside the `<!-- deft:managed-section v2 -->` ... `<!-- /deft:managed-section -->` block of `templates/agents-entry.md`. The marker version was bumped from `v1` to `v2` in the v0.27 release line (#992) when the canonical install layout flipped to `.deft/core/`; the placeholder token set itself is unchanged from the inherited webinstaller pin-marker contract.
5
+
6
+ The placeholder set is **inherited from the [`deftai/webinstaller`](https://github.com/deftai/webinstaller) pin-marker contract** so the same tokens render identically across the two install rails (the Go installer, which embeds the file via `//go:embed`, and the webinstaller, which substitutes per-fetch metadata at install time).
7
+
8
+ Legend (RFC2119): !=MUST, ~=SHOULD, ⊗=MUST NOT, ?=MAY.
9
+
10
+ ## Token format
11
+
12
+ - ! Tokens MUST use the literal form `{{TOKEN_NAME}}` (double-brace, no spaces).
13
+ - ! Token names MUST be uppercase ASCII letters, digits, and underscores -- regex `[A-Z][A-Z0-9_]*`.
14
+ - ⊗ Tokens MUST NOT carry whitespace inside the braces (e.g. `{{ TOKEN }}` is invalid).
15
+ - ⊗ Token names MUST NOT be reused across different semantic concepts -- if the value is different, the token name MUST be different.
16
+
17
+ ## Documented tokens (v2)
18
+
19
+ The following five tokens are part of the v2 contract (token set unchanged from v1; the marker version bump was triggered by the install-layout flip in #992). Every renderer (Go installer, webinstaller, `.deft/core/run agents:refresh`) MUST accept them; consumers MAY add custom tokens, but custom tokens MUST NOT shadow any of these names.
20
+
21
+ ### `{{UPSTREAM_SHA}}`
22
+
23
+ - ! Type: full 40-character lowercase Git commit SHA.
24
+ - ! Source: the commit SHA of the `deftai/directive` checkout the AGENTS.md was rendered from.
25
+ - ! Rendered as: literal SHA, no leading whitespace, no trailing newline.
26
+ - ? Substituted by webinstaller / Go installer at install time. The Python `cmd_agents_refresh` reference implementation uses `git rev-parse HEAD` from the framework root when available; falls back to the literal token (left unsubstituted) when not.
27
+
28
+ ### `{{UPSTREAM_REF}}`
29
+
30
+ - ! Type: a Git ref name (branch or tag) -- e.g. `master`, `main`, `v0.22.0`, `phase-1`.
31
+ - ! Source: the ref the upstream `deftai/directive` checkout was on at fetch time.
32
+ - ! Rendered as: literal ref, no leading whitespace, no trailing newline.
33
+ - ? Substituted by webinstaller / Go installer at install time. Python reference implementation uses `git rev-parse --abbrev-ref HEAD`; falls back to literal token when not available.
34
+
35
+ ### `{{UPSTREAM_TAG}}`
36
+
37
+ - ! Type: the most recent annotated Git tag visible from the resolved SHA, with leading `v` preserved (e.g. `v0.22.0`).
38
+ - ! Source: `git describe --tags --abbrev=0` against the upstream repo.
39
+ - ! Rendered as: literal tag, no leading whitespace, no trailing newline.
40
+ - ? Substituted by webinstaller / Go installer at install time. Python reference implementation mirrors the same `git describe` priority chain used by `_resolve_version()` in the `run` script (#741); falls back to literal token when no tag is reachable.
41
+
42
+ ### `{{FETCHED_AT}}`
43
+
44
+ - ! Type: ISO-8601 UTC timestamp with `Z` suffix (e.g. `2026-04-30T22:57:51Z`).
45
+ - ! Source: wall-clock time at which the AGENTS.md was rendered or refreshed.
46
+ - ! Rendered as: literal ISO-8601 timestamp, no leading whitespace, no trailing newline.
47
+ - ? Substituted by webinstaller / Go installer at fetch time. Python reference implementation uses `datetime.now(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')`.
48
+
49
+ ### `{{FETCHED_BY}}`
50
+
51
+ - ! Type: short string identifying the renderer / installer (e.g. `webinstaller@deftai/webinstaller`, `deft-install/v0.22.0`, `.deft/core/run agents:refresh`).
52
+ - ! Source: the surface that performed the AGENTS.md render or refresh.
53
+ - ! Rendered as: literal string, no leading whitespace, no trailing newline.
54
+ - ? Substituted by webinstaller / Go installer at fetch time. Python reference implementation emits `.deft/core/run agents:refresh@<VERSION>`.
55
+
56
+ ## Substitution semantics
57
+
58
+ - ! The renderer MUST perform a single pass of literal `{{TOKEN}}` -> value substitution. Nested templates are out of scope for v2.
59
+ - ! Tokens that the renderer does not have a value for MUST be left as the literal `{{TOKEN_NAME}}` form so downstream tooling can detect missing substitutions. ⊗ Renderers MUST NOT silently substitute the empty string.
60
+ - ! The byte sequence between `<!-- deft:managed-section v2 -->` and `<!-- /deft:managed-section -->` after substitution is what `cmd_agents_refresh --check` compares against the consumer's existing managed section.
61
+ - ~ A renderer that has no value for any of the documented tokens (e.g. running outside a Git checkout) MAY skip substitution entirely and emit the template verbatim. The contract test asserts this is byte-stable.
62
+
63
+ ## Version contract
64
+
65
+ - ! The marker carries a literal version segment (`v2`) so a future format change can be detected without disturbing existing consumers. Bumping the marker version (e.g. v1 -> v2 in #992) intentionally fires `agents-md=stale` on every consumer install whose AGENTS.md was rendered against the prior version, surfacing the upgrade prompt; in v0.27 the bump is paired with the `.deft/core/` install-layout flip so the prompt routes operators to the relocator.
66
+ - ⊗ Future format changes MUST NOT silently reuse a prior marker version (`v1`, `v2`, ...).
67
+
68
+ ## Cross-references
69
+
70
+ - Template: [`./agents-entry.md`](./agents-entry.md)
71
+ - Go installer embed: [`./embed.go`](./embed.go)
72
+ - Python reference implementation: `cmd_agents_refresh` in the `run` CLI script (root `run`)
73
+ - Conformance test: [`../tests/content/test_agents_entry_contract.py`](../../tests/content/test_agents_entry_contract.py)
74
+ - Universal upgrade gate: `cmd_gate` in the `run` CLI script (root `run`)
75
+ - Refs: #768, #636, #746
@@ -0,0 +1,20 @@
1
+ // Package templates exposes the deft template files as build-time embedded
2
+ // assets. Embedding from the templates/ directory keeps templates/agents-entry.md
3
+ // as the single canonical source of truth for the AGENTS.md body that the Go
4
+ // installer, task agents:init, and QUICK-START.md all emit.
5
+ //
6
+ // Editing templates/agents-entry.md alone is sufficient to change what the
7
+ // installer writes -- no Go file edit required (closes #636).
8
+ package templates
9
+
10
+ import _ "embed"
11
+
12
+ // AgentsEntry is the canonical AGENTS.md entry body written into consumer
13
+ // projects by cmd/deft-install. It is embedded at build time from
14
+ // templates/agents-entry.md via //go:embed so the installer can never drift
15
+ // from the template on disk. The accompanying drift test in embed_test.go
16
+ // asserts that the embedded bytes equal the file on disk so CI fails if the
17
+ // embed target is removed or the path is reorganised.
18
+ //
19
+ //go:embed agents-entry.md
20
+ var AgentsEntry string
@@ -0,0 +1,36 @@
1
+ package templates
2
+
3
+ import (
4
+ "os"
5
+ "testing"
6
+ )
7
+
8
+ // TestAgentsEntryMatchesFile asserts that the embedded AgentsEntry bytes
9
+ // equal the on-disk contents of templates/agents-entry.md at build time.
10
+ // This guards against accidental embed-target drift (path reorganisation,
11
+ // file deletion, or a silent rename) so CI fails loudly if the installer
12
+ // and the canonical template get out of sync (closes #636).
13
+ //
14
+ // Go tests run with the package directory as the working directory, so
15
+ // reading "agents-entry.md" here is equivalent to reading
16
+ // templates/agents-entry.md from the repo root.
17
+ func TestAgentsEntryMatchesFile(t *testing.T) {
18
+ onDisk, err := os.ReadFile("agents-entry.md")
19
+ if err != nil {
20
+ t.Fatalf("could not read templates/agents-entry.md: %v", err)
21
+ }
22
+ if AgentsEntry != string(onDisk) {
23
+ t.Errorf("embedded AgentsEntry drift from templates/agents-entry.md:\n"+
24
+ "embedded len=%d, on-disk len=%d",
25
+ len(AgentsEntry), len(onDisk))
26
+ }
27
+ }
28
+
29
+ // TestAgentsEntryNonEmpty guards against a future refactor that accidentally
30
+ // empties the embedded template (e.g. a renamed embed target that silently
31
+ // produces an empty string).
32
+ func TestAgentsEntryNonEmpty(t *testing.T) {
33
+ if len(AgentsEntry) == 0 {
34
+ t.Fatal("AgentsEntry is empty -- templates/agents-entry.md embed is broken")
35
+ }
36
+ }
@@ -0,0 +1,9 @@
1
+ I want to build uptop, a CLI+TUI that has all or nearly all of the features of btop, but in addition to being a TUI can be a useful CLI by 1. outputting collected data repeatedly at an interval specified by the user, defaulting to once per second 2. supporting output formats including --json and --markdown. uptop should also support a plug-in architecture that allows people to add new "panes" or types of information to be collected and to output. The plug-in architecture requirement may affect the choice of programming language used.
2
+
3
+ Use Claude AskInterviewQuestion (or if you are not claude, a simulation of that process) to interview me in depth and detail to create a complete project specification.
4
+
5
+ At each step, ask one focused, non‑trivial question with clear numbered answer options when appropriate. Include an "other" option that lets users specify what'd they'd rather do or say they don't know what to do.
6
+
7
+ Ask detailed, non‑obvious questions about missing decisions, edge cases, implementation details, requirements, architecture, UX, constraints, and tradeoffs. Keep asking until you are confident there is little ambiguity left and you could generate a comprehensive spec.
8
+
9
+ Then generate the spec as SPECIFICATION.md. Break the implementation plan up into different phases, subphases, and tasks so that multiple coding agents can work on the project in parallel. Make it clear if any phases, subphases, or tasks depend on others. Only plan, don't write any code.
@@ -0,0 +1,246 @@
1
+ # Specification Generation
2
+
3
+ Agent workflow for creating project specifications via structured interview.
4
+ This template implements [strategies/interview.md](../strategies/interview.md).
5
+ See that file for the full canonical strategy including the sizing gate,
6
+ Light/Full paths, and transition criteria.
7
+
8
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
9
+
10
+ ## Input Template
11
+
12
+ ```
13
+ I want to build [project name] that has the following features:
14
+ 1. [feature]
15
+ 2. [feature]
16
+ ...
17
+ N. [feature]
18
+ ```
19
+
20
+ ## Sizing Gate
21
+
22
+ ! Before starting the interview, determine project complexity per
23
+ [strategies/interview.md](../strategies/interview.md#sizing-gate).
24
+
25
+ - ! Check `PROJECT-DEFINITION.vbrief.json` narratives or `PROJECT.md` (deprecated) for `Light` or `Full` process — if declared, use that path
26
+ - ! If not declared, propose a size and **wait for the user to confirm** before proceeding
27
+ - ⊗ Combine the sizing proposal with the first interview question
28
+
29
+ **Light** (small/medium): Interview → SPECIFICATION with embedded Requirements.
30
+ **Full** (large/complex): Interview → PRD (approval gate) → SPECIFICATION with traceability.
31
+
32
+ ## Interview Process
33
+
34
+ - ~ Use Claude AskInterviewQuestion when available (emulate it if not available)
35
+ - ! If Input Template fields are empty: ask overview, then features, then details
36
+ - ! Ask **ONE** focused, non-trivial question per step
37
+ - ⊗ Ask more than one question per step; or try to sneak-in "also" questions
38
+ - ~ Provide numbered answer options when appropriate
39
+ - ! Include "other" option for custom/unknown responses
40
+ - ! Make it clear which option you feel is RECOMMENDED
41
+ - ! When you are done, append to the end of this file all questions asked and answers given
42
+
43
+ **Question Areas:**
44
+
45
+ - ! Missing decisions (language, framework, deployment)
46
+ - ! Edge cases (errors, boundaries, failure modes)
47
+ - ! Implementation details (architecture, patterns, libraries)
48
+ - ! Requirements (performance, security, scalability)
49
+ - ! UX/constraints (users, timeline, compatibility)
50
+ - ! Tradeoffs (simplicity vs features, speed vs safety)
51
+
52
+ **Completion:**
53
+
54
+ - ! Continue until little ambiguity remains
55
+ - ! Ensure spec is comprehensive enough to implement
56
+
57
+ ## Output Generation
58
+
59
+ ### Full Path: PRD Generation
60
+
61
+ Only on the **Full** path — generate `PRD.md` as a rendered stakeholder-review export before the specification source is finalized:
62
+
63
+ ```markdown
64
+ # [Project Name] PRD
65
+
66
+ ## Problem Statement
67
+ What problem does this solve? Who has this problem?
68
+
69
+ ## Goals
70
+ - Primary goal
71
+ - Secondary goals
72
+ - Non-goals (explicitly out of scope)
73
+
74
+ ## User Stories
75
+ As a [user type], I want [capability] so that [benefit].
76
+
77
+ ## Requirements
78
+
79
+ ### Functional Requirements
80
+ - FR-1: [requirement]
81
+ - FR-2: [requirement]
82
+
83
+ ### Non-Functional Requirements
84
+ - NFR-1: Performance — [requirement]
85
+ - NFR-2: Security — [requirement]
86
+
87
+ ## Success Metrics
88
+ How do we know this succeeded?
89
+
90
+ ## Open Questions
91
+ Any remaining decisions deferred to implementation.
92
+ ```
93
+
94
+ - ! Focus on WHAT, not HOW
95
+ - ! Use RFC 2119 language (MUST, SHOULD, MAY)
96
+ - ! Number all requirements for traceability
97
+ - ! User MUST review and approve the rendered PRD export before specification generation begins
98
+ - ! `vbrief/specification.vbrief.json` and scope vBRIEFs remain authoritative; rendered PRD/SPEC files are exports, not the source of truth
99
+
100
+ ### Specification Flow (both paths)
101
+
102
+ 1. ! Write scope vBRIEF(s) to `./vbrief/proposed/` with `status: proposed` using `YYYY-MM-DD-descriptive-slug.vbrief.json` naming
103
+ 2. ! Summarize what was decided and ask the user to review
104
+ 3. ! On user approval, use `task scope:promote` to move to `./vbrief/pending/` with `status: pending`
105
+ 4. ! Update `./vbrief/PROJECT-DEFINITION.vbrief.json` items registry to include the new scope vBRIEF(s)
106
+ 5. ? For project-wide spec: write `./vbrief/specification.vbrief.json` and run `task spec:render` to generate `SPECIFICATION.md`
107
+
108
+ ! The vBRIEF file MUST use this exact top-level structure:
109
+
110
+ - ! All `narratives` and `narrative` values MUST be plain strings — never objects or arrays
111
+ - ! Nested children within a PlanItem MUST use `items` (the preferred v0.6 PlanItem field)
112
+ - ≉ Use deprecated `subItems` for new content; it remains a compatibility alias only
113
+
114
+ ```json
115
+ {
116
+ "vBRIEFInfo": { "version": "0.6" },
117
+ "plan": {
118
+ "title": "Project Name SPECIFICATION",
119
+ "status": "proposed",
120
+ "narratives": {
121
+ "Overview": "Brief project summary as a plain string.",
122
+ "Architecture": "System design as a plain string."
123
+ },
124
+ "items": [
125
+ {
126
+ "id": "phase-1",
127
+ "title": "Phase 1: Foundation",
128
+ "status": "pending",
129
+ "items": [
130
+ {
131
+ "id": "1.1",
132
+ "title": "Subphase 1.1: Setup",
133
+ "status": "pending",
134
+ "items": [
135
+ {
136
+ "id": "1.1.1",
137
+ "title": "Task description",
138
+ "status": "pending",
139
+ "narrative": { "Acceptance": "...", "Traces": "FR-1" }
140
+ }
141
+ ]
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ }
147
+ }
148
+ ```
149
+
150
+ ~ See [vbrief/vbrief.md](../vbrief/vbrief.md) for full schema documentation and [vbrief/schemas/vbrief-core.schema.json](../vbrief/schemas/vbrief-core.schema.json) for the JSON Schema.
151
+
152
+ - ⊗ Write `SPECIFICATION.md` directly — it is generated from the vbrief source
153
+ - ! Follow all relevant deft guidelines
154
+ - ! Use RFC 2119 MUST, SHOULD, MAY, SHOULD NOT, MUST NOT wording
155
+ - ! Break into phases, subphases, tasks
156
+ - ! End of each phase/subphase must implement and run testing until it passes
157
+ - ! Mark all dependencies explicitly: "Phase 2 (depends on: Phase 1)"
158
+ - ! Design for parallel work (multiple agents)
159
+ - ⊗ Write code (specification only)
160
+
161
+ ## Afterwards
162
+
163
+ - ! Let user know to type "implement the scope vBRIEFs in `./vbrief/pending/`" to start implementation
164
+
165
+ **SPECIFICATION Structure (Light path — embedded Requirements):**
166
+
167
+ ```markdown
168
+ # Project Name
169
+
170
+ ## Overview
171
+
172
+ ## Requirements
173
+
174
+ ### Functional Requirements
175
+ - FR-1: [requirement]
176
+ - FR-2: [requirement]
177
+
178
+ ### Non-Functional Requirements
179
+ - NFR-1: [requirement]
180
+ - NFR-2: [requirement]
181
+
182
+ ## Architecture
183
+
184
+ ## Implementation Plan
185
+
186
+ ### Phase 1: Foundation
187
+
188
+ #### Subphase 1.1: Setup
189
+
190
+ - Task 1.1.1: (description, traces: FR-1, dependencies, acceptance criteria)
191
+
192
+ #### Subphase 1.2: Core (depends on: 1.1)
193
+
194
+ ### Phase 2: Features (depends on: Phase 1)
195
+
196
+ ## Testing Strategy
197
+
198
+ ## Deployment
199
+ ```
200
+
201
+ **SPECIFICATION Structure (Full path — references PRD):**
202
+
203
+ ```markdown
204
+ # Project Name
205
+
206
+ ## Overview
207
+ Brief summary and link to PRD.
208
+
209
+ ## Architecture
210
+
211
+ ## Implementation Plan
212
+
213
+ ### Phase 1: Foundation
214
+
215
+ #### Subphase 1.1: Setup
216
+
217
+ - Task 1.1.1: (description, traces: FR-1, dependencies, acceptance criteria)
218
+
219
+ #### Subphase 1.2: Core (depends on: 1.1)
220
+
221
+ ### Phase 2: Features (depends on: Phase 1)
222
+
223
+ ## Testing Strategy
224
+
225
+ ## Deployment
226
+ ```
227
+
228
+ ## Best Practices
229
+
230
+ - ! Detailed enough to implement without guesswork
231
+ - ! Clear scope boundaries (in vs out)
232
+ - ! Include rationale for major decisions
233
+ - ~ Size tasks for 1-4 hours
234
+ - ! Minimize inter-task dependencies
235
+ - ! Define clear component interfaces
236
+ - ! Each task SHOULD reference which FR/NFR it implements via `(traces: FR-N)`
237
+
238
+ ## Anti-Patterns
239
+
240
+ - ⊗ Multiple questions at once
241
+ - ⊗ Assumptions without clarifying
242
+ - ⊗ Vague requirements
243
+ - ⊗ Missing dependencies
244
+ - ⊗ Sequential tasks that could be parallel
245
+ - ⊗ Creating PRD.md on the Light path
246
+ - ⊗ Skipping the sizing gate