@deftai/directive-content 0.92.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.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: deft-directive-xbrief
3
+ description: >-
4
+ Create and verify dense xBRIEF artifacts (json|md|both) at an explicit --out
5
+ path. On-demand pack templates for scope/playbook/mission/project styles.
6
+ Use when compressing SoT into xBRIEF or running xbrief:create /
7
+ xbrief:verify. Do NOT trigger on scope lifecycle
8
+ (promote/activate/complete).
9
+ ---
10
+
11
+ Read and follow: skills/deft-directive-xbrief/SKILL.md
package/UPGRADING.md CHANGED
@@ -8,6 +8,20 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
8
8
 
9
9
  <!-- xbrief-backcompat-2111 -->
10
10
 
11
+ ## Multi-host native slash commands (#55 / #3054 / #3055)
12
+
13
+ - **Applies when:** you upgrade to a release that ships multi-host slash deposit (#3052–#3054) and want host autocomplete for `/deft…` on Claude / Cursor / Grok / Codex in a shared repo.
14
+ - **Safe to auto-run:** Yes for `directive update` / `directive init` deposit. Policy edits to `plan.policy.hostSlashCommands` are optional.
15
+ - **Restart required:** Start a **new agent session** (and re-open the host) after deposit so command pickers reload project files.
16
+ - **Commands:**
17
+ - `directive update` (or `directive init` on first adopt)
18
+ - `deft policy:show --field=hostSlashCommands`
19
+ - Dogfood and git prefer-commit guidance: [docs/slash-multi-host.md](./docs/slash-multi-host.md)
20
+ - Prose namespaces remain in [commands.md](./commands.md) § Slash Command Namespaces
21
+ - **Notes:** Default enables every host with a real emitter (not single-host-only). Prefer committing managed product command/prompt paths. Skill discovery (#75) is a separate residual.
22
+
23
+ ---
24
+
11
25
  ### xBRIEF rename (#2034 / #2110 / #2907)
12
26
 
13
27
  > **Single authoritative rename/history note.** Public product voice uses **xBRIEF** / `xbrief/` only. **vBRIEF** is **legacy**.
@@ -0,0 +1,57 @@
1
+ # CI/CD Layer
2
+
3
+ Provider-specific guidance for continuous integration runners and CI migration
4
+ (Blacksmith, and later GitHub-hosted, Buildjet, Depot, self-hosted, and similar).
5
+
6
+ ## Purpose
7
+
8
+ - ! Provide **optional** CI/CD modules that a project can apply when it migrates runners
9
+ - ~ Keep runner and pipeline guidance separate from core Deft rules and from `deployments/`
10
+ - ~ Enable drop-in agent prompts so a migration is repeatable across repos
11
+ - ⊗ Expand always-on `AGENTS.md` with full CI provider bulk — load this layer only when you migrate CI
12
+
13
+ ## Relation to deployments
14
+
15
+ | Layer | Focus |
16
+ |-------|--------|
17
+ | [`deployments/`](../deployments/README.md) | Where and how you **deploy** runtime apps (cloud platforms, CD paths) |
18
+ | **`ci-cd/`** (this layer) | How you **run CI jobs** (runner labels, sizing, workflow migration) |
19
+
20
+ Deploy docs may mention GitHub Actions for ship steps. They do not replace runner-tier guidance here.
21
+
22
+ ## Module Structure
23
+
24
+ Create a directory per CI provider:
25
+
26
+ ```
27
+ ci-cd/
28
+ README.md # purpose + module structure (this file)
29
+ <provider>/
30
+ README.md
31
+ overview.md
32
+ runner-tiers.md # when present: sizing decision rules
33
+ migration-prompt.md # when present: agent drop-in prompt
34
+ examples/ # before/after workflow snippets
35
+ ```
36
+
37
+ Guidelines:
38
+
39
+ - ! Use hyphens in filenames
40
+ - ! Keep modules optional and isolated
41
+ - ~ Include a clear README with attribution when derived from a reference repo
42
+ - ~ Prefer short decision tables over long narrative for tier selection
43
+ - ⊗ Make any single provider the default for the Directive framework repo itself
44
+ unless a separate product decision ships that change
45
+
46
+ ## Current modules
47
+
48
+ | Module | Load when |
49
+ |--------|-----------|
50
+ | [blacksmith/](./blacksmith/README.md) | Migrating GitHub Actions jobs to [Blacksmith](https://blacksmith.sh) runners with tiered vCPU sizing |
51
+
52
+ ## Lazy loading
53
+
54
+ 1. Scan this README for the right provider.
55
+ 2. Open that provider's `README.md`, then `overview.md` / `runner-tiers.md` as needed.
56
+ 3. Paste or adapt `migration-prompt.md` into the agent session that edits `.github/workflows/`.
57
+ 4. Do not pin full provider text into always-on agent context.
@@ -0,0 +1,32 @@
1
+ # Blacksmith CI Module
2
+
3
+ Optional Deft guidance for migrating GitHub Actions workflows to
4
+ [Blacksmith](https://blacksmith.sh) runners using **tiered vCPU sizing**.
5
+
6
+ ## Status
7
+
8
+ - ! Optional module — not required for Directive install or `task check`
9
+ - ! Lazy-load only when a repo migrates (or plans to migrate) to Blacksmith
10
+ - ⊗ Treat Blacksmith as the default Directive framework CI runner from these docs alone
11
+
12
+ ## Files
13
+
14
+ | File | Role |
15
+ |------|------|
16
+ | [overview.md](./overview.md) | What Blacksmith is, drop-in `runs-on` swap, scope and non-goals |
17
+ | [runner-tiers.md](./runner-tiers.md) | Decision rules for 4 / 8 / 32 vCPU tags |
18
+ | [migration-prompt.md](./migration-prompt.md) | Drop-in agent prompt for workflow migration |
19
+ | [examples/lint-vs-test-split.md](./examples/lint-vs-test-split.md) | Before/after: split monolithic lint+test onto small vs large runners |
20
+
21
+ ## Quick start
22
+
23
+ 1. Install the Blacksmith GitHub App on every repo that will use `runs-on: blacksmith-*`.
24
+ 2. Read [runner-tiers.md](./runner-tiers.md) and map each job to a tier.
25
+ 3. Run [migration-prompt.md](./migration-prompt.md) (or apply the rules by hand).
26
+ 4. Prefer splitting `test-and-lint` jobs into small lint and large test jobs.
27
+
28
+ ## Attribution
29
+
30
+ Tier practice and the migration prompt shape come from `deftai/evolution`
31
+ Blacksmith usage (Slack capture for issue [#448](https://github.com/deftai/directive/issues/448)).
32
+ Runner tag names follow [Blacksmith runner docs](https://docs.blacksmith.sh/blacksmith-runners/overview).
@@ -0,0 +1,98 @@
1
+ # Example: split lint vs test (before / after)
2
+
3
+ Monolithic `test-and-lint` jobs force a large machine for single-threaded lint,
4
+ or starve tests on a small machine. Split them.
5
+
6
+ ## Before (GitHub-hosted, combined)
7
+
8
+ ```yaml
9
+ name: ci
10
+
11
+ on:
12
+ pull_request:
13
+ push:
14
+ branches: [master]
15
+
16
+ jobs:
17
+ test-and-lint:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "22"
24
+ cache: pnpm
25
+ - run: pnpm install --frozen-lockfile
26
+ - run: pnpm exec biome check .
27
+ - run: pnpm exec tsc -b --pretty false
28
+ - run: pnpm exec vitest run --coverage
29
+ ```
30
+
31
+ Problems:
32
+
33
+ - Lint and typecheck barely use 32 cores
34
+ - Tests with coverage want many cores
35
+ - One failure mode mixes style and correctness
36
+
37
+ ## After (Blacksmith tiers + split)
38
+
39
+ ```yaml
40
+ name: ci
41
+
42
+ on:
43
+ pull_request:
44
+ push:
45
+ branches: [master]
46
+
47
+ jobs:
48
+ lint:
49
+ # Formatters, linters, typecheckers only — small tier.
50
+ runs-on: blacksmith-4vcpu-ubuntu-2404
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: actions/setup-node@v4
54
+ with:
55
+ node-version: "22"
56
+ cache: pnpm
57
+ - run: pnpm install --frozen-lockfile
58
+ - run: pnpm exec biome check .
59
+ - run: pnpm exec tsc -b --pretty false
60
+
61
+ test:
62
+ # Full unit suite with coverage — large tier.
63
+ runs-on: blacksmith-32vcpu-ubuntu-2404
64
+ steps:
65
+ - uses: actions/checkout@v4
66
+ - uses: actions/setup-node@v4
67
+ with:
68
+ node-version: "22"
69
+ cache: pnpm
70
+ - run: pnpm install --frozen-lockfile
71
+ - run: pnpm exec vitest run --coverage
72
+ ```
73
+
74
+ ## Medium tier snippet (scanner)
75
+
76
+ ```yaml
77
+ semgrep:
78
+ # Container scanner with real CPU work — medium tier.
79
+ runs-on: blacksmith-8vcpu-ubuntu-2404
80
+ container:
81
+ image: semgrep/semgrep:latest
82
+ steps:
83
+ - uses: actions/checkout@v4
84
+ - run: semgrep scan --config=auto
85
+ ```
86
+
87
+ ## Mapping checklist
88
+
89
+ | Job kind | Tier | Tag |
90
+ |----------|------|-----|
91
+ | biome / eslint / ruff / tsc only | Small | `blacksmith-4vcpu-ubuntu-2404` |
92
+ | matrix emit / label / dispatch | Small | `blacksmith-4vcpu-ubuntu-2404` |
93
+ | gosec / trivy fs / npm audit | Small | `blacksmith-4vcpu-ubuntu-2404` |
94
+ | semgrep / heavy image scan | Medium | `blacksmith-8vcpu-ubuntu-2404` |
95
+ | vitest/jest/go test + coverage | Large | `blacksmith-32vcpu-ubuntu-2404` |
96
+ | full `task check` | Large | `blacksmith-32vcpu-ubuntu-2404` |
97
+
98
+ Full rules: [../runner-tiers.md](../runner-tiers.md).
@@ -0,0 +1,80 @@
1
+ # Blacksmith migration prompt (agent drop-in)
2
+
3
+ Copy the prompt below into an agent session that may edit `.github/workflows/`.
4
+ Point the agent at this file (or paste the body). Pair with
5
+ [runner-tiers.md](./runner-tiers.md).
6
+
7
+ ---
8
+
9
+ ## Prompt
10
+
11
+ ```text
12
+ Migrate this repository's GitHub Actions workflows to Blacksmith runners using
13
+ tiered vCPU sizing. Follow these rules exactly.
14
+
15
+ ## Goal
16
+ Replace GitHub-hosted Ubuntu runners with Blacksmith tags so heavy parallel jobs
17
+ get large machines and single-threaded / coordination jobs stay small.
18
+
19
+ ## Runner tags (Ubuntu x64)
20
+ - blacksmith-4vcpu-ubuntu-2404 — SMALL (default)
21
+ - blacksmith-8vcpu-ubuntu-2404 — MEDIUM
22
+ - blacksmith-32vcpu-ubuntu-2404 — LARGE
23
+
24
+ ## Decision rules
25
+
26
+ ### LARGE (32 vCPU) if the job does any of:
27
+ - Test suite with coverage across many files/packages
28
+ - go test ./..., jest, vitest, pytest -n auto, cargo test (or equivalent)
29
+ - Multi-package monorepo builds (turbo run build, nx run-many, etc.)
30
+ - LLM/agent actions that spawn heavy subprocesses
31
+ - Full task check / make ci chaining many of the above
32
+
33
+ ### MEDIUM (8 vCPU) if the job:
34
+ - Runs inside a container: for a security/analysis scanner doing real CPU work
35
+ (semgrep, codeql-community, trivy image scans, sonar-scanner)
36
+ - Does moderate parallel compression/packaging but is not a full test matrix
37
+
38
+ ### SMALL (4 vCPU) if the job:
39
+ - Only runs formatters / linters / typecheckers
40
+ - Is a coordination job (mostly gh calls, $GITHUB_OUTPUT, matrix JSON, labels,
41
+ dispatching workflows)
42
+ - Runs a fast single-binary scanner (gosec, trivy fs, npm audit)
43
+ - Uploads artifacts, publishes releases, or does IO-bound deploy steps
44
+
45
+ If a job is one monolithic test-and-lint step, SPLIT it into a small-tier lint
46
+ job and a large-tier test job.
47
+
48
+ ## Migration steps
49
+ 1. Find every workflow under .github/workflows/.
50
+ 2. Replace ubuntu-latest / ubuntu-22.04 / ubuntu-24.04 with the appropriate
51
+ blacksmith-{N}vcpu-ubuntu-2404 tier per the rules above.
52
+ 3. Leave macos-*, windows-*, and self-hosted / custom-labeled runners alone.
53
+ 4. Add a one-line comment above each runs-on: explaining why that tier was
54
+ chosen. Example:
55
+
56
+ # Coordination-only: emits a JSON task list. Keep on the small runner.
57
+ runs-on: blacksmith-4vcpu-ubuntu-2404
58
+
59
+ 5. Do not change job logic except for lint/test splits required by the rules.
60
+ 6. Summarize: list each job, old runs-on, new runs-on, and the tier reason.
61
+
62
+ ## Non-goals
63
+ - Do not make Blacksmith the org-wide default outside this repo's workflows.
64
+ - Do not invent multi-provider CI abstractions.
65
+ - Do not rewrite deploy platform docs; only workflows and related CI config.
66
+ ```
67
+
68
+ ---
69
+
70
+ ## After the agent finishes
71
+
72
+ - Confirm the Blacksmith GitHub App is installed on this repository
73
+ - Open a PR that only touches workflow sizing (plus any intentional lint/test splits)
74
+ - Watch a green run on the new tags before relying on the migration
75
+
76
+ ## See also
77
+
78
+ - [overview.md](./overview.md)
79
+ - [runner-tiers.md](./runner-tiers.md)
80
+ - [examples/lint-vs-test-split.md](./examples/lint-vs-test-split.md)
@@ -0,0 +1,58 @@
1
+ # Blacksmith overview
2
+
3
+ [Blacksmith](https://blacksmith.sh) provides drop-in GitHub Actions runners.
4
+ You keep workflow YAML; you change `runs-on` labels (and often split heavy jobs).
5
+
6
+ ## Why use this module
7
+
8
+ GitHub-hosted `ubuntu-latest` is one size for every job. Blacksmith exposes
9
+ explicit vCPU tags so you can:
10
+
11
+ - Give full test/coverage and monorepo builds a **large** runner
12
+ - Keep format, lint, typecheck, and coordination jobs on a **small** runner
13
+ - Put CPU-heavy container scanners on a **medium** runner
14
+
15
+ That split cuts wall-clock time on the critical path and avoids overpaying for
16
+ idle cores on single-threaded work.
17
+
18
+ ## Drop-in shape
19
+
20
+ Minimal change (labels only):
21
+
22
+ ```yaml
23
+ jobs:
24
+ build:
25
+ # Full monorepo test suite with coverage — large tier.
26
+ runs-on: blacksmith-32vcpu-ubuntu-2404
27
+ ```
28
+
29
+ Common Ubuntu x64 tags used in this guide:
30
+
31
+ | Tag | Tier in this guide |
32
+ |-----|--------------------|
33
+ | `blacksmith-4vcpu-ubuntu-2404` | Small (default) |
34
+ | `blacksmith-8vcpu-ubuntu-2404` | Medium |
35
+ | `blacksmith-32vcpu-ubuntu-2404` | Large |
36
+
37
+ Blacksmith also publishes other sizes (for example 2 vCPU). This module standardizes
38
+ on **4 / 8 / 32** as the Deft consumer decision set. See
39
+ [runner-tiers.md](./runner-tiers.md).
40
+
41
+ ## Prerequisites
42
+
43
+ - Blacksmith GitHub App installed on **each** repository that uses `runs-on: blacksmith-*`
44
+ - Jobs that must stay on macOS, Windows, or custom self-hosted labels stay on those runners
45
+
46
+ ## Non-goals (this module)
47
+
48
+ - ⊗ Changing the Directive monorepo's own workflows as a prerequisite for shipping these docs
49
+ - ⊗ Declaring Blacksmith the default CI for every Deft consumer
50
+ - ⊗ A multi-provider CI product surface before provider guides land under `ci-cd/`
51
+
52
+ ## Related
53
+
54
+ - [runner-tiers.md](./runner-tiers.md) — when to pick 4, 8, or 32 vCPU
55
+ - [migration-prompt.md](./migration-prompt.md) — agent-ready migration steps
56
+ - [examples/lint-vs-test-split.md](./examples/lint-vs-test-split.md) — split lint vs test
57
+ - Parent layer: [ci-cd/README.md](../README.md)
58
+ - Deploy platforms (different concern): [deployments/README.md](../../deployments/README.md)
@@ -0,0 +1,80 @@
1
+ # Blacksmith runner tiers (4 / 8 / 32 vCPU)
2
+
3
+ Opinionated sizing for GitHub Actions jobs on Blacksmith Ubuntu x64 runners.
4
+ Use one tag per job. Put a one-line comment above each `runs-on:` that states why.
5
+
6
+ ## Tier table
7
+
8
+ | Tier | `runs-on` | Use for |
9
+ |------|-----------|---------|
10
+ | **Large (32 vCPU)** | `blacksmith-32vcpu-ubuntu-2404` | Full test/coverage, monorepo builds, full `task check`, heavy agent jobs |
11
+ | **Medium (8 vCPU)** | `blacksmith-8vcpu-ubuntu-2404` | Container scanners with real CPU (semgrep and similar) |
12
+ | **Small (4 vCPU)** | `blacksmith-4vcpu-ubuntu-2404` | Lint/format/typecheck, coordination, fast single-binary scanners, IO-bound work |
13
+
14
+ Default when unsure: **4 vCPU**. Move up only when the job spends real CPU on parallel work.
15
+
16
+ ## 32 vCPU — large
17
+
18
+ Choose large if the job does any of:
19
+
20
+ - Test suite with coverage across many files or packages
21
+ - Language suite runners such as `go test ./...`, `jest`, `vitest`, `pytest -n auto`, `cargo test`
22
+ - Multi-package monorepo builds (`turbo run build`, `nx run-many`, and similar)
23
+ - LLM/agent actions that spawn heavy subprocesses (for example Oz, Claude Code in CI)
24
+ - Full `task check` / `make ci` that chains many of the above
25
+
26
+ ```yaml
27
+ # Full test suite with coverage across packages — large tier.
28
+ runs-on: blacksmith-32vcpu-ubuntu-2404
29
+ ```
30
+
31
+ ## 8 vCPU — medium
32
+
33
+ Choose medium if the job:
34
+
35
+ - Runs inside a `container:` for a security or analysis scanner that does real CPU work
36
+ (semgrep, CodeQL community runners, Trivy **image** scans, sonar-scanner)
37
+ - Does moderate parallel compression or packaging but is not a full test matrix
38
+
39
+ ```yaml
40
+ # Semgrep in container with real CPU scan work — medium tier.
41
+ runs-on: blacksmith-8vcpu-ubuntu-2404
42
+ ```
43
+
44
+ ## 4 vCPU — small (default)
45
+
46
+ Choose small if the job:
47
+
48
+ - Only runs formatters, linters, or typecheckers
49
+ - Is a coordination job (mostly `gh` calls, `$GITHUB_OUTPUT`, matrix JSON, labels, dispatch)
50
+ - Runs a fast single-binary scanner (gosec, Trivy **fs**, npm audit)
51
+ - Uploads artifacts, publishes releases, or runs IO-bound deploy steps
52
+
53
+ ```yaml
54
+ # Coordination-only: emits a JSON task list. Keep on the small runner.
55
+ runs-on: blacksmith-4vcpu-ubuntu-2404
56
+ ```
57
+
58
+ ## Split monolithic lint + test
59
+
60
+ If a job today is one `test-and-lint` (or similar) step:
61
+
62
+ 1. ! Split into a **small-tier** `*-lint` job and a **large-tier** `*-test` job
63
+ 2. ! Share checkout/setup steps only as needed; prefer independent jobs so lint
64
+ fails fast on a cheap runner
65
+ 3. ~ Wire `needs:` only when order truly matters
66
+
67
+ See [examples/lint-vs-test-split.md](./examples/lint-vs-test-split.md).
68
+
69
+ ## Leave alone
70
+
71
+ Do **not** rewrite these `runs-on` values to Blacksmith Ubuntu tags:
72
+
73
+ - `macos-*`
74
+ - `windows-*`
75
+ - Self-hosted or custom-labeled runners the repo already owns
76
+
77
+ ## Comment style
78
+
79
+ ! Add a one-line comment above each Blacksmith `runs-on:` that states the tier reason.
80
+ Mirror the style in the examples and migration prompt.
package/coding/coding.md CHANGED
@@ -21,6 +21,7 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
21
21
  **Documentation:**
22
22
  - ! All *.md in `docs/` directory (except README.md, AGENTS.md, WARP.md)
23
23
  - ! Prior tasks/plans in `history/`
24
+ - ! When code changes user-visible behavior, update matching user-facing docs in the same PR — see [docs.md](docs.md) (#447; lazy-load, not AGENTS always-on)
24
25
 
25
26
  **Filenames:**
26
27
  - ~ Use hyphens not underscores (unless language idiom)
@@ -107,6 +108,11 @@ See [../scm/git.md](../scm/git.md) for:
107
108
  - ! Apply baseline security standards to every project from day one
108
109
  - See [../coding/security.md](../coding/security.md) for input validation, authn/authz, secrets, dependency, TOCTOU / mutable-external-resource rules (#1938), and agent-specific threats (#661)
109
110
 
111
+ **Review process (#1471 / #212):**
112
+ - ! Apply tool-agnostic review-cycle principles on every PR review response
113
+ - See [review.md](review.md) for read-all-findings, severity P0/P1/P2, single batch commit, cross-file grep, no mid-review push, exit on no P0/P1, and post-merge closing-keyword verification
114
+ - Greptile/GitHub adapter: [../skills/deft-directive-review-cycle/SKILL.md](../skills/deft-directive-review-cycle/SKILL.md)
115
+
110
116
  **Codebase Hygiene:**
111
117
  - See [hygiene.md](hygiene.md) for: dead code removal, circular dependency detection, error hiding patterns, legacy/deprecated code cleanup
112
118
 
@@ -138,7 +144,7 @@ This rule is the OPERATIONAL complement to the EPISTEMIC honesty rules elsewhere
138
144
 
139
145
  The rule applies to agent completion claims during task execution. It applies equally to claims to the user, claims in commit messages, claims in PR bodies, claims in CHANGELOG entries, and claims in status messages to a parent agent. A short, honest "the migration completed; I did not verify the per-record count" is strictly preferred over a confident "migration completed successfully" that hides the gap.
140
146
 
141
- **Cross-references:** strategies discuss/probe Graduation dual-path locks (#2899); `## Quality Standards` above (`⊗ Claim checks passed without running them` -- the sibling rule that this expands from process to outcome); `hygiene.md` `## Error Handling: No Hiding` (the same hiding pattern at the code-write level, not the claim level); `skills/deft-directive-pre-pr/SKILL.md` (pre-PR verification claims); `skills/deft-directive-build/SKILL.md` Step 4 Quality Gates (task-completion claims); `skills/deft-directive-review-cycle/SKILL.md` (the review-cycle skill explicitly checks for hidden incompleteness in fix-batch completion claims).
147
+ **Cross-references:** strategies discuss/probe Graduation dual-path locks (#2899); `## Quality Standards` above (`⊗ Claim checks passed without running them` -- the sibling rule that this expands from process to outcome); `hygiene.md` `## Error Handling: No Hiding` (the same hiding pattern at the code-write level, not the claim level); `skills/deft-directive-pre-pr/SKILL.md` (pre-PR verification claims); `skills/deft-directive-build/SKILL.md` Step 4 Quality Gates (task-completion claims); `skills/deft-directive-review-cycle/SKILL.md` (Greptile adapter; universal review principles in [review.md](review.md); the adapter explicitly checks for hidden incompleteness in fix-batch completion claims).
142
148
 
143
149
  ## Calling LLM APIs (#481)
144
150
 
package/coding/docs.md ADDED
@@ -0,0 +1,44 @@
1
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
2
+ <!-- Purpose: rendered coding rules -->
3
+ <!-- Source of truth: packs/rules/rules-pack-0.1.json -->
4
+ <!-- Regenerate with: task packs:render -->
5
+ <!-- Edit the source, not this file. Slice instead of loading every coding doc: task packs:slice rules by-tier --tier <TIER> (or by-domain, list) -->
6
+
7
+ # Documentation with Code Changes (#447)
8
+
9
+ Keep user-facing documentation current when code changes. Full rules live here so they are **not** always-loaded into AGENTS.md (consumer token cost).
10
+
11
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
12
+
13
+ **See also** (load only when needed):
14
+ - [coding.md](coding.md) — general coding standards
15
+ - [../skills/deft-directive-pre-pr/SKILL.md](../skills/deft-directive-pre-pr/SKILL.md) — pre-PR checklist (operational)
16
+ - [../docs/good-agents-md.md](../docs/good-agents-md.md) — AGENTS.md structure
17
+
18
+ ## When docs are required
19
+
20
+ - ! If the change alters **user-visible behavior**, update the matching user-facing surface in the **same PR** (or same commit batch before PR)
21
+ - ! User-facing surfaces include, as applicable:
22
+ - CHANGELOG.md under `[Unreleased]` (when the change is user- or operator-visible)
23
+ - CLI help / `commands.md` (or equivalent) when adding or changing a user-invoked command or flag
24
+ - Getting-started / README pointers when install or first-run behavior changes
25
+ - Skill or strategy "When to use" / trigger text when workflow entry points change
26
+ - ~ Prefer updating the **canonical source** (xBRIEF, content pack, policy) and re-rendering generated views — do not hand-edit generated markdown as the sole fix
27
+ - ⊗ Claim "docs updated" or "documented" without the documentation files appearing in the diff
28
+
29
+ ## When docs are optional
30
+
31
+ - ? Invent documentation for pure internal refactors with no user-visible behavior change
32
+ - ~ Internal-only comments and maintainer notes MAY ship without user-facing doc updates
33
+ - ⊗ Expand always-loaded AGENTS.md with long documentation-discipline essays — keep this file lazy-loaded
34
+
35
+ ## Honesty
36
+
37
+ - ! Documentation claims obey fail-loud / outcome verification (coding.md § Fail Loud): no completion claims that hide missing doc surfaces
38
+ - ~ If a required surface is skipped, say so explicitly and why (same standard as "checks not run")
39
+
40
+ ## Anti-Patterns
41
+
42
+ - ⊗ Shipping a new public task/CLI verb with no help or commands entry
43
+ - ⊗ Leaving CHANGELOG stale after a user-visible fix
44
+ - ⊗ Orphan docs (new md not reachable from AGENTS/README/reference chain — see pre-pr #644 / #647)
@@ -0,0 +1,50 @@
1
+ <!-- AUTO-GENERATED by task packs:render -- DO NOT EDIT MANUALLY -->
2
+ <!-- Purpose: rendered coding rules -->
3
+ <!-- Source of truth: packs/rules/rules-pack-0.1.json -->
4
+ <!-- Regenerate with: task packs:render -->
5
+ <!-- Edit the source, not this file. Slice instead of loading every coding doc: task packs:slice rules by-tier --tier <TIER> (or by-domain, list) -->
6
+
7
+ # Review Cycle Principles
8
+
9
+ Tool-agnostic principles for responding to code review findings on a PR. Adapters
10
+ (Greptile, CodeRabbit, Codacy, host babysit loops, …) implement these with
11
+ tool-specific mechanics. This file is the single source of truth for the
12
+ universal process so consumers without a given adapter skill still get the
13
+ review discipline (#1471 / #212).
14
+
15
+ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
16
+
17
+ **See also:** [coding.md](coding.md) (quality chain) · [testing.md](testing.md) ·
18
+ [skills/deft-directive-review-cycle/SKILL.md](../skills/deft-directive-review-cycle/SKILL.md)
19
+ (Greptile + GitHub adapter)
20
+
21
+ ## Universal Requirements
22
+
23
+ - ! ALL review findings MUST be read before any fixes begin
24
+ - ! Findings MUST be classified by severity: **P0** (critical/blocking), **P1** (real defect), **P2** (style / non-blocking). P0 and P1 are merge-blocking; P2 is not
25
+ - ! Findings MUST be fixed in a single batch commit — never incrementally per finding
26
+ - ! Changed values, terms, or fields MUST be grepped across all PR files for cross-file consistency in the same batch
27
+ - ~ Structured data files (JSON / YAML / TOML) SHOULD be validated locally before commit (e.g. `python3 -m json.tool`, YAML lint) — do not rely on the reviewer alone to catch syntax errors
28
+ - ! Do not push additional commits while a review is in progress on the current head
29
+ - ! Exit condition: no P0 or P1 remaining = ready to merge; P2 does not block merge
30
+ - ! Post-merge: verify that closing keywords (`Closes #N`, `Fixes #N`) actually closed the referenced issues (squash-merge pitfall; #167)
31
+
32
+ ## Severity and merge gate
33
+
34
+ | Severity | Meaning | Blocks merge? |
35
+ | --- | --- | --- |
36
+ | P0 | Critical / correctness / security / data-loss | Yes |
37
+ | P1 | Real defect or incomplete acceptance | Yes |
38
+ | P2 | Style, nits, non-blocking suggestion | No |
39
+
40
+ - ! Agents MUST NOT claim merge-ready while any P0 or P1 from the current review remains open
41
+ - ⊗ Elevate P2-only findings into a merge block without operator agreement
42
+
43
+ ## Anti-Patterns
44
+
45
+ - ⊗ Start fixing individual findings as you encounter them — read and plan the full batch first
46
+ - ⊗ Push one commit per finding
47
+ - ⊗ Push while a bot or human review of the current head is still in flight
48
+ - ⊗ Treat P2-only findings as merge-blocking by default
49
+ - ⊗ Assume squash merge auto-closed referenced issues — always verify issue state after merge (#167)
50
+ - ⊗ Skip cross-file grep when a fix renames or retargets a shared term/value/field
package/commands.md CHANGED
@@ -77,12 +77,55 @@ The legacy product forms below remain accepted but SHOULD emit a deprecation war
77
77
 
78
78
  Skills retain the `deft-directive-*` prefix — only the slash-command surface is namespaced.
79
79
 
80
+ ### Native multi-host registration (#55 / #3052–#3055)
81
+
82
+ Prose routing above remains the fallback for every agent (L9). For hosts that load project command/prompt files, `directive init` and `deft update` also deposit **thin native wrappers** for the locked product set (exactly **13** commands — L2) across every **enabled** emitter host in one pass (L6):
83
+
84
+ | Host | Managed directory |
85
+ |------|-------------------|
86
+ | Claude Code | `.claude/commands/` |
87
+ | Cursor | `.cursor/commands/` |
88
+ | Grok | `.grok/commands/` |
89
+ | Codex | `.codex/prompts/` |
90
+
91
+ - **Thin wrappers only (L5):** frontmatter description + short dispatch pointer to strategy/skill/`commands.md` / resilience paths. ⊗ Inline full strategy or skill bodies. ⊗ Emit native files for legacy deprecation aliases (L3 — prose aliases only).
92
+ - **Opt-out:** `plan.policy.hostSlashCommands.<host>` = `false` (hosts: `claude`, `cursor`, `grok`, `codex`). Inspect with `deft policy:show --field=hostSlashCommands`. Opt-out removes managed thin wrappers only; consumer customizations at the same path are preserved. Parallel mental model to `plan.policy.hostHooks`, but hooks and slash deposit are separate.
93
+ - **Git (L8):** Prefer **committing** managed product command/prompt paths so multi-host clones share the same surface. Idempotent rewrite on init/update. Personal gitignore of host command dirs is an escape, not the team default. Managed allowlist is exact product filenames — not whole host command directories.
94
+ - **Not skill discovery:** Native slash files (#55) ≠ skill path auto-discovery ([#75](https://github.com/deftai/directive/issues/75)). Skills deposit remains independent (L7).
95
+
96
+ Full operator guide, L2 table, and multi-host dogfood checklist: [docs/slash-multi-host.md](./docs/slash-multi-host.md).
97
+
80
98
  ---
81
99
 
82
100
  <!-- xbrief-backcompat-2111 -->
83
101
 
84
102
  > **xBRIEF rename (#2034 / #2110):** Projects still on the legacy `vbrief/` layout and `x-vbrief/` reference tokens remain read-accepted until you run `deft migrate:xbrief` (or `task migrate:xbrief`). `deft doctor` and `deft update` signpost unmigrated layouts.
85
103
 
104
+ ## xBRIEF create / verify (artifact write — not lifecycle) (#3057)
105
+
106
+ On-demand **write + check** dense xBRIEF SoT artifacts at an explicit path. These verbs do **not** promote, activate, or complete scopes.
107
+
108
+ | Verb | Meaning |
109
+ |------|---------|
110
+ | `deft xbrief:create` / `task xbrief:create` | Write json, md, or both at `--out` |
111
+ | `deft xbrief:verify` / `task xbrief:verify` | Fail-closed check at `--out` |
112
+ | `scope:*` / intake | Lifecycle birth and folder/status transitions |
113
+ | `xbrief:preflight` | Implementation-intent gate (unchanged) |
114
+
115
+ ```bash
116
+ deft xbrief:create -- --format <json|md|both> --out <path> [--style scope|playbook|mission|project] [--title T] [--id ID] [--force]
117
+ deft xbrief:verify -- --format <json|md|both> --out <path> [--style scope|playbook|mission|project]
118
+ ```
119
+
120
+ - ! `--format` and `--out` are **required**
121
+ - ! `both` uses one stem → `*.xbrief.json` + `*.xbrief.md`
122
+ - ! P0 styles: `scope` | `playbook` | `mission` | `project`
123
+ - ! Paths expand portably (`~`, `%USERPROFILE%`); project-root containment fails closed
124
+ - ~ Skill postcard: `deft-directive-xbrief` (pack grammar loads on use)
125
+ - ⊗ Overload `scope:promote` (or invent `xbrief:promote`) for “compress text”
126
+
127
+ ---
128
+
86
129
  ## Scope xBRIEF Lifecycle
87
130
 
88
131
  Scope xBRIEFs live under `xbrief/{proposed,pending,active,completed,cancelled}/`. The folder and `plan.status` must agree.
@@ -49,7 +49,7 @@
49
49
  {
50
50
  "path": "content/coding",
51
51
  "bucket": "content",
52
- "note": "Coding standards docs (coding.md, hygiene.md, testing.md, build-output.md, toolchain.md)."
52
+ "note": "Coding standards docs (coding.md, testing.md, security.md, review.md, hygiene.md, debugging.md, build-output.md, toolchain.md, holzmann.md)."
53
53
  },
54
54
  {
55
55
  "path": "content/commands.md",
@@ -72,6 +72,11 @@
72
72
  "note": "Conventions prose docs ship as content; co-located structured data files (rule-ownership.json, content-manifest.json) are engine-consumed gate inputs that travel with the same directory.",
73
73
  "straddle": true
74
74
  },
75
+ {
76
+ "path": "content/ci-cd",
77
+ "bucket": "content",
78
+ "note": "Optional CI/CD provider guidance (Blacksmith runner tiers, migration prompts, examples). Parallel to deployments/; lazy-load only (#448)."
79
+ },
75
80
  {
76
81
  "path": "content/deployments",
77
82
  "bucket": "content",
@@ -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: