@deftai/directive-content 0.93.0 → 0.95.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-sync/SKILL.md +4 -3
- package/QUICK-START.md +1 -1
- package/Taskfile.yml +9 -4
- package/UPGRADING.md +34 -1
- package/commands.md +60 -10
- package/contracts/agent-hook-readiness.md +67 -0
- package/conventions/rule-ownership.json +2 -2
- package/docs/freshness-contract.md +139 -0
- package/package.json +1 -1
- package/packs/skills/skills-pack-0.1.json +11 -9
- package/packs/strategies/strategies-pack-0.1.json +1 -1
- package/resilience/continue-here.md +8 -8
- package/skills/deft-directive-build/SKILL.md +18 -0
- package/skills/deft-directive-pre-pr/SKILL.md +18 -0
- package/skills/deft-directive-review-cycle/SKILL.md +60 -5
- package/skills/deft-directive-setup/SKILL.md +10 -2
- package/skills/deft-directive-swarm/SKILL.md +7 -0
- package/skills/deft-directive-swarm/references/core-ops.md +2 -0
- package/skills/deft-directive-swarm/references/core-phase-5-6.md +2 -0
- package/skills/deft-directive-sync/SKILL.md +181 -26
- package/skills/deft-directive-triage/SKILL.md +3 -3
- package/strategies/research.md +26 -1
- package/tasks/triage-classify.yml +1 -1
- package/tasks/verify.yml +10 -0
- package/templates/agent-prompt-preamble.md +52 -0
- package/templates/swarm-greptile-poller-prompt.md +18 -15
- package/tools/greptile.md +1 -1
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"research"
|
|
122
122
|
],
|
|
123
123
|
"path": "strategies/research.md",
|
|
124
|
-
"body": "# Research Strategy\n\nLook before you leap — investigate the domain before planning.\n\nLegend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.\n\n**⚠️ See also**: [strategies/interview.md](./interview.md) | [strategies/discuss.md](./discuss.md) | [strategies/map.md](./map.md)\n\n> Adapted from [GSD](https://github.com/gsd-build/get-shit-done) research phase.\n\n---\n\n## When to Use\n\n- ~ Before planning a feature in an unfamiliar domain (auth, payments, real-time, etc.)\n- ~ When the feature involves libraries or APIs the agent hasn't used in this project\n- ? Skip for well-understood domains where the agent has strong existing context\n\n## Output\n\n! Before writing output artifacts, follow the [Preparatory Guard](./artifact-guards.md#preparatory-guard-light).\n\nProduce `vbrief/proposed/{feature}-research.vbrief.json` with two mandatory narratives:\n\n! After emitting this scope vBRIEF, surface the GitHub-issue tracking hint from [emit-hints.md](./emit-hints.md) — name all three patterns (none / `--umbrella` / `--per-vbrief`).\n\n### `DontHandRoll` narrative\n\nProblems that look simple but have existing, battle-tested solutions.\n\n- ! For each problem area, specify: **problem**, **recommended library/tool**, **why not hand-roll**\n- ! Check the project's existing dependencies first -- don't add a library when one is already available\n- ~ Consult official docs for the recommended library (use Context7 or equivalent)\n\n**Example narrative content:**\n```\nProblem: JWT validation\nUse: jose\nRationale: Edge cases in token expiry, key rotation, algorithm confusion\n\nProblem: Email templates\nUse: react-email\nRationale: HTML email rendering is notoriously broken across clients\n\nProblem: Rate limiting\nUse: express-rate-limit\nRationale: IP spoofing, distributed state, Redis integration\n```\n\n### `CommonPitfalls` narrative\n\nWhat goes wrong in this domain, why, and how to avoid it.\n\n- ! For each pitfall: **what happens**, **why it happens**, **how to avoid it**, **warning signs**\n- ~ Informed by library docs, codebase patterns, and known failure modes\n- ~ Prioritize pitfalls that agents specifically tend to hit (stubs, missing error handling, hardcoded values)\n\n**Example narrative content:**\n```\nPitfall: Storing plain-text passwords\nWhat: User passwords saved without hashing\nWhy: Agent implements the happy path and forgets security\nAvoid: Use bcrypt/argon2, never store raw passwords\nWarning signs: No crypto import in auth module, password field stored as-is\n```\n\n### `IPRisk` narrative (#738)\n\n! When the project description, the `Don't Hand-Roll` survey, or the\nresearch notes reference third-party intellectual property (IP), the\nresearch phase MUST run the IP-risk heuristic from\n[`../references/ip-risk.md`](../references/ip-risk.md) -- canonical\nimplementation `scripts/ip_risk.py:detect_ip_terms` -- and persist a\nplain-English `IPRisk` narrative on the research vBRIEF.\n\nThe heuristic is permissive on purpose: recognizable IP names (Magic:\nThe Gathering, Pokemon, etc.), fictional-universe terms (Hogwarts,\nTatooine), branded characters, sports leagues, and trademarked products\nall trigger a hit.\n\n- ! When `detect_ip_terms` returns at least one hit, the research output\n MUST: (1) ask the explicit monetization-intent question (personal vs\n commercial); (2) emit `plain_risk_summary(hits, intent)` into the\n `IPRisk` narrative; (3) plan to inject the protection scope items\n (`ip_risk_scope_items(intent)`) at SPECIFICATION-generation time.\n- ! On `commercial` intent, surface the **non-optional** lawyer-\n consultation recommendation in the research output -- this carries\n forward into the interview output and the SPECIFICATION via the\n `IPRisk` narrative.\n- ⊗ Treat the absence of detected terms as proof that the project is\n IP-free. The heuristic only knows about the curated lists; when the\n research scope is vague, ask the user directly whether the project is\n based on a game / film / sports league / brand.\n- ⊗ Provide legal advice -- Deft is not a law firm. The only\n recommendation it makes is **consult a lawyer**.\n\n---\n\n## How Research Feeds Downstream\n\n- ! **Planning** reads research before task decomposition — acceptance criteria account for pitfalls\n- ! **Execution** references \"Don't Hand-Roll\" — agent uses recommended libraries, not custom code\n- ~ **Verification** checks for pitfall warning signs during stub detection\n\n## Research Scope Rules\n\n- ! Research the **current feature only** — not the entire project\n- ! Time-box research — if it takes longer than the feature, scope is wrong\n- ⊗ Research as a reason to delay execution indefinitely\n- ~ Research persists as a vBRIEF in `vbrief/proposed/`\n\n---\n\n## Then: Chaining Gate\n\nAfter research is complete, return to the [chaining gate](./interview.md#chaining-gate)\nso the user can run additional preparatory strategies or proceed to spec generation.\n\n- ! On completion, register artifacts in `./vbrief/plan.vbrief.json`:\n - Update `completedStrategies`: increment `runCount` for `\"research\"`,\n append artifact path (`vbrief/proposed/{feature}-research.vbrief.json`)\n - Append the path to the flat `artifacts` array\n- ! Return to [interview.md Chaining Gate](./interview.md#chaining-gate)\n- ! The research findings MUST inform subsequent strategies and spec generation:\n - \"Don't Hand-Roll\" items become constraints in the specification\n - \"Common Pitfalls\" become acceptance criteria or NFRs\n- ⊗ End the session after research without returning to the chaining gate\n or the invoking strategy's next-step menu\n\n! **Standalone context:** If invoked from a standalone strategy (e.g. map's\n standalone next-step menu) rather than from the interview chaining gate,\n return to the invoking strategy's menu instead.\n\n---\n\n## Workflow\n\n1. **Scope** -- Identify the domain and feature boundaries for research\n2. **Survey** -- Check existing project dependencies, official docs, and known pitfalls\n3. **Document** -- Produce `vbrief/proposed/{feature}-research.vbrief.json` with `DontHandRoll` and `CommonPitfalls` narratives\n4. **Chain** -- Return to [interview.md Chaining Gate](./interview.md#chaining-gate), or -- if invoked from a standalone strategy (e.g. map's standalone next-step menu) -- return to the invoking strategy's menu per the [standalone-context rule](#then-chaining-gate) above\n\n## Anti-Patterns\n\n- ⊗ Building custom solutions for solved problems\n- ⊗ Skipping research for unfamiliar domains (\"how hard can auth be?\")\n- ⊗ Research that produces a reading list instead of actionable guidance\n- ⊗ Research that doesn't flow into planning (written and never referenced)\n- ⊗ Ending after research without chaining into specification generation (chained mode; in standalone context, returning to the invoking strategy's menu satisfies the completion requirement per the [standalone-context rule](#then-chaining-gate))\n"
|
|
124
|
+
"body": "# Research Strategy\n\nLook before you leap — investigate the domain before planning.\n\nLegend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.\n\n**⚠️ See also**: [strategies/interview.md](./interview.md) | [strategies/discuss.md](./discuss.md) | [strategies/map.md](./map.md)\n\n> Adapted from [GSD](https://github.com/gsd-build/get-shit-done) research phase.\n\n---\n\n## When to Use\n\n- ~ Before planning a feature in an unfamiliar domain (auth, payments, real-time, etc.)\n- ~ When the feature involves libraries or APIs the agent hasn't used in this project\n- ? Skip for well-understood domains where the agent has strong existing context\n\n## Scope Confirmation Gate (#1273)\n\n! Before autonomous research begins, present one blocking scope-confirmation prompt and wait for the user's selection. Use the deterministic question contract: the final two numbered options MUST be `Discuss` and `Back`.\n\nPrompt:\n> \"What should this research focus on before I investigate autonomously?\"\n\n1. Confirm the inferred feature/domain scope (Recommended)\n2. Refine the feature boundary or priority areas\n3. Provide sample data, artifacts, constraints, or sensitive areas to account for\n4. Discuss\n5. Back\n\n- ! **Confirmed-scope postcondition (required before survey):** research MUST NOT start the survey until a confirmed research scope is recorded in notes. Confirmation is achieved by **any** of: option **1** (accept inferred scope as-is), or option **2**/**3** after free-form capture (the free-form answer **is** the confirmation of scope — it replaces option-1 confirmation; do not re-open option 1 after capture).\n- ! On option **1** (confirm inferred scope): record the inferred feature/domain as the confirmed research scope and proceed to the survey step.\n- ! On option **2** (refine boundary): ask a **follow-up free-form question** in the next message (one question only) to capture the refined feature boundary or priority areas; wait for the user's answer; record that free-form text as the **confirmed** research scope; then proceed to survey. ⊗ Proceed to survey after option 2 without collecting free-form refinement text. ⊗ Leave research blocked after option 2 with no follow-up path.\n- ! On option **3** (artifacts/constraints/sensitivity): ask a **follow-up free-form question** in the next message (one question only) for sample data paths, artifacts to analyze, constraints, or sensitive areas; wait for the user's answer; record provided artifacts/constraints/sensitivity flags **and** treat the current feature/domain (plus those inputs) as the **confirmed** research scope; then proceed to survey. ⊗ Proceed to survey after option 3 without collecting free-form artifact/constraint input. ⊗ Leave research blocked after option 3 with no follow-up path.\n- ! If the user declines free-form input after option 2 or 3 (empty answer / \"skip\" / \"none\"): re-present the Scope Confirmation Gate once; if they pick option **1**, confirm inferred scope and proceed; if they again decline capture without confirming, stop research and return to the chaining gate or invoking menu — do not survey on unconfirmed scope.\n- ! Record the confirmed scope, any provided artifacts, and any sensitivity flags in the research notes before the survey step.\n- ⊗ Start the survey from project description alone without a confirmed research scope (option 1 acceptance or option 2/3 free-form confirmation).\n\n## Output\n\n! Before writing output artifacts, follow the [Preparatory Guard](./artifact-guards.md#preparatory-guard-light).\n\nProduce `vbrief/proposed/{feature}-research.vbrief.json` with two mandatory narratives:\n\n! After emitting this scope vBRIEF, surface the GitHub-issue tracking hint from [emit-hints.md](./emit-hints.md) — name all three patterns (none / `--umbrella` / `--per-vbrief`).\n\n### `DontHandRoll` narrative\n\nProblems that look simple but have existing, battle-tested solutions.\n\n- ! For each problem area, specify: **problem**, **recommended library/tool**, **why not hand-roll**\n- ! Check the project's existing dependencies first -- don't add a library when one is already available\n- ~ Consult official docs for the recommended library (use Context7 or equivalent)\n\n**Example narrative content:**\n```\nProblem: JWT validation\nUse: jose\nRationale: Edge cases in token expiry, key rotation, algorithm confusion\n\nProblem: Email templates\nUse: react-email\nRationale: HTML email rendering is notoriously broken across clients\n\nProblem: Rate limiting\nUse: express-rate-limit\nRationale: IP spoofing, distributed state, Redis integration\n```\n\n### `CommonPitfalls` narrative\n\nWhat goes wrong in this domain, why, and how to avoid it.\n\n- ! For each pitfall: **what happens**, **why it happens**, **how to avoid it**, **warning signs**\n- ~ Informed by library docs, codebase patterns, and known failure modes\n- ~ Prioritize pitfalls that agents specifically tend to hit (stubs, missing error handling, hardcoded values)\n\n**Example narrative content:**\n```\nPitfall: Storing plain-text passwords\nWhat: User passwords saved without hashing\nWhy: Agent implements the happy path and forgets security\nAvoid: Use bcrypt/argon2, never store raw passwords\nWarning signs: No crypto import in auth module, password field stored as-is\n```\n\n### `IPRisk` narrative (#738)\n\n! When the project description, the `Don't Hand-Roll` survey, or the\nresearch notes reference third-party intellectual property (IP), the\nresearch phase MUST run the IP-risk heuristic from\n[`../references/ip-risk.md`](../references/ip-risk.md) -- canonical\nimplementation `scripts/ip_risk.py:detect_ip_terms` -- and persist a\nplain-English `IPRisk` narrative on the research vBRIEF.\n\nThe heuristic is permissive on purpose: recognizable IP names (Magic:\nThe Gathering, Pokemon, etc.), fictional-universe terms (Hogwarts,\nTatooine), branded characters, sports leagues, and trademarked products\nall trigger a hit.\n\n- ! When `detect_ip_terms` returns at least one hit, the research output\n MUST: (1) ask the explicit monetization-intent question (personal vs\n commercial); (2) emit `plain_risk_summary(hits, intent)` into the\n `IPRisk` narrative; (3) plan to inject the protection scope items\n (`ip_risk_scope_items(intent)`) at SPECIFICATION-generation time.\n- ! On `commercial` intent, surface the **non-optional** lawyer-\n consultation recommendation in the research output -- this carries\n forward into the interview output and the SPECIFICATION via the\n `IPRisk` narrative.\n- ⊗ Treat the absence of detected terms as proof that the project is\n IP-free. The heuristic only knows about the curated lists; when the\n research scope is vague, ask the user directly whether the project is\n based on a game / film / sports league / brand.\n- ⊗ Provide legal advice -- Deft is not a law firm. The only\n recommendation it makes is **consult a lawyer**.\n\n---\n\n## How Research Feeds Downstream\n\n- ! **Planning** reads research before task decomposition — acceptance criteria account for pitfalls\n- ! **Execution** references \"Don't Hand-Roll\" — agent uses recommended libraries, not custom code\n- ~ **Verification** checks for pitfall warning signs during stub detection\n\n## Research Scope Rules\n\n- ! Research the **current feature only** — not the entire project\n- ! Time-box research — if it takes longer than the feature, scope is wrong\n- ⊗ Research as a reason to delay execution indefinitely\n- ~ Research persists as a vBRIEF in `vbrief/proposed/`\n\n---\n\n## Then: Chaining Gate\n\nAfter research is complete, return to the [chaining gate](./interview.md#chaining-gate)\nso the user can run additional preparatory strategies or proceed to spec generation.\n\n- ! On completion, register artifacts in `./vbrief/plan.vbrief.json`:\n - Update `completedStrategies`: increment `runCount` for `\"research\"`,\n append artifact path (`vbrief/proposed/{feature}-research.vbrief.json`)\n - Append the path to the flat `artifacts` array\n- ! Return to [interview.md Chaining Gate](./interview.md#chaining-gate)\n- ! Present the chaining gate as a blocking question and wait for a user selection before any spec generation or additional scope vBRIEF generation.\n- ! Explain at handoff that `completedStrategies` records that research ran, while `vbrief/proposed/{feature}-research.vbrief.json` remains a planning artifact in the scope lifecycle until a later strategy promotes or consumes it.\n- ! The research findings MUST inform subsequent strategies and spec generation:\n - \"Don't Hand-Roll\" items become constraints in the specification\n - \"Common Pitfalls\" become acceptance criteria or NFRs\n- ⊗ Generate implementation scope vBRIEFs directly from research findings or proceed to spec generation before the user chooses from the chaining gate.\n- ⊗ End the session after research without returning to the chaining gate\n or the invoking strategy's next-step menu\n\n! **Standalone context:** If invoked from a standalone strategy (e.g. map's\n standalone next-step menu) rather than from the interview chaining gate,\n return to the invoking strategy's menu instead.\n\n---\n\n## Workflow\n\n1. **Scope confirmation** -- Ask the blocking scope-confirmation prompt, wait for the user, and record scope/artifact/sensitivity inputs\n2. **Survey** -- Check existing project dependencies, official docs, and known pitfalls\n3. **Document** -- Produce `vbrief/proposed/{feature}-research.vbrief.json` with `DontHandRoll` and `CommonPitfalls` narratives\n4. **Chain** -- Return to [interview.md Chaining Gate](./interview.md#chaining-gate), or -- if invoked from a standalone strategy (e.g. map's standalone next-step menu) -- return to the invoking strategy's menu per the [standalone-context rule](#then-chaining-gate) above\n\n## Anti-Patterns\n\n- ⊗ Building custom solutions for solved problems\n- ⊗ Skipping research for unfamiliar domains (\"how hard can auth be?\")\n- ⊗ Starting autonomous research before the Scope Confirmation Gate has captured or explicitly skipped user-provided artifacts/constraints\n- ⊗ Research that produces a reading list instead of actionable guidance\n- ⊗ Research that doesn't flow into planning (written and never referenced)\n- ⊗ Ending after research without chaining into specification generation (chained mode; in standalone context, returning to the invoking strategy's menu satisfies the completion requirement per the [standalone-context rule](#then-chaining-gate))\n"
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
"id": "roadmap",
|
|
@@ -25,14 +25,14 @@ Sessions end. Work must not be lost. A fresh session must resume from **exactly*
|
|
|
25
25
|
|
|
26
26
|
## Continue Checkpoint Contents
|
|
27
27
|
|
|
28
|
-
Persist to `./vbrief/continue.vbrief.json`
|
|
28
|
+
Persist to `./xbrief/continue.xbrief.json` in xBRIEF format (legacy `./vbrief/continue.vbrief.json` is read-accepted until migrated):
|
|
29
29
|
|
|
30
|
-
- ! **Completed** — what's already done (
|
|
31
|
-
- ! **Remaining** — what's left (
|
|
32
|
-
- ! **Decisions** — choices made during this session (
|
|
30
|
+
- ! **Completed** — what's already done (xBRIEF items with `completed` status)
|
|
31
|
+
- ! **Remaining** — what's left (xBRIEF items with `pending` status)
|
|
32
|
+
- ! **Decisions** — choices made during this session (xBRIEF narratives)
|
|
33
33
|
- ~ **Hazards** — what was tricky, what to watch out for (narrative)
|
|
34
34
|
- ! **Resume point** — the exact first thing to do when resuming (narrative on the next `pending` item)
|
|
35
|
-
- ! **Scope
|
|
35
|
+
- ! **Scope xBRIEF reference** — when scope xBRIEFs exist, MUST include `planRef` to the scope xBRIEF(s) the agent was working on (enables the resuming agent to load the durable scope record)
|
|
36
36
|
|
|
37
37
|
## Resume Protocol
|
|
38
38
|
|
|
@@ -47,8 +47,8 @@ Persist to `./vbrief/continue.vbrief.json` in vBRIEF format:
|
|
|
47
47
|
|
|
48
48
|
- ! Continue checkpoints are **ephemeral** — consumed on resume, not permanent records
|
|
49
49
|
- ~ Durable learnings from the session → persist to [meta/lessons.md](../../meta/lessons.md)
|
|
50
|
-
- ~ Durable state → persist to the task's
|
|
51
|
-
- ! Scope
|
|
50
|
+
- ~ Durable state → persist to the task's xBRIEF plan file or scope xBRIEF(s) in lifecycle folders
|
|
51
|
+
- ! Scope xBRIEFs (`./xbrief/{proposed,pending,active,completed,cancelled}/`; legacy `./vbrief/` read-accepted) are **durable** — they persist across sessions and are shared between agents; do not conflate them with ephemeral continue checkpoints
|
|
52
52
|
- ⊗ Accumulate stale continue checkpoints — clean up after resume
|
|
53
53
|
|
|
54
54
|
---
|
|
@@ -59,4 +59,4 @@ Persist to `./vbrief/continue.vbrief.json` in vBRIEF format:
|
|
|
59
59
|
- ⊗ Re-reading full conversation history instead of the continue checkpoint
|
|
60
60
|
- ⊗ Losing in-flight decisions because they weren't persisted
|
|
61
61
|
- ⊗ Starting over from scratch after an interruption
|
|
62
|
-
- ⊗ Creating `continue-{ULID}.json` — the file is singular: `continue.
|
|
62
|
+
- ⊗ Creating `continue-{ULID}.json` — the file is singular: `continue.xbrief.json`
|
|
@@ -344,6 +344,22 @@ feat(phase-2): add REST API endpoints with integration tests
|
|
|
344
344
|
- ! Scope xBRIEF ambiguous -> ask user; ⊗ guess
|
|
345
345
|
- ! Scope needs changes -> propose, get approval, update the scope xBRIEF first
|
|
346
346
|
|
|
347
|
+
|
|
348
|
+
## Probe-then-fill remote claims (#3120)
|
|
349
|
+
|
|
350
|
+
! Before filling any **remote** handoff field (PR URL, PR number, commit/HEAD SHA, CI green/success, review score) or claiming `status: pass` / ship/gate done, MUST **probe then fill**:
|
|
351
|
+
|
|
352
|
+
1. Run same-turn `git` + forge probes (examples: `git rev-parse HEAD`, `gh api repos/<owner>/<repo>/pulls/<N>`, `task pr:watch -- <N> --one-shot`, checks API).
|
|
353
|
+
2. Copy IDs / URLs / SHAs / scores **only** from that probe JSON/text into the evidence block.
|
|
354
|
+
3. Set `proof_status: bound` and attach short raw probe snippets (`command` + `snippet`) for each remote claim.
|
|
355
|
+
|
|
356
|
+
! Handoff evidence axes: **work** (local) / **ship** (pushed branch or PR) / **gate** (CI/review on HEAD). `proof_status` is `bound` | `unbound` | `n/a-no-remote-claim`.
|
|
357
|
+
! **Legal partial:** local work `done` + ship `not_started` / `blocked` **without** PR/SHA/CI/review fields and `proof_status: n/a-no-remote-claim` (or `status: partial`) is valid — do not invent ship state.
|
|
358
|
+
! **Fail ranking:** **invented-done** (false/unbound remote artifacts under pass) is **stricter** than **empty-done**. Unbound remote claims → invalid evidence (fail), not pass-with-notes.
|
|
359
|
+
! Machine check: `validateHandoffEvidence` in `packages/core/src/handoff-evidence/` (see `templates/agent-prompt-preamble.md` §11).
|
|
360
|
+
⊗ Fill PR / SHA / CI / review fields from recollection, narration, or prior-turn memory.
|
|
361
|
+
⊗ Claim `status: pass` with remote fields when `proof_status` is not `bound` or probes are missing (#3120).
|
|
362
|
+
|
|
347
363
|
## Completion
|
|
348
364
|
|
|
349
365
|
- ! When all phases pass and `task check` is green, complete each implemented story via `task scope:complete -- <active-story-path>` before final PR handoff.
|
|
@@ -370,3 +386,5 @@ feat(phase-2): add REST API endpoints with integration tests
|
|
|
370
386
|
- ⊗ Skip the Change Lifecycle Gate because the user said "proceed" -- broad approval does not satisfy the confirmation gate
|
|
371
387
|
- ⊗ Commit or push directly to the default branch -- always create a feature branch first. Exception: user explicitly instructs a direct commit, or `PROJECT-DEFINITION.xbrief.json` narratives contain `Allow direct commits to master: true`
|
|
372
388
|
- ⊗ Add a prohibition (`!` or `⊗`) without scanning the same file for conflicting softer-strength rules (`~`, `≉`) that reference the same term
|
|
389
|
+
- ⊗ Invent remote PR/SHA/CI/review claims in handoff evidence without same-turn probe binding — invented-done (#3120)
|
|
390
|
+
- ⊗ Fill remote ship/gate fields from memory when only local work completed; legal partial omits PR fields (#3120)
|
|
@@ -162,6 +162,22 @@ git --no-pager diff master
|
|
|
162
162
|
- ! If a full Read-Write-Lint-Diff cycle produced zero changes: exit the loop
|
|
163
163
|
- ~ Track iteration count -- if you exceed 3 iterations, pause and assess whether you are oscillating between competing fixes
|
|
164
164
|
|
|
165
|
+
|
|
166
|
+
## Probe-then-fill remote claims (#3120)
|
|
167
|
+
|
|
168
|
+
! Before filling any **remote** handoff field (PR URL, PR number, commit/HEAD SHA, CI green/success, review score) or claiming `status: pass` / ship/gate done, MUST **probe then fill**:
|
|
169
|
+
|
|
170
|
+
1. Run same-turn `git` + forge probes (examples: `git rev-parse HEAD`, `gh api repos/<owner>/<repo>/pulls/<N>`, `task pr:watch -- <N> --one-shot`, checks API).
|
|
171
|
+
2. Copy IDs / URLs / SHAs / scores **only** from that probe JSON/text into the evidence block.
|
|
172
|
+
3. Set `proof_status: bound` and attach short raw probe snippets (`command` + `snippet`) for each remote claim.
|
|
173
|
+
|
|
174
|
+
! Handoff evidence axes: **work** (local) / **ship** (pushed branch or PR) / **gate** (CI/review on HEAD). `proof_status` is `bound` | `unbound` | `n/a-no-remote-claim`.
|
|
175
|
+
! **Legal partial:** local work `done` + ship `not_started` / `blocked` **without** PR/SHA/CI/review fields and `proof_status: n/a-no-remote-claim` (or `status: partial`) is valid — do not invent ship state.
|
|
176
|
+
! **Fail ranking:** **invented-done** (false/unbound remote artifacts under pass) is **stricter** than **empty-done**. Unbound remote claims → invalid evidence (fail), not pass-with-notes.
|
|
177
|
+
! Machine check: `validateHandoffEvidence` in `packages/core/src/handoff-evidence/` (see `templates/agent-prompt-preamble.md` §11).
|
|
178
|
+
⊗ Fill PR / SHA / CI / review fields from recollection, narration, or prior-turn memory.
|
|
179
|
+
⊗ Claim `status: pass` with remote fields when `proof_status` is not `bound` or probes are missing (#3120).
|
|
180
|
+
|
|
165
181
|
## Exit Condition
|
|
166
182
|
|
|
167
183
|
! Exit when a complete Read-Write-Lint-Diff cycle produces **zero changes** -- no file edits in Write, no lint fixes in Lint, and no scope issues in Diff.
|
|
@@ -179,3 +195,5 @@ After exiting:
|
|
|
179
195
|
- ⊗ Ignore the iteration count -- more than 3 iterations usually indicates oscillating fixes or an unclear spec task
|
|
180
196
|
- ⊗ Add a prohibition (`!` or `⊗`) without scanning the same file for conflicting softer-strength rules (`~`, `≉`) that reference the same term
|
|
181
197
|
- ⊗ Skip `task pr:check-closing-keywords` (#737) before pushing a PR. Intent mode (#3015) also refuses bare/conditional real `Closes #N` without `--allow-close`. The negation-context substring match is the Layer 0 (prevention) gate that prevents the recurring auto-close of umbrella / staying-OPEN issues observed in #697 (closed #642), #401 (closed #642), #700 (closed #233), and #735 (closed #734) -- each incident required manual reopen and downstream cleanup. The lint's three-state exit (0 clean / 1 hits found / 2 config error) MUST be treated as a hard refusal: rewrite the PR body / commit messages until clean, OR pass `--allow-known-false-positives` ONLY for legitimately-quoted occurrences (test fixtures, documentation that discusses the trigger token literally). See `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 1 for the corresponding Layer 3 (recovery) `pr:check-protected-issues` rule (#701)
|
|
198
|
+
- ⊗ Invent remote PR/SHA/CI/review claims in handoff evidence without same-turn probe binding — invented-done (#3120)
|
|
199
|
+
- ⊗ Fill remote ship/gate fields from memory when only local work completed; legal partial omits PR fields (#3120)
|
|
@@ -270,7 +270,7 @@ Remediation:
|
|
|
270
270
|
- `gh pr checks <N>`
|
|
271
271
|
- `gh api repos/<owner>/<repo>/pulls/<N> -q .head.sha` for HEAD pin
|
|
272
272
|
- `gh api repos/<owner>/<repo>/commits/<sha>/check-runs` for Greptile terminal check-run
|
|
273
|
-
5. Evaluate the same Step 6 fail-closed all-of (terminal check-run + HEAD SHA + Last reviewed commit + confidence
|
|
273
|
+
5. Evaluate the same Step 6 fail-closed all-of (terminal check-run + HEAD SHA + Last reviewed commit + confidence meets resolved min (policy/dogfood/default; see Step 6 #3095) + no P0/P1).
|
|
274
274
|
6. Surface missing-task once to the operator/parent on first detection; do not silently rebrand freestyle sleep as `pr:watch`.
|
|
275
275
|
|
|
276
276
|
⊗ Fake a successful `pr:watch` or `review-monitor:*` gate when every dual-invoke probe failed.
|
|
@@ -278,7 +278,7 @@ Remediation:
|
|
|
278
278
|
⊗ Invent ad-hoc `sleep` / main-session poll / OpenClaw cron loops outside Approach 1–3 when the skill already names this fallback (#2878 / statusreport#153 recurrence).
|
|
279
279
|
⊗ Skip Step 6 fail-closed fields because deterministic tasks are missing — the gh surfaces above remain mandatory.
|
|
280
280
|
|
|
281
|
-
! When `clean_gate_holdout=ci_failures` and Greptile otherwise satisfies the probe-side Step 6 fields (SHA match on HEAD, confidence
|
|
281
|
+
! When `clean_gate_holdout=ci_failures` and Greptile otherwise satisfies the probe-side Step 6 fields (SHA match on HEAD, confidence meets resolved min (policy/dogfood/default; see Step 6 #3095), no P0/P1, not errored): **MUST NOT** idle-poll hoping CI heals. Treat Greptile CLEAN + CI red with the **same ownership** as a Greptile P0 for a merge-ready worker — one fix batch, re-push, re-probe.
|
|
282
282
|
|
|
283
283
|
! On persistent `ci_failures` holdout: exit the Greptile wait immediately, fetch failing check annotations (`gh pr checks <N>`, CodeQL / required-check details, or `ci_failed_checks` from `pr:watch --json`), fix or escalate with evidence, then re-enter the review loop after CI is green.
|
|
284
284
|
|
|
@@ -324,6 +324,35 @@ Remediation:
|
|
|
324
324
|
|
|
325
325
|
⊗ Treat a stall as silent -- if the elapsed clock crosses the 10-minute threshold the agent MUST surface the menu, even if the agent is mid-poll. Continuing to poll past the threshold without user input is forbidden.
|
|
326
326
|
|
|
327
|
+
### Owner Continuity Gate (#3090)
|
|
328
|
+
|
|
329
|
+
! After any claim of `drive-to: merge-ready`, babysit, shepherd, or "driving review-cycle / merge" on an **open PR**, the **same turn** MUST end in exactly one of:
|
|
330
|
+
|
|
331
|
+
- **A.** Approach 1 monitor live + sticky `<!-- deft:review-owner -->` lease registered (or #2878 gh-only lease equivalent). Parent yields with an **active** child / monitor and emits `review_cycle: in_progress:<pr>#<monitor_or_lease_ref>`.
|
|
332
|
+
- **B.** Parent-retained ownership: parent does **not** mark the work complete; the next concrete action is an explicit dual-source poll/fix (Step 1 + Step 6). Emit `review_cycle: in_progress:<pr>#parent-retained` (or lease id when a sticky lease exists).
|
|
333
|
+
- **C.** Explicit finish to caller/principal: `BLOCKED` / needs decision / `FAILED` with PR URL + HEAD SHA + why. Emit `review_cycle: skipped:<reason>` or keep `in_progress` only when a live owner remains; never freeform `started`.
|
|
334
|
+
|
|
335
|
+
! **`review_cycle` evidence enum (portable — all consumers / handoffs / preamble §11 / swarm finish messages):** **only**
|
|
336
|
+
- `done` — Step 6 fail-closed all-of met on current HEAD (terminal check + HEAD pin + confidence bar + **0 P0/P1** via **dual-source**)
|
|
337
|
+
- `in_progress:<pr>#<monitor_or_lease_ref>` — verifiable sticky lease, registered monitor id, or documented `parent-retained` ownership
|
|
338
|
+
- `skipped:<reason>` — intentional skip (e.g. no-pr, operator cancel)
|
|
339
|
+
- `n/a` — work never entered review-cycle
|
|
340
|
+
|
|
341
|
+
! Layer **L4** `status: pass` (or equivalent process-green handoff) is **illegal** unless `review_cycle: done` **or** `review_cycle: in_progress:…` with **verifiable** sticky lease / parent-retained ownership documented on that turn.
|
|
342
|
+
|
|
343
|
+
! Opening a PR may use `in_progress` + lease; the **merge path** requires `done` (stricter product merge bars remain out of scope).
|
|
344
|
+
|
|
345
|
+
! When dual-source fetch shows open P0/P1 under Step 6 / CLEAN evaluation: continue the fix loop **or** exit **BLOCKED** to the parent — never idle.
|
|
346
|
+
|
|
347
|
+
! Optional machine gate: `deft verify:l4-owner --pr <N>` (or `task verify:l4-owner -- --pr <N>`; dual-invoke same order as other gates). Exit **0** only when a sticky lease is fresh on the PR **or** the caller asserts `--review-cycle done` after Step 6 (lease-or-done machine gate). `skipped` / `n/a` / parent-retained are process evidence only and do **not** satisfy this machine gate. Exit **1** on silent hold (no lease, no done). Pair with existing monitor-without-lease regression (#2797).
|
|
348
|
+
|
|
349
|
+
⊗ End an owning turn with **0 children**, **no sticky lease**, and **no finish signal** after a drive-to-merge / babysit / shepherd claim (**silent hold**).
|
|
350
|
+
⊗ Treat check-run **SUCCESS alone** as CLEAN or merge-ready while dual-source P0/P1 remain open.
|
|
351
|
+
⊗ Emit freeform `review_cycle: started` / `pending` / `initiated` or L4 `status: pass` without **A** (or parent-retained **B** with explicit next action) or full Step 6 `done`.
|
|
352
|
+
⊗ Solve Owner Continuity via host cron-as-Approach-1 or always-block-parent-until-merge — use A/B/C above (#2876 / #3090).
|
|
353
|
+
|
|
354
|
+
~ **Eval / regression (#3090):** Given PR open + check SUCCESS + open inline P1s + agent text claims driving merge + turn ends with 0 subagents and no lease → **FAIL** (Owner Continuity Gate), not PASS.
|
|
355
|
+
|
|
327
356
|
### Review Monitoring
|
|
328
357
|
! **Background / independent dispatch (#1880 Gap D):** Long-running review-cycle owners and pollers (>~3 min) MUST be dispatched independently / in the background so the parent conversation stays interactive. On Cursor, use the Task tool background path (`run_in_background: true`). This generalizes the Approach-1 sub-agent monitor rule to implementation and fix workers as well — foreground dispatch is reserved for short tasks. The parent receives completion via `DONE` / `BLOCKED` / `FAILED` per `templates/agent-prompt-preamble.md` §11.
|
|
329
358
|
|
|
@@ -372,7 +401,7 @@ Remediation:
|
|
|
372
401
|
|
|
373
402
|
1. ! Launch via the matching primitive: `start_agent` (Warp), `spawn_subagent` (grok-build / TUI / non-Warp), the Cursor `Task` tool with `run_in_background: true` (`cursor-composer` / `cursor-cloud-agent`, #1877), **or OpenClaw `sessions_spawn` (`openclaw`, #2876)** with a prompt that instructs it to poll for Greptile completion. For `spawn_subagent`, Cursor `Task`, and OpenClaw `sessions_spawn` 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).
|
|
374
403
|
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; for OpenClaw `sessions_spawn` the host session completion / messaging channel (prefer `task pr:watch` inside the child when available). Front-load the first check to catch fast reviews.
|
|
375
|
-
3. ! When the exit condition is met (Greptile review current on the HEAD commit SHA, confidence
|
|
404
|
+
3. ! When the exit condition is met (Greptile review current on the HEAD commit SHA, confidence meets resolved min (policy/dogfood/default; see Step 6 #3095), no P0/P1 remaining), the sub-agent reports completion back to the parent (via `send_message_to_agent`, the spawn_subagent result channel, or the OpenClaw sessions completion channel).
|
|
376
405
|
4. ! The main conversation pane stays fully interactive during monitoring -- the user (or parent monitor) can continue other work.
|
|
377
406
|
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.
|
|
378
407
|
|
|
@@ -389,6 +418,11 @@ Remediation:
|
|
|
389
418
|
|
|
390
419
|
~ Recurrence: enterprize PR #43 (2026-08-02) — first monitor polled live, host settled empty/unknown; parent spawned a second same-`taskName` monitor; dual lease collision while PR stayed open. See also `meta/lessons.md` and FC04 / growth friction R1 + R10.
|
|
391
420
|
|
|
421
|
+
|
|
422
|
+
### Completion latch on settle replay (#3092)
|
|
423
|
+
|
|
424
|
+
! **Empty settle** is not a latch hit — use Empty announce ≠ done (#3044) above. When the parent has already emitted **one** consolidate for a monitor/leaf `runId` and the harness re-delivers an **identical or equivalent** non-empty settle for the same key, stay **silent** (no re-QC, no second final; host silent token when defined). Re-open only on new runId, principal reopen, or material new evidence. Full MUST: `templates/agent-prompt-preamble.md` §11.5.
|
|
425
|
+
|
|
392
426
|
### Single review-monitor lease (#3044 / #2814)
|
|
393
427
|
|
|
394
428
|
! **One sticky lease per PR:** ownership is the single sticky GitHub PR comment `<!-- deft:review-owner -->` (or the dual-invoke `review-monitor:register` form that writes it). Parallel ownership is forbidden.
|
|
@@ -452,7 +486,7 @@ NOTES: <short>
|
|
|
452
486
|
- Second check: wait ~60 seconds, then poll
|
|
453
487
|
- Subsequent checks: wait ~90 seconds, then poll
|
|
454
488
|
2. ! Poll using `gh pr view <number> --comments` and `gh pr checks <number>` in the same shell session
|
|
455
|
-
3. ! When the exit condition is met (Greptile review current, confidence
|
|
489
|
+
3. ! When the exit condition is met (Greptile review current, confidence meets resolved min (policy/dogfood/default; see Step 6 #3095), no P0/P1), exit the loop and proceed to Step 5
|
|
456
490
|
4. ! If the user interrupts (Ctrl+C or equivalent), exit gracefully and report current review status
|
|
457
491
|
|
|
458
492
|
! Greptile may advance its review by **editing an existing PR issue comment** rather than creating a new PR review object. Do NOT rely solely on `pulls/{number}/reviews` — that endpoint may remain stale at an older commit SHA even after Greptile has reviewed the latest commit.
|
|
@@ -493,7 +527,7 @@ NOTES: <short>
|
|
|
493
527
|
```
|
|
494
528
|
|
|
495
529
|
A missing or non-matching completion marker is `unknown`. See [`../../templates/swarm-greptile-poller-prompt.md`](../../templates/swarm-greptile-poller-prompt.md) `### Last reviewed commit:` for the canonical regex shared with the push-driven poller loop.
|
|
496
|
-
4. ! **Confidence
|
|
530
|
+
4. ! **Confidence meets resolved min (#3095)** — the parsed `Confidence Score: X/5` is **>=** the resolved floor from `plan.policy.review.minGreptileConfidence` (inspect: `task policy:show --field=minGreptileConfidence`; `pr:watch` / `pr:merge-ready` share this SoT). Resolution order: typed project policy > framework dogfood detect (framework source → **5**) > consumer default (**4**, legacy confidence > 3 / 4/5+). A score below the floor, an unparsed confidence, or an absent confidence is `unknown`. Directive dogfood MUST NOT exit CLEAN on 4/5.
|
|
497
531
|
5. ! **No P0/P1 findings** — the triple-tier (+ Tier 2.5) detector reports zero P0 and zero P1 findings (P2 issues are non-blocking style suggestions and do not gate the loop).
|
|
498
532
|
|
|
499
533
|
! All five fields MUST hold on the SAME single fresh fetch. The agent MUST NOT assemble a "pass" by combining a terminal check-run observed on one poll with a confidence parsed on an earlier poll — the read is atomic per the SHA-pinned-AT-READ-TIME rule above.
|
|
@@ -583,8 +617,27 @@ task lifecycle:event -- emit plan:approved \
|
|
|
583
617
|
3. ~ This step mirrors `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 2 and applies to ALL PR merges, not just swarm runs.
|
|
584
618
|
4. ! For PRs that referenced any umbrella / staying-OPEN issue (`Refs #N`), the INVERSE check applies: any protected issue that auto-closed MUST be reopened with a comment citing #701 and the merged PR. See `skills/deft-directive-swarm/SKILL.md` Phase 6 Step 1 protected-issue reopen sweep and `meta/lessons.md` `## GitHub Closing-Keyword False-Positive Layer 3` for the persistent `closingIssuesReferences` link case (Layer 3, #701).
|
|
585
619
|
|
|
620
|
+
|
|
621
|
+
## Probe-then-fill remote claims (#3120)
|
|
622
|
+
|
|
623
|
+
! Before filling any **remote** handoff field (PR URL, PR number, commit/HEAD SHA, CI green/success, review score) or claiming `status: pass` / ship/gate done, MUST **probe then fill**:
|
|
624
|
+
|
|
625
|
+
1. Run same-turn `git` + forge probes (examples: `git rev-parse HEAD`, `gh api repos/<owner>/<repo>/pulls/<N>`, `task pr:watch -- <N> --one-shot`, checks API).
|
|
626
|
+
2. Copy IDs / URLs / SHAs / scores **only** from that probe JSON/text into the evidence block.
|
|
627
|
+
3. Set `proof_status: bound` and attach short raw probe snippets (`command` + `snippet`) for each remote claim.
|
|
628
|
+
|
|
629
|
+
! Handoff evidence axes: **work** (local) / **ship** (pushed branch or PR) / **gate** (CI/review on HEAD). `proof_status` is `bound` | `unbound` | `n/a-no-remote-claim`.
|
|
630
|
+
! **Legal partial:** local work `done` + ship `not_started` / `blocked` **without** PR/SHA/CI/review fields and `proof_status: n/a-no-remote-claim` (or `status: partial`) is valid — do not invent ship state.
|
|
631
|
+
! **Fail ranking:** **invented-done** (false/unbound remote artifacts under pass) is **stricter** than **empty-done**. Unbound remote claims → invalid evidence (fail), not pass-with-notes.
|
|
632
|
+
! Machine check: `validateHandoffEvidence` in `packages/core/src/handoff-evidence/` (see `templates/agent-prompt-preamble.md` §11).
|
|
633
|
+
⊗ Fill PR / SHA / CI / review fields from recollection, narration, or prior-turn memory.
|
|
634
|
+
⊗ Claim `status: pass` with remote fields when `proof_status` is not `bound` or probes are missing (#3120).
|
|
635
|
+
|
|
586
636
|
## Anti-Patterns
|
|
587
637
|
|
|
638
|
+
- ⊗ End owning turn with 0 children, no sticky lease, and no finish after drive-to-merge / babysit / shepherd claim — silent hold (#3090)
|
|
639
|
+
- ⊗ Emit freeform `review_cycle: started` / `pending` / `initiated` or L4 `status: pass` without `done` or verifiable `in_progress:<pr>#…` lease/parent-retained (#3090)
|
|
640
|
+
- ⊗ Treat check-run SUCCESS alone as CLEAN / merge-ready while dual-source P0/P1 remain (#3090)
|
|
588
641
|
- ⊗ Ignore [`coding/review.md`](../../coding/review.md) while running this adapter — universal batch/severity/exit/post-merge rules live there
|
|
589
642
|
- ⊗ Route PR shepherding to Cursor global `babysit` on Deft-managed repos when `.deft/core/` is installed -- use this review-cycle skill instead (#2261)
|
|
590
643
|
- ⊗ Route OpenClaw babysit/shepherd/watch to main-session gh poll + cron when `sessions_spawn` is available -- use Approach 1 with `sessions_spawn` (#2876 / #2261)
|
|
@@ -621,3 +674,5 @@ task lifecycle:event -- emit plan:approved \
|
|
|
621
674
|
- ⊗ Treat empty/unknown review-monitor settle as DONE/CLEAN/merge-ready without same-turn ground truth (#3044 / FC04 residual)
|
|
622
675
|
- ⊗ Spawn a second review-monitor while prior owner is running or last settle was empty/unknown without terminal ground truth (#3044)
|
|
623
676
|
- ⊗ Accept empty review-monitor final message missing STATUS/HEAD/CHECKS/MERGE handback (#3044)
|
|
677
|
+
- ⊗ Invent remote PR/SHA/CI/review claims in handoff evidence without same-turn probe binding — invented-done (#3120)
|
|
678
|
+
- ⊗ Fill remote ship/gate fields from memory when only local work completed; legal partial omits PR fields (#3120)
|
|
@@ -655,7 +655,9 @@ omit = [
|
|
|
655
655
|
- **anything else** (discuss, yolo, speckit, research, brownfield, map, etc.) →
|
|
656
656
|
1. ! Read `deft/strategies/{strategy-name}.md` **right now, in this same turn**
|
|
657
657
|
2. ! Begin the strategy's workflow immediately — ask its first question
|
|
658
|
-
3. !
|
|
658
|
+
3. ! For `research`, the first question is the strategy's Scope Confirmation Gate (#1273); ask it and wait before any autonomous research begins.
|
|
659
|
+
4. ! For `research`, after the research artifact is written, surface the strategy's Then: Chaining Gate and wait for a user selection; do NOT create scope xBRIEFs from research output unless the user later chooses a spec-generating path; do NOT fall through to the interview output path after research.
|
|
660
|
+
5. ! **STOP reading this section** — do NOT use the interview process below
|
|
659
661
|
|
|
660
662
|
- ⊗ Default to interview without reading PROJECT-DEFINITION.xbrief.json
|
|
661
663
|
- ⊗ Continue reading below when PROJECT-DEFINITION.xbrief.json specifies a non-interview strategy
|
|
@@ -760,8 +762,14 @@ Per [strategies/interview.md](../../strategies/interview.md#interview-rules-shar
|
|
|
760
762
|
**Spec Structure (both paths):**
|
|
761
763
|
- ! Overview, Architecture
|
|
762
764
|
- ! Implementation Plan: scope xBRIEFs in `xbrief/proposed/` with phases and dependencies
|
|
763
|
-
- ! Explicit dependency mapping
|
|
765
|
+
- ! Explicit dependency mapping MUST use the field consumers actually read for the scope shape:
|
|
766
|
+
- **Story-shaped scopes** (`plan.metadata.kind = "story"` or scopes intended for swarm allocation / decompose): sequential/blocked work MUST set `plan.metadata.swarm.depends_on` to an array of **resolvable story identifiers**. Swarm readiness, decompose, and queue traversal read **only** this field for story ordering — not `plan.metadata.dependencies` alone. ! Each `depends_on` entry MUST equal the blocking scope's `plan.id` when that field is set; otherwise the blocking artifact's **filename stem** (basename with `.xbrief.json` / `.vbrief.json` stripped — the same stem readiness uses as `story_id`). ⊗ Use rendered titles, free-form prose, date-only prefixes, or unstripped full filenames — those do not resolve and leave the generated scope blocked.
|
|
767
|
+
- **Phase/epic or cross-scope roadmap batches**: MAY also set plan-level `plan.metadata.dependencies` for roadmap/export readers.
|
|
768
|
+
- `edges` / `references` may supplement documentation but **do not** replace `plan.metadata.swarm.depends_on` for sequential story scopes.
|
|
769
|
+
- ! When multiple scopes are produced in one Phase 3 pass, encode machine-readable dependency ordering before finishing the write: independent scopes use empty `plan.metadata.swarm.depends_on` (`[]`); sequential/blocked story scopes use non-empty `plan.metadata.swarm.depends_on`. Optionally mirror the same DAG in `plan.metadata.dependencies` for roadmap views.
|
|
764
770
|
- ~ Scopes designed for parallel work by multiple agents
|
|
771
|
+
- ⊗ Deposit sequential story-shaped scopes with only `plan.metadata.dependencies` / `edges` / `references` and missing `plan.metadata.swarm.depends_on` — orchestration will treat them as independent or reject readiness.
|
|
772
|
+
- ⊗ Deposit multiple generated scope xBRIEFs with no dependency metadata and rely on filenames or human prose for ordering.
|
|
765
773
|
- ! Testing Strategy and Deployment captured in narratives
|
|
766
774
|
- ⊗ Write code — specification only
|
|
767
775
|
|
|
@@ -115,6 +115,12 @@ Large multi-host skills use a **host-neutral core** plus **one** per-host adapte
|
|
|
115
115
|
⊗ Multi-sentence progress-only first response after announce with zero tools / yield (#2943 text-repetition hang).
|
|
116
116
|
⊗ Treat thin DONE (no PR URL / merge evidence) as success (#2943).
|
|
117
117
|
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Completion latch after first consolidate (#3092)
|
|
121
|
+
|
|
122
|
+
! After the parent emits **one** user/caller-visible consolidate for a child `runId` / settle batch, **identical or equivalent completion replay** for the same key MUST be **silent** (no tools, no re-QC, no second final; host silent token when defined, e.g. OpenClaw `NO_REPLY`). Re-open only on new `runId`/batch, principal explicit reopen, or materially new evidence (new HEAD, new blocker class). Replay storms: at most one fail-loud note, then silent. Full MUST: `templates/agent-prompt-preamble.md` §11.5. Depth: `references/core-phase-5-6.md`. Orthogonal to empty settle ≠ done (#3044).
|
|
123
|
+
|
|
118
124
|
## Runtime Capability Detection (summary)
|
|
119
125
|
|
|
120
126
|
! Before selecting a launch method, probe the environment. Full probe text: [`references/core-phase-3.md`](references/core-phase-3.md).
|
|
@@ -152,6 +158,7 @@ Large multi-host skills use a **host-neutral core** plus **one** per-host adapte
|
|
|
152
158
|
- ⊗ Prose-only phase handoff after cohort complete (“I will spawn…”) (#2934)
|
|
153
159
|
- ⊗ Multi-sentence progress-only first response after leaf announce with zero tools / yield (#2943)
|
|
154
160
|
- ⊗ Treat thin DONE (no PR URL / merge evidence) as success (#2943)
|
|
161
|
+
- ⊗ Second+ user-visible consolidate for the same child runId without new evidence (#3092)
|
|
155
162
|
- ⊗ Assign overlapping files to multiple agents
|
|
156
163
|
- ⊗ Merge before Greptile exit condition (score > 3, no P0/P1)
|
|
157
164
|
- ⊗ Skip Phase 0 approval before Phase 1
|
|
@@ -143,3 +143,5 @@ CONSTRAINTS:
|
|
|
143
143
|
- ⊗ End a cohort phase-boundary turn with only narrative “I will spawn…” / “review next” and zero next-phase tool calls and no explicit terminal status (`blocked` / `awaiting-human` / `done`) (#2934)
|
|
144
144
|
- ⊗ Multi-sentence progress-only first response after leaf completion announce (`subagent_announce` / parent-push) with zero tools / yield — tool-first ground-truth batch or host yield only (#2943 text-repetition hang)
|
|
145
145
|
- ⊗ Treat thin DONE (completion without PR URL / merge evidence) as success — re-dispatch or take over after ground truth (#2943)
|
|
146
|
+
- ⊗ Second+ user-visible consolidate / final for the same child `runId` / settle batch without new evidence or principal reopen — completion latch silent-replay path (`templates/agent-prompt-preamble.md` §11.5 / #3092)
|
|
147
|
+
- ⊗ Full dual-source re-QC solely because the harness re-delivered the same settle event (#3092)
|
|
@@ -37,6 +37,8 @@ For each agent's PR:
|
|
|
37
37
|
|
|
38
38
|
! **Parent tool-first after leaf announce (#2943):** On the first parent turn after a leaf completion event (`subagent_announce` / parent-push / host completion notify), the parent MUST either (a) emit a **tool-first** ground-truth batch (`gh` / `git` / worktree or file status), or (b) **yield** (`sessions_yield` on OpenClaw, or host equivalent). ⊗ Multi-sentence progress-only first response with zero tools / yield — the text-repetition hang class.
|
|
39
39
|
|
|
40
|
+
! **Completion latch after first consolidate (#3092):** After the parent has emitted **one** user/caller-visible consolidate for a child `runId` / settle batch (accept or reject), **identical or equivalent completion replay** for the same key MUST be **silent** (no tools, no re-QC, no second final; host silent token when defined, e.g. OpenClaw `NO_REPLY`). Re-open only on new `runId`/batch, principal explicit reopen, or **materially new** evidence (new HEAD, new blocker class) — not fat re-embeds of the same rollup. Replay storms: at most one fail-loud note, then silent. Full MUST + anti-patterns: `templates/agent-prompt-preamble.md` §11.5. Orthogonal to empty settle ≠ done (#3044).
|
|
41
|
+
|
|
40
42
|
### Complete xBRIEFs
|
|
41
43
|
|
|
42
44
|
! The cohort's story xBRIEFs are completed by the deterministic **cohort completion sweep** in Phase 6 (`task swarm:complete-cohort`, Phase 6 Step 1.5 below), which runs AFTER the merge cascade. Do NOT move story xBRIEFs out of `xbrief/active/` before their PRs merge — a pre-merge move creates premature state if the merge cascade fails. This section is where the monitor records, per story, what the post-merge sweep will finalize:
|