You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: non-negotiable docs-currency rule across instruction surfaces
Interface/behavior changes must update docs in the same patch;
CLI reference regenerates via bun run docs:cli-reference; agent-facing
phrasing changes go through instruction-source + setup sync.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .codex/skills/hack-cli/SKILL.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,7 @@ Use `hack` as the primary interface for local-first development.
63
63
- Generated (do not hand-edit): `.hack/.internal/compose.override.yml`, `.hack/.internal/compose.env.override.yml`, `.hack/.branch/compose.<branch>.override.yml`.
- Ignore rules: hack owns a committed `.hack/.gitignore` (self-healing on init/up) covering machine-local generated files (`.internal/`, `.branch/`, `.env`, `.env.state.json`, `hack.env*.local.yaml`); keep it committed, and if generated files leaked into git, `hack doctor --fix` untracks them (files stay on disk).
66
67
67
68
## Linked git worktrees
68
69
@@ -172,13 +173,15 @@ Use `hack` as the primary interface for local-first development.
172
173
- Audit integration state only: `hack setup sync --all-scopes --check`
- After upgrading CLI: `hack update` then `hack setup sync --all-scopes`
176
+
- When changing hack itself: interface or behavior changes must update docs/ in the same change (regenerate the CLI reference with `bun run docs:cli-reference`).
175
177
176
178
## Agent setup (CLI-first)
177
179
178
180
- Cursor rules: `hack setup cursor`
179
181
- Claude hooks: `hack setup claude`
180
182
- Codex skill: `hack setup codex`
181
183
- Refresh all local agent integrations: `hack setup sync --all-scopes`
184
+
- Agent-assisted onboarding: `hack init --with claude|codex|both` (new repos) or `hack agent onboard` (existing projects) print/hand off the full setup prompt; the `/hack-init` skill and the `hack-init` MCP prompt return the same content.
Copy file name to clipboardExpand all lines: .cursor/rules/hack.mdc
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ Prefer `hack` when shell access is available. Use MCP only when shell access is
29
29
- Generated (do not hand-edit): `.hack/.internal/compose.override.yml`, `.hack/.internal/compose.env.override.yml`, `.hack/.branch/compose.<branch>.override.yml`.
- Ignore rules: hack owns a committed `.hack/.gitignore` (self-healing on init/up) covering machine-local generated files (`.internal/`, `.branch/`, `.env`, `.env.state.json`, `hack.env*.local.yaml`); keep it committed, and if generated files leaked into git, `hack doctor --fix` untracks them (files stay on disk).
32
33
33
34
## Linked git worktrees
34
35
@@ -77,6 +78,7 @@ Prefer `hack` when shell access is available. Use MCP only when shell access is
77
78
- Audit integration state only: `hack setup sync --all-scopes --check`
- After upgrading CLI: `hack update` then `hack setup sync --all-scopes`
81
+
- When changing hack itself: interface or behavior changes must update docs/ in the same change (regenerate the CLI reference with `bun run docs:cli-reference`).
Copy file name to clipboardExpand all lines: AGENTS.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,9 +55,13 @@ Never use any types and always default to leveraging generics and smart types to
55
55
56
56
## Verification Guardrails
57
57
58
+
- Docs currency is non-negotiable: ANY interface or behavior change (commands, flags, config keys, file layouts, env vars, defaults) must update the affected docs/ pages in the same patch — no matter what.
59
+
- The CLI reference is generated: after changing the CLI surface, run `bun run docs:cli-reference` and commit `docs/reference/cli.md` (a drift test fails otherwise).
60
+
- Agent-facing behavior phrasing lives in `src/agents/instruction-source.ts`; update it (not the generated surfaces) and run `hack setup sync --all-scopes`.
58
61
- If a change affects `hack run`, `hack exec`, env resolution, runtime-state reconciliation, or lifecycle shell/process semantics, the patch must include both targeted tests and matching docs updates.
59
62
- For env-sensitive command changes, verify the requested env, effective env, cached runtime-state env, and target-service-running matrix instead of a single happy path.
60
63
- For lifecycle changes, verify `sh -c` semantics, process-group cleanup, stale pane/process metadata reconciliation, and interactive stdin behavior.
64
+
- Real end-to-end coverage lives in `tests/e2e/` (`bun run test:e2e:local`, docker tier via `test:e2e:local:docker`) — extend it when adding user-facing workflows.
61
65
- When a semantic contract changes, update the closest durable doc or skill instruction in the same patch so future work starts from the current rules.
62
66
63
67
## Command Complexity
@@ -251,6 +255,7 @@ Project files (managed vs generated):
251
255
- Generated (do not hand-edit): `.hack/.internal/compose.override.yml`, `.hack/.internal/compose.env.override.yml`, `.hack/.branch/compose.<branch>.override.yml`.
- Ignore rules: hack owns a committed `.hack/.gitignore` (self-healing on init/up) covering machine-local generated files (`.internal/`, `.branch/`, `.env`, `.env.state.json`, `hack.env*.local.yaml`); keep it committed, and if generated files leaked into git, `hack doctor --fix` untracks them (files stay on disk).
254
259
255
260
Linked git worktrees:
256
261
- Secret key inherits from the primary checkout automatically through the shared git common dir; set `HACK_ENV_SECRET_KEY` for CI or detached environments.
- After upgrading CLI: `hack update` then `hack setup sync --all-scopes`
353
+
- When changing hack itself: interface or behavior changes must update docs/ in the same change (regenerate the CLI reference with `bun run docs:cli-reference`).
348
354
349
355
Agent setup (CLI-first):
350
356
- Cursor rules: `hack setup cursor`
351
357
- Claude hooks: `hack setup claude`
352
358
- Codex skill: `hack setup codex`
353
359
- Refresh all local agent integrations: `hack setup sync --all-scopes`
360
+
- Agent-assisted onboarding: `hack init --with claude|codex|both` (new repos) or `hack agent onboard` (existing projects) print/hand off the full setup prompt; the `/hack-init` skill and the `hack-init` MCP prompt return the same content.
Copy file name to clipboardExpand all lines: CLAUDE.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,13 @@ TypeScript (strict). Runtimes: Bun 1.3+, Node 23. Prettier: 2 spaces, no semicol
38
38
Always default to useing named paramaters in functions eg myFunction({ ctx, other }) vs myFunction(ctx, other)
39
39
Never use any types and always default to leveraging generics and smart types to sensure the best possible tpye inference across the project.
40
40
41
+
## Docs Currency (non-negotiable)
42
+
43
+
- ANY interface or behavior change (commands, flags, config keys, file layouts, env vars, defaults) must update the affected docs/ pages in the same patch.
44
+
- The CLI reference is generated: after changing the CLI surface, run `bun run docs:cli-reference` and commit `docs/reference/cli.md` (a drift test fails otherwise).
45
+
- Agent-facing behavior phrasing lives in `src/agents/instruction-source.ts`; update it (not the generated surfaces) and run `hack setup sync --all-scopes`.
46
+
- Real end-to-end coverage lives in `tests/e2e/` (`bun run test:e2e:local`) — extend it when adding user-facing workflows.
47
+
41
48
## Project Notes (Obsidian)
42
49
43
50
This project uses Obsidian for project context, specs, research, and progress tracking.
@@ -118,6 +125,7 @@ Project files (managed vs generated):
118
125
- Generated (do not hand-edit): `.hack/.internal/compose.override.yml`, `.hack/.internal/compose.env.override.yml`, `.hack/.branch/compose.<branch>.override.yml`.
- Ignore rules: hack owns a committed `.hack/.gitignore` (self-healing on init/up) covering machine-local generated files (`.internal/`, `.branch/`, `.env`, `.env.state.json`, `hack.env*.local.yaml`); keep it committed, and if generated files leaked into git, `hack doctor --fix` untracks them (files stay on disk).
121
129
122
130
Linked git worktrees:
123
131
- Secret key inherits from the primary checkout automatically through the shared git common dir; set `HACK_ENV_SECRET_KEY` for CI or detached environments.
- After upgrading CLI: `hack update` then `hack setup sync --all-scopes`
223
+
- When changing hack itself: interface or behavior changes must update docs/ in the same change (regenerate the CLI reference with `bun run docs:cli-reference`).
215
224
216
225
Agent setup (CLI-first):
217
226
- Cursor rules: `hack setup cursor`
218
227
- Claude hooks: `hack setup claude`
219
228
- Codex skill: `hack setup codex`
220
229
- Refresh all local agent integrations: `hack setup sync --all-scopes`
230
+
- Agent-assisted onboarding: `hack init --with claude|codex|both` (new repos) or `hack agent onboard` (existing projects) print/hand off the full setup prompt; the `/hack-init` skill and the `hack-init` MCP prompt return the same content.
"After upgrading CLI: `hack update` then `hack setup sync --all-scopes`",
284
+
"When changing hack itself: interface or behavior changes must update docs/ in the same change (regenerate the CLI reference with `bun run docs:cli-reference`).",
0 commit comments