@deftai/directive-content 0.77.0 → 0.78.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/.agents/skills/deft-directive-swarm/SKILL.md +998 -3
- package/Taskfile.yml +10 -0
- package/commands.md +9 -1
- package/docs/agent-docs.md +4 -0
- package/docs/skill-pin-policy.md +77 -0
- package/package.json +1 -1
- package/packs/skills/skills-pack-0.1.json +13 -5
- package/skills/deft-directive-review-cycle/SKILL.md +17 -4
- package/skills/deft-directive-setup/SKILL.md +5 -1
- package/skills/deft-directive-swarm/SKILL.md +2 -0
- package/tasks/engine-invoke.cjs +13 -10
- package/tasks/engine.yml +28 -6
- package/tasks/eval.yml +9 -0
- package/tasks/ts-build-fresh.cjs +99 -0
- package/tasks/verify.yml +10 -0
- package/templates/agent-prompt-preamble.md +61 -2
- package/templates/agents-entry.md +8 -2
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deft-directive-review-cycle
|
|
3
3
|
description: >-
|
|
4
|
-
Greptile bot reviewer response workflow. Use when
|
|
5
|
-
a
|
|
6
|
-
|
|
4
|
+
Greptile / bot reviewer response and PR-shepherding workflow. Use when
|
|
5
|
+
running a review cycle or babysitting a PR to merge-ready -- audit process
|
|
6
|
+
prerequisites, fetch bot findings, fix all issues in a single batch commit,
|
|
7
|
+
and exit cleanly when no P0 or P1 issues remain. Supersedes Cursor global
|
|
8
|
+
babysit on Deft-managed repos (#2261).
|
|
7
9
|
---
|
|
8
10
|
<!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
|
|
9
11
|
<!-- Purpose: rendered skill -->
|
|
@@ -36,8 +38,17 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
36
38
|
## When to Use
|
|
37
39
|
|
|
38
40
|
- User says "review cycle", "check reviews", or "run review cycle" on a PR
|
|
41
|
+
- Operator asks to **babysit**, **shepherd**, or **watch** a PR -- including the Cursor product action **babysit-pull-request-in-cloud** (#2261 / #1862 intent-routing class)
|
|
39
42
|
- A bot reviewer (Greptile) has posted findings on an open PR
|
|
40
|
-
- Dispatching a cloud agent to monitor and resolve PR review findings
|
|
43
|
+
- Dispatching a cloud or background agent to monitor and resolve PR review findings until merge-ready
|
|
44
|
+
|
|
45
|
+
## Cursor global babysit supersession (#2261)
|
|
46
|
+
|
|
47
|
+
On repos with `.deft/core/` installed, **PR shepherding intent** routes here -- not the Cursor-global `babysit` skill (`~/.cursor/skills-cursor/babysit/SKILL.md`). The product action **babysit-pull-request-in-cloud** shares the babysit name but MUST chain into this review-cycle surface on Deft-managed projects.
|
|
48
|
+
|
|
49
|
+
- ! Orchestrators dispatching cloud/background workers for PR shepherding MUST include `templates/agent-prompt-preamble.md` (or reference it) and mandate reading this skill as the first workflow step.
|
|
50
|
+
- ! Cloud babysit workers use `worker_role: review-monitor` (or `drive-to: merge-ready` implementation workers that own the review cycle) -- not a generic babysit loop without Phase 1 audit or Step 6 exit predicate (#1259).
|
|
51
|
+
- ⊗ Route **babysit-pull-request-in-cloud** to Cursor global babysit when `.deft/core/` is present -- that bypasses xBRIEF preflight, `task check`, Greptile fail-closed exit, and CHANGELOG discipline (#2261 recurrence).
|
|
41
52
|
|
|
42
53
|
## Branch-Protection Policy Guard
|
|
43
54
|
|
|
@@ -389,6 +400,8 @@ task lifecycle:event -- emit plan:approved \
|
|
|
389
400
|
|
|
390
401
|
## Anti-Patterns
|
|
391
402
|
|
|
403
|
+
- ⊗ Route PR shepherding to Cursor global `babysit` on Deft-managed repos when `.deft/core/` is installed -- use this review-cycle skill instead (#2261)
|
|
404
|
+
- ⊗ Treat a passing SLizard/Greptile check run, a non-blocking review comment, or an ad hoc fix commit as the review-cycle exit predicate -- Step 6 fail-closed all-of (#1259) and multi-reviewer registry triage (#769) still apply
|
|
392
405
|
- ⊗ Push individual fix commits per finding
|
|
393
406
|
- ⊗ Start fixing before analyzing ALL findings
|
|
394
407
|
- ⊗ Rely on the bot to catch syntax errors in structured data files
|
|
@@ -482,7 +482,11 @@ omit = [
|
|
|
482
482
|
|
|
483
483
|
- ~ After Phase 2 writes `PROJECT-DEFINITION.xbrief.json`, recommend `task triage:welcome` to the user as the single chained command for picking up the v0.27 triage surface. The N3 ritual (#1143) is the consolidating onboarding step for the #1119 governance swarm verbs (`task triage:bootstrap` / `task triage:scope` / `plan.policy.wipCap` writes / `task scope:demote --batch` relief / `task triage:summary`); without it consumers must learn each verb individually from the v0.27 release notes.
|
|
484
484
|
- ~ `task triage:welcome` is idempotent and detection-bound -- each phase emits an informational stderr line and skips when its precondition is already satisfied, so a re-run after a partial completion resumes cleanly. The destructive phases (subscription / `wipCap` writes, optional WIP-relief invocation) are gated by numbered-menu prompts per [`../../contracts/deterministic-questions.md`](../../contracts/deterministic-questions.md). See [`../../UPGRADING.md`](../../UPGRADING.md) `## From v0.26.x -> v0.27` for the full walkthrough.
|
|
485
|
-
|
|
485
|
+
### Consumer AGENTS always-pin recommendations (#2508)
|
|
486
|
+
|
|
487
|
+
! After Phase 2 completes (or when closing a greenfield bootstrap), tell the consumer that process-critical directive skills should be named in their project's AGENTS.md **unmanaged header** when false-negative risk matters — full tier definitions: [`../../docs/skill-pin-policy.md`](../../docs/skill-pin-policy.md).
|
|
488
|
+
~ Recommend the default consumer pin set for lifecycle work: `deft-directive-build` (implementation), `deft-directive-pre-pr` (before PR), `deft-directive-review-cycle` (bot review loop), and `deft-directive-swarm` when they plan parallel agents. Each is referenced by skill id + `.deft/core/.agents/skills/<id>/SKILL.md` path — not by pasting skill bodies.
|
|
489
|
+
⊗ Recommend pinning entire `languages/`, `deployments/`, or other framework doc packs into AGENTS.md (#2508 anti-pattern).
|
|
486
490
|
|
|
487
491
|
---
|
|
488
492
|
|
|
@@ -57,6 +57,8 @@ This path became first-class in #1342 (platform adapter slices 1-3) and is fully
|
|
|
57
57
|
|
|
58
58
|
~ **Windows + Grok Build (#1353):** When issuing shell commands via `run_terminal_command` on this platform, avoid `|`, `>`, or `2>&1` in the command string — use Python `pathlib`/`subprocess` or plain `task` targets instead to avoid wrapper leakage. See `templates/agent-prompt-preamble.md` §3.5 for the full escape hatch list.
|
|
59
59
|
|
|
60
|
+
! **Windows + Cursor Task-tool console storm (#2563):** Local Cursor Task subagents on Windows have frozen the host by flooding visible `cmd.exe` / `conhost` windows (observed with both parallel and serial Task agents; in-parent work stayed stable). Prefer one of: (1) in-parent / serial monitor-owned implementation, (2) cloud workers, or (3) after the #2563 mitigations (`windowsHide` + warm-dist skip in `engine:_ts-build`) are on the branch under test, keep local Task concurrency at **1** and prefer `pnpm exec` / warm `dist/bin.js` over repeated cold `task` rebuilds. See `templates/agent-prompt-preamble.md` §3.8. ⊗ Launch a wide parallel local Cursor Task cohort on Windows without that mitigation or an explicit operator acceptance of host-freeze risk.
|
|
61
|
+
|
|
60
62
|
## Prerequisites
|
|
61
63
|
|
|
62
64
|
- ! `xbrief/active/` contains one or more story-level xBRIEFs with status `running`
|
package/tasks/engine-invoke.cjs
CHANGED
|
@@ -88,20 +88,23 @@ function main() {
|
|
|
88
88
|
process.exit(2);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
// Command transport is one-hop: a spawned CLI may invoke Task again with a
|
|
92
|
+
// different ENGINE_CMD, which must not be shadowed by this inherited value.
|
|
93
|
+
const childEnv = { ...process.env };
|
|
94
|
+
delete childEnv.DEFT_ENGINE_CMD_JSON;
|
|
95
|
+
delete childEnv.DEFT_ENGINE_CMD;
|
|
96
|
+
|
|
97
|
+
// stdio inherit (not pipe): piped stdout/stderr deadlocks when the child emits
|
|
98
|
+
// more than the OS pipe buffer before exit — observed as greenfield smoke
|
|
99
|
+
// hanging then CI SIGTERM exit 143 with no output (#2554 / #2547).
|
|
91
100
|
const result = spawnSync(execPath, execArgv, {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
env: process.env,
|
|
101
|
+
stdio: "inherit",
|
|
102
|
+
env: childEnv,
|
|
95
103
|
// Global deft/directive on Windows are .cmd shims; shell:false cannot spawn them (#2415).
|
|
96
104
|
shell: mode === "global" && process.platform === "win32",
|
|
97
|
-
|
|
105
|
+
// CREATE_NO_WINDOW: hide console windows from Cursor Task / nested shells (#2563).
|
|
106
|
+
windowsHide: true,
|
|
98
107
|
});
|
|
99
|
-
if (result.stdout) {
|
|
100
|
-
process.stdout.write(result.stdout);
|
|
101
|
-
}
|
|
102
|
-
if (result.stderr) {
|
|
103
|
-
process.stderr.write(result.stderr);
|
|
104
|
-
}
|
|
105
108
|
const code = result.status;
|
|
106
109
|
process.exit(code === null ? 1 : code);
|
|
107
110
|
}
|
package/tasks/engine.yml
CHANGED
|
@@ -35,13 +35,16 @@ tasks:
|
|
|
35
35
|
// Windows native Task often has no `sh` on PATH, so Corepack.cmd was
|
|
36
36
|
// invisible after #2411. Prefer a direct spawn (POSIX / real binaries);
|
|
37
37
|
// fall back to shell:true so PATHEXT resolves .cmd/.exe on win32.
|
|
38
|
+
// windowsHide (#2563): CREATE_NO_WINDOW so Cursor Task shells do not
|
|
39
|
+
// flood visible cmd.exe/conhost windows on every probe/build.
|
|
40
|
+
const spawnOpts=(extra)=>({stdio:'ignore',windowsHide:true,...extra});
|
|
38
41
|
const hasCmd=(name)=>{
|
|
39
42
|
try{
|
|
40
|
-
execFileSync(name,['--version'],
|
|
43
|
+
execFileSync(name,['--version'],spawnOpts());
|
|
41
44
|
return true;
|
|
42
45
|
}catch{
|
|
43
46
|
try{
|
|
44
|
-
execFileSync(name,['--version'],{
|
|
47
|
+
execFileSync(name,['--version'],spawnOpts({shell:true}));
|
|
45
48
|
return true;
|
|
46
49
|
}catch{
|
|
47
50
|
return false;
|
|
@@ -49,7 +52,7 @@ tasks:
|
|
|
49
52
|
}
|
|
50
53
|
};
|
|
51
54
|
const run=(cmd,args)=>{
|
|
52
|
-
execFileSync(cmd,args,{cwd:root,stdio:'inherit',shell:true});
|
|
55
|
+
execFileSync(cmd,args,{cwd:root,stdio:'inherit',shell:true,windowsHide:true});
|
|
53
56
|
};
|
|
54
57
|
const trySteps=(steps)=>{
|
|
55
58
|
for(const [cmd,args] of steps){
|
|
@@ -98,6 +101,10 @@ tasks:
|
|
|
98
101
|
# ships no packages/ tree (guard false -> no-op, #2126). Git-vendored-payload
|
|
99
102
|
# repos may carry a stray packages/ under .deft/core without a root `build`
|
|
100
103
|
# script — source-only presence must NOT run `pnpm run build` there.
|
|
104
|
+
#
|
|
105
|
+
# Warm-dist skip (#2563): when packages/cli/dist/bin.js is newer than
|
|
106
|
+
# packages/{cli,core,types} sources, skip rebuild. Override with
|
|
107
|
+
# DEFT_FORCE_TS_BUILD=1; force-skip with DEFT_SKIP_TS_BUILD=1.
|
|
101
108
|
dir: '{{.USER_WORKING_DIR}}'
|
|
102
109
|
cmds:
|
|
103
110
|
- |
|
|
@@ -105,6 +112,9 @@ tasks:
|
|
|
105
112
|
if [ -f "{{.DEFT_ROOT}}/packages/cli/package.json" ] \
|
|
106
113
|
&& [ -f "{{.DEFT_ROOT}}/package.json" ] \
|
|
107
114
|
&& node -e "const fs=require('fs');const j=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));process.exit(j.scripts&&j.scripts.build?0:1)" "{{.DEFT_ROOT}}/package.json"; then
|
|
115
|
+
if node "{{.TASKFILE_DIR}}/ts-build-fresh.cjs" "{{.DEFT_ROOT}}"; then
|
|
116
|
+
exit 0
|
|
117
|
+
fi
|
|
108
118
|
node -e "
|
|
109
119
|
const {execFileSync}=require('child_process');
|
|
110
120
|
const fs=require('fs');
|
|
@@ -116,13 +126,16 @@ tasks:
|
|
|
116
126
|
// Windows native Task often has no `sh` on PATH, so Corepack.cmd was
|
|
117
127
|
// invisible after #2411. Prefer a direct spawn (POSIX / real binaries);
|
|
118
128
|
// fall back to shell:true so PATHEXT resolves .cmd/.exe on win32.
|
|
129
|
+
// windowsHide (#2563): CREATE_NO_WINDOW so Cursor Task shells do not
|
|
130
|
+
// flood visible cmd.exe/conhost windows on every probe/build.
|
|
131
|
+
const spawnOpts=(extra)=>({stdio:'ignore',windowsHide:true,...extra});
|
|
119
132
|
const hasCmd=(name)=>{
|
|
120
133
|
try{
|
|
121
|
-
execFileSync(name,['--version'],
|
|
134
|
+
execFileSync(name,['--version'],spawnOpts());
|
|
122
135
|
return true;
|
|
123
136
|
}catch{
|
|
124
137
|
try{
|
|
125
|
-
execFileSync(name,['--version'],{
|
|
138
|
+
execFileSync(name,['--version'],spawnOpts({shell:true}));
|
|
126
139
|
return true;
|
|
127
140
|
}catch{
|
|
128
141
|
return false;
|
|
@@ -130,12 +143,20 @@ tasks:
|
|
|
130
143
|
}
|
|
131
144
|
};
|
|
132
145
|
const run=(cmd,args)=>{
|
|
133
|
-
execFileSync(cmd,args,{cwd:root,stdio:'inherit',shell:true});
|
|
146
|
+
execFileSync(cmd,args,{cwd:root,stdio:'inherit',shell:true,windowsHide:true});
|
|
147
|
+
};
|
|
148
|
+
const markWarm=()=>{
|
|
149
|
+
try{
|
|
150
|
+
const dist=root+'/packages/cli/dist';
|
|
151
|
+
fs.mkdirSync(dist,{recursive:true});
|
|
152
|
+
fs.writeFileSync(dist+'/.deft-ts-build-stamp',new Date().toISOString());
|
|
153
|
+
}catch{}
|
|
134
154
|
};
|
|
135
155
|
const trySteps=(steps)=>{
|
|
136
156
|
for(const [cmd,args] of steps){
|
|
137
157
|
try{
|
|
138
158
|
run(cmd,args);
|
|
159
|
+
markWarm();
|
|
139
160
|
process.exit(0);
|
|
140
161
|
}catch{
|
|
141
162
|
// fall through to Corepack / next resolver
|
|
@@ -145,6 +166,7 @@ tasks:
|
|
|
145
166
|
const envPm=String(process.env.DEFT_PACKAGE_MANAGER||'').trim().toLowerCase();
|
|
146
167
|
if(envPm==='npm'){
|
|
147
168
|
run('npm',['run',script]);
|
|
169
|
+
markWarm();
|
|
148
170
|
process.exit(0);
|
|
149
171
|
}
|
|
150
172
|
const pin=String(pkg.packageManager||'').trim();
|
package/tasks/eval.yml
CHANGED
|
@@ -30,3 +30,12 @@ tasks:
|
|
|
30
30
|
- task: :engine:invoke
|
|
31
31
|
vars:
|
|
32
32
|
ENGINE_CMD: 'eval:report --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
33
|
+
|
|
34
|
+
triggers:
|
|
35
|
+
desc: "Trigger routing coverage for AGENTS.md / Skills Index (#1586). Offline skill-pi-trigger-eval compatible eval over evals/trigger-cases.jsonl vs REFERENCES.md. -- task eval:triggers [-- --json] [--project-root PATH]"
|
|
36
|
+
deps:
|
|
37
|
+
- task: :engine:_ts-build
|
|
38
|
+
cmds:
|
|
39
|
+
- task: :engine:invoke
|
|
40
|
+
vars:
|
|
41
|
+
ENGINE_CMD: 'eval:triggers --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Decide whether engine:_ts-build can skip `pnpm run build` (#2563).
|
|
6
|
+
*
|
|
7
|
+
* Exit codes:
|
|
8
|
+
* 0 — dist is fresh enough (or DEFT_SKIP_TS_BUILD=1); skip rebuild
|
|
9
|
+
* 1 — rebuild required (missing dist, newer sources, or DEFT_FORCE_TS_BUILD=1)
|
|
10
|
+
* 2 — usage / config error
|
|
11
|
+
*
|
|
12
|
+
* Warm-dist skip avoids a full `tsc -b` (and its nested shell:true spawns) on
|
|
13
|
+
* every `task <verb>` when packages/cli/dist/bin.js is already up to date.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const fs = require("node:fs");
|
|
17
|
+
const path = require("node:path");
|
|
18
|
+
|
|
19
|
+
const SKIP_DIRS = new Set(["node_modules", "dist", "coverage", ".git"]);
|
|
20
|
+
|
|
21
|
+
function walkSourceFiles(dir, out) {
|
|
22
|
+
if (!fs.existsSync(dir)) return;
|
|
23
|
+
let entries;
|
|
24
|
+
try {
|
|
25
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
26
|
+
} catch {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
for (const ent of entries) {
|
|
30
|
+
const full = path.join(dir, ent.name);
|
|
31
|
+
if (ent.isDirectory()) {
|
|
32
|
+
if (SKIP_DIRS.has(ent.name)) continue;
|
|
33
|
+
walkSourceFiles(full, out);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (ent.isFile() && /\.(?:ts|tsx|json)$/.test(ent.name) && !ent.name.endsWith(".d.ts")) {
|
|
37
|
+
out.push(full);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function main() {
|
|
43
|
+
const root = process.argv[2];
|
|
44
|
+
if (!root) {
|
|
45
|
+
console.error("deft: ts-build-fresh usage: ts-build-fresh.cjs <DEFT_ROOT>");
|
|
46
|
+
process.exit(2);
|
|
47
|
+
}
|
|
48
|
+
if (process.env.DEFT_FORCE_TS_BUILD === "1") {
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
if (process.env.DEFT_SKIP_TS_BUILD === "1") {
|
|
52
|
+
process.exit(0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const distDir = path.join(root, "packages", "cli", "dist");
|
|
56
|
+
const bin = path.join(distDir, "bin.js");
|
|
57
|
+
const stamp = path.join(distDir, ".deft-ts-build-stamp");
|
|
58
|
+
if (!fs.existsSync(bin)) {
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
// Prefer the post-build stamp (#2563): `tsc -b` incremental often leaves
|
|
62
|
+
// bin.js mtime unchanged even after a successful build when sources are
|
|
63
|
+
// newer than a previous emit. The stamp is written only after a completed
|
|
64
|
+
// engine:_ts-build, so it is the authoritative "warm dist" marker.
|
|
65
|
+
const marker = fs.existsSync(stamp) ? stamp : bin;
|
|
66
|
+
const markerMtime = fs.statSync(marker).mtimeMs;
|
|
67
|
+
const candidates = [];
|
|
68
|
+
|
|
69
|
+
for (const pkg of ["cli", "core", "types"]) {
|
|
70
|
+
const pkgRoot = path.join(root, "packages", pkg);
|
|
71
|
+
if (!fs.existsSync(pkgRoot)) continue;
|
|
72
|
+
walkSourceFiles(path.join(pkgRoot, "src"), candidates);
|
|
73
|
+
for (const name of ["package.json", "tsconfig.json", "tsconfig.build.json"]) {
|
|
74
|
+
const fp = path.join(pkgRoot, name);
|
|
75
|
+
if (fs.existsSync(fp)) candidates.push(fp);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
for (const name of ["package.json", "tsconfig.json", "tsconfig.base.json", "pnpm-workspace.yaml"]) {
|
|
79
|
+
const fp = path.join(root, name);
|
|
80
|
+
if (fs.existsSync(fp)) candidates.push(fp);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
for (const file of candidates) {
|
|
84
|
+
try {
|
|
85
|
+
if (fs.statSync(file).mtimeMs > markerMtime) {
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
} catch {
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
process.exit(0);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (require.main === module) {
|
|
96
|
+
main();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
module.exports = { walkSourceFiles };
|
package/tasks/verify.yml
CHANGED
|
@@ -415,6 +415,16 @@ tasks:
|
|
|
415
415
|
vars:
|
|
416
416
|
ENGINE_CMD: 'verify:eval-health-relocation --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
417
417
|
|
|
418
|
+
eval-triggers-relocation:
|
|
419
|
+
desc: "Fail-closed eval:triggers gate when AGENTS.md / REFERENCES.md / trigger cases change (#1586). Skips (exit 0) when the diff does not touch trigger-routing homes. -- task verify:eval-triggers-relocation [-- --base-ref <ref> | --staged] [--quiet]"
|
|
420
|
+
dir: '{{.USER_WORKING_DIR}}'
|
|
421
|
+
deps:
|
|
422
|
+
- task: :engine:_ts-build
|
|
423
|
+
cmds:
|
|
424
|
+
- task: :engine:invoke
|
|
425
|
+
vars:
|
|
426
|
+
ENGINE_CMD: 'verify:eval-triggers-relocation --project-root "{{.USER_WORKING_DIR}}" {{.CLI_ARGS}}'
|
|
427
|
+
|
|
418
428
|
agents-md-advisory:
|
|
419
429
|
desc: "ADVISORY (never fail-closing) consumer AGENTS.md legibility signal (#2155). Counts the UNMANAGED (project-authored) region only -- the framework-owned managed section is excluded -- and compares it against the SOFT, operator-adjustable budget plan.policy.agentsMdAdvisory.unmanagedSoftMaxLines (generous default when unset). Consumer companion to the maintainer-only #645 ratchet; deliberately NOT a check:consumer dependency (advise->observe->enforce per #1419). Default posture ALWAYS exits 0; the opt-in --enforce flag promotes an over-budget region to a hard cap (exit 1). Raising the field is the documented, no-friction way to accept growth and silence the nudge."
|
|
420
430
|
dir: '{{.USER_WORKING_DIR}}'
|
|
@@ -211,6 +211,18 @@ PYTEST_ADDOPTS="--basetemp=$(mktemp -d)/pt" task check
|
|
|
211
211
|
|
|
212
212
|
A clean result under an isolated basetemp is attributable to your change, not to the ambient shared-`/tmp` race. Do NOT point `--basetemp` at a static path shared across workers -- that re-introduces the collision. Solo / single-run invocations on a private worktree do not require this, but it is harmless to apply unconditionally.
|
|
213
213
|
|
|
214
|
+
## 3.8 Windows Cursor Task-tool console storm (#2563)
|
|
215
|
+
|
|
216
|
+
On Windows, Cursor Task-tool local subagents can open a visible `cmd.exe` / `conhost` window per shell turn. Framework source checkouts amplify this: many `task <verb>` calls run `engine:_ts-build` → `pnpm`/`tsc` via `shell: true`. Parallel (and even serial) Task agents have frozen the maintainer host; completing the same stories in-parent (no Task subagent) stayed stable.
|
|
217
|
+
|
|
218
|
+
**Directive rule for orchestrators on Windows:**
|
|
219
|
+
|
|
220
|
+
- ! Prefer in-parent implementation or cloud workers for Cursor Task cohorts until the branch under test includes the #2563 mitigations (`windowsHide` on engine spawns + warm-dist skip via `tasks/ts-build-fresh.cjs`).
|
|
221
|
+
- ! When local Task agents are required, keep concurrency at **1**, reuse a warm `packages/cli/dist/bin.js` (set `DEFT_SKIP_TS_BUILD=1` only when dist is known current), and avoid spawning nested Task agents from workers.
|
|
222
|
+
- ⊗ Launch a multi-agent local Cursor Task swarm on Windows that multiplies cold `task` rebuilds without operator acceptance of host-freeze risk.
|
|
223
|
+
|
|
224
|
+
Reference: issue #2563; swarm skill Platform Requirements; env scrub + stdio inherit for nested Task recursion (#2554 / #2438) are necessary but not sufficient alone.
|
|
225
|
+
|
|
214
226
|
## 4. pre-pr and review-cycle skills
|
|
215
227
|
|
|
216
228
|
Before pushing any branch:
|
|
@@ -225,8 +237,55 @@ Anti-pattern: pushing without pre-pr and relying on Greptile to find issues. Tha
|
|
|
225
237
|
The active host harness may expose its own review-labeled surfaces. On Cursor these are the `bugbot` and `security-review` Task **subagent types** and the `review-bugbot` / `review-security` **skills**; other harnesses may ship equivalents. A generic operator request to "review" / "get this reviewed" / "use sub-agents for reviews" must NOT be routed to those host-native tools as the review of record.
|
|
226
238
|
|
|
227
239
|
- ! Route ALL review work through the canonical `skills/deft-directive-review-cycle/SKILL.md` surface. Map a generic review request to the review cycle **by intent**, not by literal keyword -- "review this", "get this reviewed", and "use sub-agents for reviews" all mean run `deft-directive-review-cycle` (extends the #1862 / #2261 intent-routing fix).
|
|
228
|
-
-
|
|
229
|
-
-
|
|
240
|
+
- ! Map **PR shepherding intent** the same way: `babysit`, `babysit this PR`, `shepherd`, `watch the PR`, and the Cursor product action **babysit-pull-request-in-cloud** all mean run `deft-directive-review-cycle` on Deft-managed repos (`.deft/core/` installed) -- NOT the Cursor-global `babysit` skill (`~/.cursor/skills-cursor/babysit/SKILL.md`) (#2261).
|
|
241
|
+
- ~ Host review tools (Cursor `babysit` / `bugbot` / `security-review` subagent types, `review-bugbot` / `review-security` skills, or any future host equivalent) MAY be folded in as *advisory* finding sources INSIDE the review cycle -- the #2019 harness-aware-reviewer path -- with their findings batched alongside the Greptile / bot findings the cycle already processes.
|
|
242
|
+
- ⊗ Substitute a host-native review subagent type, Cursor global `babysit`, or `review-*` skill for `deft-directive-review-cycle` as the review surface. The host tools are advisory inputs folded into the cycle, never a replacement for it. Reaching for them on a bare "review" or "babysit" request is the #1862 / #2261 wrong-review-surface class (see also #2019, #2018).
|
|
243
|
+
|
|
244
|
+
## 4.6 Cloud PR-shepherd dispatch -- review-monitor worked example (#2261)
|
|
245
|
+
|
|
246
|
+
When an operator triggers **babysit-pull-request-in-cloud** (or equivalent PR-shepherding intent) on a Deft-managed repo, the orchestrator MUST dispatch a **review-monitor** worker with this preamble (or a reference to `templates/agent-prompt-preamble.md`) and an explicit mandate to read `skills/deft-directive-review-cycle/SKILL.md` before any PR mutation.
|
|
247
|
+
|
|
248
|
+
Worked example (cloud background review-monitor on PR #1037):
|
|
249
|
+
|
|
250
|
+
```markdown
|
|
251
|
+
## Allocation context
|
|
252
|
+
|
|
253
|
+
- dispatch_kind: solo
|
|
254
|
+
- allocation_plan_id: null
|
|
255
|
+
- batching_rationale: null
|
|
256
|
+
- cohort_vbriefs: []
|
|
257
|
+
- operator_approval_evidence: operator selected babysit-pull-request-in-cloud 2026-07-03
|
|
258
|
+
|
|
259
|
+
## Worker metadata
|
|
260
|
+
|
|
261
|
+
- dispatch_provider: cursor-cloud-agent
|
|
262
|
+
- worker_role: review-monitor
|
|
263
|
+
- selected_backend: cursor-cloud
|
|
264
|
+
- routing_policy: null
|
|
265
|
+
- resolved_model: null
|
|
266
|
+
- model_source: harness-default explicit
|
|
267
|
+
|
|
268
|
+
## Runtime and GitHub auth mode
|
|
269
|
+
|
|
270
|
+
- runtime_mode: cloud-headless
|
|
271
|
+
- github_auth_mode: injected-token
|
|
272
|
+
|
|
273
|
+
## Unit of work
|
|
274
|
+
|
|
275
|
+
drive-to: merge-ready on PR #1037 (repo: deftai/deftvisage, branch: fix/visage-repo-org-scoping)
|
|
276
|
+
|
|
277
|
+
## Mandates
|
|
278
|
+
|
|
279
|
+
1. First tool call: read AGENTS.md; confirm Deft alignment.
|
|
280
|
+
2. Read `templates/agent-prompt-preamble.md` (binding) and `skills/deft-directive-review-cycle/SKILL.md` end-to-end -- NOT `~/.cursor/skills-cursor/babysit/SKILL.md`.
|
|
281
|
+
3. Run review-cycle Phase 1 process audit before the fix loop; batch Phase 1 + Phase 2 fixes per review-cycle discipline.
|
|
282
|
+
4. Poll terminal verdict via `task pr:watch -- <N>` when waiting on Greptile/SLizard (#1056).
|
|
283
|
+
5. Exit only on review-cycle Step 6 fail-closed all-of (#1259) -- ad hoc SLizard P2 fixes without the exit predicate are insufficient.
|
|
284
|
+
|
|
285
|
+
DONE: include PR URL, role review-monitor, and whether Step 6 CLEAN was reached.
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Anti-pattern: dispatching `Task(environment=cloud)` with only the Cursor global babysit skill attached and no preamble / `deft-directive-review-cycle` path -- that is the #2261 recurrence class.
|
|
230
289
|
|
|
231
290
|
## 5. REST-by-default for read-only gh calls
|
|
232
291
|
|
|
@@ -57,9 +57,15 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
57
57
|
|
|
58
58
|
! **Skills Index** (Level-0) in `.deft/core/REFERENCES.md` — scan before improvising; read `SKILL.md` only on index match. `welcome` / `onboard triage` → `deft triage:welcome --onboard` (N3 / #1143); lessons → packs:slice.
|
|
59
59
|
|
|
60
|
+
## Skill pin policy (#2508)
|
|
61
|
+
|
|
62
|
+
! 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).
|
|
63
|
+
! **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.
|
|
64
|
+
⊗ Pin entire language packs, deployment docs, or framework bulk into AGENTS.md — pins are for false-negative-sensitive process gates only (#2508).
|
|
65
|
+
|
|
60
66
|
## Review-surface precedence (#2308)
|
|
61
67
|
|
|
62
|
-
! Route review through `deft-directive-review-cycle` — `.deft/core/.agents/skills/deft-directive-review-cycle/SKILL.md`; host `
|
|
68
|
+
! Route PR shepherding / review work through `deft-directive-review-cycle` — `.deft/core/.agents/skills/deft-directive-review-cycle/SKILL.md`; host `babysit` / `bugbot` / `security-review` advisory-only (#2308 / #2261).
|
|
63
69
|
|
|
64
70
|
## Value feedback and attribution (#1709)
|
|
65
71
|
|
|
@@ -67,7 +73,7 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
67
73
|
|
|
68
74
|
## Eval and framework health (#1703)
|
|
69
75
|
|
|
70
|
-
! `deft eval:health` when orienting or after gate/policy changes (Tier 0; 4-hour debounce). Release: `deft eval:run` / `deft eval:report` (#1703).
|
|
76
|
+
! `deft eval:health` when orienting or after gate/policy changes (Tier 0; 4-hour debounce). Release: `deft eval:run` / `deft eval:report`; skill routing: `deft eval:triggers` (#1586 / #1703).
|
|
71
77
|
|
|
72
78
|
## Branch policy & branch verification
|
|
73
79
|
|