This repository is the maintained source of truth for the do-it workflow
distribution. The live ~/.codex copy is an install target, not the place to
make durable edits.
Working rule:
- Edit the maintained repository copy.
- Use the host's current path: marketplace-first for Codex / Claude, local copy
or Team Import for Cursor while public listing is pending, and the independent
OpenCode npm package with the vendored config-home fallback. Treat registry
availability as unverified until
npm viewsucceeds. - Use
do-it setuponly for managed CLI doctor / migration. Ordinarydoctorverifies that managed state; it does not verify Cursor's standalone local-copy installer or OpenCode registration. - Avoid hand-editing deployed files under host configuration roots.
For modern Codex installs, the plugin owns bundled do-it agents.
manifest.targets.codex.installAgents=false deliberately leaves
~/.codex/agents as user-owned space rather than a second plugin mirror. A
legacy migration may remove only exact, confirmed old do-it duplicates; it must
not overwrite, delete, or classify user-defined global agents as do-it state.
Exception: for an intentional live-global rebaseline, copy only
manifest-managed targets from ~/.codex back into this repository, then run the
doctor command to prove the repository and live global entries match. Use this
only when the operator explicitly asks for live-first workflow changes. The
closeout must name it as live-global rebaseline, show source/live parity, and
run package or temporary CODEX_HOME validation before any commit.
For workflow policy changes, update docs/routing-matrix.md so
do-it-router, meaning buckets (code-quality, decide, review, verify),
and closeout guidance stay aligned. For mixed code/docs changes, update docs
after behavior and review are proven so documentation follows current truth.
The durable public concept is host-native plugin delivery, plus optional managed CLI setup for doctor and migration. Keep docs honest:
- use marketplace-first language for Codex and Claude Code
- describe Cursor as local copy / Team Import until its public listing is verified
- describe OpenCode as an independent npm package plus vendored fallback; label registry availability unverified until
npm viewsucceeds - demote
do-it setup/ GitHub tarball + setup to optional/legacy - mention
npm install -g @tdwhere/do-itonly as the registry path after registry publication is verified - use
npm exec --package . -- do-it setupfor checkout-local doctor / migration examples when the package surface is present - keep
do-it installanddo-it doctordocumented as the underlying split commands for CI, debugging, or partial checks - do not require pairing Codex plugin install with global setup for hooks
- keep user-defined
~/.codex/agentsseparate from plugin-owned bundled agents - do not invent package.json scripts or release coordinates that are not present
- make future package commands delegate to the same installer and doctor logic
Current validation commands:
npm test
npm run validate:agents
npm run validate:core-skill-boundaries
npm run build:claude-agents
npm run build:codex-plugin
npm exec --package . -- do-it setup
npm exec --package . -- do-it install
npm exec --package . -- do-it doctor
CODEX_HOME=/tmp/do-it-codex-test npm exec --package . -- do-it setup
CODEX_HOME=/tmp/do-it-codex-test npm exec --package . -- do-it doctor
CLAUDE_PLUGIN_ROOT_OVERRIDE=/tmp/do-it-claude-test npm exec --package . -- do-it setup --target=claude
./install/install.sh
./install/doctor.sh
CODEX_HOME=/tmp/do-it-codex-test ./install/install.sh
CODEX_HOME=/tmp/do-it-codex-test ./install/doctor.sh
CODEX_HOME=/tmp/do-it-plugin-test codex plugin marketplace add /path/to/do-it
CODEX_HOME=/tmp/do-it-plugin-test codex plugin add do-it@tdwhere-do-itAfter registry publication, also validate the public global path:
npm install -g @tdwhere/do-it
do-it setupDo not add lifecycle scripts that install into ~/.codex automatically during
npm install. Installation should be an explicit operator command.
The installer records .do-it-install-state.json in the target CODEX_HOME so
future installs can distinguish do-it-managed files from user-owned files. It
refuses to overwrite unmarked skill or agent targets unless DO_IT_FORCE=1 is
set.
Install copies are staged before live targets are changed. Managed replacements use temporary siblings and backups so a copy failure does not remove the previous live target.
doctor treats a missing, malformed, version-mismatched, or stale install
state file as drift. A clean file copy is not enough when the state marker that
protects future upgrades is missing. Therefore run ordinary doctor only for a
managed CLI install/setup; verify Cursor local-copy installs by exact directory,
plugin metadata, and Hooks UI inspection after reload.
| Host surface | Skills | Agents | Commands | Hooks | Doctor | Verification command |
|---|---|---|---|---|---|---|
| Codex plugin marketplace | Generated under plugins/do-it/skills/ |
Generated under plugins/do-it/agents/ |
None | Plugin hooks (trust under /hooks) |
Optional via CLI | npm run build:codex-plugin and CODEX_HOME=/tmp/do-it-plugin-test codex plugin marketplace add /path/to/do-it then codex plugin add do-it@tdwhere-do-it |
| Codex CLI setup (legacy) | Managed from manifest.json |
Bundled Codex agents stay plugin-owned; installAgents=false preserves user ~/.codex/agents |
CLI do-it |
Root hooks.json plus do-it-managed files under hooks/ |
Default target | CODEX_HOME=/tmp/do-it-codex-test npm exec --package . -- do-it setup |
| Claude Code plugin | Same maintained skills/do-it/ source |
Generated Markdown under dist/claude/agents/ |
commands/ |
Do-it-managed files under hooks/, including hooks/hooks.json |
--target=claude |
CLAUDE_PLUGIN_ROOT_OVERRIDE=/tmp/do-it-claude-test npm exec --package . -- do-it setup --target=claude |
| Cursor local / Team Import (public listing pending) | Full 11 from ALL_SKILLS under plugins/do-it-cursor/skills/ plus generated discovery/reference files |
Generated under plugins/do-it-cursor/agents/ |
None | Medium: sessionStart, default-off feedback capture + serialized router/grill via prompt-submit + stance at beforeSubmitPrompt, postToolUse/afterFileEdit, advisory completion reminder (no grill-pretool) |
Managed CLI setup only: --target=cursor; not standalone local copy |
npm run install:cursor-local, Reload Window, inspect exact directory + Hooks UI; or do-it setup --target=cursor for managed doctor |
| OpenCode npm package / global vendored fallback | Generated under plugins/do-it-opencode/skills/ |
Generated under plugins/do-it-opencode/agents/ |
None | Medium-Light: transform bootstrap, tool.execute.after, session.idle soft reminder |
No CLI doctor | Exact pack + npm run smoke:package -- <opencode.tgz>; npm run install:opencode-global verifies the config-home fallback |
| Pi npm package | Generated under plugins/do-it-pi/skills/ |
Ten portable do-it.* agents through optional pi-subagents; prompt templates remain available without it |
Prompt templates | Medium: root router/grill, root write advice, soft next-turn verification; child stance only | /do-it-status reports Bash, hook diagnostics, and subagent tool registration—not agent discovery |
Exact pack + node scripts/smoke-pi-package.mjs <pi.tgz> exercises the real Pi loader; live package-agent discovery remains a separate pi-subagents check |
Cleanup is host-owned and exact-path only. Back up any shared JSON before editing;
never delete an entire ~/.codex, ~/.claude, ~/.cursor, ~/.kimi-code,
project config, or plugin directory tree just to remove do-it.
| Host / install path | Safe cleanup |
|---|---|
| Codex marketplace | Remove only do-it@tdwhere-do-it through Codex's plugin manager. Keep the marketplace registration if other plugins use it; otherwise remove only the tdwhere-do-it registration through that manager. Inspect /hooks afterward. Do not recursively delete CODEX_HOME. |
| Claude Code marketplace | Remove only do-it@do-it through /plugin management. Remove the marketplace registration only when no other installed entry depends on it. Do not recursively delete ~/.claude. |
| Cursor local copy | Close Cursor, back up ~/.cursor/hooks.json, remove only hook objects whose command path contains do-it-cursor/hooks/, and then remove exactly ~/.cursor/plugins/local/do-it-cursor. On native Windows use the corresponding %USERPROFILE%\.cursor\... paths; on WSL clean only the caller's mirrored profile. Reload and confirm the do-it entries disappeared while unrelated hooks remain. |
| Cursor Team Import | Remove the imported do-it plugin in the Team dashboard. If a local copy was also installed, clean it separately with the preceding row; do not delete all team plugins. |
| OpenCode local registration | Back up the applicable project or user opencode.json, remove only the do-it absolute-path entry from its "plugin" array, restart OpenCode, and confirm unrelated entries still load. Do not delete the project config or the checkout. |
| Pi package | Use pi remove with the exact local or npm:@tdwhere/do-it-pi package source, then /reload. Remove only ~/.pi/agent/do-it-data/ if its session state is no longer needed. pi-subagents is independent; do not remove it when other package agents use it. |
| Kimi Code plugin | /plugins remove do-it (deletes the install record only). The managed copy stays on disk by host design: remove exactly $KIMI_CODE_HOME/plugins/managed/do-it/ by hand, then /reload. Session state under $KIMI_CODE_HOME/do-it-data/ is do-it-owned and safe to delete. Do not delete the whole ~/.kimi-code. |
| Managed CLI setup | There is no broad uninstall command. Use the target's .do-it-install-state*.json as an ownership inventory and remove only entries proven do-it-managed; preserve unmarked/user-owned files. Prefer testing and abandoning a temporary home over manually cleaning a shared live home. |
If ownership is unclear, stop and restore the backup rather than using a glob,
recursive home-directory deletion, or DO_IT_FORCE=1 as cleanup.
For Codex legacy migration, compare against the known do-it-managed inventory
and remove only confirmed stale do-it duplicates. ~/.codex/agents is otherwise
user-owned; never use a broad agent-directory cleanup to make plugin state look
tidy.
Deprecated legacy skill targets use the same safety rule: install removes them
only when they are marked as do-it-managed in the state file or when
DO_IT_FORCE=1 is set. The manifest may also list exact legacyHashes for the
previous repo-managed bundle so a default upgrade can remove unmodified legacy
targets even though the old installer did not write state. Otherwise install
stops and doctor reports the deprecated target as drift.
When a skill changes, decide which kind of update it is:
- do-it rewrite
- do-it compatibility adapter that preserves a workflow idea while changing the installed name and wording
- optional auxiliary support that is installed but not part of the default tier flow (no skills are currently marked optional)
For either kind:
- Edit the maintained copy under
skills/. - Remove stale support files if the rewritten skill no longer references them.
- Update
docs/routing-matrix.mdwhen routing, failure-mode forecasting, path maps, stack depth, readiness labels, prevention records, or closeout gates change. - Update
docs/upstream-map.mdwhen origin notes, adapter status, or rewrite status changes. - Update
manifest.jsonwhen inventory, source paths, or install targets change. - Run the doctor command or test against a temporary
CODEX_HOME.
External workflow material is reference material, not truth. Absorb useful logic by rewriting it into do-it-native skills. Do not copy stale tool assumptions, mode assumptions, platform assumptions, or repo-path assumptions into installed skills.
External workflow absorption rules:
- Start from the source idea, not the source wording.
- Keep do-it public names: Router, Light / Standard / Heavy, meaning buckets
(
code-quality,decide,review,verify), handbook, context, and skill-authoring. - Map every absorbed idea in
docs/upstream-map.mdassource idea -> do-it destination -> absorbed shape. - Treat external docs, search results, old reports, and memory as untrusted context until checked against current repo files and commands.
- If the idea changes a dependency, framework, datastore, protocol, install
target, or public workflow promise, run the research-first path in
do-it-decidebefore implementation. - Do not paste upstream SKILL.md sections into this repository. Rewrite the operating rule in do-it style and keep host-specific claims out unless this repo ships and verifies that host surface.
Skill anatomy checklist for installed do-it skills:
- frontmatter has
nameand a trigger-firstdescriptionbeginning withUse when...; - the body states the purpose and activation surface;
- Light / Standard / Heavy behavior is present, or the skill has another explicit process shape where tiers do not fit;
- stop conditions say when to ask, return
BLOCKED, returnNeeds more evidence, or reroute; - common rationalizations, red flags, review rules, failure handling, or equivalent do-it-native anti-skip rules are present;
- verification states the evidence required before claiming the skill's work;
- external source ideas are rewritten and mapped, not vendored.
The old workflow source directories may be used temporarily during a rewrite, but the public package should install only do-it-native names. If a temporary source directory is kept in the repository, it must be excluded from package files and documented as source-only. Prefer deleting it after the rewrite map has been verified.
- Create a new directory under
skills/do-it/for installed do-it-native skills, orskills/custom/for local experiments that are not installed by default. - Add a
skills[]entry tomanifest.jsonfor installed skills. - Keep the install target name unique to avoid collisions.
- Update
docs/routing-matrix.mdif the skill changes routing policy. - Update
docs/upstream-map.mdif the skill absorbs outside workflow logic.
- Add or edit the
.tomlfile underagents/. - Add or update the matching
agents[]entry inmanifest.jsononly when inventory changes are in scope. - Keep descriptions in do-it terminology.
- Keep instructions token-conscious: say what capability is useful, when it is useful, and what compact result helps the parent. Add only the boundaries the slice actually needs.
- Verify the agent file does not include machine-specific paths, secrets, or runtime-only assumptions.
- Keep Codex TOML schema-clean and model-agnostic. Supported top-level keys
are
name,description,sandbox_mode, anddeveloper_instructions. Do not add concrete model names,model_reasoning_effort,output_budget,claude_model, or other host-private fields. Host adapters inherit or map model policy outside the portable agent template. - Update
docs/routing-matrix.mdif the agent changes default planning, implementation, review, or closeout flow.
Review coverage should stay risk-budgeted, not fixed. Keep specialist reviewers available for correctness, scope, maintainability / YAGNI, and adversarial failure modes, but let the parent choose only the views that improve the task.
Bundled agents are optional capability experts, not a contract pipeline. The parent gives a worker the goal plus any necessary write or side-effect boundary; the worker inspects autonomously, returns useful evidence or uncertainty, and the parent integrates the result. Do not require a fixed field checklist, agent count, or role matrix.
As of 0.4.0, do-it ships a Claude Code plugin alongside the Codex install. Both
targets use the same manifest.json, the same skills/do-it/*/SKILL.md, and
the same agents/*.toml source-of-truth. The Claude target adds:
.claude-plugin/plugin.jsonandmarketplace.json— plugin metadata for/plugin marketplace add tdwhere123/do-itthen/plugin install do-it@do-it.hooks/hooks.jsonand hook scripts (behavior-feedback.sh,router.sh,grill-prompt.sh,subagent-stance.sh,write-quality-lint.sh,verification-gate.sh) — wire UserPromptSubmit / UserPromptExpansion / PostToolUse / Stop without required slash commands. Claude alone also receives the default-off, named-commandstrict-external-actions.shPreToolUse profile.grill-pretoolis not registered.commands/do-it-skip.md,commands/do-it-handbook.md, andcommands/do-it-retrospective.md— optional Claude command surfaces; the latter uses expliciton|off|status|reportarguments.dist/claude/agents/*.md— generated byscripts/build-claude-agents.mjsfromagents/*.toml. The build runs automatically beforedo-it install --target=claudeand onnpm pack/npm publish(viaprepack).
- Skill change: edit
skills/do-it/<name>/SKILL.md. Both targets pick up the change. The frontmatterdescriptionshould start with trigger-firstUse when...wording so Codex plugin discovery and Claude implicit-summon both see the activation condition. Keep the existing Problem/Fix body content below the frontmatter when it is still useful. - Agent change: edit
agents/<name>.toml. The next install (ornpm run build:claude-agents) regenerates the Claude.mdform. - Model policy change: keep source agents host-owned and model-agnostic.
Do not add concrete model names,
model,model_reasoning_effort,claude_model,output_budget, or other host-private policy toagents/*.toml. Claude generated agents omitmodel:by default and inherit the running host model; only use a uniformmodel: inheritcompatibility fallback if a tested Claude Code version requires the field. - Hook keyword change: edit
hooks/data/*.tsvand keephooks/data/SCHEMA.mdaligned. End users extend known tables through the data-only<cwd>/.do-it/keywords.local.tsvformat documented there. The legacy executable.do-it/keywords.local.shpath is ignored. Numeric hook limits (e.g.file-sizethresholds) are overridden through the data-only<git-root of edited file>/.do-it/write-quality.local.tsv, also documented inhooks/data/SCHEMA.md. - Hook behavior change: edit the relevant
hooks/*.sh. Hook scripts must remain portable bash with no nonstandard runtime dependency and degrade silently (exit 0) on unexpected input.
As of 0.13.0, do-it ships a Cursor plugin alongside Codex and Claude. Skill and
agent sources remain skills/do-it/*/SKILL.md and agents/*.toml. The Cursor
target installs the full skill inventory (ALL_SKILLS) and adds:
plugins/do-it-cursor/.cursor-plugin/plugin.json— plugin metadata for local path install (~/.cursor/plugins/local/do-it-cursor), Team Import from Repo, public marketplace when listed, anddo-it setup --target=cursor.plugins/do-it-cursor/skills/— generated fromALL_SKILLSinscripts/skill-tiers.mjs(core + extended), including sharedreferences/and the skills index via extras.plugins/do-it-cursor/agents/— generated agent bundle for the Cursor host.plugins/do-it-cursor/hooks/— Cursor event mapping (sessionStart,beforeSubmitPrompt,postToolUse/afterFileEdit,stop). Nogrill-pretool/preToolUseplan gate.scripts/build-cursor-plugin.mjs— the only supported way to refresh the generated Cursor bundle; both local copy and managed CLI setup install the full eleven-skill bundle.
- Core vs extended change: edit
scripts/skill-tiers.mjsand keepmanifest.skillTiersin sync, then runnpm run build:cursor-plugin. - Inventory or wording change: edit source under
skills/do-it/oragents/, then runnpm run build:cursor-plugin. Do not hand-editplugins/do-it-cursor/skills/orplugins/do-it-cursor/agents/. - Hook change: edit kernel scripts under
hooks/and Cursor mapping underinstall/cursor-hooks.json; regenerate withnpm run build:cursor-plugin. - Install verification: for
npm run install:cursor-local, confirm all eleven skill directories plus generated discovery/reference files land under~/.cursor/plugins/local/do-it-cursoras a real directory, Reload Window, and inspect Customize → Hooks for do-it.cmdentries. Do not run ordinarydoctorfor this standalone copy because it has no managed install state. Fordo-it setup --target=cursor/CURSOR_PLUGIN_ROOT_OVERRIDE=…,setupruns managed install plus doctor; laterdo-it doctor --target=cursoris valid.
As of 0.13.0, do-it also ships an OpenCode TypeScript plugin. It shares the same skill and agent sources but maps hooks through OpenCode events instead of Claude/Codex shell hooks.
plugins/do-it-opencode/— generated skills, agents, and TS plugin bridge.scripts/build-opencode-plugin.mjs— the only supported way to refresh the OpenCode bundle.- Operators may need to register the plugin manually in project or user
opencode.json— seeplugins/do-it-opencode/docs/README.opencode.mdandskills/do-it/references/host-opencode.md. Medium hook depth: transform bootstrap,tool.execute.afterwrite-quality,session.idlesoft verification (nogrill-pretool).
- Inventory or wording change: edit source skills/agents, then run
npm run build:opencode-plugin. - Hook bridge change: edit
plugins/do-it-opencode/sources and kernel scripts underhooks/; rerunnpm run build:opencode-plugin && npm run test-opencode. - Install verification:
npm run build:opencode-plugin && npm run test-opencode(no CLI doctor target yet).
As of the Codex plugin v1 line, the repo also exposes a Codex marketplace surface generated from the same maintained manifest:
.agents/plugins/marketplace.json— repo-local marketplace entry pointingdo-itat./plugins/do-it.plugins/do-it/.codex-plugin/plugin.json— plugin metadata with version parity topackage.json.plugins/do-it/skills/— generated from everymanifest.skills[]entry.plugins/do-it/agents/— generated from everymanifest.agents[]entry.scripts/build-codex-plugin.mjs— the only supported way to refresh the generated plugin bundle.
- Inventory change: update
manifest.json, then runnpm run build:codex-pluginandnpm run validate:agents, then commit the generated marketplace/plugin changes. - Version change: update
package.jsonandmanifest.jsontogether; the Codex plugin build fails if they drift. - Skill wording change: edit source skills under
skills/do-it/, then regenerate. Do not editplugins/do-it/skills/directly. - Agent change: edit
agents/*.toml, then regenerate. Do not merge Claude.mdgeneration into the Codex plugin build. - Hook change: ship hooks inside the Codex plugin bundle and document trust
under
/hooks. Global CLI setup remains optional for doctor / migration — do not treatplugin_hooks=falseas a reason to require paired global setup.
Generated artifact rules:
- Do not hand-edit
plugins/do-it/skills/,plugins/do-it/agents/,plugins/do-it/.codex-plugin/plugin.json,.agents/plugins/marketplace.json,plugins/do-it-cursor/skills/,plugins/do-it-cursor/agents/,plugins/do-it-opencode/skills/,plugins/do-it-opencode/agents/,dist/claude/agents/, ordist/claude/skills/_index.md. - Skill source is
skills/do-it/; Codex plugin output is regenerated withnpm run build:codex-plugin. - Claude agent output is regenerated with
npm run build:claude-agents. - Cursor plugin output is regenerated with
npm run build:cursor-plugin. - OpenCode plugin output is regenerated with
npm run build:opencode-plugin. - The lazy skill index is regenerated by install preflight or
node scripts/build-skills-index.mjs; package/install checks should catch stale generated inventory. - If generated output differs after a source edit, commit the generated result alongside the source change and name the generator command in closeout.
- Add a target entry under
manifest.targets.<name>withrootEnv,rootDefault,stateFile,agentSourceFrom,agentSourceExt,agentTargetExt,extras, andpreInstall. - If the host needs new top-level files (e.g. plugin metadata), list them
in
extras. - Verify with
<rootEnv>=/tmp/<name>-test do-it install --target=<name>followed by the matching doctor invocation.
git diff --check
npm test
npm run validate:agents
npm run build:claude-agents
# Codex (default): byte-equal with prior versions except for deprecated/optional skills
CODEX_HOME=/tmp/cx do-it install
diff -r --exclude='.do-it-install-state*' /tmp/cx /tmp/cx-old # against worktree of v0.3.x
# Claude target
CLAUDE_PLUGIN_ROOT_OVERRIDE=/tmp/cl do-it setup --target=claude
# Optional skills opt-in
CLAUDE_PLUGIN_ROOT_OVERRIDE=/tmp/cl-full do-it install --target=claude --with-optionalEach target has its own state file under the install root (configured via
manifest.targets.<name>.stateFile):
~/.codex/.do-it-install-state.json— codex (unchanged from 0.3.x)~/.claude/.do-it-install-state-claude.json— claude
This avoids state collisions when both targets are installed on the same machine.
Agent descriptions should make clear what expertise a subagent contributes, not encode a parent workflow. When adding or changing an agent:
- state the capability, the useful trigger, and the compact result it returns;
- keep its write permissions narrow;
- require it to inspect current truth before acting;
- require verification evidence when it edits files;
- ask for failure-mode coverage, path-map evidence when applicable, and residual risk;
- remind implementation agents that the parent owns integration and final claims.
The parent gives each worker only the goal and necessary boundary context;
subagent-stance reinforces autonomous work and parent integration. Do not add
fixed contract fields or refusal behavior. scripts/validate-agent-bundle.mjs
still protects portable bundle integrity and model-agnostic policy.
Recommended checks before committing workflow changes. For live-first rebaseline, run the source/live parity check before these commands:
git diff --check
npm test
npm run validate:agents
npm run validate:core-skill-boundaries
npm run build:claude-agents
npm run build:codex-plugin
CODEX_HOME=/tmp/do-it-codex-test ./install/install.sh
CODEX_HOME=/tmp/do-it-codex-test ./install/doctor.sh
CODEX_HOME=/tmp/do-it-plugin-test codex plugin marketplace add /path/to/do-it
CODEX_HOME=/tmp/do-it-plugin-test codex plugin add do-it@tdwhere-do-it
CLAUDE_PLUGIN_ROOT_OVERRIDE=/tmp/do-it-claude-test npm exec --package . -- do-it setup --target=claude
npm run validate:release -- vX.Y.Z
npm run smoke:packageAlso run targeted sweeps for stale references after substantial rewrites, for example old project names, obsolete save paths, deleted support files, or commands that belong to an adapter instead of the Codex-first workflow.