Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "hack-dance",
"interface": {
"displayName": "Hack Dance"
},
"plugins": [
{
"name": "hack",
"source": {
"source": "local",
"path": "./plugins/hack"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL"
},
"category": "Developer Tools"
}
]
}
16 changes: 16 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "hack-dance",
"description": "Official Hack plugins for local-first development workflows.",
"owner": {
"name": "Hack Dance LLC"
},
"plugins": [
{
"name": "hack",
"source": "./plugins/hack",
"description": "Operate and onboard Hack-managed local development environments.",
"category": "development",
"tags": ["local-development", "docker", "developer-tools", "agents"]
}
]
}
7 changes: 0 additions & 7 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,5 @@
]
}
]
},
"mcpServers": {
"hack": {
"type": "stdio",
"command": "hack",
"args": ["mcp", "serve"]
}
}
}
3 changes: 0 additions & 3 deletions .codex/config.toml

This file was deleted.

17 changes: 0 additions & 17 deletions .codex/skills/hack-init/SKILL.md

This file was deleted.

16 changes: 16 additions & 0 deletions .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "hack-dance",
"owner": {
"name": "Hack Dance LLC"
},
"metadata": {
"description": "Official Hack plugins for local-first development workflows."
},
"plugins": [
{
"name": "hack",
"source": "plugins/hack",
"description": "Operate and onboard Hack-managed local development environments."
}
]
}
5 changes: 4 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"packages/db/package.json",
"services/auth-broker/package.json",
"bun.lock",
"apps/macos/Config/Base.xcconfig"
"apps/macos/Config/Base.xcconfig",
"plugins/hack/.codex-plugin/plugin.json",
"plugins/hack/.claude-plugin/plugin.json",
"plugins/hack/.cursor-plugin/plugin.json"
],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}
Expand Down
12 changes: 6 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ Most formatting and common issues are automatically fixed by Biome. Run `bun x u
Use `hack` as the single interface for local-first runtime orchestration (compose, DNS/TLS, logs, env, and persistent project workspaces).

Integration freshness:
- These instructions were generated by hack CLI v3.5.0; treat cached rules from another version as potentially stale.
- These instructions were generated by hack CLI v3.5.1; treat cached rules from another version as potentially stale.
- At session start, audit project and global integrations with `hack setup sync --all-scopes --check`.
- If anything is stale, missing, or deprecated, run `hack setup sync --all-scopes`, then reload the agent session so cached instructions are replaced.
- Never copy or hand-edit generated Hack rules to refresh them; update the CLI and run the sync command.
- Content revision: `1319d93c89c3` (version alone is not a freshness guarantee).
- Content revision: `6ef36575c6e7` (version alone is not a freshness guarantee).

Product boundary:
- Supported v3 surface: project init, up/down/restart, open, logs, env, host exec/shell, sessions, doctor, and daemon.
Expand Down Expand Up @@ -366,7 +366,7 @@ Docker compose notes:
- Use `docker compose -f .hack/docker-compose.yml exec <service> <cmd>` only if you need exec into a running container.

Agent integration maintenance:
- Project-level hack commands auto-check integration drift and attempt auto-sync (project docs, client skills/rules, shared global skills, and MCP).
- Project-level hack commands auto-check integration drift and attempt auto-sync (project docs, Cursor/Claude integrations, shared global skills, and MCP).
- When drift is detected, Hack reports it before repair and tells the agent to reload after repair; it never silently leaves the session using cached rules.
- Set `HACK_SETUP_SYNC_MODE=warn` to only warn, or `HACK_SETUP_SYNC_MODE=off` to disable.
- Refresh project + user integrations: `hack setup sync --all-scopes`
Expand All @@ -376,9 +376,9 @@ Agent integration maintenance:
- 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`).

Agent setup (CLI-first):
- Cursor rules: `hack setup cursor`
- Claude hooks: `hack setup claude`
- Codex skill: `hack setup codex`
- Cursor plugin: run `hack setup cursor`, then install Hack with `/add-plugin` or enable it from Settings > Plugins as directed.
- Claude Code plugin: run `hack setup claude`, then install or enable `hack@hack-dance` as directed.
- Codex plugin: run `hack setup codex`, then install or enable Hack from `/plugins` as directed.
- Refresh all local agent integrations: `hack setup sync --all-scopes`
- 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.
- Init prompt: `hack agent init` (use --client cursor|claude|codex to open)
Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ This project uses Obsidian for project context, specs, research, and progress tr
Use `hack` as the single interface for local-first runtime orchestration (compose, DNS/TLS, logs, env, and persistent project workspaces).

Integration freshness:
- These instructions were generated by hack CLI v3.5.0; treat cached rules from another version as potentially stale.
- These instructions were generated by hack CLI v3.5.1; treat cached rules from another version as potentially stale.
- At session start, audit project and global integrations with `hack setup sync --all-scopes --check`.
- If anything is stale, missing, or deprecated, run `hack setup sync --all-scopes`, then reload the agent session so cached instructions are replaced.
- Never copy or hand-edit generated Hack rules to refresh them; update the CLI and run the sync command.
- Content revision: `1319d93c89c3` (version alone is not a freshness guarantee).
- Content revision: `6ef36575c6e7` (version alone is not a freshness guarantee).

Product boundary:
- Supported v3 surface: project init, up/down/restart, open, logs, env, host exec/shell, sessions, doctor, and daemon.
Expand Down Expand Up @@ -236,7 +236,7 @@ Docker compose notes:
- Use `docker compose -f .hack/docker-compose.yml exec <service> <cmd>` only if you need exec into a running container.

Agent integration maintenance:
- Project-level hack commands auto-check integration drift and attempt auto-sync (project docs, client skills/rules, shared global skills, and MCP).
- Project-level hack commands auto-check integration drift and attempt auto-sync (project docs, Cursor/Claude integrations, shared global skills, and MCP).
- When drift is detected, Hack reports it before repair and tells the agent to reload after repair; it never silently leaves the session using cached rules.
- Set `HACK_SETUP_SYNC_MODE=warn` to only warn, or `HACK_SETUP_SYNC_MODE=off` to disable.
- Refresh project + user integrations: `hack setup sync --all-scopes`
Expand All @@ -246,9 +246,9 @@ Agent integration maintenance:
- 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`).

Agent setup (CLI-first):
- Cursor rules: `hack setup cursor`
- Claude hooks: `hack setup claude`
- Codex skill: `hack setup codex`
- Cursor plugin: run `hack setup cursor`, then install Hack with `/add-plugin` or enable it from Settings > Plugins as directed.
- Claude Code plugin: run `hack setup claude`, then install or enable `hack@hack-dance` as directed.
- Codex plugin: run `hack setup codex`, then install or enable Hack from `/plugins` as directed.
- Refresh all local agent integrations: `hack setup sync --all-scopes`
- 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.
- Init prompt: `hack agent init` (use --client cursor|claude|codex to open)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ 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.
AGENTS.md/CLAUDE.md. Cursor, Claude Code, and Codex support ship as native,
user-installed Hack plugins from this repository's marketplaces.

## More than ports

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This section is easy to find, but it does not lead the product story.
- Working notes and historical design docs live in `docs/plans/`; they are not the supported product contract
- Root scripts orchestrate workspace tasks through Turbo
- Package-local commands remain available via `bun run --cwd <workspace> <script>`
- Agent-facing docs and setup output are generated from `src/agents/instruction-source.ts` via `src/agents/*` and `src/mcp/agent-docs.ts`; update the canonical source (not the rendered surfaces) when changing AGENTS/Codex/MCP guidance.
- Agent-facing docs, bundled Codex/Claude/Cursor plugin content, and setup output are generated from `src/agents/instruction-source.ts` via `src/agents/*` and `src/mcp/agent-docs.ts`; update the canonical source (not the rendered surfaces) when changing agent guidance.
- The generated [CLI reference](reference/cli.md) is rendered from the command spec (`bun run docs:cli-reference`); a drift test fails when it is stale.
- End-to-end coverage that backs docs claims lives in `tests/e2e/` (`bun run test:e2e:local`).
- `.factory/validation/` contains historical evidence from retired hosted/web/integration work and is not the current product contract.
8 changes: 5 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ terminal).
- `hack doctor` / `hack doctor --fix` — validate and repair local setup
- `hack daemon` — optional local daemon for faster JSON status/ps
- `hack agent onboard` — agent-assisted onboarding for existing projects
- `hack setup` — install/refresh agent integrations (Cursor rules, Claude hooks, Codex skill, MCP)
- `hack setup` — check/prepare native Cursor, Claude Code, and Codex plugins; refresh project
instructions; or explicitly configure standalone MCP
- `hack tickets` — deprecated compatibility surface for existing Tickets data

Interactive diagnostics use compact status rows: healthy groups stay on one line, while warnings
Expand Down Expand Up @@ -66,8 +67,9 @@ See [Beta workflows](beta.md) for guides on this surface.
apply documented defaults or fail fast with `E_INTERACTIVE_REQUIRED`.
- `NO_COLOR` (or `HACK_NO_COLOR`) disables colored/decorated output.

Generated agent docs, Cursor rules, Codex skills, and the shared `~/.ai/skills/hack-cli` skill carry
the Hack CLI version that generated them. Audit both project and global surfaces with
Generated agent docs, native plugin content, and the shared `~/.ai/skills/hack-cli` skill carry the Hack CLI
version that generated them. Native agent plugins are versioned with the Hack release and installed once
from the `hack-dance/hack` marketplace. Audit project and global generated surfaces with
`hack setup sync --all-scopes --check`; repair them with `hack setup sync --all-scopes`, then reload
the agent session so it stops using cached guidance. Interactive project commands also report drift
before auto-repair instead of repairing silently.
Expand Down
7 changes: 4 additions & 3 deletions docs/docs-ia.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ remote/control-plane features.
- `docs/guides/global-settings.md` — global config
- `docs/guides/agent-first-setup.md` — agent-assisted onboarding (`hack init --with`, `hack agent onboard`)
- `docs/guides/prerequisite-detection-matrix.md` — environment prerequisite checks
- Generated agent-facing guidance: `AGENTS.md`/`CLAUDE.md` snippets, `.codex/skills/hack-cli/SKILL.md`,
and `hack-init` skill/MCP prompt content, all rendered from `src/agents/instruction-source.ts`
- Generated agent-facing guidance: `AGENTS.md`/`CLAUDE.md` snippets, the Hack plugin's bundled
`hack-cli` skill, and `hack-init` skill/MCP prompt content, all rendered from
`src/agents/instruction-source.ts`
(canonical source) via `src/agents/*` and `src/mcp/agent-docs.ts`.

New docs belong here when they describe supported v3 CLI surface a user hits without opting into
Expand Down Expand Up @@ -92,7 +93,7 @@ extend `hack` (authoring extensions, SDK usage) rather than how to use it.

`docs/reference/cli.md` is generated from the command specs (`bun run docs:cli-reference`) and
must not be hand-edited. Agent-facing instruction surfaces (`AGENTS.md`/`CLAUDE.md` snippets, the
Codex skill, Cursor rules, the session primer) are all rendered from the canonical section list in
native plugin skills/rules, the session primer) are all rendered from the canonical section list in
`src/agents/instruction-source.ts`; update that file, not the individual renderers, when agent
guidance needs to change, then regenerate.

Expand Down
12 changes: 6 additions & 6 deletions docs/guides/agent-first-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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 Codex session with the Hack plugin installed | `/hack-init` |
| A no-shell MCP client | the `hack-init` MCP prompt (`hack setup mcp`) |

## New repo: `hack init --with`
Expand Down Expand Up @@ -42,11 +42,11 @@ 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
never go stale on substance.
The official Hack plugins for Cursor, Claude Code, and Codex bundle the same `hack-init` skill;
run `hack setup cursor`, `hack setup claude`, or `hack setup codex` for exact marketplace guidance.
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 never go
stale on substance.

## What the prompt covers

Expand Down
Loading
Loading