From ork
Implements features using parallel subagents with scope control, reflection, and MCP servers for memory/context. Activates on implement/build/create requests in JS/TS projects.
npx claudepluginhub yonatangross/orchestkit --plugin orkThis skill is limited to using the following tools:
Parallel subagent execution for feature implementation with scope control and reflection.
assets/micro-plan-template.mdassets/reflection-template.mdchecklists/implementation-review.mdreferences/agent-phases.mdreferences/agent-teams-full-stack.mdreferences/agent-teams-phases.mdreferences/agent-teams-security-audit.mdreferences/cc-enhancements.mdreferences/e2e-verification.mdreferences/feedback-loop.mdreferences/interview-mode.mdreferences/micro-planning-guide.mdreferences/orchestration-modes.mdreferences/scope-creep-detection.mdreferences/team-worktree-setup.mdreferences/test-requirements-matrix.mdreferences/tier-classification.mdreferences/worktree-isolation-mode.mdreferences/worktree-workflow.mdrules/_sections.mdOrchestrates multi-phase feature development: research, plan, implement, review with confidence scoring, approvals, and quality gates. For complex features spanning multiple files or needing architecture decisions.
Guides feature or multi-file implementation with structured workflow: clarify requirements, select personas, implement safely, add tests, and validate.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Share bugs, ideas, or general feedback.
Parallel subagent execution for feature implementation with scope control and reflection.
/ork:implement user authentication
/ork:implement --model=opus real-time notifications
/ork:implement dashboard analytics
FEATURE_DESC = "$ARGUMENTS" # Full argument string, e.g., "user authentication"
# $ARGUMENTS[0] is the first token, $ARGUMENTS[1] second, etc. (CC 2.1.59)
# Model override detection (CC 2.1.72)
MODEL_OVERRIDE = None
for token in "$ARGUMENTS".split():
if token.startswith("--model="):
MODEL_OVERRIDE = token.split("=", 1)[1] # "opus", "sonnet", "haiku"
FEATURE_DESC = FEATURE_DESC.replace(token, "").strip()
Pass MODEL_OVERRIDE to all Agent() calls via model=MODEL_OVERRIDE when set. Accepts symbolic names (opus, sonnet, haiku) or full IDs (claude-opus-4-6) per CC 2.1.74.
Run BEFORE any other step. Detect available MCP servers and check for resumable state.
# Probe MCPs (parallel — all in ONE message):
ToolSearch(query="select:mcp__memory__search_nodes")
ToolSearch(query="select:mcp__context7__resolve-library-id")
Write(".claude/chain/capabilities.json", JSON.stringify({
"memory": <true if found>,
"context7": <true if found>,
"timestamp": now()
}))
# Resume check:
Read(".claude/chain/state.json")
# If exists and skill == "implement":
# Read last handoff (e.g., 04-architecture.json)
# Skip to current_phase
# "Resuming from Phase {N} — architecture decided in previous session"
# If not: write initial state
Write(".claude/chain/state.json", JSON.stringify({
"skill": "implement", "feature": FEATURE_DESC,
"current_phase": 1, "completed_phases": [],
"capabilities": capabilities
}))
Load:
Read("${CLAUDE_PLUGIN_ROOT}/skills/chain-patterns/references/checkpoint-resume.md")
Read the /effort setting to scale implementation depth. The effort-aware context budgeting hook detects effort level automatically — adapt the phase plan accordingly:
| Effort Level | Phases Run | Agents | Token Budget |
|---|---|---|---|
| low | 1 (Discovery) → 5 (Implement) → 10 (Reflect) | 2 max | ~50K |
| medium | 1 → 2 → 5 → 7 (Scope Creep) → 10 | 3 max | ~150K |
| high (default) | All 10 phases | 4-7 | ~400K |
Override: Explicit user selection in Step 0 (e.g., "Plan first" or "Worktree") overrides
/effortdownscaling. If user requests full exploration, respect that regardless of effort level.
BEFORE any work, detect the project tier. This becomes the complexity ceiling for all patterns.
Scan codebase signals and classify into tiers 1-6 (Interview through Open Source). Each tier sets an architecture ceiling and determines which phases/agents to use.
Load tier details, workflow mapping, and orchestration mode: Read("${CLAUDE_SKILL_DIR}/references/tier-classification.md")
For features touching 5+ files, offer worktree isolation to prevent conflicts with the main working tree:
AskUserQuestion(questions=[{
"question": "Isolate this feature in a git worktree?",
"header": "Isolation",
"options": [
{"label": "Yes — worktree (Recommended)", "description": "Creates isolated branch via EnterWorktree, merges back on completion", "markdown": "```\nWorktree Isolation\n──────────────────\nmain ─────────────────────────────▶\n \\ /\n └─ feat-{slug} (worktree) ───┘\n ├── Isolated directory\n ├── Own branch + index\n └── Auto-merge on completion\n\nSafe: main stays untouched until done\n```"},
{"label": "No — work in-place", "description": "Edit files directly in current branch", "markdown": "```\nIn-Place Editing\n────────────────\nmain ──[edit]──[edit]──[edit]───▶\n ▲ ▲ ▲\n │ │ │\n direct modifications\n\nFast: no branch overhead\nRisk: changes visible immediately\n```"},
{"label": "Plan first", "description": "Research and design in plan mode before writing code", "markdown": "```\nPlan Mode Flow\n──────────────\n 1. EnterPlanMode($ARGUMENTS)\n 2. Read existing code\n 3. Research patterns\n 4. Design approach\n 5. ExitPlanMode → plan\n 6. User approves plan\n 7. Execute implementation\n\n Best for: Large features,\n unfamiliar codebases,\n architectural decisions\n```"}
],
"multiSelect": false
}])
If 'Plan first' selected:
# 1. Enter read-only plan mode
EnterPlanMode("Research and design: $ARGUMENTS")
# 2. Research phase — Read/Grep/Glob ONLY, no Write/Edit
# - Read existing code in the target area
# - Grep for related patterns, imports, dependencies
# - Check tests, configs, and integration points
# - If context7 available: query library docs
# 3. Design the plan — produce:
# - File map: which files to create/modify
# - Architecture decisions with rationale
# - Task breakdown with acceptance criteria
# - Risk assessment and edge cases
# 4. Exit plan mode — returns plan to user for approval
ExitPlanMode()
# 5. User reviews plan. If approved → continue to Phase 1 (Discovery)
# with the plan as input. If rejected → revise or stop.
If worktree selected:
EnterWorktree(name: "feat-{slug}") to create isolated branchgit checkout {original-branch} && git merge feat-{slug}AskUserQuestionLoad worktree details: Read("${CLAUDE_SKILL_DIR}/references/worktree-isolation-mode.md")
Create tasks with TaskCreate BEFORE doing any work. Each phase gets a subtask. Update status with TaskUpdate as you progress.
| Phase | Activities | Agents |
|---|---|---|
| 1. Discovery | Research best practices, Context7 docs, break into tasks | — |
| 2. Micro-Planning | Detailed plan per task (load ${CLAUDE_SKILL_DIR}/references/micro-planning-guide.md) | — |
| 3. Worktree | Isolate in git worktree for 5+ file features (load ${CLAUDE_SKILL_DIR}/references/worktree-workflow.md) | — |
| 4. Architecture | 4 parallel background agents | workflow-architect, backend-system-architect, frontend-ui-developer, llm-integrator |
| 5. Implementation + Tests | Parallel agents, single-pass artifacts with mandatory tests | backend-system-architect, frontend-ui-developer, llm-integrator, test-generator |
| 6. Integration Verification | Code review + real-service integration tests | backend, frontend, code-quality-reviewer, security-auditor |
| 7. Scope Creep | Compare planned vs actual (load ${CLAUDE_SKILL_DIR}/references/scope-creep-detection.md) | workflow-architect |
| 8. E2E Verification | Browser + API E2E testing (load ${CLAUDE_SKILL_DIR}/references/e2e-verification.md) | — |
| 9. Documentation | Save decisions to memory graph | — |
| 10. Reflection | Lessons learned, estimation accuracy | workflow-architect |
Load agent prompts: Read("${CLAUDE_SKILL_DIR}/references/agent-phases.md")
For Agent Teams mode: Read("${CLAUDE_SKILL_DIR}/references/agent-teams-phases.md")
Write handoff JSON after major phases. See chain-patterns skill for schema.
| After Phase | Handoff File | Key Outputs |
|---|---|---|
| 1. Discovery | 01-discovery.json | Best practices, library docs, task breakdown |
| 2. Micro-Plan | 02-plan.json | File map, acceptance criteria per task |
| 4. Architecture | 04-architecture.json | Decisions, patterns chosen, agent results |
| 5. Implementation | 05-implementation.json | Files created/modified, test results |
| 7. Scope Creep | 07-scope.json | Planned vs actual, PR split recommendation |
Output results incrementally after each phase — don't batch everything until the end:
| After Phase | Show User |
|---|---|
| 1. Discovery | Key findings, library recommendations, task breakdown |
| 4. Architecture | Each agent's design decisions as they return |
| 5. Implementation | Files created/modified per agent, test results |
| 7. Scope Creep | Planned vs actual delta, PR split recommendation |
When agents run with run_in_background=true, output each agent's findings as soon as it returns — don't wait for all agents to finish. This gives users ~60% faster perceived feedback and enables early intervention if an agent's approach diverges from the plan.
Phase 5 agents SHOULD use isolation: "worktree" to prevent file conflicts:
Agent(subagent_type="backend-system-architect",
prompt="Implement backend: {feature}. Architecture: {from 04-architecture.json}",
isolation="worktree", run_in_background=true)
Agent(subagent_type="frontend-ui-developer",
prompt="Implement frontend: {feature}...",
isolation="worktree", run_in_background=true)
Agent(subagent_type="test-generator",
prompt="Generate tests: {feature}...",
isolation="worktree", run_in_background=true)
After final PR, schedule health monitoring:
# Guard: Skip cron in headless/CI (CLAUDE_CODE_DISABLE_CRON)
# if env CLAUDE_CODE_DISABLE_CRON is set, run a single check instead
CronCreate(
schedule="0 */6 * * *",
prompt="Health check for {feature} in PR #{pr}:
gh pr checks {pr} --repo {repo}.
If healthy 24h → CronDelete. If errors → alert."
)
if capabilities.context7:
mcp__context7__resolve-library-id({ libraryName: "next-auth" })
mcp__context7__query-docs({ libraryId: "...", query: "..." })
else:
WebFetch("https://docs.example.com/api") # T1 fallback
If working on a GitHub issue, run the Start Work ceremony from issue-progress-tracking and post progress comments after major phases.
Maintain checkpoints after each task. Load triggers: Read("${CLAUDE_SKILL_DIR}/references/feedback-loop.md")
Phase 5 test-generator MUST produce tests matching the change type. Each change type maps to specific required tests and testing rules.
Load test matrix, real-service detection, and phase 9 gate: Read("${CLAUDE_SKILL_DIR}/references/test-requirements-matrix.md")
run_in_background: true, launch all agents in ONE messageTeamDelete() after completion; press Ctrl+F twice as manual fallback. Note: /clear (CC 2.1.72+) preserves background agentsExitWorktree(action: "keep") in Phase 10 if worktree was entered in Step 0; never leave orphaned worktrees/ork:verify {FEATURE} # Grade the implementation
/ork:cover {FEATURE} # Generate test suite
/ork:commit # Commit changes
/loop 10m npm test # Watch tests while iterating
/loop 30m /ork:verify {FEATURE} # Periodic quality gate
ork:explore: Explore codebase before implementingork:verify: Verify implementations work correctlyork:issue-progress-tracking: Auto-updates GitHub issues with commit progressLoad on demand with Read("${CLAUDE_SKILL_DIR}/references/<file>"):
| File | Content |
|---|---|
agent-phases.md | Agent prompts and spawn templates |
agent-teams-phases.md | Agent Teams mode phases |
interview-mode.md | Interview/take-home constraints |
orchestration-modes.md | Task tool vs Agent Teams selection |
feedback-loop.md | Checkpoint triggers and actions |
cc-enhancements.md | CC version-specific features |
agent-teams-full-stack.md | Full-stack pipeline for teams |
team-worktree-setup.md | Team worktree configuration |
micro-planning-guide.md | Detailed micro-planning guide |
scope-creep-detection.md | Planned vs actual comparison |
worktree-workflow.md | Git worktree workflow |
e2e-verification.md | Browser + API E2E testing guide |
worktree-isolation-mode.md | Worktree isolation details |
tier-classification.md | Tier classification, workflow mapping, orchestration mode |
test-requirements-matrix.md | Test matrix by change type, real-service detection, phase 9 gate |