@deftai/directive-content 0.114.0 → 0.116.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.
- package/UPGRADING.md +17 -6
- package/coding/review.md +8 -0
- package/commands.md +4 -1
- package/contracts/design-critique.md +14 -6
- package/docs/BROWNFIELD.md +10 -0
- package/docs/grok-build-subscription-setup.md +38 -0
- package/package.json +1 -1
- package/packs/rules/rules-pack-0.1.json +112 -112
- package/packs/skills/skills-pack-0.1.json +10 -7
- package/packs/strategies/strategies-pack-0.1.json +1 -1
- package/scm/github.md +32 -0
- package/skills/deft-directive-build/SKILL.md +3 -1
- package/skills/deft-directive-design-critique/SKILL.md +2 -1
- package/skills/deft-directive-pre-pr/SKILL.md +15 -8
- package/skills/deft-directive-release/SKILL.md +4 -4
- package/skills/deft-directive-review-cycle/SKILL.md +35 -0
- package/skills/deft-directive-setup/SKILL.md +13 -8
- package/skills/deft-directive-swarm/references/core-phase-0.md +1 -1
- package/skills/deft-directive-swarm/references/core-phase-3.md +1 -1
- package/skills/deft-directive-swarm/references/host-cursor.md +36 -14
- package/strategies/interview.md +13 -9
- package/templates/agent-prompt-preamble.md +2 -2
- package/templates/agents-entry.md +4 -3
- package/tools/package-manager-network.md +2 -2
package/strategies/interview.md
CHANGED
|
@@ -73,6 +73,9 @@ on the brownfield detector:
|
|
|
73
73
|
- ! On confirmed scrap, continue to the [Sizing Gate](#sizing-gate) as a full create path
|
|
74
74
|
- ⊗ Auto-delete PROJECT-DEFINITION without scrap confirm
|
|
75
75
|
- ⊗ Rename Proceed to "Update" without changing behavior
|
|
76
|
+
4. **Process-only (keep Phase 2 identity)** — leave strategy; no new scope; no spec write. Do not emit a proposed scope. Do not merge or scrap PROJECT-DEFINITION narratives. Then-path: session ritual / deft check / later Add scope. Skip Sizing Gate, export, Acceptance Gate, and build. GitHub issues stay cache/queue inputs. Docs stay described content.
|
|
77
|
+
- ⊗ Use Back or Other as this option
|
|
78
|
+
- ⊗ Bind docs or issues as the next-build plan
|
|
76
79
|
|
|
77
80
|
**Preparatory strategies** (type: `preparatory` — loops back to this gate on completion):
|
|
78
81
|
- Research — investigate the domain, find libraries, identify pitfalls
|
|
@@ -152,19 +155,20 @@ This repo already has a project definition and/or scopes. Before we proceed:
|
|
|
152
155
|
1. Add scope to this project (default) — keep identity; add one new proposed scope
|
|
153
156
|
2. Update project definition — delta interview; merge narratives (Spec-Generating Guard)
|
|
154
157
|
3. Replace specification (scrap) — requires explicit yes/confirmed; full recreate
|
|
158
|
+
4. Process-only (keep Phase 2 identity) — leave strategy; no new scope; no spec write
|
|
155
159
|
|
|
156
160
|
--- Preparatory (loops back) ---
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
5. Run a research phase — investigate the domain, find libraries, identify pitfalls
|
|
162
|
+
6. Run a discuss phase — lock key decisions using Feynman technique
|
|
163
|
+
7. Run a probe phase — adversarially stress-test the plan; surface assumptions, edge cases, and risks
|
|
164
|
+
8. Run a map phase — analyze existing codebase conventions
|
|
161
165
|
|
|
162
166
|
--- Switch strategy ---
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
9. Switch to yolo — auto-pilot picks all answers
|
|
168
|
+
10. Switch to speckit — formal spec process with story readiness before implementation
|
|
169
|
+
11. Other (specify)
|
|
170
|
+
12. Discuss
|
|
171
|
+
13. Back
|
|
168
172
|
```
|
|
169
173
|
|
|
170
174
|
---
|
|
@@ -97,7 +97,7 @@ Populate `selected_backend` OR `routing_policy` (or both when the operator sets
|
|
|
97
97
|
**Role-boundary expectations (all providers):** the same boundaries apply whether the worker runs on Composer, Grok Build, Cursor/cloud, Claude Code, OpenClaw, or a future adapter:
|
|
98
98
|
|
|
99
99
|
- ! `leaf-implementation` workers implement scoped xBRIEF work in their assigned worktree only -- gates (`task check`, file-scope audit, Greptile review cycle) are model-agnostic and MUST still pass.
|
|
100
|
-
- ! **Spawned mutating workers take their own worktree (#4066).** Implement-class spawn must
|
|
100
|
+
- ! **Spawned mutating workers take their own worktree (#4066 / #4295).** Implement-class spawn must dest-place before occupancy claim. Grok `spawn_subagent` dest is `cwd` only (cannot rewrite PreToolUse input). Claude/Codex keep `isolation=worktree` or a linked path. Cursor Task has no local dest field — dest-placing is a dest-rooted window (nursery inherit) or `@cursor/sdk` `Agent.create({ local: { cwd } })`; do not advertise Task dest keys. Sharing the primary checkout with a live occupant is refuse, not `occupancy:grant` across hosts. Master/primary occupancy is the exception (`release-cut`, `policy-restore`, operator-directed default-branch work). `--read-only` never claims. On DONE/terminal the dispatcher compare-and-releases the recorded child tree (incarnation + parent-id); do not steal the parent's lease to recover.
|
|
101
101
|
- ! `orchestrator`, `review-monitor`, and `merge-release` roles MUST run on strong or review-capable agents; dispatchers MUST NOT route these roles to cheap leaf backends.
|
|
102
102
|
- ⊗ Route a cheap leaf backend onto the merge cascade, Phase 5->6 release gate, conflict-resolution rebase, or review-cycle merge-ready decision -- these are irreversible-damage surfaces that stay on the strong tier regardless of provider.
|
|
103
103
|
|
|
@@ -238,7 +238,7 @@ On Windows, Cursor Task-tool local subagents historically opened a visible `cmd.
|
|
|
238
238
|
|
|
239
239
|
**Directive rule for orchestrators on Windows:**
|
|
240
240
|
|
|
241
|
-
- ! Use **local
|
|
241
|
+
- ! Use **local dest-placing Cursor** as the default dispatch path — same as other platforms (nursery inherit or dest-rooted `@cursor/sdk` `Agent.create`; not dest-binding Task). Do not route to cloud solely because the host is Windows.
|
|
242
242
|
- ! Parallel local cohorts are allowed; do not force concurrency=1 because of #2563.
|
|
243
243
|
- ~ Prefer the normal warm `task` / `dist/bin.js` path; avoid unnecessary `DEFT_FORCE_TS_BUILD=1` across a parallel cohort.
|
|
244
244
|
- ⊗ Drop or weaken the #2563 `windowsHide` / warm-dist mitigations without a replacement that keeps Windows local swarm workable.
|
|
@@ -31,7 +31,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
31
31
|
|
|
32
32
|
! Writes: `./xbrief/` (`PROJECT-DEFINITION.xbrief.json`, `plan.xbrief.json`, `specification.xbrief.json`) as `"xBRIEFInfo"` `"version": "0.8"`. Legacy `vbrief/`; `deft migrate:xbrief`.
|
|
33
33
|
! Completed xBRIEFs are record of *what is*, zero authority over *what to build next* (#3383). Current contract = active xBRIEF + human operator live instruction.
|
|
34
|
-
⊗ Treat a completed xBRIEF as the next-build contract. ⊗ Emit `"version": "0.6"` on new writes.
|
|
34
|
+
⊗ Treat a completed xBRIEF as the next-build contract. ⊗ Emit `"version": "0.6"` on new writes. ⊗ No xBRIEF DeftVersion stamps (#4271).
|
|
35
35
|
|
|
36
36
|
## Unmanaged project header (#2065)
|
|
37
37
|
|
|
@@ -71,6 +71,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
71
71
|
|
|
72
72
|
! Process-critical skills with false-negative risk MUST be named in AGENTS.md (always-pin tier) — tier definitions: `.deft/core/docs/skill-pin-policy.md` (#2508).
|
|
73
73
|
! **Default always-pins:** `deft-directive-build`, `deft-directive-pre-pr`, `deft-directive-review-cycle`, `deft-directive-swarm` — read each `SKILL.md` when that work type starts.
|
|
74
|
+
! Policy-anchored review-response (#3452): HEAD policy before out-of-model. Depth: review-cycle SKILL.
|
|
74
75
|
⊗ Pin entire language packs, deployment docs, or framework bulk into AGENTS.md — pins are for false-negative-sensitive process gates only (#2508).
|
|
75
76
|
! **Dual stop (#2442):** multi-iteration work MUST have success + failure/budget stop (max iters / no-progress / budget); single-turn exempt; halt with operator-visible report; ⊗ thrash. Defaults: build, swarm, review-cycle skills. See main.md Dual Stop Rule. Ledger #3143 (`packages/core/src/delivery-attempt/`).
|
|
76
77
|
## Rule Authority [AXIOM]
|
|
@@ -86,7 +87,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
86
87
|
|
|
87
88
|
## Through-merge worker dispatch (#3032)
|
|
88
89
|
|
|
89
|
-
! On **through merge** / **drive to merge** / land-ship / **drive-to: merge-ready** story intent: parent MUST dispatch a `drive-to: merge-ready` worker (worktree, preflight, pre-pr, review-cycle, merge/`scope:complete`) via the **swarm/solo-worker launch path** even if **cohort size is 1** — parent MUST NOT implement as the leaf. Depth: swarm Phase 0 + skill-pin-policy (#3032 / #1880 Gap C).
|
|
90
|
+
! On **through merge** / **drive to merge** / land-ship / **drive-to: merge-ready** story intent: parent MUST dispatch a `drive-to: merge-ready` worker (worktree, preflight, pre-pr, review-cycle, merge/`scope:complete`) via the **swarm/solo-worker launch path** even if **cohort size is 1** — parent MUST NOT implement as the leaf. Depth: swarm Phase 0 + skill-pin-policy (#3032 / #1880 Gap C). Spawn dest (#4066 / #4295): dest-place implement workers before occupancy. Cursor local is dest-placing (nursery inherit or dest-rooted `@cursor/sdk` `Agent.create`); ⊗ Task dest keys.
|
|
90
91
|
⊗ Parent conversation implements or babysits product fix/CI loops for drive-to:merge-ready work when background subagent/worktree dispatch is available (#3032).
|
|
91
92
|
! After leaf announce: tool-first / yield / one short non-repeated answer; ⊗ N>2 near-identical zero-tool (FC14 / #3131). Machine: `evaluateParentTurnShape` (`parent-turn-shape`). Depth: preamble §11 + `docs/openclaw-agent-host.md`.
|
|
92
93
|
|
|
@@ -139,7 +140,7 @@ Deft is installed in .deft/core/. Full guidelines: .deft/core/main.md
|
|
|
139
140
|
|
|
140
141
|
## Windows PowerShell: multi-line git/gh bodies (#2646 / #2744)
|
|
141
142
|
|
|
142
|
-
! Multi-line git commit / gh issue|pr|comment bodies: write UTF-8 (no BOM) to OS temp, then `git commit -F` / `gh --body-file` / `deft scm:body:* --body-file`. Issue-body RMW on win32: `deft scm:body:issue:fetch --out-file` then edit the file then `deft scm:body:issue:edit --body-file` (#2607 postcondition verify). ⊗ bash heredocs, `<<<`, inline multi-line `--body`, or PS capture-concat of `gh api --jq .body` (string[]/$OFS destroys bodies — #2087, #2741, #1492). Detail: `.deft/core/scm/github.md` § #2646 / #2744. `ghx` is read-only — mutations stay on live `gh`.
|
|
143
|
+
! Multi-line git commit / gh issue|pr|comment bodies: write UTF-8 (no BOM) to OS temp, then `git commit -F` / `gh --body-file` / `deft scm:body:* --body-file`. Issue-body RMW on win32: `deft scm:body:issue:fetch --out-file` then edit the file then `deft scm:body:issue:edit --body-file` (#2607 postcondition verify). ⊗ bash heredocs, `<<<`, inline multi-line `--body`, or PS capture-concat of `gh api --jq .body` (string[]/$OFS destroys bodies — #2087, #2741, #1492). Detail: `.deft/core/scm/github.md` § #2646 / #2744. `ghx` is read-only — mutations stay on live `gh`. Explicit PR `--body-file` / `--body` / `--fill` skip the GitHub template (#4293): compose the template `Documentation impact` block, then `deft verify:docs-impact -- --body-file` on those same bytes (leftover-complete / finalize-cohort).
|
|
143
144
|
|
|
144
145
|
## Contextual guardrails (runtime-detect lazy-load)
|
|
145
146
|
|
|
@@ -15,7 +15,7 @@ Directive runs against arbitrary repositories, including private monorepos with
|
|
|
15
15
|
|
|
16
16
|
- ! Read-only, session-start, and session-ritual flows (`deft session:start`, `deft verify:session-ritual`, `deft verify:tools`) MUST perform no npm/pnpm registry access. Tool-presence probes MUST use PATH lookups (`which`/`accessSync`) or `--version` checks, never a subcommand that can resolve dependencies or query a registry.
|
|
17
17
|
- ! `npm config get @deftai:registry` and `npm config get registry` are offline configuration reads, not registry access. `deft doctor` MAY use them in its default tier to identify effective routing, but MUST NOT print the raw values because registry URLs can contain internal hostnames or credentials.
|
|
18
|
-
- ! `deft doctor` MUST default to an OFFLINE tier: no check in the default run may contact an npm/pnpm registry. The one check that can (`payload-staleness`, which uses `git ls-remote` to verify the installed pin and `npm view <package> version --
|
|
18
|
+
- ! `deft doctor` MUST default to an OFFLINE tier: no check in the default run may contact an npm/pnpm registry. The one check that can (`payload-staleness`, which uses `git ls-remote` to verify the installed pin and `npm view <package> version --ignore-scripts` from a temp cwd whose project `.npmrc` sets `@deftai:registry=https://registry.npmjs.org/`) is gated behind the explicit `--network` flag and is skipped by default with a pointer to that flag. `--registry` does not beat `@scope:registry`; `--userconfig` does not beat a project `@scope:registry`. Directive-owned `npm view` MUST unset or override the scoped key (cwd change with a project `.npmrc`, or durable `@deftai:registry`) rather than pin `--registry` from the consumer cwd.
|
|
19
19
|
- ! Before a network-gated check runs, `deft doctor --network` MUST print a disclosure line naming the tool and registry class it may contact (for example, "may contact your git remote and the npm registry") BEFORE any network call is attempted.
|
|
20
20
|
- ! Any future doctor check, session step, or read-only command that needs to invoke `npm`/`pnpm` in a way that can reach a registry MUST follow the same pattern: explicit flag or subcommand, disclosed registry class before the call, and offline by default.
|
|
21
21
|
- ~ Where a package-manager operation is unavoidable in an explicitly-invoked flow (e.g. a release or install workflow that legitimately needs to fetch packages), prefer offline/frozen modes (`--offline`, `--prefer-offline`, `--frozen-lockfile`) when the operation only needs to validate local state rather than resolve fresh metadata.
|
|
@@ -28,4 +28,4 @@ This does not ban dependency installation or registry verification from explicit
|
|
|
28
28
|
|
|
29
29
|
## Reference implementation
|
|
30
30
|
|
|
31
|
-
`packages/core/src/doctor/npm-registry.ts` performs only the two offline `npm config get` reads above and redacts their values from findings. `packages/core/src/doctor/payload-staleness.ts` owns the network-capable doctor probes (`git ls-remote` and `npm view`); `packages/core/src/doctor/main.ts` gates them behind `--network` and prints the disclosure line first. The npm release lookup
|
|
31
|
+
`packages/core/src/doctor/npm-registry.ts` performs only the two offline `npm config get` reads above and redacts their values from findings. `packages/core/src/doctor/payload-staleness.ts` owns the network-capable doctor probes (`git ls-remote` and `npm view`); `packages/core/src/doctor/main.ts` gates them behind `--network` and prints the disclosure line first. The npm release lookup isolates from project/user `@deftai:registry` with a temp cwd whose project `.npmrc` sets `@deftai:registry=https://registry.npmjs.org/`, and `--ignore-scripts`. User npmrc still supplies proxy/cafile. `--registry` does not beat `@scope:registry` (npm/cli#7659). `--userconfig` does not beat a project scoped registry. Default doctor and gated session-ritual MUST NOT add a fail-closed `npm view`. `packages/core/src/session/session-start.ts` and `packages/core/src/verify-env/verify-tools.ts` perform no package-manager network access at all -- tool presence is resolved via PATH probing only. Do not parse per-package `.npmrc` keys.
|