@deftai/directive-content 0.110.0 → 0.112.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/QUICK-START.md +16 -14
- package/SKILL.md +13 -13
- package/Taskfile.yml +20 -15
- package/UPGRADING.md +64 -24
- package/commands.md +20 -18
- package/contracts/design-critique.md +36 -13
- package/conventions/machine-generated-banner.md +9 -9
- package/conventions/rule-ownership.json +3 -3
- package/docs/SUPPORT.md +43 -0
- package/docs/capabilities.md +110 -0
- package/docs/capability-overlay.json +197 -0
- package/docs/getting-started.md +131 -49
- package/docs/scope-provenance.md +2 -0
- package/main.md +22 -22
- package/package.json +1 -1
- package/packs/rules/rules-pack-0.1.json +1 -1
- package/packs/skills/skills-pack-0.1.json +9 -7
- package/scm/github.md +2 -0
- package/skills/deft-directive-design-critique/SKILL.md +10 -4
- package/skills/deft-directive-release/SKILL.md +22 -17
- package/skills/deft-directive-review-cycle/SKILL.md +52 -15
- package/skills/deft-directive-swarm/SKILL.md +8 -4
- package/skills/deft-directive-swarm/references/core-ops.md +1 -0
- package/skills/deft-directive-swarm/references/core-phase-0.md +2 -1
- package/skills/deft-directive-swarm/references/core-phase-3.md +8 -5
- package/skills/deft-directive-swarm/references/host-claude-code.md +3 -2
- package/skills/deft-directive-swarm/references/host-grok-build.md +19 -3
- package/skills/deft-directive-swarm/references/host-grokbot.md +151 -0
- package/tasks/docs.yml +19 -0
- package/tasks/migrate.yml +3 -1
- package/tasks/policy.yml +2 -2
- package/tasks/scm.yml +12 -1
- package/tasks/scope.yml +16 -25
- package/tasks/triage-actions.yml +3 -4
- package/tasks/triage-bootstrap.yml +2 -2
- package/tasks/triage-bulk.yml +6 -7
- package/tasks/triage-classify.yml +2 -2
- package/tasks/triage-queue.yml +2 -2
- package/tasks/triage-reconcile.yml +2 -2
- package/tasks/triage-scope-drift.yml +2 -2
- package/tasks/triage-scope.yml +2 -2
- package/tasks/triage-smoketest.yml +3 -3
- package/tasks/triage-subscribe.yml +2 -2
- package/tasks/triage-summary.yml +2 -2
- package/tasks/triage-welcome.yml +2 -2
- package/tasks/verify.yml +30 -1
- package/templates/PULL_REQUEST_TEMPLATE.md +12 -0
- package/templates/agent-prompt-preamble.md +6 -3
- package/templates/agents-entry.md +5 -5
- package/templates/design-critique-brief.md +2 -0
|
@@ -15,7 +15,7 @@ Minimal runtime contract for the Grok Build dispatch-provider path (one supporte
|
|
|
15
15
|
- One isolated git worktree per agent (identical to the Warp path — see Phase 2)
|
|
16
16
|
- Workers launched via `spawn_subagent` dispatch (Phase 3 Step 2d)
|
|
17
17
|
- Monitor coordination via worktree-state polling (`git status`, `git log`) and `get_command_or_subagent_output`
|
|
18
|
-
- Review-cycle
|
|
18
|
+
- Review-cycle **sibling** monitors spawned via `spawn_subagent` by the **parent/orchestrator** (not `start_agent`). Implementation leaves MUST NOT nested-spawn a review-monitor -- see Nested spawn_subagent boundary below.
|
|
19
19
|
|
|
20
20
|
This path became first-class in #1342 (platform adapter slices 1-3) and is fully documented in Phase 3 Step 2d and Phase 4. Grok Build + Windows users should also see #1353 (§3.5 in `templates/agent-prompt-preamble.md`) for shell output capture limitations that affect `get_command_or_subagent_output` in PowerShell 5.1 contexts. Refs #1342, #1331.
|
|
21
21
|
|
|
@@ -23,17 +23,33 @@ This path became first-class in #1342 (platform adapter slices 1-3) and is fully
|
|
|
23
23
|
|
|
24
24
|
### Step 2d: Grok Build Launch (spawn_subagent available)
|
|
25
25
|
|
|
26
|
-
! When the platform descriptor is `grok-build` (spawn_subagent detected, no start_agent, no WARP_*, no Cursor `Task`, no OpenClaw `sessions_spawn
|
|
26
|
+
! When the platform descriptor is `grok-build` (spawn_subagent detected, no start_agent, no WARP_*, no Cursor `Task`, no OpenClaw `sessions_spawn`, no Grok Bot unique signals), dispatch each worker via `spawn_subagent` with:
|
|
27
27
|
0. Create `<worktree>/.deft-scratch/subagent-status/` before spawn if launch/pre-dispatch did not already, and instruct the worker to heartbeat + commit early (#3730).
|
|
28
28
|
1. The canonical `templates/agent-prompt-preamble.md` content as the preamble
|
|
29
29
|
2. The standard worktree prompt (STEP 1-6 from the Prompt Template below), adapted to use `get_command_or_subagent_output` for polling rather than `start_agent` lifecycle events
|
|
30
|
-
3.
|
|
30
|
+
3. `tool_input.cwd` set to the agent's reserved linked worktree. Grok implement dest is `cwd` only. Do not pass `worktree_path`, `worktreePath`, `worktree`, or `isolation=worktree`.
|
|
31
|
+
|
|
32
|
+
! **Parent ritual HEAD-discontinuous / dest occupancy deny class (#4215).** Native `spawn_subagent` with `cwd` to a dest-proven reserved linked worktree must not require a live parent primary ritual. Occupancy-refused on the contended primary is why `session:start --rearm` on master is the wrong recovery, not a spawn skip. If native spawn is denied, record that deny text in the handback. CLI `grok --cwd` is last-resort after that deny, not a habit after the first failure. Do not dual-launch CLI and `spawn_subagent` on the same unit. Do not document CLI as the real Grok Build launch path.
|
|
31
33
|
|
|
32
34
|
~ This is the first-class non-Warp path. Workers use worktree state polling (`git status`, `git log`) and `get_command_or_subagent_output` as their coordination channel instead of Warp tab state.
|
|
33
35
|
|
|
34
36
|
! Design-critique N≥3 other-family seats are not `spawn_subagent` Grok catalog rows. When `claude` / `codex` resolve on PATH, CLI-spawn those seats (`content/docs/grok-build-subscription-setup.md`). Paste-ready is fallback. Normative stop: `content/contracts/design-critique.md` Envelope and ceiling (#4067).
|
|
35
37
|
|
|
36
38
|
|
|
39
|
+
## Nested spawn_subagent boundary (#4130 / #2797 analogue)
|
|
40
|
+
|
|
41
|
+
! Nested `spawn_subagent` (implementation leaf spawning leaf) is unsupported for an Approach 1 review-monitor. Nested spawn does not report to the parent, and the parent cannot re-prompt a live child (`resume_from` requires terminal). A Grok Build **implementation leaf** MUST NOT nested-spawn a second-level review-monitor via `spawn_subagent`. Prefer either:
|
|
42
|
+
|
|
43
|
+
- (a) a `drive-to: merge-ready` leaf that owns a blocking dual-invoke `pr:watch` (`deft pr:watch` then `task deft:pr:watch`) in its own process, then `pr:merge-ready` / merge in the same loop, or
|
|
44
|
+
- (b) `stop-at: pr-open` with the dispatcher (parent that owns `spawn_subagent`) launching a sibling monitor and registering it via dual-invoke `review-monitor:register -- --platform-primitive spawn_subagent`.
|
|
45
|
+
|
|
46
|
+
! Top-level parents/orchestrators that own `spawn_subagent` MAY Approach-1 background a review-monitor.
|
|
47
|
+
|
|
48
|
+
⊗ An implementation leaf backgrounds a nested `spawn_subagent` poller and exits claiming monitoring is active.
|
|
49
|
+
⊗ Invent mid-flight message-later on grok-build as a substitute for this boundary.
|
|
50
|
+
|
|
51
|
+
If the leaf needs another agent, it stops and reports `BLOCKED`. The parent owns the next spawn.
|
|
52
|
+
|
|
37
53
|
## Monitor notes
|
|
38
54
|
|
|
39
55
|
! Heartbeat liveness on the Grok Build hybrid path is required — see `references/core-phase-4.md` Heartbeat liveness check (#1365) and `docs/subagent-heartbeat.md`.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Host adapter: Grok Bot
|
|
2
|
+
|
|
3
|
+
Legend (RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
4
|
+
|
|
5
|
+
Descriptor: `grok-bot`. Grok Bot is **not** Grok Build. Register primitive: `grok-bot-executor` (`task review-monitor:register -- --platform-primitive grok-bot-executor`).
|
|
6
|
+
|
|
7
|
+
Load this file only after detect selects Grok Bot. Do not load other host adapters (#2928).
|
|
8
|
+
|
|
9
|
+
## Detection spike (ordered matrix placement) — #4201
|
|
10
|
+
|
|
11
|
+
! Grok Bot MUST be classified with **Grok-Bot-unique** signals. Probe those signals **before** probe 7 (`spawn_subagent` → `grok-build`). Same class as Claude-before-Task (#3134) and OpenClaw-before-grok-build (#2875).
|
|
12
|
+
|
|
13
|
+
⊗ Classify Grok Bot from bare `spawn_subagent` alone — that misclassifies as `grok-build`.
|
|
14
|
+
⊗ Classify Grok Bot from bare `Task` alone — that misclassifies as `cursor-composer`.
|
|
15
|
+
|
|
16
|
+
### Skill-side ordered probe (tool set + env)
|
|
17
|
+
|
|
18
|
+
Probe order (must match engine `probeMonitoringTier` / `resolveDispatchProvider`):
|
|
19
|
+
|
|
20
|
+
1. `start_agent` → `warp-orchestrated`
|
|
21
|
+
2. `WARP_*` → `warp-manual`
|
|
22
|
+
3. Cursor `Task` **with Cursor signals** (`CURSOR_COMPOSER` / `CURSOR_AGENT` or Cursor-only Task surface) → `cursor-composer` / `cursor-cloud-agent`
|
|
23
|
+
4. Claude Code (Claude-unique signals) → `claude-code`
|
|
24
|
+
5. OpenClaw `sessions_spawn` → `openclaw`
|
|
25
|
+
6. **Grok Bot** (this descriptor) — unique signals below → `grok-bot`
|
|
26
|
+
7. `spawn_subagent` → `grok-build`
|
|
27
|
+
8. else → `generic-terminal` (Tier 3)
|
|
28
|
+
|
|
29
|
+
### Grok-Bot-unique signals (any one is sufficient when earlier probes are absent)
|
|
30
|
+
|
|
31
|
+
| Signal | Notes |
|
|
32
|
+
|--------|--------|
|
|
33
|
+
| Question widgets | Operator-gate UI (`ask_user_question` / host widgets). Phase 0 / mid-scope / dual-stop map here. |
|
|
34
|
+
| Task / executor / CloudAgent | Worker spawn surface — **not** Cursor `Task` (requires `CURSOR_*`) and **not** Grok Build `spawn_subagent` |
|
|
35
|
+
| Routines | Grok Bot scheduled / routine surface |
|
|
36
|
+
| Short main-chat beats | Parent consolidate on the main chat (not a subagent pane) |
|
|
37
|
+
| `DEFT_PROBE_GROK_BOT` / `DEFT_HAS_GROK_BOT_WIDGETS` / `DEFT_HAS_GROK_BOT_EXECUTOR` | Explicit framework probe / override |
|
|
38
|
+
| `DEFT_AGENT_RUNTIME=grok-bot` (or `grokbot`) | Explicit runtime stamp |
|
|
39
|
+
| `GROK_BOT` | Host stamp |
|
|
40
|
+
|
|
41
|
+
! When both Cursor and Grok Bot signals could appear, **Cursor probes win** (earlier in the chain).
|
|
42
|
+
! When both OpenClaw and Grok Bot signals could appear, **OpenClaw probes win** (earlier in the chain).
|
|
43
|
+
! When Grok Bot unique signals are present **and** `spawn_subagent` is also present, **Grok Bot wins**. That is the misclassification this adapter exists to close.
|
|
44
|
+
|
|
45
|
+
! Engine env probe is env-centric (same pattern as Claude `CLAUDECODE` / Cursor `CURSOR_*`); skill prose names the tool fingerprint for agents that can see the tool set.
|
|
46
|
+
|
|
47
|
+
## Operator gates — widgets keep Discuss and Back (#1470 / #1563)
|
|
48
|
+
|
|
49
|
+
! Phase 0 / mid-scope / dual-stop operator gates on this host MUST use question widgets (or a numbered chat menu) that **visibly preserve** canonical numbered options, with the final two labels `Discuss` and `Back` in that order.
|
|
50
|
+
|
|
51
|
+
! Widget labels MUST include the canonical number (for example `1. Accept`). Agents accept fallback chat replies only when they match the displayed number or the exact displayed option text.
|
|
52
|
+
|
|
53
|
+
⊗ Drop `Discuss` / `Back` because the host widget UI has an `Other` affordance or alphabetic shortcuts — those do not satisfy [`../../../contracts/deterministic-questions.md`](../../../contracts/deterministic-questions.md) Host-UI portability (#1563).
|
|
54
|
+
|
|
55
|
+
## Consumer facade — three verbs (Phases 0–6 stay internal)
|
|
56
|
+
|
|
57
|
+
Expose **propose / launch / status**. Keep swarm Phases 0–6 as lazy-loaded depth. Do not load all host adapters just in case (#2928).
|
|
58
|
+
|
|
59
|
+
| Verb | Operator meaning | Depth (load on demand) |
|
|
60
|
+
|------|------------------|------------------------|
|
|
61
|
+
| **propose** | Name the cohort (stories / xBRIEFs), file-overlap, worktree plan. Does not spawn. | [`core-phase-0.md`](core-phase-0.md) then [`core-phase-1-2.md`](core-phase-1-2.md) |
|
|
62
|
+
| **launch** | Emit the C2 launch-manifest (`task swarm:launch`) then spawn via this adapter. Worktree isolation MUST before parallel spawn. | [`core-phase-3.md`](core-phase-3.md) + this file |
|
|
63
|
+
| **status** | Heartbeats, worktree git, PR/review state. Parent consolidate as **short main-chat beats**. | [`core-phase-4.md`](core-phase-4.md) |
|
|
64
|
+
|
|
65
|
+
! Human decision: one clear ask, then stop. Do not auto-dispatch arcs without operator consent (#3578 / #1702).
|
|
66
|
+
|
|
67
|
+
## Thin skill pack (Grok Bot consumers)
|
|
68
|
+
|
|
69
|
+
Discovery set — **thin routers only**. Each item points at the existing Directive skill. ⊗ Put normative contract bodies in these routers.
|
|
70
|
+
|
|
71
|
+
| Router | Points at |
|
|
72
|
+
|--------|-----------|
|
|
73
|
+
| setup | `skills/deft-directive-setup/SKILL.md` |
|
|
74
|
+
| xbrief | `skills/deft-directive-xbrief/SKILL.md` |
|
|
75
|
+
| triage | `skills/deft-directive-triage/SKILL.md` (work selection: `plan-sequence:current` then `triage:queue`) |
|
|
76
|
+
| swarm (facade) | this adapter + `skills/deft-directive-swarm/SKILL.md` (propose / launch / status above) |
|
|
77
|
+
| build | `skills/deft-directive-build/SKILL.md` |
|
|
78
|
+
| **arc** | Companion **#4202** — do not implement the design-critique thin arc router here |
|
|
79
|
+
|
|
80
|
+
## Doctor / cold-start (one happy path)
|
|
81
|
+
|
|
82
|
+
! One narratable path: `npx @deftai/directive doctor` → follow its one `Next command:` → optional agent-driven setup (`skills/deft-directive-setup/SKILL.md`).
|
|
83
|
+
|
|
84
|
+
! Hide package-manager and offline forks behind doctor. Do not invent a second Grok Bot install ladder. Category: Grok Bot is a **coding host**; Directive remains the repo practice layer (`docs/CATEGORY.md`).
|
|
85
|
+
|
|
86
|
+
## GitHub connector preference
|
|
87
|
+
|
|
88
|
+
! Prefer GitHub MCP / connector tools when the host exposes them. Fall back to `gh` / `ghx` (REST) when the connector is absent.
|
|
89
|
+
|
|
90
|
+
⊗ Invent a Grok-Bot-only GitHub client. The SCM contract stays `content/scm/github.md`.
|
|
91
|
+
|
|
92
|
+
## Launch — Step 2h
|
|
93
|
+
|
|
94
|
+
### Step 2h: Grok Bot Launch (unique signals detected) — #4201
|
|
95
|
+
|
|
96
|
+
! When the platform descriptor is `grok-bot` (Grok-Bot-unique signals detected; no `start_agent`, no `WARP_*`, no Cursor classification, no Claude Code, no OpenClaw `sessions_spawn`), dispatch each **leaf worker** via Task / executor / CloudAgent with:
|
|
97
|
+
|
|
98
|
+
1. The canonical `templates/agent-prompt-preamble.md` content as the preamble.
|
|
99
|
+
2. The standard worktree prompt (STEP 1–6 from the Prompt Template in `references/core-ops.md`).
|
|
100
|
+
3. The worktree path set to the agent's isolated git worktree.
|
|
101
|
+
4. ! **Worktree isolation MUST before parallel spawn** (Phase 2 / #4066). Fail loud if a parallel cohort would share the repo root.
|
|
102
|
+
5. ! **Background / non-blocking spawn** for any worker or poller whose loop runs longer than a short task (~3 min) so the parent main-chat stays interactive (#1880 Gap D).
|
|
103
|
+
6. ! **Deliberate model routing (#1739):** resolve `(dispatch_provider=grok-bot, worker_role)` via `task verify:routing` / `task swarm:routing-set`. Grok Bot is harness-bound — record `--harness-default`; `resolved_model` stays null.
|
|
104
|
+
|
|
105
|
+
! Parent consolidate → **short main-chat beats** (not a second worker pane dump). Human decision → one clear ask then stop.
|
|
106
|
+
|
|
107
|
+
~ This is the first-class Grok Bot path. It is **Tier 1 → Approach 1**. It MUST NOT be misclassified as `grok-build` via bare `spawn_subagent` or as `cursor-composer` via bare `Task`.
|
|
108
|
+
|
|
109
|
+
! Long pollers MUST honour the sub-agent heartbeat contract (`docs/subagent-heartbeat.md`, #1166).
|
|
110
|
+
|
|
111
|
+
## Nested executor boundary
|
|
112
|
+
|
|
113
|
+
! Nested Task / executor / CloudAgent (implementation leaf spawning leaf) is unsupported for an Approach 1 review-monitor. A Grok Bot **implementation leaf** MUST NOT nested-spawn a second-level review-monitor. Prefer either:
|
|
114
|
+
|
|
115
|
+
- (a) a `drive-to: merge-ready` leaf that owns a blocking dual-invoke `pr:watch` (`deft pr:watch` then `task deft:pr:watch`) in its own process, or
|
|
116
|
+
- (b) `stop-at: pr-open` with the dispatcher (parent that owns the executor primitive) launching a sibling monitor and registering it via dual-invoke `review-monitor:register -- --platform-primitive grok-bot-executor`.
|
|
117
|
+
|
|
118
|
+
! Top-level parents/orchestrators that own the executor primitive MAY Approach-1 background a review-monitor.
|
|
119
|
+
|
|
120
|
+
⊗ An implementation leaf backgrounds a nested executor poller and exits claiming monitoring is active.
|
|
121
|
+
|
|
122
|
+
If the leaf needs another agent, it stops and reports `BLOCKED`. The parent owns the next spawn.
|
|
123
|
+
|
|
124
|
+
## Babysit / review-monitor
|
|
125
|
+
|
|
126
|
+
! Babysit / PR shepherd on Grok Bot is **Approach 1** via executor / CloudAgent (`skills/deft-directive-review-cycle/SKILL.md`). Register with `--platform-primitive grok-bot-executor`.
|
|
127
|
+
|
|
128
|
+
! Long review-monitor ownership (>~3 min) MUST NOT block the parent main chat — background executor + parent yield (#1880 Gap D); heartbeats per #1166.
|
|
129
|
+
|
|
130
|
+
⊗ Fall through to Approach 3 blocking `sleep` poll when Grok Bot executor spawn is available.
|
|
131
|
+
⊗ Misclassify Grok Bot as `grok-build` because `spawn_subagent` is also on the tool list (#4201).
|
|
132
|
+
⊗ Misclassify Grok Bot as `cursor-composer` because a Task-like tool exists without Cursor signals (#4201).
|
|
133
|
+
|
|
134
|
+
## Monitor / completion channel
|
|
135
|
+
|
|
136
|
+
! Completion is host completion / parent main-chat announce for the Grok Bot executor path. Do not poll via Grok Build `get_command_or_subagent_output` unless that primitive is actually present under descriptor `grok-build`.
|
|
137
|
+
|
|
138
|
+
! Long pollers MUST honour on-disk heartbeats (`docs/subagent-heartbeat.md`, #1166).
|
|
139
|
+
|
|
140
|
+
! Pre-spawn verification and Duplicate-Agent rules in `references/core-phase-4.md` apply.
|
|
141
|
+
|
|
142
|
+
## Retained / continue-by-id (#3158)
|
|
143
|
+
|
|
144
|
+
! **Default one-shot after executor completion:** Grok Bot executor leaves that exit are typically terminal — prefer **split-dispatch** for mid-scope user-approval gates (#954) unless the host documents continue/resume of the same agent id.
|
|
145
|
+
? When the host supports re-attach or re-prompt of a still-live executor with context intact, treat as **retain-capable** for message-later / steer-mid-flight.
|
|
146
|
+
! Nested-executor boundary above still forbids implementation leaves from retaining a second-level review-monitor.
|
|
147
|
+
~ Stance: orchestration only (#3164). Grok Bot stays the coding host / CoS cockpit. Directive does not own Slack/calendar/bot roster orchestration.
|
|
148
|
+
|
|
149
|
+
## Phase handoff (see also core #2934)
|
|
150
|
+
|
|
151
|
+
! After coding cohort complete, same-turn next-phase tool dispatch or explicit terminal status — see `references/core-phase-5-6.md` and the thin SKILL MUST block. ⊗ End the turn with only narrative “I will spawn…”.
|
package/tasks/docs.yml
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
version: '3'
|
|
2
2
|
|
|
3
|
+
vars:
|
|
4
|
+
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
5
|
+
|
|
3
6
|
# Maintainer documentation tasks.
|
|
4
7
|
#
|
|
5
8
|
# docs:rule-map renders the Rule Map: a maintainer-facing view of how the
|
|
@@ -35,3 +38,19 @@ tasks:
|
|
|
35
38
|
- task: :engine:invoke
|
|
36
39
|
vars:
|
|
37
40
|
ENGINE_CMD: 'rule-map --project-root "{{.USER_WORKING_DIR}}" --check'
|
|
41
|
+
|
|
42
|
+
capability-map:
|
|
43
|
+
desc: "Generate content/docs/capabilities.md from the capability overlay (#4099)"
|
|
44
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
45
|
+
deps:
|
|
46
|
+
- task: :engine:_ts-build
|
|
47
|
+
cmds:
|
|
48
|
+
- node "{{.DEFT_ROOT}}/packages/core/dist/docs/capability-map.js" --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
|
49
|
+
|
|
50
|
+
capability-map:check:
|
|
51
|
+
desc: "Fail if committed content/docs/capabilities.md is stale or the overlay disagrees with registries (#4099)"
|
|
52
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
53
|
+
deps:
|
|
54
|
+
- task: :engine:_ts-build
|
|
55
|
+
cmds:
|
|
56
|
+
- node "{{.DEFT_ROOT}}/packages/core/dist/docs/capability-map.js" --project-root "{{.USER_WORKING_DIR}}" --check
|
package/tasks/migrate.yml
CHANGED
|
@@ -23,7 +23,9 @@ tasks:
|
|
|
23
23
|
ENGINE_CMD: 'migrate-preflight --project-root "{{.USER_WORKING_DIR}}" --deft-root "{{.DEFT_ROOT}}" {{.CLI_ARGS}}'
|
|
24
24
|
|
|
25
25
|
xbrief:
|
|
26
|
-
|
|
26
|
+
# Hop 2 on current npm (#4092). Hop 1 (`migrate:vbrief`) is frozen on the
|
|
27
|
+
# v0.59.0 tag only — current deposits must not ship that target.
|
|
28
|
+
desc: "Migrate consumer vbrief/ layout to xbrief/ with semantic v0.6->v0.8 transforms (#2110 / #2034). Hop 2 of the frozen two-hop path (#4092)."
|
|
27
29
|
dir: '{{.USER_WORKING_DIR}}'
|
|
28
30
|
deps:
|
|
29
31
|
- task: :engine:_ts-build
|
package/tasks/policy.yml
CHANGED
|
@@ -21,8 +21,8 @@ tasks:
|
|
|
21
21
|
# --format=text|json -- machine-stable scripting envelope
|
|
22
22
|
# --changed-only -- drop default-source rows
|
|
23
23
|
# --field=<name> -- single-field isolation
|
|
24
|
-
#
|
|
25
|
-
#
|
|
24
|
+
# Inspect via engine:invoke / packages/cli/dist (policy:show). The
|
|
25
|
+
# retired `python -m scripts.policy` launcher is gone.
|
|
26
26
|
desc: "Inspect every registered typed-policy field on vbrief/PROJECT-DEFINITION.vbrief.json (#1148 / N8). -- task policy:show [-- --format=json] [--changed-only] [--field=<name>]"
|
|
27
27
|
dir: '{{.USER_WORKING_DIR}}'
|
|
28
28
|
deps:
|
package/tasks/scm.yml
CHANGED
|
@@ -14,6 +14,7 @@ version: '3'
|
|
|
14
14
|
# - scm:issue:close (thin wrapper over `ghx|gh issue close`)
|
|
15
15
|
# - scm:issue:edit (thin wrapper over `ghx|gh issue edit`)
|
|
16
16
|
# - scm:issue:design-critique-chip (#3642 closed catalog remaining-set)
|
|
17
|
+
# - scm:issue:work-claim (#4200 same-issue busy flag)
|
|
17
18
|
# - scm:body:* (#1555 safe Markdown body posting via github-body TS CLI)
|
|
18
19
|
#
|
|
19
20
|
# Each command is a thin pass-through to `ghx <verb>` (when ghx is on PATH)
|
|
@@ -92,7 +93,7 @@ tasks:
|
|
|
92
93
|
ENGINE_CMD: 'scm issue edit {{.CLI_ARGS}}'
|
|
93
94
|
|
|
94
95
|
issue:design-critique-chip:
|
|
95
|
-
desc: "[#3642] Exclusive design-critique catalog chip -- task scm:issue:design-critique-chip -- --issue N --chip triage-ready|mechanism-shaped [--repo OWNER/NAME]"
|
|
96
|
+
desc: "[#3642] Exclusive design-critique catalog chip -- task scm:issue:design-critique-chip -- --issue N --chip triage-ready|mechanism-shaped|recut-needed [--repo OWNER/NAME]"
|
|
96
97
|
dir: '{{.USER_WORKING_DIR}}'
|
|
97
98
|
deps:
|
|
98
99
|
- task: :engine:_ts-build
|
|
@@ -101,6 +102,16 @@ tasks:
|
|
|
101
102
|
vars:
|
|
102
103
|
ENGINE_CMD: 'scm issue design-critique-chip {{.CLI_ARGS}}'
|
|
103
104
|
|
|
105
|
+
issue:work-claim:
|
|
106
|
+
desc: "[#4200] Same-issue busy flag -- task scm:issue:work-claim -- claim|show|release --issue N [--repo OWNER/NAME] [--json]"
|
|
107
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
108
|
+
deps:
|
|
109
|
+
- task: :engine:_ts-build
|
|
110
|
+
cmds:
|
|
111
|
+
- task: :engine:invoke
|
|
112
|
+
vars:
|
|
113
|
+
ENGINE_CMD: 'scm issue work-claim {{.CLI_ARGS}}'
|
|
114
|
+
|
|
104
115
|
body:issue:create:
|
|
105
116
|
desc: "[#1555] Safely create an issue body from --body-file without shell Markdown interpolation"
|
|
106
117
|
dir: '{{.USER_WORKING_DIR}}'
|
package/tasks/scope.yml
CHANGED
|
@@ -5,33 +5,24 @@ vars:
|
|
|
5
5
|
|
|
6
6
|
# scope lifecycle tasks.
|
|
7
7
|
#
|
|
8
|
-
# IMPORTANT: every task sets ``dir: '{{.USER_WORKING_DIR}}'`` so
|
|
9
|
-
#
|
|
10
|
-
# is
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
# still points at ``deft/scripts/scope_lifecycle.py`` after the dir switch.
|
|
14
|
-
# The previous ``{{.TASKFILE_DIR}}/../scripts/`` form broke on Windows
|
|
15
|
-
# under `uv --project "{{.DEFT_ROOT}}" run python` (#566) because mixed-separator traversal
|
|
16
|
-
# normalizes incorrectly and drops the deft/ prefix.
|
|
8
|
+
# IMPORTANT: every task sets ``dir: '{{.USER_WORKING_DIR}}'`` so
|
|
9
|
+
# engine:invoke CWD is the consumer project root, NOT the framework tree.
|
|
10
|
+
# DEFT_ROOT is defined locally in this file's `vars:` block via
|
|
11
|
+
# ``{{joinPath .TASKFILE_DIR ".."}}`` -- see ../Taskfile.yml for why
|
|
12
|
+
# root-level definition is avoided.
|
|
17
13
|
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
# on Windows (pwsh/cmd preserve nested quotes verbatim), and Python's
|
|
22
|
-
# argv receives a literal single-quote-prefixed filename that fails to
|
|
23
|
-
# open (#577). All seven scope:* commands therefore forward
|
|
24
|
-
# ``{{.CLI_ARGS}}`` bare -- matching migrate.yml / prd.yml / issue.yml /
|
|
25
|
-
# reconcile.yml. ``scope_lifecycle.py`` handles both absolute and
|
|
26
|
-
# relative values via ``_resolve_file_path`` + ``resolve_project_root``
|
|
27
|
-
# -- the script owns path resolution, the task just forwards
|
|
28
|
-
# ``--project-root`` so detection never silently falls back to deft's
|
|
29
|
-
# own tree (#535). Relative paths resolve against the consumer root
|
|
30
|
-
# thanks to ``--project-root``; absolute paths are used as-is.
|
|
14
|
+
# Handler: packages/cli/src/scope-lifecycle.ts via engine:invoke
|
|
15
|
+
# (packages/cli/dist). Help registry:
|
|
16
|
+
# packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
31
17
|
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# Taskfile
|
|
18
|
+
# CLI_ARGS: passed raw / unquoted. go-task shell-escapes CLI_ARGS with
|
|
19
|
+
# single quotes on its own, so wrapping the interpolation in
|
|
20
|
+
# Taskfile-level double quotes produces ``"'path'"`` at dispatch time
|
|
21
|
+
# on Windows (#577). All scope:* commands therefore forward
|
|
22
|
+
# ``{{.CLI_ARGS}}`` bare -- matching migrate.yml / prd.yml / issue.yml /
|
|
23
|
+
# reconcile.yml. The TypeScript handler owns path resolution; the task
|
|
24
|
+
# forwards ``--project-root`` so detection never silently falls back to
|
|
25
|
+
# the framework tree (#535).
|
|
35
26
|
|
|
36
27
|
tasks:
|
|
37
28
|
|
package/tasks/triage-actions.yml
CHANGED
|
@@ -20,10 +20,9 @@ version: '3'
|
|
|
20
20
|
# (#74), `task pr:check-protected-issues` (#702), and `task verify:encoding`
|
|
21
21
|
# (#798).
|
|
22
22
|
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
# scripts/cache.py (#883 Story 2 unified cache).
|
|
23
|
+
# Handler: packages/cli/src/triage-actions.ts via engine:invoke (packages/cli/dist).
|
|
24
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
25
|
+
# Audit/cache contracts live in packages/core (candidates log + unified cache).
|
|
27
26
|
|
|
28
27
|
vars:
|
|
29
28
|
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
|
@@ -15,8 +15,8 @@ version: '3'
|
|
|
15
15
|
# tasks/triage-bulk.yml (Story 4 -- bulk ops + freshness)
|
|
16
16
|
# tasks/triage-bootstrap.yml (Story 6 -- this file)
|
|
17
17
|
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
18
|
+
# Handler: packages/cli/src/triage-bootstrap.ts via engine:invoke (packages/cli/dist).
|
|
19
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
20
20
|
#
|
|
21
21
|
# Per `conventions/task-caching.md` (#574): NO `sources:` / `generates:`
|
|
22
22
|
# declarations on this task because user-facing recovery flags
|
package/tasks/triage-bulk.yml
CHANGED
|
@@ -11,13 +11,12 @@ version: '3'
|
|
|
11
11
|
# are hidden from `task -l`.
|
|
12
12
|
#
|
|
13
13
|
# The disable-gate `cmds:` blocks introduced by PR #916 (#915 hot-fix) were
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
# inside triage_bulk.py itself (#915 fix).
|
|
14
|
+
# reversed once bulk ops walked the local cache instead of live `gh issue
|
|
15
|
+
# list`. As of #883 Story 3 the cache walk consumes the unified `cache:get`
|
|
16
|
+
# surface (`.deft-cache/github-issue/<owner>/<repo>/<N>/`); the four
|
|
17
|
+
# `bulk-*` targets invoke packages/cli/src/triage-bulk.ts via engine:invoke.
|
|
18
|
+
# The cache-empty hard-fail (exit 2) and Tier-2 audit-log short-circuit are
|
|
19
|
+
# enforced inside that handler (#915 fix).
|
|
21
20
|
#
|
|
22
21
|
# Per `conventions/task-caching.md` (#574): every target here accepts user
|
|
23
22
|
# flags via `{{.CLI_ARGS}}` (--label, --author, --age-days, --cluster,
|
|
@@ -13,8 +13,8 @@ version: '3'
|
|
|
13
13
|
# `--validate`, `--project-root`) are forwarded via {{.CLI_ARGS}} and
|
|
14
14
|
# go-task's incremental-build cache layer would silently swallow them.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
16
|
+
# Handler: packages/cli/src/triage-classify.ts via engine:invoke (packages/cli/dist).
|
|
17
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
18
18
|
# Current Shape: https://github.com/deftai/directive/issues/1129#issuecomment-4471901622
|
|
19
19
|
|
|
20
20
|
vars:
|
package/tasks/triage-queue.yml
CHANGED
|
@@ -17,8 +17,8 @@ version: '3'
|
|
|
17
17
|
# `--project-root`, `--cache-root`, `--audit-log`) via {{.CLI_ARGS}} and
|
|
18
18
|
# go-task's incremental-build cache layer would silently swallow them.
|
|
19
19
|
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
20
|
+
# Handler: packages/cli/src/triage-queue.ts via engine:invoke (packages/cli/dist).
|
|
21
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
22
22
|
# Current Shape: https://github.com/deftai/directive/issues/1128#issuecomment-4471272093
|
|
23
23
|
|
|
24
24
|
vars:
|
|
@@ -12,8 +12,8 @@ version: '3'
|
|
|
12
12
|
# `--project-root`) are forwarded via {{.CLI_ARGS}} and go-task's
|
|
13
13
|
# incremental-build cache layer would silently swallow them.
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
15
|
+
# Handler: packages/cli/src/triage-reconcile.ts via engine:invoke (packages/cli/dist).
|
|
16
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
17
17
|
# Pattern reference: tasks/triage-bootstrap.yml (#845 Story 6).
|
|
18
18
|
|
|
19
19
|
vars:
|
|
@@ -13,8 +13,8 @@ version: '3'
|
|
|
13
13
|
# {{.CLI_ARGS}} and go-task's incremental-build cache layer would silently
|
|
14
14
|
# swallow them.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
16
|
+
# Handler: packages/cli/src/triage-scope-drift.ts via engine:invoke (packages/cli/dist).
|
|
17
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
18
18
|
|
|
19
19
|
vars:
|
|
20
20
|
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
package/tasks/triage-scope.yml
CHANGED
|
@@ -14,8 +14,8 @@ version: '3'
|
|
|
14
14
|
# via {{.CLI_ARGS}} and go-task's incremental-build cache layer would
|
|
15
15
|
# silently swallow them.
|
|
16
16
|
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
17
|
+
# Handler: packages/cli/src/triage-scope.ts via engine:invoke (packages/cli/dist).
|
|
18
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
19
19
|
# Current Shape: https://github.com/deftai/directive/issues/1131#issuecomment-4471901494
|
|
20
20
|
|
|
21
21
|
vars:
|
|
@@ -13,9 +13,9 @@ version: '3'
|
|
|
13
13
|
# `--cache-only`, `--fixture`) are forwarded via {{.CLI_ARGS}} and
|
|
14
14
|
# go-task's incremental-build cache layer would silently swallow them.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
16
|
+
# Handler: packages/cli/src/triage-smoketest.ts via engine:invoke (packages/cli/dist).
|
|
17
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
18
|
+
# Fixture: tests/fixtures/triage_smoketest/
|
|
19
19
|
# Pattern reference: tasks/triage-summary.yml (D2 / #1122).
|
|
20
20
|
|
|
21
21
|
vars:
|
|
@@ -12,8 +12,8 @@ version: '3'
|
|
|
12
12
|
# declarations -- user-facing flags (`--label`, `--milestone`, `--issue`,
|
|
13
13
|
# `--issue-note`, `--actor`) are forwarded via {{.CLI_ARGS}}.
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
15
|
+
# Handler: packages/cli/src/triage-subscribe.ts via engine:invoke (packages/cli/dist).
|
|
16
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
17
17
|
|
|
18
18
|
vars:
|
|
19
19
|
DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
|
package/tasks/triage-summary.yml
CHANGED
|
@@ -12,8 +12,8 @@ version: '3'
|
|
|
12
12
|
# `--no-history`, `--json`) are forwarded via {{.CLI_ARGS}} and go-task's
|
|
13
13
|
# incremental-build cache layer would silently swallow them.
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
15
|
+
# Handler: packages/cli/src/triage-summary.ts via engine:invoke (packages/cli/dist).
|
|
16
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
17
17
|
# Pattern reference: tasks/triage-scope.yml (D12 / #1131 / merged via #1190).
|
|
18
18
|
|
|
19
19
|
vars:
|
package/tasks/triage-welcome.yml
CHANGED
|
@@ -13,8 +13,8 @@ version: '3'
|
|
|
13
13
|
# `--no-subprocess`) are forwarded via {{.CLI_ARGS}} and go-task's
|
|
14
14
|
# incremental-build cache layer would silently swallow them.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
16
|
+
# Handler: packages/cli/src/triage-welcome.ts via engine:invoke (packages/cli/dist).
|
|
17
|
+
# Help registry: packages/core/src/triage/help/registry-data.ts (edit in place).
|
|
18
18
|
# Pattern reference: tasks/triage-summary.yml (D2 / #1122).
|
|
19
19
|
|
|
20
20
|
vars:
|
package/tasks/verify.yml
CHANGED
|
@@ -107,6 +107,14 @@ tasks:
|
|
|
107
107
|
vars:
|
|
108
108
|
ENGINE_CMD: 'verify-closing-keywords {{.CLI_ARGS}}'
|
|
109
109
|
|
|
110
|
+
docs-impact:
|
|
111
|
+
desc: "Declared-versus-touched documentation-impact check (#4099). --pr uses REST; --body-file for local. Fork PRs stay read-only."
|
|
112
|
+
deps:
|
|
113
|
+
- task: :engine:_ts-build
|
|
114
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
115
|
+
cmds:
|
|
116
|
+
- node "{{.DEFT_ROOT}}/packages/core/dist/docs/docs-impact.js" --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}
|
|
117
|
+
|
|
110
118
|
license-sync:
|
|
111
119
|
desc: "Drift guard for root LICENSE ↔ content/LICENSE.md and published package.json license fields (#2902). Three-state exit (0 clean / 1 drift / 2 config). Framework-source only."
|
|
112
120
|
# Framework-source-only gate: reads THIS repo's LICENSE + package manifests.
|
|
@@ -369,6 +377,27 @@ tasks:
|
|
|
369
377
|
vars:
|
|
370
378
|
ENGINE_CMD: 'codebase-map-fresh --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
371
379
|
|
|
380
|
+
|
|
381
|
+
spec-prd-fresh:
|
|
382
|
+
desc: "Fail-closed SPECIFICATION.md / PRD.md render-freshness gate (#4086). Re-renders to a buffer and fails on banner or projection diff. Banner canon and full projection freshness are separate assertions. Modeled on verify:codebase-map-fresh."
|
|
383
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
384
|
+
deps:
|
|
385
|
+
- task: :engine:_ts-build
|
|
386
|
+
# Per conventions/task-caching.md: no sources/generates because this gate
|
|
387
|
+
# forwards project-root through CLI_ARGS.
|
|
388
|
+
cmds:
|
|
389
|
+
- task: :engine:invoke
|
|
390
|
+
vars:
|
|
391
|
+
ENGINE_CMD: 'verify:spec-prd-fresh --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
392
|
+
|
|
393
|
+
rule-map-fresh:
|
|
394
|
+
desc: "Fail-closed docs/RULE-MAP.md renderer freshness (#4095). Alias for docs:rule-map:check. Asserts byte-identical renderer output, filled grouping purposes, pack entries from named arrays, and Taskfile declaration counts. Not a consumer gate."
|
|
395
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
396
|
+
deps:
|
|
397
|
+
- task: :engine:_ts-build
|
|
398
|
+
cmds:
|
|
399
|
+
- task: :docs:rule-map:check
|
|
400
|
+
|
|
372
401
|
session-ritual:
|
|
373
402
|
desc: "Fail-closed session ritual verifier (#1348). Flags: --tier quick|gated / --json. Set DEFT_SESSION_RITUAL_SKIP=1 for headless workers and CI."
|
|
374
403
|
dir: '{{.USER_WORKING_DIR}}'
|
|
@@ -401,7 +430,7 @@ tasks:
|
|
|
401
430
|
ENGINE_CMD: 'verify:tools {{.CLI_ARGS}}'
|
|
402
431
|
|
|
403
432
|
scm-boundary:
|
|
404
|
-
desc: "Detection-bound gate against raw `gh` / `ghx` subprocess calls
|
|
433
|
+
desc: "Detection-bound gate against raw `gh` / `ghx` subprocess calls (#1145 / N5). TypeScript verbs route through packages/core/src/scm/call.ts. The scanner still globs retired scripts/triage_*.py paths (vacuous; owner packages/core/src/verify-source/scm-boundary.ts SCOPE_GLOBS). Three-state exit (0 clean / 1 violations / 2 config error). Document an exception via `--allow-list <path>`."
|
|
405
434
|
dir: '{{.USER_WORKING_DIR}}'
|
|
406
435
|
deps:
|
|
407
436
|
- task: :engine:_ts-build
|
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
- `vbrief/pending/YYYY-MM-DD-slug.vbrief.json`
|
|
14
14
|
-->
|
|
15
15
|
|
|
16
|
+
## Documentation impact
|
|
17
|
+
|
|
18
|
+
<!-- Closed enum. Rationale is quoted data and is never a gate input.
|
|
19
|
+
change_class: add | change | withdraw | none
|
|
20
|
+
surfaces: none OR comma-separated command:<id> | skill-trigger:<id> | help:<id> | docs-site:<page>
|
|
21
|
+
`no user-doc impact` is refused when a registered command, skill, help key,
|
|
22
|
+
or public docs-site page is added or removed. Same-PR rule: coding/docs.md (#447). -->
|
|
23
|
+
|
|
24
|
+
change_class: none
|
|
25
|
+
surfaces: none
|
|
26
|
+
rationale: "Replace this quoted sentence with the actual documentation-impact rationale."
|
|
27
|
+
|
|
16
28
|
## Checklist
|
|
17
29
|
|
|
18
30
|
- [ ] `task check` passes locally (validate + lint + test; see `coding/testing.md`)
|