@deftai/directive-content 0.92.0 → 0.94.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/Taskfile.yml +8 -3
- 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 +81 -3
- package/conventions/content-manifest.json +6 -1
- package/deployments/README.md +8 -0
- package/docs/openclaw-agent-host.md +46 -0
- package/docs/skill-discovery-hosts.md +84 -0
- package/docs/slash-multi-host.md +241 -0
- package/main.md +1 -0
- package/package.json +1 -1
- package/packs/rules/rules-pack-0.1.json +137 -1
- package/packs/skills/skills-pack-0.1.json +22 -6
- package/packs/strategies/strategies-pack-0.1.json +1 -1
- package/skills/deft-directive-pre-pr/SKILL.md +8 -5
- package/skills/deft-directive-review-cycle/SKILL.md +67 -23
- 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-xbrief/SKILL.md +77 -0
- package/strategies/research.md +26 -1
- package/tasks/verify.yml +10 -0
- package/templates/agent-prompt-preamble.md +33 -0
- package/templates/swarm-greptile-poller-prompt.md +18 -15
- package/tools/greptile.md +1 -1
|
@@ -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/Taskfile.yml
CHANGED
|
@@ -84,12 +84,16 @@ includes:
|
|
|
84
84
|
deployments:
|
|
85
85
|
taskfile: ./tasks/deployments.yml
|
|
86
86
|
optional: true
|
|
87
|
+
# check-graph namespaces (#3070): must NOT be optional. CONSUMER_CHECK_GATES /
|
|
88
|
+
# check:consumer depend on these includes; optional silent omit yields opaque
|
|
89
|
+
# go-task "Task does not exist" (exit 200/201). Fail loud when the file is
|
|
90
|
+
# missing so operators get a clear deposit-repair signal (`deft update`).
|
|
87
91
|
toolchain:
|
|
88
92
|
taskfile: ./tasks/toolchain.yml
|
|
89
|
-
optional:
|
|
93
|
+
optional: false
|
|
90
94
|
verify:
|
|
91
95
|
taskfile: ./tasks/verify.yml
|
|
92
|
-
optional:
|
|
96
|
+
optional: false
|
|
93
97
|
coverage:
|
|
94
98
|
taskfile: ./tasks/coverage.yml
|
|
95
99
|
optional: true
|
|
@@ -134,9 +138,10 @@ includes:
|
|
|
134
138
|
migrate:
|
|
135
139
|
taskfile: ./tasks/migrate.yml
|
|
136
140
|
optional: true
|
|
141
|
+
# check-graph namespace (#3070): vbrief:validate is on CONSUMER_CHECK_GATES.
|
|
137
142
|
vbrief:
|
|
138
143
|
taskfile: ./tasks/vbrief.yml
|
|
139
|
-
optional:
|
|
144
|
+
optional: false
|
|
140
145
|
xbrief:
|
|
141
146
|
taskfile: ./tasks/xbrief.yml
|
|
142
147
|
optional: true
|
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**.
|
package/ci-cd/README.md
ADDED
|
@@ -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` (
|
|
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)
|
package/coding/review.md
ADDED
|
@@ -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
|