@deftai/directive-content 0.91.0 → 0.93.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-xbrief/SKILL.md +11 -0
- package/QUICK-START.md +1 -1
- package/UPGRADING.md +14 -0
- package/ci-cd/README.md +57 -0
- package/ci-cd/blacksmith/README.md +32 -0
- package/ci-cd/blacksmith/examples/lint-vs-test-split.md +98 -0
- package/ci-cd/blacksmith/migration-prompt.md +80 -0
- package/ci-cd/blacksmith/overview.md +58 -0
- package/ci-cd/blacksmith/runner-tiers.md +80 -0
- package/coding/coding.md +7 -1
- package/coding/docs.md +44 -0
- package/coding/review.md +50 -0
- package/commands.md +43 -0
- package/conventions/content-manifest.json +6 -1
- package/deployments/README.md +8 -0
- package/docs/deft-directive-disable.md +96 -0
- package/docs/directive-lifecycle.md +16 -0
- package/docs/getting-started.md +2 -0
- package/docs/no-deft-directive.md +1 -0
- package/docs/openclaw-agent-host.md +46 -0
- package/docs/skill-discovery-hosts.md +84 -0
- package/docs/skill-pin-policy.md +7 -0
- package/docs/slash-multi-host.md +241 -0
- package/main.md +1 -0
- package/package.json +1 -1
- package/packs/lessons/lessons-pack-0.1.json +85 -45
- package/packs/rules/rules-pack-0.1.json +137 -1
- package/packs/skills/skills-pack-0.1.json +25 -6
- package/skills/deft-directive-pre-pr/SKILL.md +8 -5
- package/skills/deft-directive-review-cycle/SKILL.md +75 -20
- package/skills/deft-directive-setup/SKILL.md +104 -1
- package/skills/deft-directive-swarm/references/core-ops.md +1 -0
- package/skills/deft-directive-swarm/references/core-phase-0.md +6 -0
- package/skills/deft-directive-swarm/references/host-openclaw.md +10 -0
- package/skills/deft-directive-xbrief/SKILL.md +77 -0
- package/templates/agent-prompt-preamble.md +3 -0
- package/templates/agents-entry.md +10 -0
- package/templates/swarm-greptile-poller-prompt.md +48 -5
package/deployments/README.md
CHANGED
|
@@ -8,6 +8,14 @@ Platform-specific guidance for deployment environments (cloud.gov, Cloudflare, A
|
|
|
8
8
|
- ~ Keep platform guidance separate from core Deft rules
|
|
9
9
|
- ~ Enable export of platform instructions for external tools (e.g., Copilot)
|
|
10
10
|
|
|
11
|
+
## Relation to CI/CD
|
|
12
|
+
|
|
13
|
+
This layer covers **where and how you deploy** runtime apps. For **CI runner
|
|
14
|
+
migration** (Blacksmith tiered vCPU sizing, agent migration prompts), use the
|
|
15
|
+
optional [`ci-cd/`](../ci-cd/README.md) layer instead. Platform modules may still
|
|
16
|
+
include a `cicd.md` for deploy-pipeline steps; that is not a substitute for
|
|
17
|
+
runner-tier guidance under `ci-cd/`.
|
|
18
|
+
|
|
11
19
|
## Module Structure
|
|
12
20
|
|
|
13
21
|
Create a directory per platform:
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Temporary kill-switch: `.deft-directive-disable`
|
|
2
|
+
|
|
3
|
+
Use a **root file flag** to turn Directive **enforcement** off for local testing (A/B, DevHammer, ceremony vs loop) **without** permanent project opt-out and **without** deleting the deposit.
|
|
4
|
+
|
|
5
|
+
Tracker: [#3039](https://github.com/deftai/directive/issues/3039).
|
|
6
|
+
|
|
7
|
+
**Not** permanent opt-out — that is [`.no-deft-directive`](./no-deft-directive.md) (#2926).
|
|
8
|
+
|
|
9
|
+
## Filename and location
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
.deft-directive-disable
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **Exact name:** lowercase `.deft-directive-disable`
|
|
16
|
+
- **Location:** project / workspace **root only**
|
|
17
|
+
- **Content:** empty file or a short `#` comment. Presence is the flag. No schema.
|
|
18
|
+
- **Git:** **Must be gitignored** (deposit baseline includes this entry). Committed / tracked flag is a misconfig: doctor **warns**, and enforcement is **not** disabled (repo-controlled content must not turn off hooks for clones).
|
|
19
|
+
|
|
20
|
+
## Distinct from permanent opt-out
|
|
21
|
+
|
|
22
|
+
| File | Intent |
|
|
23
|
+
|------|--------|
|
|
24
|
+
| [`.no-deft-directive`](./no-deft-directive.md) | Permanent: project does not use Directive. Flag + deposit is **inconsistent**. |
|
|
25
|
+
| `.deft-directive-disable` | Temporary: testing kill-switch. **Deposit OK**. |
|
|
26
|
+
|
|
27
|
+
## Behavior
|
|
28
|
+
|
|
29
|
+
| Surface | When flag present |
|
|
30
|
+
|---------|-------------------|
|
|
31
|
+
| **Doctor** | Status **disabled (test kill-switch)**; **not** the #2926 flag+deposit dirty path; prints full recovery (file gone + new session). |
|
|
32
|
+
| **Agent** | Always-on AGENTS contract: stop further Directive process load; echo recovery. |
|
|
33
|
+
| **CLI** (`session:start`, ritual paths) | Disabled + recovery; no ritual write / no half-DD automation. |
|
|
34
|
+
| **Host hooks** | SessionStart / PreToolUse / compact skip ritual and enforcement. |
|
|
35
|
+
|
|
36
|
+
Deposit (`.deft/core`) **may remain**. Init/update are not blocked by this flag alone (unlike permanent opt-out).
|
|
37
|
+
|
|
38
|
+
## Recovery (hysteresis)
|
|
39
|
+
|
|
40
|
+
Directive is **fully operational** only when:
|
|
41
|
+
|
|
42
|
+
1. **`.deft-directive-disable` is absent**, and
|
|
43
|
+
2. A **new agent session** has been started after the file was removed
|
|
44
|
+
|
|
45
|
+
Canonical recovery message:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Directive is DISABLED for this project via root `.deft-directive-disable` (test/local kill-switch).
|
|
49
|
+
Deposit may still be present; enforcement (hooks, session ritual, automation) will not run.
|
|
50
|
+
|
|
51
|
+
To fully re-enable Directive:
|
|
52
|
+
1. Delete the file: rm .deft-directive-disable (or equivalent)
|
|
53
|
+
2. Start a NEW agent session (reload AGENTS / host skills / hooks)
|
|
54
|
+
Until both are done, Directive is not fully operational.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Precedence
|
|
58
|
+
|
|
59
|
+
1. `.deft-directive-disable` → test kill-switch (deposit OK; recovery = delete + new session)
|
|
60
|
+
2. `.no-deft-directive` → permanent opt-out (#2926)
|
|
61
|
+
3. Else normal Directive
|
|
62
|
+
|
|
63
|
+
If **both** flags are present: one combined message; permanent install semantics still apply for init/update.
|
|
64
|
+
|
|
65
|
+
## Consumer note (A/B / DevHammer)
|
|
66
|
+
|
|
67
|
+
Typical arm for “without Directive enforcement”:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Ensure ignore entry exists (init/update baseline)
|
|
71
|
+
# Then:
|
|
72
|
+
touch .deft-directive-disable
|
|
73
|
+
# Start a new agent session — enforcement off; deposit may stay.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Re-enable:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
rm .deft-directive-disable
|
|
80
|
+
# Start a NEW agent session
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Non-goals (v1)
|
|
84
|
+
|
|
85
|
+
- ⊗ Auto-delete `.deft/` or uninstall deposit
|
|
86
|
+
- ⊗ Replace or weaken `.no-deft-directive`
|
|
87
|
+
- ⊗ Rewrite AGENTS to a stub on disable
|
|
88
|
+
- ⊗ Org-remote kill switch
|
|
89
|
+
- ⊗ Nested monorepo package roots
|
|
90
|
+
- ⊗ `DEFT_DISABLED=1` env (optional later)
|
|
91
|
+
|
|
92
|
+
## Related
|
|
93
|
+
|
|
94
|
+
- [no-deft-directive.md](./no-deft-directive.md) — permanent opt-out
|
|
95
|
+
- [getting-started.md](./getting-started.md) — install and first project
|
|
96
|
+
- `session:start`, `doctor`, host hooks (SessionStart / PreToolUse / compact)
|
|
@@ -65,6 +65,22 @@ framework:
|
|
|
65
65
|
| **Ship** | PR merge and release — `task pr:*` and [`deft-directive-release`](../skills/deft-directive-release/SKILL.md). |
|
|
66
66
|
| **Issues / Features** | GitHub issues and feature requests mirrored into `.deft-cache/` and surfaced as triage candidates. |
|
|
67
67
|
|
|
68
|
+
## Delivery integrity vs deploy / UAT (#3041)
|
|
69
|
+
|
|
70
|
+
`scope:complete` and swarm cohort completion mark **lifecycle bookkeeping**, not environment
|
|
71
|
+
green. For **code-bearing** scopes, delivered completion requires durable proof that the
|
|
72
|
+
implementation reached the configured **delivery branch** (`plan.policy.deliveryBranch`,
|
|
73
|
+
defaulting to the repo default branch) — typically: PR `base.ref` equals that branch, and the
|
|
74
|
+
merge commit is an ancestor of the refreshed remote delivery ref. A merge into an intermediate
|
|
75
|
+
feature/integration branch is **not** delivery.
|
|
76
|
+
|
|
77
|
+
Handoff states that Git can assert are distinct: `implemented` → `pr_open` →
|
|
78
|
+
`merged_to_integration` → `delivered`. **Deployed** and **UAT verified** are separate evidence
|
|
79
|
+
axes and are never inferred from Git alone. Explicit non-delivery dispositions
|
|
80
|
+
(`accepted_not_delivered`, `superseded`, `experiment_archived`, `cancelled`) complete the
|
|
81
|
+
lifecycle without claiming the work shipped. Legacy completed records without completion
|
|
82
|
+
provenance surface as `unknown` / `unverified`, not retroactively `delivered`.
|
|
83
|
+
|
|
68
84
|
## Why it loops
|
|
69
85
|
|
|
70
86
|
The central claim of the picture is that Directive is **reiterative**. Strategy analysis is
|
package/docs/getting-started.md
CHANGED
|
@@ -145,3 +145,5 @@ Full command reference for every triage and cache verb lives in [`commands.md`
|
|
|
145
145
|
**Writing:** For docs, issues, and PR prose, follow [writing-ste100.md](./writing-ste100.md) (short controlled English; #2927).
|
|
146
146
|
|
|
147
147
|
**Opt out:** To mark a repo as not using Directive, add root [`.no-deft-directive`](./no-deft-directive.md) (#2926). Tools skip install and session ritual when that file is present.
|
|
148
|
+
|
|
149
|
+
**Temporary test kill-switch:** For local A/B or DevHammer without permanent opt-out, use root [`.deft-directive-disable`](./deft-directive-disable.md) (#3039). Deposit may stay; re-enable by deleting the file and starting a new agent session.
|
|
@@ -82,6 +82,7 @@ When `deft-directive-setup` runs:
|
|
|
82
82
|
|
|
83
83
|
## Related
|
|
84
84
|
|
|
85
|
+
- [deft-directive-disable.md](./deft-directive-disable.md) — **temporary** test/local kill-switch (deposit OK; not this flag)
|
|
85
86
|
- [getting-started.md](./getting-started.md) — install and first project
|
|
86
87
|
- [product-signal.md](./product-signal.md) — optional partner signal (defaults off; flag still wins locally)
|
|
87
88
|
- `session:start`, `doctor`, `directive init`, `directive update`
|
|
@@ -18,6 +18,52 @@ Epic spine: [#2874](https://github.com/deftai/directive/issues/2874). This doc i
|
|
|
18
18
|
|
|
19
19
|
If you are installing Directive for the first time, start at [QUICK-START.md](../QUICK-START.md) or [getting-started.md](./getting-started.md), then return here for host-specific expectations.
|
|
20
20
|
|
|
21
|
+
Native **file-host** slash/prompt command registration (thin wrappers under `.claude/commands/`, `.cursor/commands/`, and peers) is documented in [slash-multi-host.md](./slash-multi-host.md) (epic #55). **OpenClaw L2 product commands** are a separate skills adapter ([#3064](https://github.com/deftai/directive/issues/3064)) — see § L2 product commands below. That surface is separate from always-pin skills (#3001/#3008), spawn/review mapping, and skill-discovery residual [#75](https://github.com/deftai/directive/issues/75).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## L2 product commands (OpenClaw adapter — #3064)
|
|
26
|
+
|
|
27
|
+
OpenClaw does **not** load repo-local command files the way Claude/Cursor do. L2 parity for the **exactly 13** product commands is delivered as **thin user-invocable skills** deposited into the OpenClaw **main workspace skills** root (real copies — not symlink-escape into npm; same spirit as always-pins).
|
|
28
|
+
|
|
29
|
+
### Hybrid layout (LockedDecisions D1–D3)
|
|
30
|
+
|
|
31
|
+
| Artifact | OpenClaw slug | Role |
|
|
32
|
+
|----------|---------------|------|
|
|
33
|
+
| **Router** | `deft` | Preferred **native/menu-facing** entry (Telegram `BOT_COMMANDS` budget) |
|
|
34
|
+
| **13 product skills** | e.g. `deft_run_interview`, `deft_continue` | Invocable as `/<slug>` text skills for discoverability |
|
|
35
|
+
|
|
36
|
+
Stable map (logical slash → OpenClaw slug, `a-z0-9_`, max 32). Colons never appear in OC slugs. Example: `/deft:directive:run:interview` → `deft_run_interview`. Full table lives in `packages/core/src/slash/openclaw-slugs.ts` and is unit-tested for bijectivity against `listProductCommands()`.
|
|
37
|
+
|
|
38
|
+
Bodies stay **thin** (L5): frontmatter + short dispatch pointer to the same content-relative targets as file hosts (`generateThinWrappers()` IR). ⊗ Inline full strategy/skill bodies. ⊗ Add `openclaw` to `HOST_COMMAND_LAYOUTS` / invent `.openclaw/commands/`.
|
|
39
|
+
|
|
40
|
+
### Native menu / `commands.nativeSkills` (D3)
|
|
41
|
+
|
|
42
|
+
| Setting | Expected behavior |
|
|
43
|
+
|---------|-------------------|
|
|
44
|
+
| Prefer menu safety | Use the **`deft` router** as the primary bot menu entry; invoke product work via router args or typed `/deft_run_*` skill text |
|
|
45
|
+
| `commands.nativeSkills` **on** / aggressive native registration | All `user-invocable: true` skills (router + 13 + always-pins) **may** flood Telegram → `BOT_COMMANDS_TOO_MUCH` risk |
|
|
46
|
+
| `auto` / selective | Prefer **router-first** for menu slots; keep the 13 invocable as skill/text without requiring 13 menu slots |
|
|
47
|
+
| **off** | Skills remain loadable; operators type skill names / prose — no native menu flood |
|
|
48
|
+
|
|
49
|
+
! Do not require 13 Telegram bot menu slots for L2 parity.
|
|
50
|
+
|
|
51
|
+
### Wire path (D4–D5)
|
|
52
|
+
|
|
53
|
+
1. **Primary recovery:** `deft doctor --fix` when OpenClaw is detected — deposits managed L2 skills next to always-pins.
|
|
54
|
+
2. **init/update:** deposits when OpenClaw signals are present and `plan.policy.openClawProductCommands` is not false. **Fail-closed** when OpenClaw is not detected (no writes on non-OC machines).
|
|
55
|
+
3. Multi-seat: `deft doctor --fix --openclaw-all-agents` (same flag as always-pins).
|
|
56
|
+
4. Opt-out: `plan.policy.openClawProductCommands: false` — removes **managed** L2 thin skills only; preserves consumer custom skills at the same slug.
|
|
57
|
+
5. After deposit: **restart the OpenClaw gateway or start a new session** so `available_skills` refreshes.
|
|
58
|
+
|
|
59
|
+
Always-pin skills (`deft-directive-build`, `pre-pr`, `review-cycle`, `swarm`) remain a **different** surface from L2 product commands (`/deft:directive:run:interview`, `/deft:continue`, …).
|
|
60
|
+
|
|
61
|
+
Inspect policy:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
deft policy:show --field=openClawProductCommands
|
|
65
|
+
```
|
|
66
|
+
|
|
21
67
|
---
|
|
22
68
|
|
|
23
69
|
## Mental model (host class)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Multi-host skill discovery (#75)
|
|
2
|
+
|
|
3
|
+
Directive deposits **thin skill discovery pointers** so agent hosts that do not
|
|
4
|
+
scan `.agents/skills/` still auto-load the same consumer skill inventory.
|
|
5
|
+
|
|
6
|
+
## Canonical vs additional paths
|
|
7
|
+
|
|
8
|
+
| Path | Role |
|
|
9
|
+
|------|------|
|
|
10
|
+
| `.agents/skills/` | **Canonical** consumer discovery (landed with #94 / install `writeAgentsSkills`) |
|
|
11
|
+
| `.claude/skills/` | Claude Code |
|
|
12
|
+
| `.codex/skills/` | OpenAI Codex |
|
|
13
|
+
| `.github/skills/` | GitHub Copilot |
|
|
14
|
+
| `.cursor/skills/` | Cursor (when not fully covered by optional OpenPackage install) |
|
|
15
|
+
|
|
16
|
+
Additional host paths **mirror** the same thin `SKILL.md` inventory as
|
|
17
|
+
`.agents/skills/`. They do not fork independent skill bodies. Full skill text
|
|
18
|
+
lives under `.deft/core/skills/…` (or `.deft/core/SKILL.md` for the root
|
|
19
|
+
`deft` skill).
|
|
20
|
+
|
|
21
|
+
## Thin pointers only
|
|
22
|
+
|
|
23
|
+
Each deposited `SKILL.md` is a short frontmatter + `Read and follow: .deft/core/…`
|
|
24
|
+
line. Init/update **must not** copy full skill process docs into host skill dirs
|
|
25
|
+
(those rot on framework upgrade).
|
|
26
|
+
|
|
27
|
+
Windows: deposit uses ordinary file writes (contained projection). Elevated
|
|
28
|
+
symlinks are **not** required.
|
|
29
|
+
|
|
30
|
+
## When deposit runs
|
|
31
|
+
|
|
32
|
+
- `directive init` / greenfield scaffold — after `.agents/skills/`
|
|
33
|
+
- `directive update` / refresh — every refresh (idempotent rewrite of managed
|
|
34
|
+
pointers when content drifts)
|
|
35
|
+
|
|
36
|
+
## Per-host opt-out
|
|
37
|
+
|
|
38
|
+
Typed policy: `plan.policy.hostSkillDiscovery`
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"plan": {
|
|
43
|
+
"policy": {
|
|
44
|
+
"hostSkillDiscovery": {
|
|
45
|
+
"claude": true,
|
|
46
|
+
"cursor": true,
|
|
47
|
+
"codex": true,
|
|
48
|
+
"github": false
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- Default: all four residual hosts **enabled**
|
|
56
|
+
- Inspect: `deft policy:show --field=hostSkillDiscovery`
|
|
57
|
+
- Opt-out skips deposit for that host only (does not remove unrelated user files)
|
|
58
|
+
|
|
59
|
+
Distinct from `plan.policy.hostHooks` (hook JSON deposit, #2752).
|
|
60
|
+
|
|
61
|
+
## Relationship to #55 slash registration
|
|
62
|
+
|
|
63
|
+
| | **#75 skill discovery** | **#55 slash / commands** |
|
|
64
|
+
|--|-------------------------|---------------------------|
|
|
65
|
+
| Artifact | Host **skill** dirs (`…/skills/`) | Host **command/prompt** files (`…/commands/`, `…/prompts/`) |
|
|
66
|
+
| Product set | Existing consumer skill inventory | Locked product slash set (L2) |
|
|
67
|
+
| Content | Thin skill pointer `SKILL.md` | Thin command wrapper (~40–100 tok) |
|
|
68
|
+
| Deposit | This doc / `skill-discovery-deposit` | Epic children #3052–#3055 |
|
|
69
|
+
|
|
70
|
+
Do **not** treat slash completion as closing skill-path residual, or skill
|
|
71
|
+
deposit as registering slash commands.
|
|
72
|
+
|
|
73
|
+
## Relationship to OpenPackage
|
|
74
|
+
|
|
75
|
+
OpenPackage (#2462 / #2370) is an optional tiered pack install for some hosts.
|
|
76
|
+
It does **not** replace init/update multi-host skill discovery for the residual
|
|
77
|
+
matrix above. Close #75 only when residual host paths are deposited (or
|
|
78
|
+
explicitly opted out), not solely because OpenPackage exists.
|
|
79
|
+
|
|
80
|
+
## Implementation pointers
|
|
81
|
+
|
|
82
|
+
- Layouts + policy: `packages/core/src/init-deposit/skill-discovery-hosts.ts`
|
|
83
|
+
- Deposit: `packages/core/src/init-deposit/skill-discovery-deposit.ts`
|
|
84
|
+
- Shared inventory with `.agents/skills/`: `CONSUMER_SKILL_DISCOVERY_INVENTORY`
|
package/docs/skill-pin-policy.md
CHANGED
|
@@ -69,9 +69,16 @@ The managed AGENTS.md section `## Skill pin policy (#2508)` carries the framewor
|
|
|
69
69
|
|
|
70
70
|
Skills-pack entries (`content/packs/skills/skills-pack-0.1.json`) MAY record `"alwaysPin": true` on metadata-only rows so slice tooling and future gates can list pins without parsing AGENTS.md. The authoritative runtime list for agents remains the AGENTS.md pin section; the catalog field is advisory for tooling (#1535).
|
|
71
71
|
|
|
72
|
+
## Through-merge is false-negative sensitive (#3032)
|
|
73
|
+
|
|
74
|
+
Operator phrases such as **through merge**, **drive to merge**, **land/ship issue**, or explicit **drive-to: merge-ready** often start implementation **without** a clear `swarm` keyword. That is the same false-negative class this policy targets: the parent may code instead of loading `deft-directive-swarm` and dispatching a worker.
|
|
75
|
+
|
|
76
|
+
! AGENTS.md carries short always-on `!` / `⊗` bullets under **Through-merge worker dispatch (#3032)** (agents-entry + maintainer multi-agent doctrine). N=1 still uses the swarm/solo launch path; parent MUST NOT implement when background subagent/worktree dispatch is available. See also swarm Phase 0 `references/core-phase-0.md` and #1880 Gap C.
|
|
77
|
+
|
|
72
78
|
## Related
|
|
73
79
|
|
|
74
80
|
- Skills Index: `REFERENCES.md` § Skills Index
|
|
75
81
|
- Progressive disclosure: #2484
|
|
76
82
|
- Trigger coverage evals: #1586
|
|
77
83
|
- Review-surface precedence: #2308 / `deft-directive-review-cycle`
|
|
84
|
+
- Through-merge parent-must-dispatch: #3032 / AGENTS.md `## Through-merge worker dispatch (#3032)`
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Multi-host native slash-command registration
|
|
2
|
+
|
|
3
|
+
Operator guide for **host-native** Directive slash and prompt files after epic [#55](https://github.com/deftai/directive/issues/55).
|
|
4
|
+
|
|
5
|
+
This surface is **not** skill auto-discovery ([#75](https://github.com/deftai/directive/issues/75)). Skills stay under skill deposit paths. Slash registration writes thin command/prompt wrappers so hosts can show `/deft…` (or the host equivalent) in autocomplete.
|
|
6
|
+
|
|
7
|
+
Legend (RFC2119): `!`=MUST, `~`=SHOULD, `≉`=SHOULD NOT, `⊗`=MUST NOT, `?`=MAY.
|
|
8
|
+
|
|
9
|
+
Product locks: **LockedDecisions L1–L10** on [#55](https://github.com/deftai/directive/issues/55). Code waves: [#3052](https://github.com/deftai/directive/issues/3052) generator, [#3053](https://github.com/deftai/directive/issues/3053) emitters, [#3054](https://github.com/deftai/directive/issues/3054) deposit. This page is the docs/dogfood child [#3055](https://github.com/deftai/directive/issues/3055).
|
|
10
|
+
|
|
11
|
+
Prose SoT for routing and deprecation aliases: [commands.md § Slash Command Namespaces](../commands.md#slash-command-namespaces-418--1670).
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What you get
|
|
16
|
+
|
|
17
|
+
On `directive init` and `deft update`, Directive deposits **exactly 13** thin wrappers (L2) for every **enabled** host that has a real emitter (L6).
|
|
18
|
+
|
|
19
|
+
| Host id | Directory | Surface |
|
|
20
|
+
|---------|-----------|---------|
|
|
21
|
+
| `claude` | `.claude/commands/` | commands |
|
|
22
|
+
| `cursor` | `.cursor/commands/` | commands |
|
|
23
|
+
| `grok` | `.grok/commands/` | commands |
|
|
24
|
+
| `codex` | `.codex/prompts/` | prompts |
|
|
25
|
+
| **OpenClaw** (adapter, not file emitter) | OpenClaw **workspace skills** (`~/.openclaw/workspace/skills` or `$OPENCLAW_STATE_DIR/...`) | user-invocable skills + router |
|
|
26
|
+
|
|
27
|
+
File hosts use portable hyphen filenames (L4), for example `deft-directive-run-interview.md` and `deft-continue.md`. Logical slash ids keep the namespace form (`/deft:directive:run:interview`).
|
|
28
|
+
|
|
29
|
+
**OpenClaw** is **not** a fifth row in `SLASH_EMITTER_HOSTS` / `HOST_COMMAND_LAYOUTS`. There is no project-tree `.openclaw/commands/` deposit (that would be stub theater — Gateway does not load that path). OpenClaw L2 parity ships as a **skills/plugin adapter** ([#3064](https://github.com/deftai/directive/issues/3064)): thin **user-invocable** skills under the main workspace skills root, with a stable `logicalId → openClawSlug` map (`a-z0-9_`, max 32). See [openclaw-agent-host.md](./openclaw-agent-host.md) § L2 product commands.
|
|
30
|
+
|
|
31
|
+
⊗ Treat last-writer-wins single-host install as the product default. One repo may use many hosts; deposit targets the **configured set** in one pass.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Product set (L2 — exactly 13)
|
|
36
|
+
|
|
37
|
+
| # | Logical slash id | Filename stem |
|
|
38
|
+
|---|------------------|---------------|
|
|
39
|
+
| 1 | `/deft:directive:change` | `deft-directive-change` |
|
|
40
|
+
| 2 | `/deft:directive:change:apply` | `deft-directive-change-apply` |
|
|
41
|
+
| 3 | `/deft:directive:change:verify` | `deft-directive-change-verify` |
|
|
42
|
+
| 4 | `/deft:directive:change:archive` | `deft-directive-change-archive` |
|
|
43
|
+
| 5 | `/deft:directive:run:interview` | `deft-directive-run-interview` |
|
|
44
|
+
| 6 | `/deft:directive:run:yolo` | `deft-directive-run-yolo` |
|
|
45
|
+
| 7 | `/deft:directive:run:map` | `deft-directive-run-map` |
|
|
46
|
+
| 8 | `/deft:directive:run:discuss` | `deft-directive-run-discuss` |
|
|
47
|
+
| 9 | `/deft:directive:run:research` | `deft-directive-run-research` |
|
|
48
|
+
| 10 | `/deft:directive:run:speckit` | `deft-directive-run-speckit` |
|
|
49
|
+
| 11 | `/deft:directive:run:probe` | `deft-directive-run-probe` |
|
|
50
|
+
| 12 | `/deft:continue` | `deft-continue` |
|
|
51
|
+
| 13 | `/deft:checkpoint` | `deft-checkpoint` |
|
|
52
|
+
|
|
53
|
+
⊗ Auto-register every `deft-directive-*` skill as a slash entry.
|
|
54
|
+
⊗ Expand N without an amendment to L2 on #55.
|
|
55
|
+
|
|
56
|
+
Legacy prose aliases (`/deft:change`, `/deft:run:…`) remain accepted in agent text with deprecation guidance. Native host files emit **canonical names only** (L3) — no second set of alias files.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Thin wrappers (L5)
|
|
61
|
+
|
|
62
|
+
Each managed file is a short pointer, not a copy of a strategy or skill:
|
|
63
|
+
|
|
64
|
+
- YAML frontmatter: `description` (and `argument-hint` when needed)
|
|
65
|
+
- Body: load the content-relative target under `.deft/core/` when installed; honor `$ARGUMENTS`; do not inline the target body
|
|
66
|
+
|
|
67
|
+
Token intent (catalog ≤ ~1k tok for the set; invoke body ~40–100 tok). Real cost is the strategy/skill after invoke.
|
|
68
|
+
|
|
69
|
+
Contributors: keep wrappers thin. Emitters consume `generateThinWrappers()` / `listProductCommands()` — do not maintain a second name table.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Policy opt-out (`plan.policy.hostSlashCommands`)
|
|
74
|
+
|
|
75
|
+
Default: all emitter hosts enabled (`claude`, `cursor`, `grok`, `codex`).
|
|
76
|
+
|
|
77
|
+
Set a host to `false` in `xbrief/PROJECT-DEFINITION.xbrief.json` (or consumer deposit layout) to skip that host:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"plan": {
|
|
82
|
+
"policy": {
|
|
83
|
+
"hostSlashCommands": {
|
|
84
|
+
"claude": true,
|
|
85
|
+
"cursor": true,
|
|
86
|
+
"grok": false,
|
|
87
|
+
"codex": true
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Inspect:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
deft policy:show --field=hostSlashCommands
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
On opt-out, init/update **removes only** Directive-managed thin wrappers for that host. Consumer-customized files at the same path are left alone. Unknown host keys fail validation.
|
|
101
|
+
|
|
102
|
+
This policy is parallel to `plan.policy.hostHooks` (enforcement hooks). Hooks and slash deposit are separate surfaces.
|
|
103
|
+
|
|
104
|
+
### OpenClaw adapter opt-out (`plan.policy.openClawProductCommands`)
|
|
105
|
+
|
|
106
|
+
OpenClaw L2 deposit is **separate** from the four file emitters. Default **on** when the adapter is real and OpenClaw is detected.
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"plan": {
|
|
111
|
+
"policy": {
|
|
112
|
+
"openClawProductCommands": false
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
deft policy:show --field=openClawProductCommands
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
When false, init/update/doctor **removes only** Directive-managed OpenClaw L2 thin skills (router + 13 product slugs). Consumer-customized skills at the same slug are left alone. Deposit **does not write** OpenClaw artifacts when OpenClaw is not detected (fail-closed).
|
|
123
|
+
|
|
124
|
+
Primary recovery: `deft doctor --fix` (optional `--openclaw-all-agents` for multi-seat).
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Git policy (L8 — prefer commit)
|
|
129
|
+
|
|
130
|
+
! **Prefer committing** managed product command/prompt files so every clone and every host share the same `/deft…` surface.
|
|
131
|
+
|
|
132
|
+
- Managed paths are exact product filenames (installer allowlist), not “claim the whole `.claude/commands/` tree.”
|
|
133
|
+
- Custom files you add next to managed ones stay app-owned.
|
|
134
|
+
- Idempotent rewrite on init/update keeps managed thin wrappers current either way.
|
|
135
|
+
|
|
136
|
+
? Personal gitignore of host command dirs remains an escape for machine-local only setups. That is **not** the default team recommendation. Multi-host shared repos benefit most from a committed deposit.
|
|
137
|
+
|
|
138
|
+
⊗ Do not use single-host last-writer-wins as the team sharing model.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Prose fallback (L9)
|
|
143
|
+
|
|
144
|
+
File hosts without native registration (or with all file hosts opted out) still use the agent text convention in [commands.md](../commands.md). AGENTS.md and skills routing continue to work without native autocomplete files.
|
|
145
|
+
|
|
146
|
+
**OpenClaw** after [#3064](https://github.com/deftai/directive/issues/3064): when the adapter has deposited L2 skills, operators should prefer the invocable skills / router — not prose-only discovery. Prose `/deft:directive:…` remains accepted in agent text when skills are not yet wired (doctor not run, policy off, or host without OpenClaw signals).
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Slash registration vs skill discovery (#55 vs #75 vs #3064)
|
|
151
|
+
|
|
152
|
+
| Concern | Tracker | What lands |
|
|
153
|
+
|---------|---------|------------|
|
|
154
|
+
| Native slash / prompt **command files** | #55 | Thin wrappers under host command/prompt dirs; multi-host deposit |
|
|
155
|
+
| Skill auto-discovery paths | #75 | `SKILL.md` discovery under `.agents/skills/`, `.claude/skills/`, etc. |
|
|
156
|
+
| OpenClaw L2 product commands | #3064 | Thin **user-invocable** skills + router in OpenClaw workspace skills (not a file emitter) |
|
|
157
|
+
|
|
158
|
+
! Do not treat skill discovery alone as “slash registration done.”
|
|
159
|
+
! Do not dual-maintain full skill bodies as command file contents (L7).
|
|
160
|
+
! Do not invent project `.openclaw/commands/` for L2 parity.
|
|
161
|
+
|
|
162
|
+
Agent-host runtime notes (OpenClaw spawn/review + L2 skills) live under [openclaw-agent-host.md](./openclaw-agent-host.md).
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Dogfood checklist (multi-host clone)
|
|
167
|
+
|
|
168
|
+
Use this after install or upgrade when two or more hosts share one repo.
|
|
169
|
+
|
|
170
|
+
1. **Upgrade / deposit**
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
npm i -g @deftai/directive@latest # when using the npm channel
|
|
174
|
+
directive update # or directive init on a new project
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
2. **Confirm policy**
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
deft policy:show --field=hostSlashCommands
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Expect enabled hosts = emitters you want (default: all four true).
|
|
184
|
+
|
|
185
|
+
3. **Smoke paths on disk** (enabled hosts only)
|
|
186
|
+
|
|
187
|
+
```text
|
|
188
|
+
.claude/commands/deft-continue.md
|
|
189
|
+
.cursor/commands/deft-continue.md
|
|
190
|
+
.grok/commands/deft-continue.md
|
|
191
|
+
.codex/prompts/deft-continue.md
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Spot-check count: **13** managed files per enabled host. Bodies stay short (description + dispatch pointer).
|
|
195
|
+
|
|
196
|
+
4. **Two-host UI check**
|
|
197
|
+
|
|
198
|
+
- Open the same clone in host A (for example Claude Code) and host B (for example Cursor).
|
|
199
|
+
- Type `/` (or the host prompt picker) and confirm Directive entries such as `deft-directive-run-interview` / `/deft:continue` appear on **both** hosts when both are enabled.
|
|
200
|
+
- Invoke one strategy command and one session command; agent should load the pointed strategy/resilience doc, not a fat inlined body.
|
|
201
|
+
|
|
202
|
+
5. **Opt-out smoke (optional)**
|
|
203
|
+
|
|
204
|
+
- Set one host to `false`, run `directive update`, confirm that host’s **managed** product files were removed and other hosts remain.
|
|
205
|
+
- Restore `true` and update again to redeposit.
|
|
206
|
+
|
|
207
|
+
6. **Git**
|
|
208
|
+
|
|
209
|
+
- Stage managed product paths (or let the installer staging path include them) and commit so teammates inherit the surface.
|
|
210
|
+
- ~ Avoid gitignoring the whole host command directory on team repos.
|
|
211
|
+
|
|
212
|
+
7. **Hooks still separate**
|
|
213
|
+
|
|
214
|
+
- `deft verify:hooks-installed --scope=agent` checks hooks, not slash files.
|
|
215
|
+
- Missing autocomplete after a clean deposit is a host UI/cache issue or policy opt-out — re-run update and re-check policy before filing a deposit bug.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Related surfaces
|
|
220
|
+
|
|
221
|
+
| Surface | Role |
|
|
222
|
+
|---------|------|
|
|
223
|
+
| [commands.md § Slash Command Namespaces](../commands.md#slash-command-namespaces-418--1670) | Prose namespaces, routing, deprecation aliases, deposit pointer |
|
|
224
|
+
| `packages/core/src/slash/` | Generator IR + emitters + OpenClaw adapter (maintainers) |
|
|
225
|
+
| `writeSlashCommandDeposit` | init/update file-host deposit |
|
|
226
|
+
| `depositOpenClawL2ProductCommands` / doctor OpenClaw L2 check | OpenClaw skills adapter (#3064) |
|
|
227
|
+
| `plan.policy.openClawProductCommands` | OpenClaw L2 adapter opt-out |
|
|
228
|
+
| `plan.policy.hostHooks` | Host enforcement hooks (#2438) — not slash files |
|
|
229
|
+
| [#75](https://github.com/deftai/directive/issues/75) | Skill discovery residual |
|
|
230
|
+
| [#3064](https://github.com/deftai/directive/issues/3064) | OpenClaw L2 product-command adapter |
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Design reading order (#55)
|
|
235
|
+
|
|
236
|
+
1. LockedDecisions L1–L10 on #55
|
|
237
|
+
2. Multi-host deposit amendment on #55
|
|
238
|
+
3. Token / context design rules on #55
|
|
239
|
+
4. This page + `commands.md`
|
|
240
|
+
|
|
241
|
+
Issue body (2026-03) on #55 is historical intent only.
|
package/main.md
CHANGED
|
@@ -32,6 +32,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
|
|
|
32
32
|
- Interfaces: [interfaces/cli.md](./content/interfaces/cli.md), [interfaces/tui.md](./content/interfaces/tui.md), [interfaces/web.md](./content/interfaces/web.md), [interfaces/rest.md](./content/interfaces/rest.md)
|
|
33
33
|
- Tools: [tools/taskfile.md](./content/tools/taskfile.md), [scm/git.md](./content/scm/git.md), [scm/github.md](./content/scm/github.md), [tools/telemetry.md](./content/tools/telemetry.md)
|
|
34
34
|
- Testing: [coding/testing.md](./content/coding/testing.md)
|
|
35
|
+
- Review process: [coding/review.md](./content/coding/review.md) (tool-agnostic; Greptile adapter via review-cycle skill)
|
|
35
36
|
|
|
36
37
|
**Advanced:**
|
|
37
38
|
- Contracts: [contracts/hierarchy.md](./content/contracts/hierarchy.md), [contracts/boundary-maps.md](./content/contracts/boundary-maps.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive-content",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"description": "Shippable Directive framework content in the consumer .deft/core/ layout (C1 flatten), plus the engine surfaces (.githooks/, Taskfile.yml, tasks/) the deposit wires. Python-free per #2022 Phase 3. Refs #11, #1669, #1967.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|