@deftai/directive-content 0.62.0 → 0.64.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.
@@ -193,13 +193,13 @@ Both commands extract the "Comments Outside Diff" section with surrounding conte
193
193
 
194
194
 
195
195
 
196
- ! Select the monitoring approach based on runtime capability detection (the matrix in `skills/deft-directive-swarm/SKILL.md` Phase 3 Step 1, extended per #1342 slices 1-2 for `spawn_subagent` / "grok-build" as a first-class tier). Probe the environment (tool set + env vars) to obtain the stable platform descriptor (`grok-build`, `warp-orchestrated`, `warp-interactive`, etc.) from the launch adapter / `get_platform_capabilities` and map the descriptor to the appropriate tier + dispatch primitive (start_agent or spawn_subagent). The descriptor (not hard-coded tool presence) is the single source of truth for both launch and review monitoring.
196
+ ! Select the monitoring approach based on runtime capability detection (the matrix in `skills/deft-directive-swarm/SKILL.md` Phase 3 Step 1, extended per #1342 slices 1-2 for `spawn_subagent` / "grok-build" and per #1877 for Cursor as first-class Tier-1 tiers). Probe the environment (tool set + env vars) to obtain the stable platform descriptor (`grok-build`, `warp-orchestrated`, `warp-manual`, `cursor-composer`, `cursor-cloud-agent`, etc.) from the launch adapter / `get_platform_capabilities` and map the descriptor to the appropriate tier + dispatch primitive (`start_agent`, `spawn_subagent`, or the Cursor `Task` tool). The descriptor (not hard-coded tool presence) is the single source of truth for both launch and review monitoring.
197
197
 
198
- - **Tier 1 (orchestrated sub-agent)** → Approach 1 (spawn review-monitor sub-agent via the primitive matching the descriptor: `start_agent` or `spawn_subagent`)
198
+ - **Tier 1 (orchestrated sub-agent)** → Approach 1 (spawn review-monitor sub-agent via the primitive matching the descriptor: `start_agent`, `spawn_subagent`, or the Cursor `Task` tool with `run_in_background: true`)
199
199
  - **Tier 2 (no sub-agent primitive, but scheduler/timer/auto-reinvocation)** → Approach 2 (yield-between-polls)
200
200
  - **Tier 3 (interactive session, nothing else)** → Approach 3 (blocking sleep loop as last resort)
201
201
 
202
- ! Detection: use the full runtime capability matrix (swarm Phase 3 + launch adapter from #1342 slice 2). The old single-probe for `start_agent` is superseded; the returned platform descriptor determines both the orchestration path and the MCP surface (see MCP probe below). If the descriptor is `grok-build` (spawn_subagent present, start_agent + WARP_* absent), treat as Tier 1 with the spawn_subagent poller path.
202
+ ! Detection: use the full runtime capability matrix (swarm Phase 3 + launch adapter from #1342 slice 2). The old single-probe for `start_agent` is superseded; the returned platform descriptor determines both the orchestration path and the MCP surface (see MCP probe below). If the descriptor is `grok-build` (spawn_subagent present, start_agent + WARP_* absent), treat as Tier 1 with the spawn_subagent poller path. If the descriptor is `cursor-composer` / `cursor-cloud-agent` (Cursor `Task` tool present, start_agent + WARP_* + spawn_subagent absent), treat as **Tier 1 with the backgrounded Cursor `Task` poller path** (#1877) — NOT Tier 3. Cursor's `Task` tool is a first-class sub-agent primitive; degrading a Cursor session to the Approach-3 blocking poll is the misclassification #1877 closes.
203
203
 
204
204
  ! Swarm agents (whether launched via `start_agent` or `spawn_subagent` per the platform descriptor) SHOULD prefer Approach 1 for their own review-monitor sub-agent. Approach 2's yield-between-polls is not self-sustaining for swarm agents (see warning below). Always include the canonical `templates/agent-prompt-preamble.md` (AGENTS.md read mandate, #810 vBRIEF gate, #798 PowerShell UTF-8, pre-PR + review-cycle mandates) when spawning a poller sub-agent.
205
205
 
@@ -207,10 +207,12 @@ Both commands extract the "Comments Outside Diff" section with surrounding conte
207
207
 
208
208
  ! **Background dispatch (#1880):** Spawn the review-monitor sub-agent via the matching primitive IN THE BACKGROUND (Cursor: Task `run_in_background: true`; Grok Build: `spawn_subagent` with parent yielding). The parent MUST remain interactive while the poller runs.
209
209
 
210
+ ! **Heartbeat contract for Cursor pollers (#1877 / #1166):** A Cursor `Task` review-monitor poller whose loop runs > ~3 min MUST honour the sub-agent heartbeat contract (`docs/subagent-heartbeat.md`), same as the `spawn_subagent` path — emit periodic progress so the parent can distinguish a live poller from a hung one.
211
+
210
212
  ! When the platform descriptor indicates Tier 1 (sub-agent support), spawn a review-monitor sub-agent using the primitive matching the descriptor:
211
213
 
212
- 1. ! Launch via the matching primitive: `start_agent` (Warp) **or** `spawn_subagent` (grok-build / TUI / non-Warp) with a prompt that instructs it to poll for Greptile completion. For `spawn_subagent` the prompt MUST reference the canonical poller template `templates/swarm-greptile-poller-prompt.md` (with placeholders filled) plus the agent preamble; the working directory / context must be the PR branch (worktree or equivalent for hybrid).
213
- 2. ! The sub-agent polls using the mechanism for its primitive: for `spawn_subagent` use `get_command_or_subagent_output` (adaptive cadence: ~20-30s first check after push, ~60s second, ~90s thereafter; Greptile typically lands in 3-7 min); for `start_agent` the native messaging path. Front-load the first check to catch fast reviews.
214
+ 1. ! Launch via the matching primitive: `start_agent` (Warp), `spawn_subagent` (grok-build / TUI / non-Warp), **or the Cursor `Task` tool with `run_in_background: true` (`cursor-composer` / `cursor-cloud-agent`, #1877)** with a prompt that instructs it to poll for Greptile completion. For `spawn_subagent` and the Cursor `Task` tool the prompt MUST reference the canonical poller template `templates/swarm-greptile-poller-prompt.md` (with placeholders filled) plus the agent preamble; the working directory / context must be the PR branch (worktree or equivalent for hybrid).
215
+ 2. ! The sub-agent polls using the mechanism for its primitive: for `spawn_subagent` use `get_command_or_subagent_output` (adaptive cadence: ~20-30s first check after push, ~60s second, ~90s thereafter; Greptile typically lands in 3-7 min); for `start_agent` the native messaging path; for the Cursor `Task` tool the backgrounded-task completion-notification path. Front-load the first check to catch fast reviews.
214
216
  3. ! When the exit condition is met (Greptile review current on the HEAD commit SHA, confidence > 3, no P0/P1 remaining), the sub-agent reports completion back to the parent (via `send_message_to_agent` or the spawn_subagent result channel).
215
217
  4. ! The main conversation pane stays fully interactive during monitoring -- the user (or parent monitor) can continue other work.
216
218
  5. ! On receiving the completion message / result, the parent re-fetches findings (both gh pr view --comments and the secondary source) and proceeds to Step 5.
@@ -341,14 +341,16 @@ git worktree add <path> -b <branch-name> <configured-base-branch>
341
341
 
342
342
  1. ! **Probe for `start_agent` tool** — check the available tool set for `start_agent` (or equivalent agent-orchestration tool). Its presence indicates a Warp environment with native orchestration support.
343
343
  2. ! **Probe for Warp environment** — if `start_agent` is not available, check for `WARP_*` environment variables (e.g. `WARP_TERMINAL_SESSION`, `WARP_IS_WARP_TERMINAL`). Their presence indicates Warp without orchestration.
344
- 3. ! **Probe for `spawn_subagent` tool** — when neither `start_agent` nor `WARP_*` is present, check for `spawn_subagent` (Grok Build / non-Warp TUI launch adapter, #1342 slice 2). Its presence indicates the grok-build platform.
345
- 4. ! **Select launch path automatically** based on detection results do NOT present static options:
344
+ 3. ! **Probe for the Cursor `Task` tool** — when neither `start_agent` nor `WARP_*` is present, check the tool set for the Cursor `Task` sub-agent tool (dispatchable in the background via `run_in_background: true`). Its presence indicates a Cursor environment with a **first-class Tier-1 sub-agent primitive** (#1877). Classify as `cursor-composer` for an interactive Composer session and `cursor-cloud-agent` for a Cursor cloud agent. Cursor is **Tier 1 → Approach 1** — do NOT let it fall through to `generic-terminal` / the Approach-3 blocking poll.
345
+ 4. ! **Probe for `spawn_subagent` tool** when none of `start_agent`, `WARP_*`, or the Cursor `Task` tool is present, check for `spawn_subagent` (Grok Build / non-Warp TUI launch adapter, #1342 slice 2). Its presence indicates the grok-build platform.
346
+ 5. ! **Select launch path automatically** based on detection results — do NOT present static options:
346
347
  - **`start_agent` available** → Orchestrated launch (Step 2a) — preferred path, fully automated, no manual tab management
347
348
  - **`start_agent` unavailable, Warp detected** → Interactive Warp tabs (Step 2b) — full MCP, global rules, warm index; requires manual tab management
348
- - **`grok-build` (`spawn_subagent` available, no `start_agent`, no `WARP_*`)** → Grok Build launch (Step 2d) — first-class non-Warp path
349
+ - **Cursor `Task` tool available (no `start_agent`, no `WARP_*`)** → Cursor sub-agent launch (Step 2e) via the `Task` tool with `run_in_background: true` (Tier 1 / Approach 1) keeps the monitor pane interactive; descriptor is `cursor-composer` (interactive) or `cursor-cloud-agent` (cloud)
350
+ - **`grok-build` (`spawn_subagent` available, no `start_agent`, no `WARP_*`, no Cursor `Task` tool)** → Grok Build launch (Step 2d) — first-class non-Warp path
349
351
  - **No orchestration primitive detected** → `generic-terminal` degraded launch. Offer a **Serial self-execution downgrade** first: with explicit operator consent, the monitor may execute the prepared worker prompts itself one story at a time from the isolated worktrees. This preserves forward progress but is not true concurrent swarm execution.
350
- 5. ! **Return a stable platform descriptor** for downstream phases — one of `warp-orchestrated` (start_agent available), `warp-manual` (Warp without start_agent), `grok-build` (spawn_subagent available, non-Warp), or `generic-terminal` (no orchestration primitives). The detection matrix MUST include explicit absence checks for `start_agent` and `WARP_*` so the four descriptors are unambiguous. Phase 4 monitoring and Phase 6 sub-agent dispatch read this stable platform descriptor as a single source of truth instead of re-running detection per call.
351
- 6. ? **Cloud escape hatch** — use `oz agent run-cloud` (Step 2c) ONLY if the user explicitly requests cloud execution. Never default to cloud.
352
+ 6. ! **Return a stable platform descriptor** for downstream phases — one of `warp-orchestrated` (start_agent available), `warp-manual` (Warp without start_agent), `cursor-composer` (Cursor `Task` tool, interactive Composer), `cursor-cloud-agent` (Cursor `Task` tool, cloud agent), `grok-build` (spawn_subagent available, non-Warp, non-Cursor), or `generic-terminal` (no orchestration primitives). The detection matrix MUST include explicit absence checks for `start_agent`, `WARP_*`, and the Cursor `Task` tool so the six descriptors are unambiguous. Phase 4 monitoring and Phase 6 sub-agent dispatch read this stable platform descriptor as a single source of truth instead of re-running detection per call.
353
+ 7. ? **Cloud escape hatch** — use `oz agent run-cloud` (Step 2c) ONLY if the user explicitly requests cloud execution. Never default to cloud. (The Cursor `cursor-cloud-agent` descriptor above is distinct — it is a Cursor-native cloud agent detected via the `Task` tool, not the `oz` escape hatch.)
352
354
 
353
355
  ! In `generic-terminal` mode, if the operator declines serial self-execution, the manual terminal prompt-paste fallback remains available: the user can paste each generated prompt into any terminal or agent interface with access to the matching worktree. Surface the tradeoff clearly: manual paste preserves user control but requires tab/process management and is still not automated orchestration.
354
356
 
@@ -494,6 +496,17 @@ Agents execute on remote VMs without local MCP servers, codebase indexing, or Wa
494
496
 
495
497
  ~ 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.
496
498
 
499
+ ### Step 2e: Cursor Launch (Task tool available) — #1877
500
+
501
+ ! When the platform descriptor is `cursor-composer` or `cursor-cloud-agent` (Cursor `Task` tool detected, no `start_agent`, no `WARP_*`, no `spawn_subagent`), dispatch each worker via the Cursor `Task` tool with:
502
+ 1. The canonical `templates/agent-prompt-preamble.md` content as the preamble (AGENTS.md read mandate, #810 vBRIEF gate, #798 PowerShell UTF-8, pre-PR + review-cycle mandates).
503
+ 2. The standard worktree prompt (STEP 1-6 from the Prompt Template below).
504
+ 3. The worktree path set to the agent's isolated git worktree.
505
+ 4. ! **`run_in_background: true`** for any worker or poller whose loop runs longer than a short task (~3 min) — implementation, fix, and review-cycle workers — so the monitor conversation pane stays interactive (#1880 Gap D). The parent is notified on completion.
506
+ 5. ! **Deliberate model routing (#1739):** pass the route's `resolved_model` (when non-null) as the Task tool's `model` argument — stamping the C2 manifest is prep; the recorded model MUST reach the actual spawn call.
507
+
508
+ ~ This is the first-class Cursor path. It is **Tier 1 → Approach 1** (a backgroundable sub-agent primitive), equivalent in tier to `start_agent` / `spawn_subagent`; it MUST NOT be downgraded to a `generic-terminal` blocking poll. Cursor pollers whose loop runs > ~3 min MUST honour the sub-agent heartbeat contract (`docs/subagent-heartbeat.md`, #1166), same as the `spawn_subagent` path.
509
+
497
510
  ## Phase 4 — Monitor
498
511
 
499
512
  ### Polling Cadence
package/tasks/core.yml CHANGED
@@ -1,136 +1,22 @@
1
1
  version: '3'
2
2
 
3
- # Maintainer-only Python self-test lane (#1813 contributor path / #2022 Phase 2).
4
- #
5
- # pytest, ruff, black, and mypy run here via `uv run` for framework-source-repo
6
- # pre-commit checks. This fragment is included from the root Taskfile with
7
- # `internal: true` so `core:*` tasks are NOT listed or callable from the CLI on
8
- # consumer installs — only `task check:framework-source` wires them as deps.
9
- #
10
- # Consumer `task check` dispatches to `check:consumer` (TS / deft verbs only).
11
- # Do NOT add these tasks to the consumer check aggregate.
3
+ # Maintainer-only packaging lane (#1860). Build/clean dispatch the native
4
+ # TypeScript build-dist helper; Python/uv paths removed.
12
5
 
13
6
  vars:
14
7
  DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
15
8
 
16
9
  tasks:
17
- validate:
18
- desc: Validate all markdown files
19
- env:
20
- PYTHONUTF8: "1"
21
- cmds:
22
- - cmd: >-
23
- uv --project "{{.DEFT_ROOT}}" run python -c "from pathlib import Path;
24
- files=[f for f in sorted(Path('.').rglob('*.md')) if '.git' not in f.parts and 'backup' not in f.parts];
25
- [print(f'\u2713 {f}') for f in files];
26
- print(f'\u2713 All {len(files)} markdown files validated')"
27
-
28
- test:
29
- desc: Run test suite
30
- cmds:
31
- # #1474: tolerate a missing tests/ directory. The installer (#1482)
32
- # prunes the vendored .deft/core/tests/ from the consumer deposit, so in
33
- # a vendored consumer `task deft:check` -> framework check -> core:test
34
- # would otherwise run `pytest tests/` against a now-absent directory and
35
- # exit with a path error instead of 0 (blocking #1474 acceptance a1).
36
- # A cross-platform pathlib guard (no bare shell conditional, per the
37
- # AGENTS.md Windows rules) skips the run with a clear notice when tests/
38
- # is absent; the framework's own repo (tests/ present) still runs the
39
- # full suite unchanged. The check targets the same CWD-relative `tests`
40
- # path pytest would run against, so it is correct regardless of CWD.
41
- - cmd: >-
42
- uv --project "{{.DEFT_ROOT}}" run python -c "import sys, subprocess;
43
- from pathlib import Path;
44
- _exists = Path('tests').exists();
45
- print('no tests/ (vendored consumer) -- skipping') if not _exists else None;
46
- sys.exit(subprocess.run([sys.executable, '-m', 'pytest', 'tests']).returncode if _exists else 0)"
47
-
48
- test:coverage:
49
- desc: Run tests with coverage (fails if < 85%)
50
- cmds:
51
- - uv --project "{{.DEFT_ROOT}}" run pytest tests/ --cov --cov-report=html
52
-
53
- fmt:
54
- desc: Format Python code
55
- cmds:
56
- - uv --project "{{.DEFT_ROOT}}" run ruff format .
57
- - uv --project "{{.DEFT_ROOT}}" run black .
58
-
59
- lint:
60
- desc: Lint and type-check Python code
61
- cmds:
62
- - uv --project "{{.DEFT_ROOT}}" run ruff check .
63
- # #1475: bring the local type-check gate to parity with CI. The CI
64
- # Python job (.github/workflows/ci.yml) runs `mypy tests/`, but this
65
- # local gate previously checked only run.py -- so a type error under
66
- # tests/ shipped green locally (task check -> core:lint) and reddened
67
- # master after merge. The tests/ tree is now part of the gate; run.py
68
- # is retained for its pre-existing local-only coverage. Both surfaces
69
- # share the [tool.mypy] config in pyproject.toml, including the
70
- # tests.* override that relaxes disallow_untyped_defs while still
71
- # failing on real type mismatches under tests/.
72
- #
73
- # #1474: the same vendored-consumer guard core:test uses. The installer
74
- # (#1482) prunes the vendored .deft/core/tests/, and `task deft:check`
75
- # runs core:lint too, so an unconditional `mypy run.py tests/` would
76
- # fail on the now-absent tests/ path. The cross-platform pathlib guard
77
- # (no bare shell conditional, per the AGENTS.md Windows rules) appends
78
- # tests/ to the mypy target list only when it exists; run.py (always in
79
- # the payload) stays checked either way.
80
- - cmd: >-
81
- uv --project "{{.DEFT_ROOT}}" run python -c "import sys, subprocess;
82
- from pathlib import Path;
83
- targets = ['run.py'] + (['tests'] if Path('tests').exists() else []);
84
- sys.exit(subprocess.run([sys.executable, '-m', 'mypy', *targets]).returncode)"
85
-
86
-
87
10
  build:
88
- desc: Package framework for distribution (cross-platform via Python helper, #736)
89
- env:
90
- PYTHONUTF8: "1"
11
+ desc: Package framework for distribution (cross-platform via TypeScript build-dist, #736 / #1860)
12
+ deps:
13
+ - task: :ts:build
91
14
  cmds:
92
- # Single cross-platform dispatch (#736). The Python helper uses
93
- # stdlib tarfile / zipfile with a canonical exclude list and
94
- # auto-selects tar.gz on Linux/macOS, zip on Windows. The previous
95
- # platform-split shape had the Windows branch missing the exclude
96
- # list, ingesting .git history and the prior dist/ artifact.
97
- # Regression-guarded by tests/content/test_taskfile_zip_parity.py.
98
- - uv --project "{{.DEFT_ROOT}}" run python "{{.DEFT_ROOT}}/scripts/build_dist.py" --version "{{.VERSION}}"
15
+ - node "{{.DEFT_ROOT}}/packages/core/dist/release/build-dist-runner.js" "{{.VERSION}}" "{{.DEFT_ROOT}}"
99
16
 
100
17
  clean:
101
- desc: Clean generated artifacts (cross-platform via Python helper, #736)
102
- env:
103
- PYTHONUTF8: "1"
104
- cmds:
105
- # Single cross-platform dispatch (#736) -- mirrors the build target's
106
- # simplification. Python's pathlib + shutil.rmtree handles the dist/
107
- # directory removal identically on POSIX and Windows, replacing the
108
- # prior rm -rf / Remove-Item duplication.
109
- #
110
- # The dist/ path is anchored at {{.DEFT_ROOT}} so `task clean` works
111
- # the same way regardless of the operator's current working directory.
112
- # The previous shape relied on `pathlib.Path('dist')` resolving against
113
- # the inherited CWD, which silently no-ops when the operator runs
114
- # `task -t tasks/core.yml clean` from a subdirectory (Greptile P2 on
115
- # PR #773).
116
- - cmd: >-
117
- uv --project "{{.DEFT_ROOT}}" run python -c "import shutil, pathlib;
118
- d = pathlib.Path(r'{{.DEFT_ROOT}}') / 'dist';
119
- shutil.rmtree(d) if d.exists() else None;
120
- print(f'Cleaned {d}')"
121
-
122
- stats:
123
- desc: Show framework statistics
18
+ desc: Clean generated dist/ artifacts (cross-platform, #736 / #1860)
124
19
  cmds:
125
20
  - cmd: >-
126
- uv --project "{{.DEFT_ROOT}}" run python -c "from pathlib import Path;
127
- v='{{.VERSION}}';
128
- sep='='*42;
129
- dirs=[('Core files','core'),('Languages','languages'),('Interfaces','interfaces'),('Tools','tools'),('Templates','templates')];
130
- counts=[(n,len(list(Path(d).glob('*.md')))) for n,d in dirs];
131
- total=len([f for f in Path('.').rglob('*.md') if '.git' not in str(f) and 'backup' not in str(f)]);
132
- print(f'Deft Framework v{v} Statistics:');
133
- print(sep);
134
- [print(f'{n}: {c}') for n,c in counts];
135
- print(f'Total files: {total}');
136
- print(sep)"
21
+ node -e "const fs=require('node:fs');const path=require('node:path');const d=path.join(process.argv[1],'dist');if(fs.existsSync(d))fs.rmSync(d,{recursive:true,force:true});console.log('Cleaned '+d);"
22
+ "{{.DEFT_ROOT}}"
package/tasks/ts.yml CHANGED
@@ -1,19 +1,6 @@
1
1
  version: '3'
2
2
 
3
- # TypeScript engine monorepo verbs (#1717). The TS engine lives at the repo
4
- # root (packages/*) and coexists with the Python/Go engine during the
5
- # strangler-fig migration.
6
- #
7
- # `check:framework-source` now runs the TS lane via the `ts:check-lane`
8
- # Node-toolchain-aware guard (#1790): when `pnpm` is on PATH it runs
9
- # lint+build+test, and when it is absent it skips with a notice and exits 0
10
- # (so the gate still works in Node-less environments, mirroring the #1474
11
- # vendored-consumer guards). This closed the PR #1780 gap where a TS biome
12
- # failure passed a local `task check` but reddened CI. The dedicated `ts` CI
13
- # job still runs the lane unconditionally.
14
- #
15
- # DEFT_ROOT resolves to the repo root (this fragment lives in tasks/, so
16
- # {{.TASKFILE_DIR}}/.. is the root), matching the sibling task fragments.
3
+ # TypeScript engine monorepo verbs (#1717). Parity oracle tasks removed (#1860).
17
4
 
18
5
  vars:
19
6
  DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
@@ -38,7 +25,7 @@ tasks:
38
25
  - pnpm run lint
39
26
 
40
27
  check-lane:
41
- desc: "Run the TS lane (lint+build+test) when a Node toolchain is present; skip with a notice otherwise (#1530 local-gate<->CI parity, #1790)."
28
+ desc: "Run the TS lane (lint+build+test) when a Node toolchain is present; skip with a notice otherwise (#1530, #1790)."
42
29
  dir: '{{.DEFT_ROOT}}'
43
30
  cmds:
44
31
  - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" ts-check-lane --project-root "{{.DEFT_ROOT}}"
@@ -48,281 +35,3 @@ tasks:
48
35
  deps: [build]
49
36
  cmds:
50
37
  - node "{{.DEFT_ROOT}}/packages/cli/dist/verify-encoding.js" --all --project-root "{{.DEFT_ROOT}}"
51
-
52
- parity:
53
- desc: "Golden-diff the ported verify:encoding gate vs the Python oracle, cache-off (#1718)"
54
- deps: [build]
55
- cmds:
56
- - node "{{.DEFT_ROOT}}/packages/cli/dist/parity.js"
57
-
58
- policy-parity:
59
- desc: "Golden-diff the ported policy surface vs the Python oracle, cache-off (#1722)"
60
- deps: [build]
61
- cmds:
62
- - node "{{.DEFT_ROOT}}/packages/cli/dist/policy-parity.js"
63
-
64
- preflight-parity:
65
- desc: "Golden-diff the ported vBRIEF preflight gate vs the Python oracle, cache-off (#1721)"
66
- deps: [build]
67
- cmds:
68
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-preflight-parity.js"
69
-
70
- story-ready-parity:
71
- desc: "Golden-diff the ported verify:story-ready gate vs the Python oracle, cache-off (#1720)"
72
- deps: [build]
73
- cmds:
74
- - node "{{.DEFT_ROOT}}/packages/cli/dist/story-ready-parity.js"
75
-
76
- branch-parity:
77
- desc: "Golden-diff the ported verify:branch gate vs the Python oracle, cache-off (#1719)"
78
- deps: [build]
79
- cmds:
80
- - node "{{.DEFT_ROOT}}/packages/cli/dist/branch-parity.js"
81
-
82
- wip-cap-parity:
83
- desc: "Golden-diff the ported verify:wip-cap gate vs the Python oracle, cache-off (#1723)"
84
- deps: [build]
85
- cmds:
86
- - node "{{.DEFT_ROOT}}/packages/cli/dist/wip-cap-parity.js"
87
-
88
- scm-parity:
89
- desc: "Golden-diff the ported scm.py SCM boundary vs the Python oracle, cache-off (#1724)"
90
- deps: [build]
91
- cmds:
92
- - node "{{.DEFT_ROOT}}/packages/cli/dist/scm-parity.js"
93
-
94
- triage-parity:
95
- desc: "Golden-diff every ported triage verb vs its Python oracle, cache-off (#1530 Wave 3, #1725)"
96
- deps: [build]
97
- cmds:
98
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-queue-parity.js"
99
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-summary-parity.js"
100
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-classify-parity.js"
101
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-actions-parity.js"
102
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-bootstrap-parity.js"
103
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-scope-parity.js"
104
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-aux-a-parity.js"
105
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-aux-b-parity.js"
106
-
107
- scope-lifecycle-parity:
108
- desc: "Golden-diff the ported scope:* lifecycle family vs the Python oracle, cache-off (#1726)"
109
- deps: [build]
110
- cmds:
111
- - node "{{.DEFT_ROOT}}/packages/cli/dist/scope-lifecycle-parity.js"
112
-
113
- slice-parity:
114
- desc: "Golden-diff the ported slice:* family vs the Python oracle, cache-off (#1727)"
115
- deps: [build]
116
- cmds:
117
- - node "{{.DEFT_ROOT}}/packages/cli/dist/slice-parity.js"
118
-
119
- cache-parity:
120
- desc: "Golden-diff the ported unified content cache vs the Python oracle, cache-off (#1728)"
121
- deps: [build]
122
- cmds:
123
- - node "{{.DEFT_ROOT}}/packages/cli/dist/cache-parity.js"
124
-
125
- doctor-parity:
126
- desc: "Golden-diff the ported deft doctor vs the Python oracle, cache-off (#1728)"
127
- deps: [build]
128
- cmds:
129
- - node "{{.DEFT_ROOT}}/packages/cli/dist/doctor-parity.js"
130
-
131
- release-parity:
132
- desc: "Golden-diff the ported release.py core vs the Python oracle, cache-off (#1729)"
133
- deps: [build]
134
- cmds:
135
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-parity.js"
136
-
137
- release-publish-parity:
138
- desc: "Golden-diff the ported release_publish.py vs the Python oracle, cache-off (#1729)"
139
- deps: [build]
140
- cmds:
141
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-publish-parity.js"
142
-
143
- release-rollback-parity:
144
- desc: "Golden-diff the ported release_rollback.py vs the Python oracle, cache-off (#1729)"
145
- deps: [build]
146
- cmds:
147
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-rollback-parity.js"
148
-
149
- release-e2e-parity:
150
- desc: "Golden-diff the ported release_e2e.py vs the Python oracle, cache-off (#1729)"
151
- deps: [build]
152
- cmds:
153
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-e2e-parity.js"
154
-
155
- pr-merge-readiness-parity:
156
- desc: "Golden-diff the ported pr_merge_readiness.py vs the Python oracle, cache-off (#1730)"
157
- deps: [build]
158
- cmds:
159
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-merge-readiness-parity.js"
160
-
161
- pr-protected-issues-parity:
162
- desc: "Golden-diff the ported pr_check_protected_issues.py vs the Python oracle, cache-off (#1730)"
163
- deps: [build]
164
- cmds:
165
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-protected-issues-parity.js"
166
-
167
- pr-closing-keywords-parity:
168
- desc: "Golden-diff the ported pr_check_closing_keywords.py vs the Python oracle, cache-off (#1730)"
169
- deps: [build]
170
- cmds:
171
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-closing-keywords-parity.js"
172
-
173
- pr-monitor-parity:
174
- desc: "Golden-diff the ported monitor_pr.py vs the Python oracle, cache-off (#1730)"
175
- deps: [build]
176
- cmds:
177
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-monitor-parity.js"
178
-
179
- pr-wait-mergeable-parity:
180
- desc: "Golden-diff the ported pr_wait_mergeable.py cascade composer vs the Python oracle, cache-off (#1730)"
181
- deps: [build]
182
- cmds:
183
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-wait-mergeable-parity.js"
184
-
185
- vbrief-build-parity:
186
- desc: "Golden-diff the ported vBRIEF construction foundation vs the Python oracle, cache-off (#1782 s1)"
187
- deps: [build]
188
- cmds:
189
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-build-parity.js"
190
-
191
- vbrief-reconcile-parity:
192
- desc: "Golden-diff the ported vBRIEF reconciliation engine vs the Python oracle, cache-off (#1782 s4)"
193
- deps: [build]
194
- cmds:
195
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-reconcile-parity.js"
196
-
197
- vbrief-validation-parity:
198
- desc: "Golden-diff the ported vBRIEF validation primitives vs the Python oracle, cache-off (#1782 s2)"
199
- deps: [build]
200
- cmds:
201
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-validation-parity.js"
202
-
203
- vbrief-validate-parity:
204
- desc: "Golden-diff the ported vbrief:validate + verify:vbrief-conformance gates vs the Python oracle, cache-off (#1782 s3)"
205
- deps: [build]
206
- cmds:
207
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-validate-parity.js"
208
-
209
- vbrief-activate-parity:
210
- desc: "Golden-diff the ported vbrief_activate.py lifecycle verb vs the Python oracle, cache-off (#1782 s5)"
211
- deps: [build]
212
- cmds:
213
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-activate-parity.js"
214
-
215
- verify-env-parity:
216
- desc: "Golden-diff the ported verify_tools / verify_hooks_installed / toolchain-check / verify_no_task_runtime gates vs the Python oracle, cache-off (#1783 s1)"
217
- deps: [build]
218
- cmds:
219
- - node "{{.DEFT_ROOT}}/packages/cli/dist/verify-env-parity.js"
220
-
221
- verify-source-parity:
222
- desc: "Golden-diff the ported source-tree scanner gates vs the Python oracle, cache-off (#1783 s2)"
223
- deps: [build]
224
- cmds:
225
- - node "{{.DEFT_ROOT}}/packages/cli/dist/verify-source-parity.js"
226
-
227
- validate-content-parity:
228
- desc: "Golden-diff the ported content validator gates vs the Python oracle, cache-off (#1783 s3)"
229
- deps: [build]
230
- cmds:
231
- - node "{{.DEFT_ROOT}}/packages/cli/dist/validate-content-parity.js"
232
-
233
- render-parity:
234
- desc: "Golden-diff the ported spec/PRD/render family vs the Python oracle, cache-off (#1785)"
235
- deps: [build]
236
- cmds:
237
- - node "{{.DEFT_ROOT}}/packages/cli/dist/render-parity.js"
238
-
239
- codebase-parity:
240
- desc: "Golden-diff the ported codebase mapping + capacity modules vs the Python oracle, cache-off (#1786)"
241
- deps: [build]
242
- cmds:
243
- - node "{{.DEFT_ROOT}}/packages/cli/dist/codebase-parity.js"
244
-
245
- intake-parity:
246
- desc: "Golden-diff the ported issue intake + reconcile surface vs the Python oracle, cache-off (#1784)"
247
- deps: [build]
248
- cmds:
249
- - node "{{.DEFT_ROOT}}/packages/cli/dist/intake-parity.js"
250
-
251
- lifecycle-packs-parity:
252
- desc: "Golden-diff the ported lifecycle hygiene + events + packs surface vs the Python oracle, cache-off (#1787 s2)"
253
- deps: [build]
254
- cmds:
255
- - node "{{.DEFT_ROOT}}/packages/cli/dist/lifecycle-packs-parity.js"
256
-
257
- session-parity:
258
- desc: "Golden-diff the ported session/ritual core vs the Python oracle, cache-off (#1787 s1)"
259
- deps: [build]
260
- cmds:
261
- - node "{{.DEFT_ROOT}}/packages/cli/dist/session-parity.js"
262
-
263
- orchestration-parity:
264
- desc: "Golden-diff the ported monitor/investigation gate verbs vs the Python oracle, cache-off (#1788 s2)"
265
- deps: [build]
266
- cmds:
267
- - node "{{.DEFT_ROOT}}/packages/cli/dist/orchestration-parity.js"
268
-
269
- swarm-parity:
270
- desc: "Golden-diff the ported swarm cohort verbs vs the Python oracle, cache-off (#1788 s1)"
271
- deps: [build]
272
- cmds:
273
- - node "{{.DEFT_ROOT}}/packages/cli/dist/swarm-parity.js"
274
-
275
- platform-parity:
276
- desc: "Golden-diff the ported AGENTS.md/version/platform utilities vs the Python oracle, cache-off (#1787 s3)"
277
- deps: [build]
278
- cmds:
279
- - node "{{.DEFT_ROOT}}/packages/cli/dist/platform-parity.js"
280
-
281
- parity-all:
282
- desc: "Run every TS-port golden-diff parity harness vs the Python oracle (#1530 Wave 2)"
283
- deps: [build]
284
- cmds:
285
- - node "{{.DEFT_ROOT}}/packages/cli/dist/parity.js"
286
- - node "{{.DEFT_ROOT}}/packages/cli/dist/policy-parity.js"
287
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-preflight-parity.js"
288
- - node "{{.DEFT_ROOT}}/packages/cli/dist/story-ready-parity.js"
289
- - node "{{.DEFT_ROOT}}/packages/cli/dist/branch-parity.js"
290
- - node "{{.DEFT_ROOT}}/packages/cli/dist/wip-cap-parity.js"
291
- - node "{{.DEFT_ROOT}}/packages/cli/dist/scm-parity.js"
292
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-queue-parity.js"
293
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-summary-parity.js"
294
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-classify-parity.js"
295
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-actions-parity.js"
296
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-bootstrap-parity.js"
297
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-scope-parity.js"
298
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-aux-a-parity.js"
299
- - node "{{.DEFT_ROOT}}/packages/cli/dist/triage-aux-b-parity.js"
300
- - node "{{.DEFT_ROOT}}/packages/cli/dist/scope-lifecycle-parity.js"
301
- - node "{{.DEFT_ROOT}}/packages/cli/dist/slice-parity.js"
302
- - node "{{.DEFT_ROOT}}/packages/cli/dist/cache-parity.js"
303
- - node "{{.DEFT_ROOT}}/packages/cli/dist/doctor-parity.js"
304
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-parity.js"
305
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-publish-parity.js"
306
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-rollback-parity.js"
307
- - node "{{.DEFT_ROOT}}/packages/cli/dist/release-e2e-parity.js"
308
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-merge-readiness-parity.js"
309
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-protected-issues-parity.js"
310
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-closing-keywords-parity.js"
311
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-monitor-parity.js"
312
- - node "{{.DEFT_ROOT}}/packages/cli/dist/pr-wait-mergeable-parity.js"
313
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-build-parity.js"
314
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-reconcile-parity.js"
315
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-validation-parity.js"
316
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-validate-parity.js"
317
- - node "{{.DEFT_ROOT}}/packages/cli/dist/vbrief-activate-parity.js"
318
- - node "{{.DEFT_ROOT}}/packages/cli/dist/verify-env-parity.js"
319
- - node "{{.DEFT_ROOT}}/packages/cli/dist/verify-source-parity.js"
320
- - node "{{.DEFT_ROOT}}/packages/cli/dist/validate-content-parity.js"
321
- - node "{{.DEFT_ROOT}}/packages/cli/dist/render-parity.js"
322
- - node "{{.DEFT_ROOT}}/packages/cli/dist/codebase-parity.js"
323
- - node "{{.DEFT_ROOT}}/packages/cli/dist/intake-parity.js"
324
- - node "{{.DEFT_ROOT}}/packages/cli/dist/lifecycle-packs-parity.js"
325
- - node "{{.DEFT_ROOT}}/packages/cli/dist/session-parity.js"
326
- - node "{{.DEFT_ROOT}}/packages/cli/dist/orchestration-parity.js"
327
- - node "{{.DEFT_ROOT}}/packages/cli/dist/swarm-parity.js"
328
- - node "{{.DEFT_ROOT}}/packages/cli/dist/platform-parity.js"
package/tasks/verify.yml CHANGED
@@ -45,6 +45,17 @@ tasks:
45
45
  cmds:
46
46
  - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-content-manifest --project-root "{{.DEFT_ROOT}}"
47
47
 
48
+ cursor-tier1:
49
+ desc: "Framework-source content gate (#1877): assert Cursor (cursor-composer / cursor-cloud-agent, Task-tool primitive) is enumerated as a Tier-1 descriptor in the swarm Phase 3 capability matrix AND the review-cycle monitoring tier table. Fails when a doc edit drops the Cursor descriptor and silently re-opens the Tier-3 blocking-poll misclassification. Three-state exit (0 clean / 1 missing marker / 2 config error)."
50
+ deps:
51
+ - _ts-build
52
+ # Framework-source-only gate: it scans THIS repo's two skill docs, so it
53
+ # targets DEFT_ROOT (not USER_WORKING_DIR) -- a consumer install renders
54
+ # these skills under .deft/core and does not author them. Mirrors
55
+ # verify:content-manifest / verify:rule-ownership.
56
+ cmds:
57
+ - node "{{.DEFT_ROOT}}/packages/cli/dist/bin.js" verify-cursor-tier1 --project-root "{{.DEFT_ROOT}}"
58
+
48
59
  go-freeze:
49
60
  desc: "Tier-1 freeze gate for the legacy Go-installer bridge (#1912). Advisory while the Tier-0 SoT (lastGoInstaller) is null; once the operator pins it, fails when cmd/deft-install is bumped above the frozen tag. Three-state exit (0 ok / 1 violation / 2 config error). Emergency bypass: DEFT_ALLOW_GO_INSTALLER_BUMP=1."
50
61
  deps:
package/tasks/ci.yml DELETED
@@ -1,57 +0,0 @@
1
- version: '3'
2
-
3
- # Maintainer-only local CI mirror (#1813 contributor path / #2022 Phase 2).
4
- #
5
- # `ci:local` shells into scripts/ci_local.py via `uv run python`. Release
6
- # Step-5 pre-flight now uses the TS `task check` path (py-purge-ci-local-ts);
7
- # this fragment remains for explicit maintainer local CI only. Included from
8
- # the root Taskfile with `internal: true` — not wired into `check:consumer`
9
- # or the default `task check` aggregate.
10
-
11
- vars:
12
- DEFT_ROOT: '{{joinPath .TASKFILE_DIR ".."}}'
13
-
14
- # ci:* tasks for running the full CI pipeline locally so contributors
15
- # catch CI failures before pushing.
16
- #
17
- # ci:local mirrors the step graph of .github/workflows/ci.yml on the
18
- # host platform:
19
- #
20
- # - Linux: Python (uv sync + ruff + mypy + pytest --cov), Go test +
21
- # cross-compile builds for linux/amd64 + darwin/arm64 +
22
- # windows/amd64, and the existing Taskfile-level
23
- # verifications (toolchain:check, verify:stubs,
24
- # verify:links, verify:rule-ownership, vbrief:validate,
25
- # build).
26
- #
27
- # - macOS: Same as Linux. The darwin/arm64 cross-compile is the
28
- # native build path. /dev/null is the discard target for
29
- # cross-compile output.
30
- #
31
- # - Windows: Same Python + Go + Taskfile-level steps; NUL replaces
32
- # /dev/null as the cross-compile discard target.
33
- # Additionally, when --matrix=windows is supplied the
34
- # Windows-task-dispatch regression pytest guard-rails run
35
- # -- those steps shell out to PowerShell and require a
36
- # real Windows host (CI uses windows-latest).
37
- #
38
- # CLI_ARGS are forwarded so contributors can pass flags such as
39
- # --matrix=linux, --skip-build, --verbose, and --no-fail-fast.
40
- #
41
- # Per conventions/task-caching.md, this task forwards {{.CLI_ARGS}} to
42
- # a Python script that accepts user-facing flags (--skip-build,
43
- # --no-fail-fast, etc.); declaring sources: / generates: would short-
44
- # circuit the cmds: block and silently swallow those flags. Caching is
45
- # intentionally absent.
46
- #
47
- # Companion script: scripts/ci_local.py
48
- # Companion test: tests/cli/test_ci_local.py
49
-
50
- tasks:
51
- local:
52
- desc: "Run the full CI pipeline locally (matrix-aware). Mirrors .github/workflows/ci.yml step graph; on Windows hosts --matrix=windows additionally runs the windows-task-dispatch regression guard-rails. Refs #233."
53
- dir: '{{.USER_WORKING_DIR}}'
54
- env:
55
- PYTHONUTF8: "1"
56
- cmds:
57
- - uv --project "{{.DEFT_ROOT}}" run python "{{.DEFT_ROOT}}/scripts/ci_local.py" --root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}