jarvis
npx skills add https://github.com/simonren/jarvis --skill jarvis
Agent 安装分布
Skill 文档
Jarvis
Structured execution for multi-step development work. Creates .jarvis/roadmap.md as a state machine on the VERY FIRST action, then uses it to gate every subsequent step. Resumes from any unchecked item.
When to Use
- Implementing a new feature from a PRD, spec, or description
- Large refactors spanning multiple files or modules
- System migrations (database, framework, API version)
- Integration work connecting multiple services or systems
- Tech debt cleanup requiring coordinated changes
- Infrastructure changes (CI/CD, deployment, monitoring)
- Any complex work needing structured phases + tracked progress
- Resuming interrupted work (
.jarvis/roadmap.mdalready exists)
When NOT to Use
- Single-file bug fixes or small tweaks
- Tasks where the user gave exact code to write
- Pure research or exploration tasks
Resume After Context Compaction
When resuming after context compaction or in a new session:
- Re-invoke the Jarvis skill to reload these instructions into context.
- READ
.jarvis/roadmap.mdto find current state. - Find the first unchecked item and continue from there.
- Do NOT re-do checked items. Do NOT skip unchecked items.
The roadmap is the source of truth â not your memory of what happened before compaction.
Step Zero: Create the Roadmap IMMEDIATELY
This is non-negotiable. Before ANY thinking, exploring, or brainstorming, create .jarvis/roadmap.md.
The roadmap is not a planning artifact â it is the state machine that gates all work. If it doesn’t exist, nothing else can proceed.
digraph step_zero {
"Jarvis invoked" [shape=doublecircle];
".jarvis/roadmap.md exists?" [shape=diamond];
"Create skeleton roadmap NOW" [shape=box style=filled fillcolor=lightyellow];
"Read roadmap, find first unchecked" [shape=box];
"Begin work" [shape=doublecircle];
"Jarvis invoked" -> ".jarvis/roadmap.md exists?";
".jarvis/roadmap.md exists?" -> "Create skeleton roadmap NOW" [label="no"];
".jarvis/roadmap.md exists?" -> "Read roadmap, find first unchecked" [label="yes"];
"Create skeleton roadmap NOW" -> "Read roadmap, find first unchecked";
"Read roadmap, find first unchecked" -> "Begin work";
}
On first invocation, write this skeleton immediately:
# Task: [user's request, verbatim]
**Source:** [user message / spec path]
**Started:** [date]
**Type:** [feature | refactor | migration | integration | infrastructure | tech-debt]
## Phase 0: Setup
- [x] Roadmap created
- [ ] Brainstorming complete (.jarvis/design.md written)
- [ ] Design approved by user
## Phase 1: Research & Planning
- [ ] Deep-read codebase, find reference implementations
- [ ] E2E readiness analyzed (infra exists or setup task added)
- [ ] Write .jarvis/research.md
- [ ] Implementation plan written (.jarvis/plan.md)
- [ ] Tasks populated in this roadmap
- [ ] User annotation cycle (repeat until approved)
- [ ] Execution mode chosen (subagent-driven / parallel / manual)
- [ ] /multi review passed
## Phase 2: Implementation
(populated after Phase 1)
## Phase 3: Integration
- [ ] Full test suite passes
- [ ] E2E test suite passes
- [ ] Cross-task integration verified
- [ ] Verification complete (superpowers:verification-before-completion)
- [ ] /multi review passed
- [ ] Branch finished (superpowers:finishing-a-development-branch)
Check off “Roadmap created” immediately. Now proceed to the first unchecked item.
Phase Gates
EVERY phase transition requires reading .jarvis/roadmap.md and verifying all items in the current phase are checked.
GATE: Before starting Phase 1
â READ .jarvis/roadmap.md
â Are ALL Phase 0 items checked? If NO â STOP. Complete them.
GATE: Before starting Phase 2
â READ .jarvis/roadmap.md
â Are ALL Phase 1 items checked (research, plan, annotation, /multi)? If NO â STOP. Complete them.
GATE: Before starting Phase 3
â READ .jarvis/roadmap.md
â Are ALL Phase 2 tasks checked? If NO â STOP. Complete them.
GATE: Before claiming "done"
â READ .jarvis/roadmap.md
â Are ALL Phase 3 items checked? If NO â STOP. Complete them.
Reading the file forces you to confront actual state, not assumed state.
Anti-Skip Rationalizations
If you are thinking any of these, you are about to skip a step. STOP.
| Thought | What to do instead |
|---|---|
| “The user said ‘go’, I should produce code fast” | READ roadmap.md. What’s the next unchecked item? Do that. |
| “I already know what to build, brainstorming is overhead” | Roadmap says brainstorming is unchecked. Do it. |
| “I’ll create the roadmap after I get the design done” | The roadmap IS Step Zero. It should already exist. |
| “The /multi review will slow us down” | Check it off or don’t proceed. Those are your only options. |
| “I can dispatch subagents now and review later” | READ roadmap.md. Is the previous gate passed? |
| “The subagent already wrote code, the process ship has sailed” | It hasn’t. Run the review. Fix issues. Check it off. |
| “This task is simple enough to skip the design doc” | Write a 3-line design doc. Still counts. |
| “I’ll check off items in batch later” | Check off NOW. The roadmap is only useful if current. |
| “I don’t need to research, I can just plan” | Research is unchecked. Write research.md first. |
| “The user already approved, I can tweak the plan myself” | If /multi changes the plan materially, re-present to user. |
| “I have a better idea than what the plan says” | Phase 2 is mechanical. Revise the plan or follow it. |
| “These tasks touch different files, they won’t conflict” | Files change. Use isolation: "worktree" for ALL parallel code agents. No exceptions. |
| “E2E tests can be added later” | If the task is user-facing and E2E infra is missing, it’s a Phase 1a finding. Ask user now. |
Superpowers Integration
Use superpowers skills at every applicable phase. Do not skip them.
| Jarvis Phase | Superpowers Skill | When |
|---|---|---|
| Phase 0 | superpowers:brainstorming |
Always — explore intent and requirements before architecture |
| Phase 1 (Research) | — | Always — deep-read codebase and produce research.md before planning |
| Phase 1 (Plan) | superpowers:writing-plans |
Always — structure the task plan |
| Phase 1 (Annotate) | — | Always — present plan for user annotation, iterate until approved |
| Phase 2 (Implement) | superpowers:dispatching-parallel-agents |
Identifies independent tasks and structures agent prompts. Execution owned by subagent-driven-development or executing-plans. Requires isolation: "worktree" when agents modify code in parallel. |
| Phase 2 (Test) | superpowers:test-driven-development |
When the task is suitable for TDD (testable logic, clear inputs/outputs) |
| Phase 2 (Debug) | superpowers:systematic-debugging |
When tests fail or unexpected behavior occurs |
| Phase 3 | superpowers:verification-before-completion |
Always — verify before claiming done |
| Post-Phase 3 | superpowers:finishing-a-development-branch |
When work is ready to integrate |
Phases
Phase 0: Setup (Brainstorming & Design)
- Create
.jarvis/roadmap.mdâ skeleton (see Step Zero above). Check off immediately. - Run
superpowers:brainstormingâ explore intent, requirements, design through dialogue. - Write
.jarvis/design.mdâ validated design output. Check off in roadmap.- Note:
superpowers:brainstormingwrites todocs/plans/. After it finishes, move or copy the output to.jarvis/design.md. Jarvis artifacts live in.jarvis/, notdocs/plans/.
- Note:
- Get user approval on the design. Check off in roadmap.
GATE: All Phase 0 items must be checked before proceeding to Phase 1.
Phase 1: Research & Planning
Phase 1 has three distinct sub-phases. Do not collapse them.
1a. Research (Context Engineering)
Context quality drives development velocity. Invest in understanding before planning.
- Deep-read the codebase areas relevant to the task spec/PRD â guided by the intent established during brainstorming. Read deeply, not broadly. Understand intricacies, edge cases, and existing patterns in the areas this change will touch.
- Write
.jarvis/research.mdâ task-specific findings: how the affected system areas currently work, relevant patterns, constraints, gotchas, and integration points. This builds on top ofCLAUDE.md(project-wide conventions) â do not repeat what’s already there. - Find reference implementations â search for concrete examples in the codebase or established open-source projects that solve similar problems. Link them in
research.md. Grounding plans in real code produces dramatically better architecture than designing from scratch. If no relevant reference exists (greenfield/novel work), document the search attempt and proceed with stated assumptions. - Analyze E2E readiness â determine whether the project has E2E testing infrastructure. See E2E Readiness Analysis for the full procedure. Document findings in
research.mdunder an## E2E Readinesssection. If infra is missing and the task touches user-facing surfaces, ask the user how they want E2E set up, then add an E2E setup task as a prerequisite in Phase 2 during planning. Check off in roadmap.
Check off research items in roadmap.
1b. Planning
- Run
superpowers:writing-plansâ create detailed implementation plan informed byresearch.md. - Write
.jarvis/plan.mdâ the plan output. Check off in roadmap.- Note:
superpowers:writing-planswrites todocs/plans/. After it finishes, move or copy the output to.jarvis/plan.md. Jarvis artifacts live in.jarvis/, notdocs/plans/.
- Note:
- Populate Phase 2 in
.jarvis/roadmap.mdwith task-level checkboxes from the plan. - Choose execution mode â ask the user: subagent-driven (same session), parallel session, or manual. Check off in roadmap.
1c. Annotation Cycle (Plan Refinement)
The plan is a shared mutable document. Iterate on it before any code is written.
- Present the plan to the user for review.
- The user annotates with inline corrections, rejected approaches, domain constraints, or missing context.
- Revise the plan based on annotations â do not implement yet.
- Repeat until the user approves (typically 1-3 rounds). Check off in roadmap.
- Run
/multireview on the final plan. Address critical feedback. If/multifeedback materially changes the approved plan, re-present the revised plan to the user for approval before proceeding. Check off.
GATE: All Phase 1 items must be checked before proceeding to Phase 2.
Phase 2: Execution
Phase 2 execution is delegated to the chosen execution skill:
- Subagent-Driven (same session): Invoke
superpowers:subagent-driven-development. It handles its own per-task review cycle (implementer â spec review â code quality review). - Parallel Session: Invoke
superpowers:executing-plans. It handles batch execution with human review checkpoints.
Jarvis tracks progress at the TASK level in roadmap.md. The execution skill handles sub-steps within each task.
Parallel Agent Isolation
Rule: When dispatching 2+ implementation agents in parallel, ALWAYS use isolation: "worktree" on every Task call.
Each agent gets its own worktree branch â no shared filesystem, no overwrites. This is mandatory for any agents that modify code.
Parallel agents dispatched?
ââ Do ANY modify code?
ââ YES â isolation: "worktree" on EVERY agent (mandatory)
ââ NO (read-only research/exploration) â no isolation needed
Example Task call with worktree isolation:
Task tool call:
subagent_type: "general-purpose"
isolation: "worktree"
prompt: "Implement TASK-003: Add validation middleware per .jarvis/tasks/TASK-003.md ..."
Post-parallel merge-back workflow:
After all parallel agents return, merge their work back into the working branch:
- All agents return with their worktree branches
- Review each branch’s diff
- Merge one branch at a time into the working branch
- After each merge, run tests to verify no breakage
- If a merge conflict arises, dispatch a focused agent to resolve it (or resolve manually)
- Only after ALL branches are merged and tests pass â mark tasks complete in roadmap
After EACH task completes per the execution skill, immediately update roadmap.md:
- [x] TASK-001: [title]
If the execution skill is not used (manual execution), follow this per-task cycle and use sub-step checkboxes in roadmap.md:
### TASK-001: [title]
> Blocked by: (none)
- [ ] Design (.jarvis/tasks/TASK-001.md)
- [ ] Implement (TDD when suitable)
- [ ] Verify (full suite + e2e pass)
- [ ] Self-review (lint + typecheck)
- [ ] Commit
- Design â Write approach in
.jarvis/tasks/TASK-NNN.md. Check off. - Implement â Use
superpowers:test-driven-development(red â green â refactor) when the task has testable logic with clear inputs/outputs. Otherwise, implement then write tests. Check off. - Verify â Full test suite + e2e. Use
superpowers:systematic-debuggingif stuck. Check off. - Self-review â Lint + typecheck. Check off.
- Commit â Atomic commit (with user approval). Check off.
GATE: All Phase 2 tasks must be checked before proceeding to Phase 3.
Phase 3: Integration
- Run full test suite (unit + e2e)
- Fix cross-task integration issues
- Run
superpowers:verification-before-completionâ evidence before assertions - Final cleanup
- Run
/multireview on complete implementation. Address critical feedback. - Run
superpowers:finishing-a-development-branch
Check off each item immediately.
E2E Testing
Unit tests alone are insufficient. E2E tests are required when the project has user-facing surfaces.
- Frontend: Use
agent-browserâ navigate pages, click buttons, verify results, take screenshots. - Backend APIs: Use
curlâ verify status codes, response bodies, error cases. - Both: Projects with frontend + backend get both.
E2E Readiness Analysis
During Phase 1a Research, analyze whether the project can run E2E tests today. This prevents hitting a wall at verification time.
What to look for:
| Signal | Where to check |
|---|---|
| Browser test runner (Playwright, Cypress, etc.) | package.json devDeps, config files (playwright.config.*, cypress.config.*) |
Browser automation setup (agent-browser) |
Existing test files, CLAUDE.md references |
| API test infrastructure | Test directories, existing integration/E2E test files using curl, supertest, etc. |
| Test URLs / base URL config | .env* files, test config, docker-compose.yml |
| CI E2E pipeline | .github/workflows/, Makefile targets |
| Test fixtures / seed data | fixtures/, seeds/, test setup files |
Decision flow:
Does the task touch user-facing surfaces?
ââ NO â E2E not required for this task. Note in research.md, check off, move on.
ââ YES â Does E2E infra exist?
ââ YES â Document what exists in research.md. Check off.
ââ NO â ASK the user:
1. What E2E tool/approach do you want? (agent-browser, Playwright, curl, etc.)
2. Any existing test URLs or environments to target?
3. Should E2E setup be a standalone prerequisite task or part of the first implementation task?
â Add E2E setup as a prerequisite task in Phase 2 during planning.
â Document decision in research.md. Check off.
What to document in research.md under ## E2E Readiness:
- Whether E2E infra exists (yes/no)
- What tools and config are present (if any)
- What’s missing (if anything)
- User’s chosen approach for setup (if infra is missing)
- Any constraints (no browser in CI, API-only project, etc.)
Review Gates
After completing each phase, run /multi for external review:
Phase completed â Summarize what was done â /multi review â Address feedback â Check off in roadmap
Include in review input:
- What was completed
- Key files changed
- Decisions and rationale
- Focus areas (architecture, correctness, maintainability)
Fix critical issues before proceeding.
Artifact Locations
When Jarvis is active, ALL artifacts go into .jarvis/. The docs/plans/ path is for non-Jarvis work.
<project>/
.jarvis/
roadmap.md # State machine (created at Step Zero)
design.md # Phase 0 output (brainstorming result)
research.md # Phase 1a output (codebase findings, reference implementations)
plan.md # Phase 1b output (implementation plan)
tasks/
TASK-001.md # Per-task design
TASK-002.md
Add .jarvis/ to .gitignore if artifacts should not be committed, or keep tracked for team visibility.
Implementation code and tests go wherever existing codebase conventions dictate.
Rules
- Roadmap is Step Zero â
.jarvis/roadmap.mdis created BEFORE any other action - Gates are mandatory â READ roadmap.md at every phase transition, verify all items checked
- No code before design â
.jarvis/design.mdmust exist and be approved first - No implementation before plan â
.jarvis/research.mdand.jarvis/plan.mdmust exist, and the user must have approved through the annotation cycle (Phase 1c) - Implementation is mechanical, not creative â once the plan is approved, follow it. Do not invent new approaches, expand scope, or redesign during Phase 2. If the plan is wrong, stop and revise it â don’t improvise
- Tests are mandatory â every task must have tests that pass. Use TDD when suitable; otherwise write tests after implementation
- E2E tests for user-facing work â agent-browser for frontend, curl for backend APIs
- Use superpowers skills â invoke applicable skills at every phase (see table)
- Check off immediately â update roadmap.md right after each step completes, not in batch
- Respect dependency order â skip blocked tasks, come back when unblocked
- Commit after each task â atomic commit per task (with user approval)
- Stop on failure â deterministic failures: investigate root cause immediately. Intermittent: retry up to 3 times, then ask user
- Review before proceeding â run
/multiafter each phase; fix critical issues first - Worktree isolation for parallel agents â when dispatching 2+ agents that modify code in parallel, ALWAYS use
isolation: "worktree". Never dispatch parallel code-modifying agents without filesystem isolation. Merge branches back sequentially and verify after each merge
Common Mistakes
| Mistake | Fix |
|---|---|
| Thinking about the task before creating roadmap | Roadmap is Step Zero. Create it FIRST. |
| Putting artifacts in docs/plans/ during Jarvis | All Jarvis artifacts go in .jarvis/ |
| Jumping to code without design approval | Phase gate blocks this. READ roadmap.md. |
| Dispatching subagents without Phase 1 gate | READ roadmap.md. Is Phase 1 complete? |
| Forgetting to check off steps | Check off IMMEDIATELY. Stale roadmap = broken state machine. |
Skipping /multi review |
Mandatory at phase gates. No exceptions. |
| Skipping tests entirely | Tests are mandatory. Use TDD when suitable, otherwise write tests after. |
| Two orchestrators competing | Jarvis tracks tasks; execution skill handles sub-steps. |
| Claiming “done” without verification | Run superpowers:verification-before-completion first. |
| Batch-checking items at the end | Each item checked the moment it completes. |
Skipping research / no research.md |
Deep-read the codebase and write findings before planning. |
| Planning without reference implementations | Find concrete examples in codebase or open-source before designing. |
| Skipping user annotation cycle | Present the plan, get corrections, revise â repeat until approved. |
| Getting creative during implementation | Phase 2 is mechanical execution. If the plan is wrong, revise it â don’t improvise. |
| Dispatching parallel agents without worktree isolation | Always use isolation: "worktree" on Task calls. One lost overwrite costs more than the worktree overhead. |
| Marking parallel tasks complete before merge-back | Merge each worktree branch sequentially, run tests after each merge, THEN mark complete. |
| Assuming E2E infra exists without checking | Analyze during Phase 1a Research. If missing, ask user and add setup task. |