@deftai/directive-content 0.98.1 → 0.100.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/Taskfile.yml +4 -0
- package/coding/coding.md +2 -3
- package/commands.md +29 -4
- package/context/tool-design.md +116 -0
- package/contracts/host-lifecycle-duties.md +9 -0
- package/docs/agent-docs.md +1 -0
- package/docs/consumer-check-contract.md +26 -3
- package/docs/decision-log.md +114 -0
- package/docs/delivery-attempt.md +17 -1
- package/docs/gate-integrity.md +112 -0
- package/docs/host-surface-assumptions.md +149 -0
- package/docs/inter-run-learning.md +4 -0
- package/docs/scope-provenance.md +1 -1
- package/docs/skill-pin-policy.md +9 -0
- package/main.md +24 -0
- package/meta/philosophy.md +8 -0
- package/meta/security.md +16 -2
- package/package.json +1 -1
- package/packs/patterns/patterns-pack-0.1.json +53 -15
- package/packs/rules/rules-pack-0.1.json +730 -914
- package/packs/skills/skills-pack-0.1.json +19 -9
- package/packs/strategies/strategies-pack-0.1.json +1 -1
- package/packs/swarm-spec/swarm-spec-pack-0.1.json +1 -1
- package/patterns/goal-gate-determinism.md +146 -0
- package/patterns/llm-app.md +9 -0
- package/skills/deft-directive-build/SKILL.md +62 -0
- package/skills/deft-directive-portfolio-priority/SKILL.md +3 -3
- package/skills/deft-directive-pre-pr/SKILL.md +32 -0
- package/skills/deft-directive-refinement/SKILL.md +8 -0
- package/skills/deft-directive-review-cycle/SKILL.md +47 -2
- package/skills/deft-directive-swarm/SKILL.md +32 -0
- package/skills/deft-directive-swarm/references/core-ops.md +8 -1
- package/skills/deft-directive-swarm/references/core-phase-0.md +2 -0
- package/skills/deft-directive-swarm/references/core-phase-3.md +18 -0
- package/skills/deft-directive-swarm/references/core-phase-4.md +63 -3
- package/skills/deft-directive-swarm/references/core-phase-5-6.md +6 -2
- package/skills/deft-directive-swarm/references/host-claude-code.md +7 -0
- package/skills/deft-directive-swarm/references/host-cursor.md +7 -0
- package/skills/deft-directive-swarm/references/host-generic.md +6 -0
- package/skills/deft-directive-swarm/references/host-grok-build.md +7 -0
- package/skills/deft-directive-swarm/references/host-openclaw.md +7 -0
- package/skills/deft-directive-swarm/references/host-warp.md +6 -0
- package/skills/deft-directive-write-skill/SKILL.md +2 -0
- package/strategies/rapid.md +11 -0
- package/swarm/swarm.md +54 -0
- package/tasks/decision.yml +30 -0
- package/tasks/swarm.yml +16 -0
- package/tasks/verify.yml +20 -0
- package/templates/agent-prompt-preamble.md +9 -5
- package/templates/agents-entry.md +18 -0
- package/templates/swarm-greptile-poller-prompt.md +48 -4
- package/vbrief/schemas/vbrief-core.schema.json +5 -0
- package/vbrief/schemas/xbrief-core-0.8.schema.json +5 -0
- package/vbrief/vbrief.md +37 -0
- package/verification/verification.md +2 -1
|
@@ -83,6 +83,17 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
83
83
|
⊗ `stop-at: pr-open` without a named babysit / merge-path owner, or dual review-monitor leases on recovery (#3044 / #2261).
|
|
84
84
|
⊗ Stand down at CLEAN under human-merge with no reachable post-merge `scope:complete` owner.
|
|
85
85
|
|
|
86
|
+
## Nuclear-family A2A topology (#3155)
|
|
87
|
+
|
|
88
|
+
! Agent-to-agent messaging is **nuclear-family** only: parent / sibling (same cohort) / child. Cross-cohort or cross-session coordination goes through a shared parent or durable parent-owned artifacts — not peer mesh. Depth: `.deft/core/swarm/swarm.md` `## Communication Topology (#3155)`; security: `.deft/core/meta/security.md` `## Unbounded A2A graphs (#3155)`; ADR: `docs/decisions/ADR-003-a2a-nuclear-family-topology.md` (decision input to #2705; client-posture ADR remainder stays on #2705). Pair: retained children #3158; parent epic #3179.
|
|
89
|
+
⊗ Open-mesh agent-to-agent messaging across cohorts or sessions ("agents everywhere").
|
|
90
|
+
⊗ Treat retained / re-addressable children as license to mesh outside the nuclear family.
|
|
91
|
+
|
|
92
|
+
## Mid-scope gate capability tier (#3158 / #954)
|
|
93
|
+
|
|
94
|
+
! Mid-scope gates: **split-dispatch** when `agent_id` is terminal; retain-capable hosts (continue-by-agent-id / message-later / steer-mid-flight) MAY re-message the live child. Retention = orchestration only — not constitution self-edit (#3164). Depth: preamble §10; `deft-directive-swarm`. Topology: #3155 nuclear-family. ⊗ Invent retain on one-shot hosts.
|
|
95
|
+
|
|
96
|
+
|
|
86
97
|
## Review-surface precedence (#2308)
|
|
87
98
|
|
|
88
99
|
! 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).
|
|
@@ -91,6 +102,9 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
91
102
|
|
|
92
103
|
! `plan.policy.valueFeedback.enabled` defaults OFF — `deft policy:show --field=valueFeedback` / `deft policy:enable-value-feedback -- --confirm`; `deft value:show`; `deft feedback:file`; `.deft/core/.agents/skills/deft-directive-feedback/SKILL.md` (#1709).
|
|
93
104
|
|
|
105
|
+
## Structured decision log (#1396 / #3211)
|
|
106
|
+
! Significant choices → `deft decision:write`; re-load → `deft decision:list` / `xbrief/decisions/`; depth `.deft/core/docs/decision-log.md` (not triage/ADRs/lessons).
|
|
107
|
+
|
|
94
108
|
## Eval and framework health (#1703)
|
|
95
109
|
|
|
96
110
|
! `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).
|
|
@@ -114,6 +128,10 @@ Legacy `vbrief/` read-accepted; `deft migrate:xbrief` for `xbrief/` (v0.6→v0.8
|
|
|
114
128
|
|
|
115
129
|
## Development Process
|
|
116
130
|
|
|
131
|
+
### Gate integrity (#3156)
|
|
132
|
+
|
|
133
|
+
! When a quality gate fails, fix the product/process/test under test — ⊗ clear red by editing the gate definition, verifier, reward, required check, coverage floor, or policy flag solely to go green. Deliberate gate changes go through issue/PR + review. Depth: `.deft/core/docs/gate-integrity.md` (refine-internal SkillOpt stays on #2436).
|
|
134
|
+
|
|
117
135
|
### Implementation Intent Gate (#810 / #1193)
|
|
118
136
|
|
|
119
137
|
! `deft xbrief:preflight -- <path>` on `xbrief/active/` before code-writing; action-verb (`build`, `implement`, `ship`, `swarm`, `run agents`, `start agent`) (#810). Slash-command sessions inherit only that verb (`DEFT_SESSION_SLASH_VERB`); non-implement verbs (`/github-issue`, `/triage`, …) MUST NOT authorize implement/push/PR/merge/deploy (#1193) — `commands.md` / `contracts/intent-ceiling.md`.
|
|
@@ -196,20 +196,64 @@ for m in _TIER25_RE.finditer(body):
|
|
|
196
196
|
# Greptile sometimes inlines the verdict as plain prose, e.g.
|
|
197
197
|
# Three P1 findings (two from prior review, one new): wrong exception ...
|
|
198
198
|
# Not safe to merge until the mocked-import test defect is resolved.
|
|
199
|
+
# should-not-merge / Do not merge until residual risk is documented (#3225)
|
|
200
|
+
# Safe to merge once corrected
|
|
199
201
|
# P1 -- wrong exception type for state validation in populate()
|
|
200
202
|
# Negation-context guard applies to the count-prose sentinel (`No P0 findings`,
|
|
201
|
-
# `Zero P1 findings` MUST NOT trigger).
|
|
202
|
-
#
|
|
203
|
+
# `Zero P1 findings` MUST NOT trigger). Advisory should-not-merge prose is a
|
|
204
|
+
# hard block even when formal review is still Comment (#3225); composes with
|
|
205
|
+
# minGreptileConfidence (#3095). Canonical TS detector:
|
|
206
|
+
# packages/core/src/content-contracts/skills/greptile-detector.ts
|
|
203
207
|
_TIER3_COUNT_RE = re.compile(
|
|
204
208
|
r"\b(?:One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten|\d+)\s+P[01]\s+findings?\b",
|
|
205
209
|
re.IGNORECASE,
|
|
206
210
|
)
|
|
207
211
|
_TIER3_LINE_RE = re.compile(r"^\s*P[01]\s+--\s", re.MULTILINE)
|
|
208
212
|
_TIER3_NEGATIONS = ("No ", "Zero ", "no ", "NO ")
|
|
213
|
+
# #3225 advisory should-not-merge family — LINE-ANCHORED (parity with
|
|
214
|
+
# packages/core/src/content-contracts/skills/greptile-detector.ts).
|
|
215
|
+
# Mid-sentence descriptive mentions ("adds should-not-merge matching") MUST NOT
|
|
216
|
+
# trigger; Summary:/Decision: labels, bullets, and short subject prefixes
|
|
217
|
+
# ("The PR is …") are stripped before the match.
|
|
218
|
+
_ADVISORY_SHOULD_NOT_MERGE_RES = (
|
|
219
|
+
re.compile(r"\bnot\s+(?:yet\s+)?safe\s+to\s+merge\b", re.IGNORECASE),
|
|
220
|
+
re.compile(r"\bshould\s*[-–—]?\s*not\s*[-–—]?\s*merge\b", re.IGNORECASE),
|
|
221
|
+
re.compile(r"\bsafe\s+to\s+merge\s+once\s+corrected\b", re.IGNORECASE),
|
|
222
|
+
re.compile(r"\bdo\s+not\s+merge\b", re.IGNORECASE),
|
|
223
|
+
re.compile(r"\bnot\s+ready\s+to\s+merge\b", re.IGNORECASE),
|
|
224
|
+
re.compile(r"\bnot\s+ready\s+for\s+merge\b", re.IGNORECASE),
|
|
225
|
+
)
|
|
226
|
+
_ADVISORY_LINE_PREFIX_RE = re.compile(
|
|
227
|
+
r"^(?:Summary|Decision|Verdict)\s*[:\-–—]\s*",
|
|
228
|
+
re.IGNORECASE,
|
|
229
|
+
)
|
|
230
|
+
_ADVISORY_SUBJECT_RE = re.compile(
|
|
231
|
+
r"^(?:the\s+pr|this\s+pr|this\s+change|the\s+change|this\s+diff)\s+is\s+",
|
|
232
|
+
re.IGNORECASE,
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
def _line_has_anchored_advisory(line: str) -> bool:
|
|
236
|
+
bare = line.strip()
|
|
237
|
+
bare = re.sub(r"^>\s*", "", bare)
|
|
238
|
+
bare = _ADVISORY_LINE_PREFIX_RE.sub("", bare, count=1)
|
|
239
|
+
bare = re.sub(r"^(?:[-*•]\s+)+", "", bare)
|
|
240
|
+
bare = re.sub(r"^\*\*", "", bare)
|
|
241
|
+
bare = re.sub(r"\*\*$", "", bare)
|
|
242
|
+
bare = re.sub(r"^_", "", bare)
|
|
243
|
+
bare = re.sub(r"_$", "", bare)
|
|
244
|
+
bare = _ADVISORY_SUBJECT_RE.sub("", bare, count=1).strip()
|
|
245
|
+
if not bare:
|
|
246
|
+
return False
|
|
247
|
+
for pat in _ADVISORY_SHOULD_NOT_MERGE_RES:
|
|
248
|
+
m = pat.search(bare)
|
|
249
|
+
if m is not None and m.start() <= 4:
|
|
250
|
+
return True
|
|
251
|
+
return False
|
|
209
252
|
|
|
210
253
|
def _has_tier3_sentinel(body: str) -> bool:
|
|
211
|
-
|
|
212
|
-
|
|
254
|
+
for line in body.splitlines():
|
|
255
|
+
if _line_has_anchored_advisory(line):
|
|
256
|
+
return True
|
|
213
257
|
for m in _TIER3_COUNT_RE.finditer(body):
|
|
214
258
|
line = _line_for(body, m.start())
|
|
215
259
|
if any(neg in line for neg in _TIER3_NEGATIONS):
|
|
@@ -509,6 +509,11 @@
|
|
|
509
509
|
"critical"
|
|
510
510
|
]
|
|
511
511
|
},
|
|
512
|
+
"effort": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"enum": ["S", "M", "L", "XL"],
|
|
515
|
+
"description": "Optional effort estimate with time anchors: S <2h, M half-day (2-4h), L 1-2 days, XL needs breakdown into S/M/L before activation. Omitted items still validate."
|
|
516
|
+
},
|
|
512
517
|
"dueDate": {
|
|
513
518
|
"$ref": "#/$defs/dateTime"
|
|
514
519
|
},
|
|
@@ -318,6 +318,11 @@
|
|
|
318
318
|
"critical"
|
|
319
319
|
]
|
|
320
320
|
},
|
|
321
|
+
"effort": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"enum": ["S", "M", "L", "XL"],
|
|
324
|
+
"description": "Optional effort estimate with time anchors: S <2h, M half-day (2-4h), L 1-2 days, XL needs breakdown into S/M/L before activation. Omitted items still validate."
|
|
325
|
+
},
|
|
321
326
|
"dueDate": {
|
|
322
327
|
"$ref": "#/$defs/dateTime"
|
|
323
328
|
},
|
package/vbrief/vbrief.md
CHANGED
|
@@ -419,6 +419,43 @@ Scope vBRIEFs use a small set of **canonical narrative keys** at the `plan.narra
|
|
|
419
419
|
}
|
|
420
420
|
```
|
|
421
421
|
|
|
422
|
+
### Effort estimate (S/M/L/XL) (#1581)
|
|
423
|
+
|
|
424
|
+
`PlanItem.effort` is an **optional** sizing field on each plan item. Existing items that omit it still validate.
|
|
425
|
+
|
|
426
|
+
| Value | Time anchor | Meaning |
|
|
427
|
+
|-------|-------------|---------|
|
|
428
|
+
| `S` | less than 2 hours | Safe single-agent slice |
|
|
429
|
+
| `M` | half-day (2–4 hours) | Single-agent; modest scope |
|
|
430
|
+
| `L` | 1–2 days | May warrant a dedicated agent or parallel worktrees |
|
|
431
|
+
| `XL` | needs breakdown | **Must not enter `active/` / `running`** until broken into S/M/L items |
|
|
432
|
+
|
|
433
|
+
#### Authority and ordering (compose with ceremony dial #3214)
|
|
434
|
+
|
|
435
|
+
Plan-item `effort` is **post-planning** authority. Estimates live on scope plan items after planning has produced those items. Session-start ceremony (ritual, deposit load, gate setup) runs **before** planning, so plan-item effort is **not** available as session-start ritual input.
|
|
436
|
+
|
|
437
|
+
- ! Treat `PlanItem.effort` as the planning-time confirm/correct signal for provisional intake size — not as a required input for initial ritual depth
|
|
438
|
+
- ⊗ Claim or require plan-item `effort` at session start to choose ceremony depth — that wiring deadlocks (no plan items yet)
|
|
439
|
+
- ~ Ceremony dial (#3214) SHOULD use a **two-stage** path: start every session at **rapid** depth, then escalate to full ceremony when the plan lands M/L or the task proves project-shaped; optional intake-time provisional S/M/L is a tiebreaker only
|
|
440
|
+
- ! Headless / autonomous runs MUST apply provisional estimates and stage transitions **without** operator confirmation prompts
|
|
441
|
+
|
|
442
|
+
Rules:
|
|
443
|
+
|
|
444
|
+
- ! When present, `effort` MUST be one of `S`, `M`, `L`, `XL` (case-sensitive)
|
|
445
|
+
- ? Omit `effort` when sizing is unknown; validation does not require the field
|
|
446
|
+
- ! XL items MUST be broken into S/M/L sub-items (or re-estimated to S/M/L) before `task scope:activate` / `task vbrief:activate` — both paths fail closed while any nested item still has `effort: "XL"`
|
|
447
|
+
- ~ Swarm allocation SHOULD read `effort` when sizing agents (XL blocks dispatch until breakdown; L may warrant a dedicated agent; S/M are safe single-agent)
|
|
448
|
+
- ~ Refinement SHOULD prompt for an estimate when accepting proposed → pending so cost signal is present before activation
|
|
449
|
+
|
|
450
|
+
```json
|
|
451
|
+
{
|
|
452
|
+
"id": "auth-slice",
|
|
453
|
+
"title": "Wire OAuth callback",
|
|
454
|
+
"status": "pending",
|
|
455
|
+
"effort": "M"
|
|
456
|
+
}
|
|
457
|
+
```
|
|
458
|
+
|
|
422
459
|
### Hierarchical Items (v0.6)
|
|
423
460
|
|
|
424
461
|
Specs with phases, subphases, and tasks express nesting via `PlanItem.items`:
|
|
@@ -4,7 +4,7 @@ Goal-backward verification of agent output — check outcomes, not checklists.
|
|
|
4
4
|
|
|
5
5
|
Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
6
6
|
|
|
7
|
-
**⚠️ See also**: [coding/testing.md](../coding/testing.md) | [verification/uat.md](./uat.md) | [core/glossary.md](../glossary.md)
|
|
7
|
+
**⚠️ See also**: [coding/testing.md](../coding/testing.md) | [verification/uat.md](./uat.md) | [core/glossary.md](../glossary.md) | [patterns/goal-gate-determinism.md](../patterns/goal-gate-determinism.md) (#852 — rigid goals/gates; flexible execution path) | [docs/gate-integrity.md](../docs/gate-integrity.md) (#3156 — do not clear red by editing the gate)
|
|
8
8
|
|
|
9
9
|
> Adapted from [GSD](https://github.com/gsd-build/get-shit-done) verification model.
|
|
10
10
|
|
|
@@ -115,3 +115,4 @@ Pick the **strongest tier reachable** for each task.
|
|
|
115
115
|
- ⊗ Accepting stubs as complete
|
|
116
116
|
- ⊗ Asking a human to check what the agent can verify itself
|
|
117
117
|
- ⊗ Verifying process ("I did steps 1–5") instead of outcomes ("user can log in")
|
|
118
|
+
- ⊗ Clearing a failing gate by editing the gate definition, verifier, reward, required check, coverage floor, or policy flag — fix the work under test, or change the gate via issue/PR + review ([gate-integrity.md](../docs/gate-integrity.md) #3156)
|