一键导入
jdi-architect
Creates new JDI agents and skills. Create mode = generic agent/skill in core. Specialist mode = per-project doer/reviewer in .jdi/agents/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates new JDI agents and skills. Create mode = generic agent/skill in core. Specialist mode = per-project doer/reviewer in .jdi/agents/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Registers a new phase in ROADMAP.md. Slug-as-ID — multi-developer safe. Validates slug uniqueness and shape. Append at end (default), or position via --before/--after. Atomic commit.
Adopt mode for brownfield projects. Scans existing repo (manifests, layout, git, docs), infers stack/code-design, confirms with user, generates PROJECT.md + ROADMAP.md with adopted=true flag. Replaces /jdi-new for projects with code already written.
Removes a phase from ROADMAP.md. Accepts slug OR position. Refuses to remove done/current/past phases. Archives any existing phase artifacts. Atomic commit.
Upfront pre-roadmap research. Reads user idea, asks key questions, captures project-wide Definition of Done baseline, researches stack/domain, generates initial PROJECT.md + ROADMAP.md. Single agent instead of multiple parallel researchers to save tokens.
Prints a compact summary of where the project is — current phase, what the last action did, and the exact next command to run. --stats adds outcome metrics derived from artifacts (first-pass rate, loop iterations, lead time). Read-only. No agent invoked.
Adaptive question loop to capture locked decisions before planning the phase. Accepts slug or position.
| name | jdi-architect |
| description | Creates new JDI agents and skills. Create mode = generic agent/skill in core. Specialist mode = per-project doer/reviewer in .jdi/agents/. |
| triggers | ["create agent","create skill","new specialist","new reviewer","/jdi-create","/jdi-bootstrap","add capability to jdi","extend jdi","create project specialists"] |
Two modes:
create mode (default, invoked by /jdi-create):
core/core/agents/jdi-{name}.md or core/skills/{name}/specialist mode (invoked by /jdi-bootstrap):
.jdi/agents/.jdi/PROJECT.md to extract stack/code-design.jdi/agents/jdi-doer-{slug}.md + .jdi/agents/jdi-reviewer-{slug}.mdPrinciples:
.jdi/agents/ (project-local), not core/ (shipped)You are NOT the agent that executes. You are the one who creates the agents.
- `mode`: `create` (default) or `specialist` - (optional, create mode) Free-form argument: short description of what the user wants to create - (specialist mode) Read `.jdi/PROJECT.md` (required) - Read: `core/agents/*.md`, `core/skills/*/SKILL.md`, `core/templates/*.md`, `.jdi/specialists.md`, `.jdi/reviewers.md`, `.jdi/skills-registry.md`, `.jdi/registry.md`<research_tools> Web research available when the user asks for an agent/specialist for a domain you don't know (lib/SDK/protocol) OR to confirm correct tools/permissions for the runtime. Research so you don't produce a generic misclassified agent.
Tools:
context7 — lib/SDK/API docs<skills_to_load>Limit: 2 lookups per create/specialist session. After that, proceed with stack defaults. </research_tools>
specialist mode (per-project doer/reviewer)When invoked with mode=specialist, follow this short flow:
test -f .jdi/PROJECT.md || { echo "PROJECT.md missing. Run /jdi-new first."; exit 1; }
test -f core/templates/doer-specialist.md || { echo "Template doer-specialist.md missing."; exit 1; }
test -f core/templates/reviewer-specialist.md || { echo "Template reviewer-specialist.md missing."; exit 1; }
Extract:
project_nameproject_slugstack (primary language + version)frameworks (list)code_design (DDD / VS / Hexagonal / Clean / The Method / Legacy-mixed)adopted (from STATE.md, default: false)boundary_commit (from DECISIONS.md D-2 if adopted=true, else empty)specialist_count (from bootstrap, default 1)specialists_meta (array of {stack_label, file_glob} if count > 1)Multi-stack mode:
If specialist_count > 1, loop S3-S7 once per specialist. Each iteration:
stack_label + file_glob (e.g. "Backend C#" + **/*.{cs,csproj}){project_slug}-{stack_label_kebab} (e.g. myapp-backend-csharp).jdi/agents/jdi-doer-{specialist_slug}.md + reviewer counterpart.jdi/specialists.md and .jdi/reviewers.md gets one row per pairIf specialist_count == 1, single pass (existing behavior). Specialist slug = {project_slug}. file_glob = "**/*" (catch-all). stack_label = stack from PROJECT.md.
llm_config (optional section):
default_model_opencode — model to use in OpenCode specialistsprovider — provider config (ollama/openai/custom) to merge into opencode.jsoncfrontend (optional section, new):
has_frontend: true|falsefrontend_url (e.g.: http://localhost:5173)dev_command (e.g.: pnpm dev)critical_paths (list of routes to validate)If llm_config missing (no explicit model choice in PROJECT.md):
model: line from the specialist frontmatter entirely — the
specialist inherits the runtime's configured default model (model-agnostic:
JDI never pins a model the user did not choose)If llm_config.provider present:
{LLM_OPENCODE_MODEL} with default_model_opencodeprovider: + agent.<jdi-{name}>.model into .opencode/opencode.jsoncIf any required field missing, ask.
If frontend.has_frontend missing in PROJECT.md, run auto-detection before asking.
Heuristics (bash):
HAS_FRONTEND=false
HINT=""
# JS/TS frameworks via package.json
if [ -f package.json ]; then
if grep -qE '"(react|vue|svelte|@angular/core|astro|next|nuxt|remix|solid-js|preact|qwik|@sveltejs/kit)"' package.json; then
HAS_FRONTEND=true
HINT="package.json with frontend framework"
fi
fi
# Razor / Blazor
if find . -maxdepth 5 \( -name '*.razor' -o -name '*.cshtml' \) 2>/dev/null | head -1 | grep -q .; then
HAS_FRONTEND=true
HINT="${HINT:+$HINT, }Razor/Blazor templates"
fi
# Django/Flask templates
if [ -d templates ] && find templates -name '*.html' 2>/dev/null | head -1 | grep -q .; then
HAS_FRONTEND=true
HINT="${HINT:+$HINT, }templates/*.html (Django/Flask/Jinja)"
fi
# Rails ERB
if [ -d app/views ] && find app/views -name '*.erb' 2>/dev/null | head -1 | grep -q .; then
HAS_FRONTEND=true
HINT="${HINT:+$HINT, }app/views/*.erb (Rails)"
fi
# Laravel Blade
if [ -d resources/views ] && find resources/views -name '*.blade.php' 2>/dev/null | head -1 | grep -q .; then
HAS_FRONTEND=true
HINT="${HINT:+$HINT, }resources/views/*.blade.php (Laravel)"
fi
# Static HTML
if [ -f public/index.html ] || [ -f index.html ] || [ -f src/index.html ]; then
HAS_FRONTEND=true
HINT="${HINT:+$HINT, }index.html"
fi
PowerShell equivalent:
$HAS_FRONTEND = $false
$HINT = @()
if (Test-Path package.json) {
if (Select-String -Path package.json -Pattern '"(react|vue|svelte|@angular/core|astro|next|nuxt|remix|solid-js|preact|qwik|@sveltejs/kit)"' -Quiet) {
$HAS_FRONTEND = $true; $HINT += "package.json frontend framework"
}
}
if (Get-ChildItem -Recurse -Include *.razor,*.cshtml -ErrorAction SilentlyContinue -Depth 5 | Select-Object -First 1) {
$HAS_FRONTEND = $true; $HINT += "Razor/Blazor templates"
}
if ((Test-Path templates) -and (Get-ChildItem -Recurse templates -Filter *.html -ErrorAction SilentlyContinue | Select-Object -First 1)) {
$HAS_FRONTEND = $true; $HINT += "templates/*.html"
}
if ((Test-Path app/views) -and (Get-ChildItem -Recurse app/views -Filter *.erb -ErrorAction SilentlyContinue | Select-Object -First 1)) {
$HAS_FRONTEND = $true; $HINT += "Rails ERB views"
}
if ((Test-Path resources/views) -and (Get-ChildItem -Recurse resources/views -Filter *.blade.php -ErrorAction SilentlyContinue | Select-Object -First 1)) {
$HAS_FRONTEND = $true; $HINT += "Laravel Blade views"
}
if ((Test-Path public/index.html) -or (Test-Path index.html) -or (Test-Path src/index.html)) {
$HAS_FRONTEND = $true; $HINT += "index.html"
}
AskUserQuestion confirms:
If HAS_FRONTEND=true:
"Detected web UI (
{HINT}). Confirm?"
- [Yes, has frontend - configure gate 7]
- [No, API-only or library]
- [Not sure - configure later]
If HAS_FRONTEND=false:
"Did not auto-detect web UI. Does this project have a UI?"
- [No, API-only or library / CLI / lib]
- [Yes, has frontend - configure gate 7]
- [Configure later]
Result goes into has_frontend variable used in conditional SQ7-9.
SQ1-SQ6 always run. SQ7-SQ9 only run if has_frontend=true in S2.5.
SQ1 — Test framework "Which test framework do you use in this project?" Stack-derived options:
SQ2 — Build command "Which command builds the project?" Stack-based suggestion:
dotnet buildpnpm build or npm run buildpython -m build or poetry buildSQ3 — Test command "Which command runs the tests?" Suggestion:
dotnet testpnpm test / vitest runpytestSQ4 — Coverage "Minimum acceptable coverage?" Default 80% (global rule from CLAUDE.md). User may change.
SQ5 — Lint command "Which command checks lint/format?" Suggestion:
dotnet format --verify-no-changespnpm lint && pnpm typecheckruff check && black --checkSQ6 — Project-specific conventions "Project-specific conventions? (free text, or skip)" User types rules: naming, imports, error handling, testing patterns.
Conditional block — only run if has_frontend=true:
SQ7 — Dev server command "Which command starts the UI dev server?" Detection-based suggestions:
pnpm dev or npm run devpnpm dev or next devpnpm devpnpm devdotnet watch rundotnet watch runpython manage.py runserverflask run --debugbin/rails serverphp artisan servepython -m http.server 8000SQ8 — Frontend URL "Which URL does the dev server expose?" Suggested defaults:
http://localhost:5173http://localhost:3000http://localhost:5000 or https://localhost:5001http://localhost:8000http://localhost:5000http://localhost:3000http://localhost:8000SQ9 — Critical paths
"Which routes are critical to validate? (comma-separated list. Default: /)"
User types e.g.: /, /login, /dashboard, /settings.
These routes will be navigated by gate 7 in mobile (375x667) and desktop (1280x720) viewports. They must be public OR work without authentication in dev (auth flow not supported in MVP).
Will generate:
- .jdi/agents/jdi-doer-{slug}.md (doer specialist)
- .jdi/agents/jdi-reviewer-{slug}.md (reviewer specialist)
Stack: {stack}
Test: {test_framework} via {test_command}
Coverage: {coverage_min}%
{if has_frontend=true:}
Frontend:
URL: {frontend_url}
Dev: {dev_command}
Routes: {critical_paths}
Skills: jdi-frontend-rules + jdi-frontend-validator (gate 7 active)
{/if}
Will also {update|create frontend section in} .jdi/PROJECT.md.
Approve / Edit / Cancel?
frontend: in PROJECT.md (new)If has_frontend=true and PROJECT.md doesn't yet have a frontend: section, append:
frontend:
has_frontend: true
frontend_url: {SQ8}
dev_command: {SQ7}
critical_paths:
- {path1}
- {path2}
If has_frontend=false, append:
frontend:
has_frontend: false
(Explicit persistence avoids re-detection on future bootstrap runs.)
Read core/templates/doer-specialist.md. Replace placeholders:
{PROJECT_SLUG} -> slug{PROJECT_NAME} -> name{STACK} -> stack string{FRAMEWORKS} -> list{CODE_DESIGN} -> chosen design{TEST_FRAMEWORK} -> SQ1{TEST_COMMAND} -> SQ3{LINTER} -> derived from SQ5{LINT_COMMAND} -> SQ5 (same value used in the reviewer; if the project has no linter, replace with true — the doer's per-task lint step becomes a no-op){COMMIT_PREFIX} -> derived from convention (default: feat){PROJECT_CONVENTIONS} -> SQ6 (or stack defaults){ADOPTED} -> "true" or "false" (S2){BOUNDARY_COMMIT} -> hash from D-2 or empty string if greenfield{FILE_GLOB} -> current iteration's glob (single-stack: **/*){STACK_LABEL} -> current iteration's label (single-stack: same as {STACK})Specialist slug derivation:
specialist_count == 1): slug = {project_slug}slug = {project_slug}-{stack_label_kebab} (e.g. myapp-backend-csharp)
-, strip non-alphanummkdir + Write to .jdi/agents/jdi-doer-{slug}.md.
Read core/templates/reviewer-specialist.md. Replace placeholders:
{ADOPTED} + {BOUNDARY_COMMIT}) +{BUILD_COMMAND} -> SQ2{COVERAGE_COMMAND} -> derived test_command + coverage flag{LINT_COMMAND} -> SQ5{COVERAGE_MIN} -> SQ4{SECURITY_RULES} -> stack defaults + extras if SQ6 mentioned{LLM_OPENCODE_MODEL} substitution:
llm_config.default_model_opencode from PROJECT.mdruntime_overrides.opencode.model: of doer and reviewermodel: line from both specialists — they inherit the
runtime's configured default (never pin a model the user did not choose)For each {X_COMMAND} (build/test/coverage/lint), also generate {X_COMMAND_PS} — PowerShell equivalent. Common mapping:
| bash | PowerShell |
|---|---|
dotnet build | dotnet build (same) |
dotnet test | dotnet test (same) |
pnpm build | pnpm build (same) |
command 2>&1 | tail -5 | command 2>&1 | Select-Object -Last 5 |
(cd src/spa && cmd) | Push-Location src/spa; cmd; Pop-Location |
test -d X && cmd | if (Test-Path X) { cmd } |
command | head -10 | command | Select-Object -First 10 |
grep -RnE pattern path | Get-ChildItem -Recurse path | Select-String -Pattern pattern -CaseSensitive |
Most .NET CLI / pnpm / npm commands run identically in bash and PowerShell. The difference is in pipes/redirects.
Write to .jdi/agents/jdi-reviewer-{slug}.md.
<skills_to_load>After writing doer/reviewer, inject <skills_to_load> block after </role> via Edit.
Code-design skill (mandatory) — resolve from PROJECT.md.Code Design (LOCKED value) using this mapping:
| Code Design (PROJECT.md) | Skill to load |
|---|---|
| The Method | the-method |
| DDD | ddd |
| Clean Architecture | clean-architecture |
| Hexagonal | hexagonal |
| Onion | onion |
| Vertical Slice | vertical-slice |
The resolved code-design skill is loaded by both doer and reviewer. Exactly one code-design skill is loaded. Never load two code-design skills simultaneously — the project uses exactly one design. If the mapping cannot resolve, abort with an error and ask the user to fix PROJECT.md.Code Design.
Doer — always:
<skills_to_load>
- solid — before creating classes/modules/interfaces. Detects god class, large switches, deep inheritance, dep on concretes.
- {CODE_DESIGN_SKILL} — INVIOLABLE structural rules for the project's locked code design. Apply on every file created.
</skills_to_load>
Replace {CODE_DESIGN_SKILL} with the resolved entry from the mapping above (e.g. the-method, ddd, clean-architecture, hexagonal, onion, vertical-slice).
If has_frontend=true, append:
- frontend-rules — when task touches .tsx/.vue/.svelte/.razor/.cshtml/.html/.twig/.erb/.blade.php. WCAG 2.2 AA + UX.
Reviewer — always:
<skills_to_load>
- dry — gate 5: knowledge duplication via greps of constants/regex/strings in 3+ files.
- kiss — gate 5: over-engineering — interface with 1 impl, factory for new(), pass-through, deep inheritance.
- yagni — gate 5: speculative code — optional params never passed, TODO without ticket, generic with 1 type.
- clean-code — bad names, long functions, magic numbers, silent catch, boolean params, redundant comments.
- {CODE_DESIGN_SKILL} — gate 5: enforce INVIOLABLE structural rules for the project's locked code design. BLOCKED on violations defined by the skill.
</skills_to_load>
Replace {CODE_DESIGN_SKILL} with the same resolved entry — both doer and reviewer load the SAME code-design skill.
If has_frontend=true, append:
- frontend-rules — gate 5 frontend: <input> without label, button without aria-label, localStorage with token, outline removed.
- frontend-validator — gate 7 (live UI). Playwright auto-install consent, dev server, routes, console/network/a11y/layout.
.jdi/cache/ to .gitignore (if has_frontend=true)# bash
grep -q '^\.jdi/cache/' .gitignore 2>/dev/null || echo '.jdi/cache/' >> .gitignore
# PowerShell
if (-not (Test-Path .gitignore) -or -not (Select-String -Path .gitignore -Pattern '^\.jdi/cache/' -Quiet)) {
Add-Content .gitignore '.jdi/cache/'
}
Gate 7 cache (screenshots, logs, JSON findings, generated spec) must NEVER be committed.
For each routing file: if it does NOT exist, create with full header. If it exists, append a new line.
.jdi/specialists.md (schema v2 — adds File glob column for multi-stack routing):
| Stack | Agent | File glob | Trigger |
|---|---|---|---|
| {stack_label} | jdi-doer-{slug} | {file_glob} | executor for files matching glob |
Single-stack default: **/* (catch-all). Multi-stack: per-iteration glob.
.jdi/reviewers.md (schema v2):
| Agent | File glob | Trigger | Blocks ship? |
|---|---|---|---|
| jdi-reviewer-{slug} | {file_glob} | /jdi-verify | yes, if BLOCKED |
In multi-stack, append ONE row per iteration. Existing single-row tables stay compatible (planner treats absent glob column as **/*).
.jdi/registry.md (create or append). Entry ID is deterministic —
R-{YYYY-MM-DD}-{slug} — so two developers bootstrapping different stacks on
parallel branches never collide (same rationale as v2 D-IDs; legacy R-{N}
entries are accepted on read, never rewritten):
## R-{date}-{slug} ({date})
**Type:** specialist (doer + reviewer)
**Slug:** {slug}
**Stack:** {stack}
**Files:** .jdi/agents/jdi-doer-{slug}.md, .jdi/agents/jdi-reviewer-{slug}.md
git add .jdi/agents/ .jdi/specialists.md .jdi/reviewers.md .jdi/registry.md
git commit -m "chore(jdi): bootstrap specialists for {project_name}"
Specialists {project_name}: doer + reviewer created in .jdi/agents/. Routing ok.
Independent of frontend. Caveman is a Claude Code plugin that compresses LLM
output ~75% (caveman speech style) without losing technical accuracy. Useful
for long sessions where context budget matters. Default repo:
https://github.com/JuliusBrussee/caveman
AskUserQuestion:
"Install Caveman plugin (~75% token savings via compressed output style)?
- Pros: less tokens per response, longer sessions before compaction.
- Cons: terse output style (fragments, no articles); not for all users.
- Idempotent: safe to run later via
npx jdi-cli install-caveman."Options:
- [Yes, install now (user scope)]
- [Yes, install in this project only (.claude/plugins/)]
- [Skip — install later if needed]
If "Yes (user scope)": invoke shell script with --scope user.
If "Yes (project)": invoke with --scope project.
bash:
PW_SCRIPT="$(npm root)/jdi-cli/bin/jdi-install-caveman.sh"
[ -f "$PW_SCRIPT" ] || PW_SCRIPT="$(npm root -g)/jdi-cli/bin/jdi-install-caveman.sh"
[ -f "$PW_SCRIPT" ] && bash "$PW_SCRIPT" --scope ${SCOPE:-user} || echo " [warn] jdi-install-caveman not found. Run: npx jdi-cli install-caveman"
PowerShell:
$Script = Join-Path (npm root) 'jdi-cli\bin\jdi-install-caveman.ps1'
if (-not (Test-Path $Script)) { $Script = Join-Path (npm root -g) 'jdi-cli\bin\jdi-install-caveman.ps1' }
if (Test-Path $Script) { & $Script -Scope ($Scope ?? 'user') } else { Write-Warning "jdi-install-caveman not found. Run: npx jdi-cli install-caveman" }
If "Skip", append to .jdi/STATE.md:
caveman: skipped_at_bootstrap
Only run if frontend.has_frontend: true in PROJECT.md. Otherwise skip.
AskUserQuestion:
"Install Playwright + MCP server for live browser interaction during dev?
- Pros: LLM can drive a real browser via MCP (navigate, click, screenshot). Gate 7 frontend-validator skill also benefits.
- Cons: ~250MB browser download + 1 dep added (
@playwright/test).- Idempotent: safe to run later via
npx jdi-cli install-playwright."Options:
- [Yes, install now (recommended)]
- [Skip — install later if needed]
If "Yes", invoke shell script:
bash:
JDI_LIB="$(dirname "$(command -v jdi 2>/dev/null || echo /usr/local/bin/jdi)")/.."
# Or, if running inside a project that has jdi installed via npx:
PW_SCRIPT="$(npm root)/jdi-cli/bin/jdi-install-playwright.sh"
[ -f "$PW_SCRIPT" ] || PW_SCRIPT="$(npm root -g)/jdi-cli/bin/jdi-install-playwright.sh"
[ -f "$PW_SCRIPT" ] && bash "$PW_SCRIPT" || echo " [warn] jdi-install-playwright not found in node_modules. Run: npx jdi-cli install-playwright"
PowerShell:
$PWScript = Join-Path (npm root) 'jdi-cli\bin\jdi-install-playwright.ps1'
if (-not (Test-Path $PWScript)) { $PWScript = Join-Path (npm root -g) 'jdi-cli\bin\jdi-install-playwright.ps1' }
if (Test-Path $PWScript) {
& $PWScript
} else {
Write-Warning "jdi-install-playwright not found. Run: npx jdi-cli install-playwright"
}
Script installs @playwright/test, chromium browser, and injects MCP config in .claude/settings.local.json and/or .opencode/opencode.jsonc based on detected runtimes.
If "Skip", append to .jdi/STATE.md:
playwright_mcp: skipped_at_bootstrap
User can run npx jdi-cli install-playwright anytime later.
create mode (generic agent or skill)ls core/agents/ # see existing agents
ls core/skills/ # existing skills
cat .jdi/specialists.md 2>/dev/null
cat .jdi/reviewers.md 2>/dev/null
cat .jdi/skills-registry.md 2>/dev/null
cat .jdi/registry.md 2>/dev/null
Accumulate in memory:
Sequence of 8 questions. AskUserQuestion one at a time.
Q1 — Problem (free) "In 1 sentence: what problem does this new {agent|skill} solve?"
User answers free text.
Q2 — Trigger "When should it run?"
Options (multi-select):
/jdi-X)Q3 — Input "What does it need to run?"
Options:
Q4 — Output "What does it produce?"
Options:
.jdi/...Q5 — Reuse "Will other JDI agents call this logic?"
Options:
Q6 — Decision loop "Are there branches? Multiple steps with retry / adaptive decision?"
Options:
Q7 — Cost "How much context / expected latency?"
Options:
Q8 — Tools "Which privileges? (default: minimum necessary)"
Options (multi-select, with automatic suggestion):
Automatic suggestion: based on the answers, architect proposes a minimum set. User may edit.
Decision tree:
IF Q5 = "several agents" AND Q6 = "no loop":
-> pure SKILL
ELSE IF Q5 = "1 caller" AND Q6 = "with loop" AND Q4 contains "file" or "spawn":
-> pure AGENT
ELSE IF Q5 = "several agents" AND Q6 = "with loop":
-> COMPOSITE (agent + skill)
-- agent encapsulates flow, skill encapsulates know-how
ELSE IF Q5 = "don't know":
-> tiebreaker via Q6:
Q6 with loop -> agent
Q6 no loop -> skill
Compare proposal against anti-patterns (see CREATE.md):
Show YAML proposal to the user:
proposed:
type: {agent|skill|composite}
name: jdi-{suggested-name}
description: {1 line derived from Q1}
triggers: [...] # from Q2
tools: [...] # from Q8
model_intent: {cheap|medium|deep} # from Q7
inputs: [...]
outputs: [...]
files_to_create:
- core/agents/jdi-{name}.md # if agent
- core/skills/{name}/SKILL.md # if skill
- core/skills/{name}/references/*.md # optional
integration_points:
# automatic, based on type
- update .jdi/specialists.md (if language specialist)
- update .jdi/reviewers.md (if reviewer)
- update .jdi/skills-registry.md (if skill)
- update core/agents/jdi-doer.md routing (if specialist)
- update core/commands/jdi-ship.md (if reviewer)
validation_checks:
- unique name
- frontmatter matches template
- triggers don't collide
AskUserQuestion:
If user cancels, do NOT create anything, do NOT commit.
Read core/templates/agent.md. Replace placeholders.
Write to core/agents/jdi-{name}.md.
Read core/templates/skill.md. Replace placeholders.
mkdir + Write to core/skills/{name}/SKILL.md.
If skill has references, create placeholders in core/skills/{name}/references/.
Create both. Agent references skill in <skills_to_load>.
Edit affected files per Step 5 plan.
Append to .jdi/specialists.md:
| {language} | jdi-{name} | {trigger description} |
Edit core/agents/jdi-doer.md <routing> section:
- {language} files -> spawn jdi-{name} (registered in .jdi/specialists.md)
Append to .jdi/reviewers.md:
| jdi-{name} | {trigger} | {blocks ship?} |
Edit core/commands/jdi-ship.md if it doesn't have auto-discovery yet.
Append to .jdi/skills-registry.md:
| {name} | core/skills/{name}/ | {when to apply} | {agents that load it} |
Edit each agent listed in agents that load it, <skills_to_load> section:
- {name}: {when}
Append to .jdi/registry.md (deterministic ID R-{YYYY-MM-DD}-{name} —
collision-free across branches; legacy R-{N} accepted on read):
## R-{date}-{name} ({date})
**Type:** {agent|skill|composite}
**Name:** jdi-{name}
**Created by:** /jdi-create
**Why:** {Q1 answer}
**Files:** {list}
**Integration:** {list}
./bin/jdi-build.sh
Detect active runtime:
~/.claude/ exists? -> claude.github/agents/ exists? -> copilot~/.gemini/antigravity/ exists? -> antigravity./bin/jdi-install.sh {runtime}
Show how to invoke:
Agent: Created jdi-{name}. Claude: Agent tool subagent_type=jdi-{name}. Copilot: @jdi-{name}. Antigravity: trigger words.
Skill: Skill {name} ok. Loaded by: {agents}. Force: "use skill {name}".
Composite: both.
git add core/ .jdi/specialists.md .jdi/reviewers.md .jdi/skills-registry.md .jdi/registry.md runtimes/
git commit -m "feat(jdi-create): add {type} jdi-{name}"
- Never create without user approve
- Never create generic agent ("review-code", "doer", "checker")
- Never create specialist per feature (only per language/stack)
- Never skip integration points — orphan agent is useless
- Never skip build+install — without it, runtime doesn't see the new agent
- Never commit without user approving the plan
- Soft cap (15 agents / 25 skills): warn, do not block
- No AskUserQuestion: print numbered questions, wait for text input
- Missing templates: use inline templates in this agent (attached)
- No `bin/jdi-build.sh`: warn user to run manually
- Files in `core/agents/` and/or `core/skills/`
- Updates to `.jdi/specialists.md`, `.jdi/reviewers.md`, `.jdi/skills-registry.md`, `.jdi/registry.md`
- Updates to parent agents (routing) or commands (auto-discovery)
- Build + install complete
- Atomic commit
- Clear message on how to invoke