Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
d111802
docs: add versioned agent-client capability matrix and policy controls
roodboi Oct 12, 2026
58c485a
fix(mcp): harden run argv and tool input contract
roodboi Oct 12, 2026
c6c0db3
fix(env): harden legacy env key files and AES-GCM envelope parsing
roodboi Oct 12, 2026
de862d7
Merge remote-tracking branch 'origin/next' into w14-rework
roodboi Oct 12, 2026
dc88c6b
Merge remote-tracking branch 'origin/next' into w06-rework
roodboi Oct 12, 2026
ffeecce
fix(agents): generate capability matrix doc and parse all guidance co…
roodboi Oct 12, 2026
56bac3a
fix(mcp): make typed refusals value-free and keep unknown-tool in-band
roodboi Oct 12, 2026
12e80af
chore: merge origin/next into wf/w15-w5-6
roodboi Oct 12, 2026
cd76b26
test(env): pin AES-GCM IV, size and tag-length guards with discrimina…
roodboi Oct 12, 2026
bcf88ec
fix(init): stop writing repo-local agent files by default
roodboi Oct 12, 2026
c005262
fix(env): resolve --env base and default the same way on every command
roodboi Oct 12, 2026
6136946
fix(agents): count corrupted and unreadable integrations as drift
roodboi Oct 12, 2026
9854d1b
test(env): pin the console logger backend for CLI refusal tests
roodboi Oct 12, 2026
6e1ff63
test(mcp): assert closed ambiguous_project refusal in project-name suite
roodboi Oct 12, 2026
1f8b51e
chore(x01): temporary witness cost trace for hosted measurement
roodboi Oct 12, 2026
0911e6d
perf(storage): coalesce witness helper work per native command
roodboi Oct 12, 2026
eb9a678
chore(x01): revert temporary witness cost trace
roodboi Oct 12, 2026
7b2ccfc
test(e2e): restore the networks scenario budget after witness coalescing
roodboi Oct 12, 2026
fa7741c
Merge remote-tracking branch 'origin/next' into wf/x03-witness-probes
roodboi Oct 12, 2026
37f093a
perf(storage): make witness engine and executable fences cheaper
roodboi Oct 12, 2026
6a4e118
chore(x03): temporary witness probe trace for hosted measurement
roodboi Oct 12, 2026
2b11ed3
fix(storage): keep closed probe cancellation for direct engine-ID fences
roodboi Oct 12, 2026
a777bc4
test(storage): pin witness fence counts and refusal controls
roodboi Oct 12, 2026
994ddb8
chore(x03): revert temporary witness probe trace
roodboi Oct 12, 2026
3edbd54
feat(agents): package offline skill references and the HACK-P pattern…
roodboi Oct 12, 2026
726cc27
test(e2e): add agent-surface-freeze negative control for guidance writes
roodboi Oct 12, 2026
9b971fa
ci: add gated Bun crash experiment and read-only crash census
roodboi Oct 12, 2026
1342871
perf(storage): read engine identity directly for docker context selec…
roodboi Oct 12, 2026
c2ecf9c
chore(x04): temporary witness probe trace for hosted measurement
roodboi Oct 12, 2026
5cf9f0f
chore(x04): revert temporary witness probe trace
roodboi Oct 12, 2026
ebe0539
test(agents): cover reference generation and reference-style and HTML…
roodboi Oct 12, 2026
6b54980
test: keep the Bun crash loop tests free of real crash reports
roodboi Oct 12, 2026
7a05b84
Merge branch 'next' into wf/w15-w5-6
roodboi Oct 12, 2026
c00468c
Merge branch 'next' into wf/w06-w5-3
roodboi Oct 12, 2026
e9b1252
Merge branch 'next' into wf/w13-w5b-2
roodboi Oct 12, 2026
af786b5
Merge branch 'next' into wf/w10-w5b-0
roodboi Oct 12, 2026
9db4dba
Merge branch 'next' into wf/w14-w5-5
roodboi Oct 12, 2026
5a731cc
Merge remote-tracking branch 'origin/wf/w06-w5-3' into train/queue-pr…
roodboi Oct 12, 2026
38d9d7f
Merge remote-tracking branch 'origin/wf/w14-w5-5' into train/queue-pr…
roodboi Oct 12, 2026
d50e935
Merge remote-tracking branch 'origin/wf/w15-w5-6' into train/queue-pr…
roodboi Oct 12, 2026
8bab674
Merge remote-tracking branch 'origin/wf/w10-w5b-0' into train/queue-p…
roodboi Oct 12, 2026
26958c9
Merge remote-tracking branch 'origin/wf/w13-w5b-2' into train/queue-p…
roodboi Oct 12, 2026
07a1834
Merge remote-tracking branch 'origin/wf/w07-w6-3' into train/queue-pr…
roodboi Oct 12, 2026
a92e3ab
Merge remote-tracking branch 'origin/wf/w02-w6-1' into train/queue-pr…
roodboi Oct 12, 2026
3e261d5
Merge remote-tracking branch 'origin/wf/w05-w6-2' into train/queue-pr…
roodboi Oct 12, 2026
6b22e00
test(patterns): add validated HACK-P01 and HACK-P02 example fixtures
roodboi Oct 12, 2026
b07121f
feat(exec): warn value-free when a running service's env changed sinc…
roodboi Oct 12, 2026
9f20366
fix(env): write .hack/.env and the encrypted store atomically with 0600
roodboi Oct 12, 2026
e2f063b
feat(agents): add focused hack-branches, hack-env and hack-diagnose p…
roodboi Oct 12, 2026
42e7b3b
fix(mcp): separate log cutoffs from backend failures
roodboi Oct 12, 2026
e32b528
feat(agents): ship a skills-only hack plugin and an opt-in hack-mcp p…
roodboi Oct 12, 2026
e2c41a9
fix(mcp): align budget docs with log cutoffs and keep byte-cut failures
roodboi Oct 12, 2026
cea44f8
feat(mcp): add exec, doctor, env explain/keys and instances tools
roodboi Oct 12, 2026
85c67b0
fix(ci): allowlist the synthetic MCP inspect-tool canary for gitleaks
roodboi Oct 12, 2026
10b6d73
fix(agents): point the env matrix bullet at the offline env guide
roodboi Oct 12, 2026
77da332
Merge remote-tracking branch 'origin/wf/w13-w5b-2' into train/queue-p…
roodboi Oct 12, 2026
4e3acee
test(exec): cover failed targeted restart env digest handling
roodboi Oct 12, 2026
cb665d5
fix(env): scope the env-file symlink refusal doc to write paths
roodboi Oct 12, 2026
3a6f73c
docs(mcp): clarify which instances hack.project.instances lists
roodboi Oct 12, 2026
60acda4
test(agents): assert plugin-default and no-write agent setup rules
roodboi Oct 12, 2026
c2b41ff
chore: merge train/queue-preview into wf/y3-envfile-b6
roodboi Oct 12, 2026
d9a5627
chore: merge train/queue-preview into wf/y1-logs-b6
roodboi Oct 12, 2026
8031f28
chore: merge train/queue-preview into wf/w08-b6
roodboi Oct 12, 2026
09b4e83
Merge remote-tracking branch 'origin/train/queue-preview' into wf/y4-…
roodboi Oct 12, 2026
5afaf19
Merge remote-tracking branch 'origin/train/queue-preview' into wf/y5-…
roodboi Oct 12, 2026
c998a9a
Merge remote-tracking branch 'origin/train/queue-preview' into wf/w09-b6
roodboi Oct 12, 2026
36cd272
test(e2e): keep Hack diagnostics out of exec-stale-env probe output
roodboi Oct 12, 2026
b9ae28c
chore: merge wf/y1-logs-b6 into wf/y2-mcptools-b6
roodboi Oct 12, 2026
919de8b
test(e2e): reproduce dependency config-hash drift for hack run/exec
roodboi Oct 12, 2026
de55236
feat(env): accept secret values on stdin with --value-stdin
roodboi Oct 12, 2026
5078855
feat(doctor): add value-free env key strength diagnostic
roodboi Oct 12, 2026
5f8cb79
fix(logger): pass messages to gum after an end-of-options marker
roodboi Oct 12, 2026
378f75f
fix(env): refuse invalid env key arguments without echoing them
roodboi Oct 12, 2026
4acac81
fix(env): refuse env scope arguments without echoing them
roodboi Oct 12, 2026
b1bc6db
fix(env): refuse value-bearing --env, --project and --target without …
roodboi Oct 12, 2026
0a26c64
Merge branch 'next' into wf/c5-confighash-b7
roodboi Oct 12, 2026
07413d0
Merge branch 'next' into wf/c4-keydiag-b7
roodboi Oct 12, 2026
6a043c0
Merge branch 'next' into wf/c6-gum-dash-b7
roodboi Oct 12, 2026
13165f9
Merge branch 'next' into wf/y4-patterns-b6
roodboi Oct 12, 2026
92c2ee1
Merge branch 'next' into wf/y5-staleenv-b6
roodboi Oct 12, 2026
4243d60
Merge branch 'next' into wf/y3-envfile-b6
roodboi Oct 12, 2026
7425da0
Merge branch 'next' into wf/w08-b6
roodboi Oct 12, 2026
c044445
Merge branch 'next' into wf/y1-logs-b6
roodboi Oct 12, 2026
0c93ddc
Merge branch 'next' into wf/w09-b6
roodboi Oct 12, 2026
6dadbe5
Merge branch 'wf/y1-logs-b6' into wf/y2-mcptools-b6
roodboi Oct 12, 2026
ed7d2f4
Merge branch 'next' into wf/c1-stdin-b7
roodboi Oct 12, 2026
989fcea
Merge branch 'wf/c6-gum-dash-b7' into wf/y3-envfile-b6
roodboi Oct 12, 2026
c6055dd
Merge branch 'wf/y3-envfile-b6' into wf/c4-keydiag-b7
roodboi Oct 12, 2026
6a754df
Merge branch 'wf/c4-keydiag-b7' into wf/y4-patterns-b6
roodboi Oct 12, 2026
ef04f02
Merge branch 'wf/y4-patterns-b6' into wf/c5-confighash-b7
roodboi Oct 12, 2026
b0cde14
Merge branch 'wf/c5-confighash-b7' into wf/y5-staleenv-b6
roodboi Oct 12, 2026
5a258e6
Merge branch 'wf/y5-staleenv-b6' into wf/y1-logs-b6
roodboi Oct 12, 2026
642775e
Merge branch 'wf/y1-logs-b6' into wf/y2-mcptools-b6
roodboi Oct 12, 2026
2fa96a2
Merge branch 'wf/y2-mcptools-b6' into wf/c1-stdin-b7
roodboi Oct 12, 2026
30936fe
Merge branch 'wf/c1-stdin-b7' into wf/w08-b6
roodboi Oct 12, 2026
94cdb85
Merge branch 'wf/w08-b6' into wf/w09-b6
roodboi Oct 12, 2026
63e1d39
test(native): use a canonical overlay name in the env selection case
roodboi Oct 12, 2026
6ecf485
Merge branch 'wf/c1-stdin-b7' into wf/w08-b6
roodboi Oct 12, 2026
93ed49c
Merge branch 'wf/w08-b6' into wf/w09-b6
roodboi Oct 12, 2026
eb74229
Merge branch 'next' into wf/w09-b6
roodboi Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
},
{
"name": "hack-mcp",
"source": {
"source": "local",
"path": "./plugins/hack-mcp"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
}
]
}
7 changes: 7 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"description": "Operate and onboard Hack-managed local development environments.",
"category": "development",
"tags": ["local-development", "docker", "developer-tools", "agents"]
},
{
"name": "hack-mcp",
"source": "./plugins/hack-mcp",
"description": "Opt-in Hack MCP server (`hack mcp serve`) for agent clients without shell access.",
"category": "development",
"tags": ["local-development", "developer-tools", "agents", "mcp"]
}
]
}
2 changes: 1 addition & 1 deletion .claude/skills/hack-init/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Fetch the current onboarding guidance from the installed Hack CLI.

1. Fetch the canonical onboarding prompt:
- With shell access: run `hack agent onboard` (works for new and existing projects).
- Without shell access: fetch the `hack-init` MCP prompt from the hack MCP server.
- Without shell access: only if the `hack-mcp` plugin or another Hack MCP server is installed, fetch the `hack-init` MCP prompt from it; otherwise report that onboarding needs shell access or an explicitly selected Hack MCP server.
2. Apply the relevant phases to the authorized workflow; preserve native approvals, credential safety, and runtime ownership.
3. Verify the requested services and host workflows. Report remaining blockers; unrelated optional integration warnings do not prevent completion.
13 changes: 6 additions & 7 deletions .codex/skills/hack-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use `hack` as the primary interface for local-first development.

- These instructions were generated by hack CLI v4.2.1; use the content revision and command behavior to assess freshness.
- Check guidance only when Hack is relevant and there is evidence of drift; use targeted `hack setup` checks for a read-only inventory. Routine tasks do not require a startup audit.
- Content revision: `9f26e5752230` (version alone is not a freshness guarantee).
- Content revision: `5c5c3c9fffea` (version alone is not a freshness guarantee).

## Product boundary

Expand Down Expand Up @@ -186,13 +186,12 @@ Use `hack` as the primary interface for local-first development.
- Standalone setup and optional native plugins are alternative integration paths. A missing optional integration does not require installation. Verify the replacement loads before explicitly removing duplicate Hack-owned entries; preserve customizations.
- CLI upgrades do not authorize integration changes. Edit guidance at its generator source and render the affected targets; restart only if the client cannot reload the changed hooks or skills.

## Agent setup (CLI-first)
## Agent setup (plugin-first)

- Cursor rules: `hack setup cursor`
- Claude hooks: `hack setup claude`
- Codex skill: `hack setup codex`
- Default integration: the optional `hack` plugin, installed through the client's plugin manager, ships skills, Claude primer hooks and a Cursor rule. It ships no MCP server, and Hack commands never install plugins.
- MCP is opt-in, only for clients without shell access and only when explicitly selected: add the separate `hack-mcp` plugin, or use `hack setup mcp` (client and scope via `hack mcp install --help`). Do not configure other clients as a side effect.
- Standalone export is an opt-in alternative to the plugin: `hack setup cursor` (rules), `hack setup claude` (hooks and skill), `hack setup codex` (skills) or `hack setup agents` (AGENTS.md/CLAUDE.md snippets). Use one integration path per client.
- Setup and onboarding never write AGENTS.md, CLAUDE.md, rule files, or repository skill copies unless the user asks for them.
- Agent-assisted onboarding: `hack init --with claude|codex` (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.
- Init prompt: `hack agent init` (use --client cursor|claude|codex to open)
- Init patterns: `hack agent patterns`
- MCP (no-shell only): `hack setup mcp`
- MCP install: choose the requested client and scope with `hack mcp install --help`; do not configure other clients as a side effect.
2 changes: 1 addition & 1 deletion .codex/skills/hack-init/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Fetch the current onboarding guidance from the installed Hack CLI.

1. Fetch the canonical onboarding prompt:
- With shell access: run `hack agent onboard` (works for new and existing projects).
- Without shell access: fetch the `hack-init` MCP prompt from the hack MCP server.
- Without shell access: only if the `hack-mcp` plugin or another Hack MCP server is installed, fetch the `hack-init` MCP prompt from it; otherwise report that onboarding needs shell access or an explicitly selected Hack MCP server.
2. Apply the relevant phases to the authorized workflow; preserve native approvals, credential safety, and runtime ownership.
3. Verify the requested services and host workflows. Report remaining blockers; unrelated optional integration warnings do not prevent completion.
5 changes: 5 additions & 0 deletions .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"name": "hack",
"source": "plugins/hack",
"description": "Operate and onboard Hack-managed local development environments."
},
{
"name": "hack-mcp",
"source": "plugins/hack-mcp",
"description": "Opt-in Hack MCP server (`hack mcp serve`) for agent clients without shell access."
}
]
}
2 changes: 1 addition & 1 deletion .cursor/rules/hack.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Prefer `hack` when shell access is available. Use MCP only when shell access is

- These instructions were generated by hack CLI v4.2.1; use the content revision and command behavior to assess freshness.
- Check guidance only when Hack is relevant and there is evidence of drift; use targeted `hack setup` checks for a read-only inventory. Routine tasks do not require a startup audit.
- Content revision: `9f26e5752230` (version alone is not a freshness guarantee).
- Content revision: `5c5c3c9fffea` (version alone is not a freshness guarantee).

## Product boundary

Expand Down
3 changes: 2 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"packages/db/package.json",
"services/auth-broker/package.json",
"bun.lock",
"plugins/hack"
"plugins/hack",
"plugins/hack-mcp"
],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ linked git worktree, `hack up` automatically becomes a separate instance named a
the branch — review a PR while your main checkout keeps running.

**Built for agents.** `hack init --with claude|codex` hands setup to an agent.
Machine surfaces are first-class: `--json` envelopes with stable error codes,
`--no-interactive`, and agent instructions that sync themselves into
AGENTS.md/CLAUDE.md, Cursor rules, and Codex skills.
Machine surfaces are first-class: `--json` envelopes with stable error codes and
`--no-interactive`. The optional `hack` plugin for Codex, Claude Code, and Cursor
gives agents Hack skills through the client's plugin manager, without writing into
your repository. Clients without shell access can add the separate `hack-mcp`
plugin. See [agent plugin setup](docs/integrations.md#optional-native-plugins).

## More than ports

Expand Down Expand Up @@ -114,6 +116,18 @@ hack up --detach
hack open
```

Using a coding agent? Install the optional `hack` plugin for its skills:

```bash
codex plugin marketplace add hack-dance/hack && codex plugin add hack@hack-dance
# or, in Claude Code:
claude plugin marketplace add hack-dance/hack --sparse .claude-plugin plugins/hack plugins/hack-mcp
claude plugin install hack@hack-dance
```

In Cursor, install Hack from Customize. Add `hack-mcp` only for a client without
shell access.

When something looks wrong:

```bash
Expand Down Expand Up @@ -151,6 +165,3 @@ experimental — hidden behind `hack help --all`.
## License

See [LICENSE](./LICENSE).

Optional native plugins for Codex, Claude Code, and Cursor bundle Hack skills and MCP.
See [agent plugin setup](docs/integrations.md#optional-native-plugins). Existing standalone setup remains supported.
15 changes: 9 additions & 6 deletions docs/agent-guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Hack owns Hack-specific instructions. User and project policy continues to own m
selection, general coding standards, work-unit planning, evolution, and writeback.
Do not ship provider model pins or copy global instruction packs into this plugin.
`tests/agent-plugin-generation.test.ts` enforces this for the generated guidance
surfaces (`plugins/hack`, the client marketplace manifests, `.agents`, and the
surfaces (`plugins/hack`, `plugins/hack-mcp`, the client marketplace manifests, `.agents`, and the
example agent configuration): no model, model-override or reasoning-effort keys, no
permission, approval or sandbox overrides, no output-style settings, and hooks that
run only `hack agent prime`. See [model-policy ownership](reference/agent-client-capabilities.md#model-policy-ownership).
Expand All @@ -23,11 +23,14 @@ run only `hack agent prime`. See [model-policy ownership](reference/agent-client
| `src/agents/install-skill.ts`, `remote-bootstrap-skill.ts` | Plugin installation/channel selection and fresh-host/cloud setup skills |
| `src/agents/focused-skills.ts` | Plugin `hack-branches`, `hack-env` and `hack-diagnose` skills, composed from canonical section ids, and the plugin `hack-cli` routing description |
| `src/agents/error-code-reference.ts` | `hack-diagnose` error-code reference, rendered from the exported `HACK_ERROR_CODES` registry in `src/lib/cli-result.ts` |
| `scripts/generate-agent-plugins.ts` | Portable plugin/MCP manifests, three client compatibility manifests, seven skills, and Cursor rule |

The portable plugin manifest derives identity and effective OpenAI presentation
from `.codex-plugin/plugin.json`; portable MCP derives from `.mcp.json` with an
explicit transport. Keep launch selection identical across both formats. These
| `scripts/generate-agent-plugins.ts` | Skills-only `hack` plugin (portable manifest, three client compatibility manifests, seven skills, Cursor rule) and the complete opt-in `hack-mcp` plugin |

The `hack` plugin is skills-only: the generator refuses a client manifest that
declares `mcpServers` and removes stale `.mcp.json`/`mcp.json` files from it. Each
portable plugin manifest derives identity and effective OpenAI presentation from
its package's `.codex-plugin/plugin.json`. Every `hack-mcp` file renders from
code; its `.mcp.json` and portable `mcp.json` (with an explicit transport) both
come from `HACK_MCP_SERVER`, so launch selection stays identical. These
plugin workflow skills complement the existing standalone setup; personal local
plugin installation does not synchronize skills into a cloud repository.

Expand Down
21 changes: 14 additions & 7 deletions docs/guides/agent-first-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ your installed version.
| --- | --- |
| A fresh repo + an agent CLI installed | `hack init --with claude\|codex\|both` |
| An existing hack project | `hack agent onboard` (prints the prompt) |
| An agent session with the hack skills installed | `/hack-init` |
| A no-shell MCP client | the `hack-init` MCP prompt (`hack setup mcp`) |
| An agent session with the `hack` plugin installed | `/hack-init` |
| A no-shell client with Hack MCP explicitly installed (`hack-mcp` plugin or `hack setup mcp`) | the `hack-init` MCP prompt |

## New repo: `hack init --with`

Expand Down Expand Up @@ -42,11 +42,18 @@ when present.

## Agent-side skill: `/hack-init`

`hack setup claude` and `hack setup codex` install a thin `hack-init` skill
(`.claude/skills/hack-init/SKILL.md` / `.codex/skills/hack-init/SKILL.md`).
The skill tells the agent to run `hack agent onboard` (or fetch the `hack-init`
MCP prompt) and follow it — the content stays in the CLI, so installed skills
fetch guidance matching the installed CLI.
The optional `hack` plugin ships a thin `hack-init` skill; install the plugin
through your client's plugin manager (see
[Optional native plugins](../integrations.md#optional-native-plugins)). The skill
tells the agent to run `hack agent onboard` and follow the printed prompt. Without
shell access it fetches the `hack-init` MCP prompt only when a Hack MCP server, such
as the opt-in `hack-mcp` plugin, is installed; otherwise it reports that blocker.
The content stays in the CLI, so the skill fetches guidance matching the installed
CLI.

A client that cannot use the plugin can export the same skill into a chosen scope as
an explicit opt-in (`hack setup claude` or `hack setup codex`). Onboarding itself
never installs it.

## MCP request lifetime

Expand Down
Loading
Loading