with one click
cook-parallel
// [Implementation] Use when you need parallel implementation - multiple tasks simultaneously.
// [Implementation] Use when you need parallel implementation - multiple tasks simultaneously.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | cook-parallel |
| version | 1.0.0 |
| description | [Implementation] Use when you need parallel implementation - multiple tasks simultaneously. |
| disable-model-invocation | false |
Goal: Implement multiple independent tasks simultaneously using parallel fullstack-developer subagents.
Workflow:
Key Rules:
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
Execute these tasks in parallel for maximum efficiency: $ARGUMENTS
Mode: PARALLEL - Multiple subagents working concurrently.
.ai/workspace/analysis/{task-name}.analysis.md. Re-read before parallel dispatch.Launch multiple researcher subagents simultaneously:
Task A research āāā
Task B research āāā¼āāāŗ Synthesis
Task C research āāā
planner subagent with synthesized researchLaunch multiple fullstack-developer subagents:
Phase 1 (Backend API) āāā
Phase 2 (Frontend UI) āāā¼āāāŗ Integration
Phase 3 (Tests) āāā
Critical: Each subagent must stay within file ownership boundaries.
tester subagent for integration testsdebugger if integration issues foundcode-reviewer for final review| Rule | Description |
|---|---|
| File Ownership | Each subagent owns specific files - no overlap |
| Dependency Order | Respect dependency graph |
| Max Concurrent | 3 subagents max to prevent conflicts |
| Sync Points | Integration checkpoints between phases |
"Add user authentication with login UI"
āāā Backend API (subagent 1)
ā āāā auth-controller.ts
ā āāā auth-service.ts
āāā Frontend UI (subagent 2)
ā āāā login-page.component.ts
ā āāā login-form.component.ts
āāā Tests (subagent 3)
āāā auth.spec.ts
āāā login.e2e.ts
| Aspect | Parallel | Sequential |
|---|---|---|
| Speed | ~2-3x faster | Baseline |
| Coordination | Higher complexity | Simple |
| Conflicts | Risk of merge issues | None |
| Context | Split across agents | Unified |
AskUserQuestion. Skip if inside workflow.)MANDATORY IMPORTANT MUST ATTENTION ā NO EXCEPTIONS: If this skill was called outside a workflow, you MUST ATTENTION use
AskUserQuestionto present these options. Do NOT skip because the task seems "simple" or "obvious" ā the user decides:
If already inside a workflow, skip ā the workflow handles sequencing.
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting ā including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ATTENTION ask user whether to skip.
docs/project-reference/domain-entities-reference.md ā Domain entity catalog, relationships, cross-service sync (read when task involves business entities/models) (read directly when relevant; do not rely on hook-injected conversation text)docs/specs/ ā Test specifications by module (read existing TCs; generate/update test specs via /tdd-spec after implementation)Skill Variant: Variant of
/cookā parallel multi-task implementation with subagents.
AI Mistake Prevention ā Failure modes to avoid on every task:
Check downstream references before deleting. Deleting components causes documentation and code staleness cascades. Map all referencing files before removal. Verify AI-generated content against actual code. AI hallucinates APIs, class names, and method signatures. Always grep to confirm existence before documenting or referencing. Trace full dependency chain after edits. Changing a definition misses downstream variables and consumers derived from it. Always trace the full chain. Trace ALL code paths when verifying correctness. Confirming code exists is not confirming it executes. Always trace early exits, error branches, and conditional skips ā not just happy path. When debugging, ask "whose responsibility?" before fixing. Trace whether bug is in caller (wrong data) or callee (wrong handling). Fix at responsible layer ā never patch symptom site. Assume existing values are intentional ā ask WHY before changing. Before changing any constant, limit, flag, or pattern: read comments, check git blame, examine surrounding code. Verify ALL affected outputs, not just the first. Changes touching multiple stacks require verifying EVERY output. One green check is not all green checks. Holistic-first debugging ā resist nearest-attention trap. When investigating any failure, list EVERY precondition first (config, env vars, DB names, endpoints, DI registrations, data preconditions), then verify each against evidence before forming any code-layer hypothesis. Surgical changes ā apply the diff test. Bug fix: every changed line must trace directly to the bug. Don't restyle or improve adjacent code. Enhancement task: implement improvements AND announce them explicitly. Surface ambiguity before coding ā don't pick silently. If request has multiple interpretations, present each with effort estimate and ask. Never assume all-records, file-based, or more complex path.
Nested Task Expansion Contract ā For workflow-step invocation, the
[Workflow] ...row is only a parent container; the child skill still creates visible phase tasks.
- Call
TaskListfirst. If a matching active parent workflow row exists, setnested=trueand recordparentTaskId; otherwise run standalone.- Create one task per declared phase before phase work. When nested, prefix subjects
[N.M] $skill-name ā phase.- When nested, link the parent with
TaskUpdate(parentTaskId, addBlockedBy: [childIds]).- Orchestrators must pre-expand a child skill's phase list and link the workflow row before invoking that child skill or sub-agent.
- Mark exactly one child
in_progressbefore work andcompletedimmediately after evidence is written.- Complete the parent only after all child tasks are completed or explicitly cancelled with reason.
Blocked until:
TaskListdone, child phases created, parent linked when nested, first child markedin_progress.
Project Reference Docs Gate ā Run after task-tracking bootstrap and before target/source file reads, grep, edits, or analysis. Project docs override generic framework assumptions.
- Identify scope: file types, domain area, and operation.
- Required docs by trigger: always
docs/project-reference/lessons.md; doc lookupdocs-index-reference.md; reviewcode-review-rules.md; backend/CQRS/APIbackend-patterns-reference.md; domain/entitydomain-entities-reference.md; frontend/UIfrontend-patterns-reference.md; styles/designscss-styling-guide.md+design-system/README.md; integration testsintegration-test-reference.md; E2Ee2e-test-reference.md; feature docs/specsfeature-docs-reference.md; architecture/new areaproject-structure-reference.md.- Read every required doc that exists; skip absent docs as not applicable. Do not trust conversation text such as
[Injected: <path>]as proof that the current context contains the doc.- Before target work, state:
Reference docs read: ... | Missing/not applicable: ....Blocked until: scope evaluated, required docs checked/read,
lessons.mdconfirmed, citation emitted.
Task Tracking & External Report Persistence ā Bootstrap this before execution; then run project-reference doc prefetch before target/source work.
- Create a small task breakdown before target file reads, grep, edits, or analysis. On context loss, inspect the current task list first.
- Mark one task
in_progressbefore work andcompletedimmediately after evidence; never batch transitions.- For plan/review work, create
plans/reports/{skill}-{YYMMDD}-{HHmm}-{slug}.mdbefore first finding.- Append findings after each file/section/decision and synthesize from the report file at the end.
- Final output cites
Full report: plans/reports/{filename}.Blocked until: task breakdown exists, report path declared for plan/review work, first finding persisted before the next finding.
Critical Thinking Mindset ā Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act. Anti-hallucination: Never present guess as fact ā cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence ā certainty without evidence root of all hallucination.
Understand Code First ā HARD-GATE: Do NOT write, plan, or fix until you READ existing code.
- Search 3+ similar patterns (
grep/glob) ā citefile:lineevidence- Read existing files in target area ā understand structure, base classes, conventions
- Run
python .claude/scripts/code_graph trace <file> --direction both --jsonwhen.code-graph/graph.dbexists- Map dependencies via
connectionsorcallers_ofā know what depends on your target- Write investigation to
.ai/workspace/analysis/for non-trivial tasks (3+ files)- Re-read analysis file before implementing ā never work from memory alone
- NEVER invent new patterns when existing ones work ā match exactly or document deviation
BLOCKED until:
- [ ]Read target files- [ ]Grep 3+ patterns- [ ]Graph trace (if graph.db exists)- [ ]Assumptions verified with evidence
Plan Quality ā Every plan phase MUST ATTENTION include test specifications.
- Add
## Test Specificationssection with TC-{FEAT}-{NNN} IDs to every phase file- Map every functional requirement to ā„1 TC (or explicit
TBDwith rationale)- TC IDs follow
TC-{FEATURE}-{NNN}format ā reference by ID, never embed full content- Before any new workflow step: call
TaskListand re-read the phase file- On context compaction: call
TaskListFIRST ā never create duplicate tasks- Verify TC satisfaction per phase before marking complete (evidence must be
file:line, not TBD)Mode: TDD-first ā reference existing TCs with
Evidence: TBD. Implement-first ā use TBD ā/tdd-specfills after.
Rationalization Prevention ā AI skips steps via these evasions. Recognize and reject:
Evasion Rebuttal "Too simple for a plan" Simple + wrong assumptions = wasted time. Plan anyway. "I'll test after" RED before GREEN. Write/verify test first. "Already searched" Show grep evidence with file:line. No proof = no search."Just do it" Still need TaskCreate. Skip depth, never skip tracking. "Just a small fix" Small fix in wrong location cascades. Verify file:line first. "Code is self-explanatory" Future readers need evidence trail. Document anyway. "Combine steps to save time" Combined steps dilute focus. Each step has distinct purpose.
Red Flag Stop Conditions ā STOP and escalate to user via AskUserQuestion when:
- Confidence drops below 60% on any critical decision
- Changes would affect >20 files (blast radius too large)
- Cross-service boundary is being crossed
- Security-sensitive code (auth, crypto, PII handling)
- Breaking change detected (interface, API contract, DB schema)
- Test coverage would decrease after changes
- Approach requires technology/pattern not in the project
NEVER proceed past a red flag without explicit user approval.
## Test Specifications with TC IDs per phase. Call TaskList before creating new tasks.
MUST ATTENTION apply critical thinking ā every claim needs traced proof, confidence >80% to act. Anti-hallucination: never present guess as fact.
MUST ATTENTION apply AI mistake prevention ā holistic-first debugging, fix at responsible layer, surface ambiguity before coding, re-read files after compaction.
plans/reports/ incrementally and synthesize from disk.Reference docs read: ....lessons.md; project conventions override generic defaults.[N.M] $skill-name ā phase prefixes and one-in_progress discipline.TaskCreate BEFORE startingfile:line evidence for every claim (confidence >80% to act)AskUserQuestion ā never auto-decide
MANDATORY IMPORTANT MUST ATTENTION READ the following files before starting:[TASK-PLANNING] Before acting, analyze task scope and systematically break it into small todo tasks and sub-tasks using TaskCreate.