j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan
deepworkplan
VerifiedDeepWorkPlan — turn any repo AI-first and run Deep Work Plans. Routes to create, execute, refine, resume, status, verify, upgrade, and repo-onboarding sub-skills based on intent. Use when the developer wants to plan, execute, manage, or verify structured multi-task work, or make a repository AI-agent-ready.
examples/ORCHESTRATOR_TASK_TEMPLATE_create_child_dwp.md
View on GitHub# Task {N}: Create Child DWP — {Repository Name}
> **Template for orchestrator plans.** Replace known placeholders when generating
> a real task file. `{CHILD_PLAN_NAME}` is a runtime variable bound only after
> the target repository allocates its next plan ID. Substitute that basename
> when running commands and writing child records; do not edit approved parent
> task markdown merely to fill in the ID.
## 1. Context
**Plan Type:** Orchestrator — Child DWP Creation
**Target Repository:** `repositories/{repo_name}/`
**Child Plan Slug:** `{feature}_{repo_short}` (the full `{CHILD_PLAN_NAME}` is allocated during this task)
This task creates a complete DWP plan inside `repositories/{repo_name}/` that implements the {repo_name}-specific portion of the overall feature. The child DWP will follow {repo_name}'s own AGENTS.md, validation commands, and conventions.
### Orchestrator Context
- **Parent Plan:** {PARENT_PLAN_NAME} (this plan, in Core Hub)
- **Feature:** {overall feature description}
- **This repo's role:** {what this repo contributes — e.g., "CRUD API endpoints for user preferences"}
- **Depends on:** {list child plans that must complete first, or "None — this is the first child DWP"}
- **Depended on by:** {list child plans that depend on this one's outputs, or "None"}
- **Manifest:** `.dwp/plans/{PARENT_PLAN_NAME}/ORCHESTRATOR_MANIFEST.md` {or "Not used"}
### Input Dependencies (from predecessors)
{If this child has predecessors, list what outputs it expects from them:}
- From {PREDECESSOR_PLAN_NAME}: {the concrete artifacts that plan declared — e.g., "analysis_results/API_CONTRACT.md with endpoint definitions and data model schemas"}
- {Or "None — this is the first child DWP in the dependency chain"}
### Output Declarations (for successors)
{What this child DWP is expected to produce for downstream consumers:}
- Declared output artifacts: {the exact files this child will write for downstream use — e.g., "analysis_results/API_CONTRACT.md: endpoint paths, request/response schemas, data model definitions"}
- Key outputs: {specific outputs — e.g., "API endpoint URLs, error response formats, pagination patterns"}
- {Or "None — no downstream child DWPs depend on this one's outputs"}
### Expected Child DWP Scope
The child DWP should cover approximately {N} tasks, including:
- {high-level task 1 — e.g., "Add data model and migration"}
- {high-level task 2 — e.g., "Create serializer/validation"}
- {high-level task 3 — e.g., "Add API views/endpoints"}
- {high-level task 4 — e.g., "Security hardening pass over the new endpoints"}
- {high-level task 5 — e.g., "Write comprehensive tests"}
- {high-level task 6 — e.g., "Update documentation"}
- Plus the single mandatory Final Review (security pass + final-state validation + skills reconciliation + documentation reconciliation)
## 2. Read Before Starting
**CRITICAL — Read target repo documentation first:**
1. `repositories/{repo_name}/AGENTS.md` — Rules, validation commands, tech stack, conventions
2. `repositories/{repo_name}/guide/GUIDE.md` — DWP guide (if exists)
**If DWP system doesn't exist in target repo:**
- Bootstrap it following Core Hub's guide as template
- Create: `.dwp/` folder structure with adapted GUIDE
- Adapt validation commands and conventions to the target repo's tech stack
**From parent plan (if applicable):**
- {Previous task} Completion & Log: {what to extract, e.g., "API contract decisions from design task"}
- {Previous task} Outputs: {e.g., "analysis_results/API_CONTRACT.md"}
## 3. Goal
Create a complete, executable DWP plan inside `repositories/{repo_name}/` that:
- Implements {repo-specific goal — e.g., "user preferences CRUD API with model, serializer, views, and tests"}
- Follows {repo_name}'s AGENTS.md rules and conventions
- Uses {repo_name}'s validation commands (e.g., `{validation_command}`)
- Contains approximately {N} atomic tasks plus mandatory final tasks
- Can be executed independently by an agent working in that repository
- References the parent orchestrator plan for context
## 4. Instructions
> **Before starting:** Re-read the plan README section 1 (Goal) to ensure this task's work aligns with the overall objective.
### Step 1: Read the Orchestrator Context Manifest and navigate to target repository
**Read the Orchestrator Context Manifest first (if it exists):**
- Read `ORCHESTRATOR_MANIFEST.md` from the parent plan folder
- Extract: shared context (design decisions, API contracts, global constraints)
- Note the dependency graph and this repo's position in it
- Note what predecessor outputs this child DWP will need (Input Dependencies)
- Note what outputs this child DWP must produce (Output Declarations)
**Navigate to target repository:**
```bash
# Save the Core Hub root before entering the child — resolving the git root
# while inside the child would return the child, not the hub.
HUB_ROOT="$(git rev-parse --show-toplevel)"
# Enter the child by its REGISTERED root (from ORCHESTRATOR_MANIFEST.md).
# repositories/{repo_name}/ is the convention, not a hardcoded requirement.
cd repositories/{repo_name}
```
> [!NOTE]
> Do not carry a hub `DWP_DIR` into the child: resolve the child's `.dwp/` in a
> subshell with `unset DWP_DIR`, or set an explicitly recorded child-specific
> override.
Read the following files completely:
- **`AGENTS.md`** — Extract and note:
- Validation commands (e.g., `codecheck -f`, `npm run test && npm run eslint:check`)
- Test file naming convention (e.g., `*.spec.ts`, `*_test.py`)
- Linting command (e.g., `npm run eslint:check`, `codecheck -f`)
- Test command (e.g., `npm run test`, `pytest`)
- Package manager (npm, Poetry, etc.)
- Docker requirements (e.g., API Services must run inside Docker)
- Commit format and scope conventions
- Import order rules, code style rules
- **`guide/GUIDE.md`** (if exists) — Note any repo-specific DWP conventions
- **Architecture documentation** — Any relevant patterns or conventions docs
### Step 2: Design the child DWP tasks
Based on this repo's role in the feature, break down the work into atomic tasks:
- Each task should have one clear objective
- Tasks should be ordered by dependency
- Each task should be independently completable
- Include validation using the target repo's commands
**{repo_type}-specific task patterns:**
{Include the appropriate pattern based on repo type:}
**For API repos (Django/Python):**
1. Model/migration
2. Serializer
3. View/endpoint
4. URL routing
5. Tests
6. Documentation
**For Web repos (Vue/TypeScript):**
1. API client/service layer
2. Pinia store / state management
3. Component(s)
4. View/route
5. Tests
6. Documentation
**For Chatbot repos (Node.js/TypeScript):**
1. Handler
2. Parser / intent recognition
3. Response builder
4. Tests
5. Documentation
**For Gateway repos (Express/TypeScript):**
1. Command registration
2. Handler implementation
3. Response formatting
4. Tests
5. Documentation
### Step 3: Create the child DWP plan
From the target repository, allocate the child folder once with `shared/plan_paths.py --plans-dir <dwp_dir>/plans allocate <slug>` (use `--max-words 4` for a v5 child). Bind `{CHILD_PLAN_NAME}` to the returned basename and create the plan at:
```
repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/
```
The target repository owns the child ID. Never derive it from the parent ID, and never rename an existing child plan.
Create all required files:
**README.md:**
```markdown
# Plan: {Feature Title} — {Repo Name}
> This is a child DWP created by orchestrator plan `{PARENT_PLAN_NAME}` in the Core Hub.
## 1. Goal
{Repo-specific goal}
## 2. Context
{Tech stack and context from the repo's AGENTS.md}
## 3. Global Guidelines
{Guidelines from the repo's AGENTS.md — validation, linting, commit format}
## 4. Task List & Links
- [ ] Task 1: {title}
See: [1.task_{name}.md](./1.task_{name}.md)
...
- [ ] Task N: Final Review
See: [{N}.task_final_review.md](./{N}.task_final_review.md)
## 5. Execution Rules for the Agent
{Standard execution rules}
## 6. Orchestrator Context
> This child DWP is part of orchestrator plan `{PARENT_PLAN_NAME}` in the Core Hub.
### Parent Plan Reference
- **Parent Plan:** {PARENT_PLAN_NAME}
- **Parent Location:** `.dwp/plans/{PARENT_PLAN_NAME}/` (in the Core Hub)
- **Manifest:** `.dwp/plans/{PARENT_PLAN_NAME}/ORCHESTRATOR_MANIFEST.md` (in the Core Hub)
- **This repo's role:** {what this repo contributes}
- **Dependencies:** {which child plans must complete first}
### Shared Context (from parent plan)
<!-- Snapshot of key shared context at child DWP creation time -->
**Key decisions:**
- {Decision 1 from parent plan — e.g., "Use JSON field for preferences storage"}
- {Decision 2 from parent plan — e.g., "REST API endpoints at /api/v1/preferences/"}
**API contract summary (if applicable):**
- {Endpoint/method/path summaries relevant to this repo}
**Global constraints:**
- {Constraint 1 — e.g., "All field names in snake_case"}
- {Constraint 2 — e.g., "Error responses follow standard format"}
### Input Dependencies
{If this child DWP has predecessors, execution is BLOCKED until inputs are available:}
> ⚠️ **EXECUTION BLOCKED** until all inputs are available.
| Predecessor | Status | Declared Output Path |
|-------------|--------|----------------------|
| {PREDECESSOR_PLAN_NAME} | [ ] Ready | `repositories/{predecessor_repo}/.dwp/plans/{PREDECESSOR_PLAN_NAME}/analysis_results/{declared_artifact}` |
**Before starting execution:**
1. Verify the predecessor plan is complete (`state.json` → `status: completed`) and each declared artifact above exists
2. Read those artifacts — extract API endpoints, data models, key decisions
3. If a declared artifact is missing, STOP and report: "Cannot start — waiting for {predecessor} to complete"
4. Use predecessor context throughout execution, especially for integration-related tasks
{Or if no predecessors: "None — this child DWP has no predecessors and can execute immediately."}
### Expected Outputs
{What this child DWP must produce for downstream consumers:}
- **Declared artifacts:** `analysis_results/{file}` — {what each contains for downstream use}
- **Key outputs for successors:** {e.g., "API endpoint definitions, data model schemas, error handling patterns"}
- **Executive Report:** only if this orchestrator explicitly requested one when creating this child; it is optional under DWP 2.3.0 and is never assumed to exist.
- {Or "No downstream consumers — this is the last child DWP in the chain."}
## 7. Plan Status / Notes
- Created: {date}
- Status: Not started — 0/{N} tasks completed
## 8. Quick Reference
See [PROMPTS.md](./PROMPTS.md) for ready-to-use prompts.
```
**Task files (`N.task_{title}.md`):**
- Use the target repo's validation commands (NOT the Core Hub's)
- Use the target repo's test naming patterns
- Use the target repo's commit format and scope
- Include re-anchoring instruction in each task
- Include Execution Checklist with Dailybot reporting step
**PROMPTS.md** — Using the target repo's template if available, or Core Hub's
**PROGRESS.md** — Initial template
**analysis_results/** — Empty folder (with .gitkeep)
**Mandatory final task** — the single Final Review, last (`{N}.task_final_review.md`)
### Step 4: Return to Core Hub and update orchestrator tracking
```bash
cd "$HUB_ROOT" # Return to the SAVED Core Hub root (never a hardcoded path)
```
Update the orchestrator plan's README.md:
- Mark this child DWP's row: `[x] Created / [ ] Executed`
- Add the child plan's full path in notes if helpful
## 5. Acceptance Criteria
- [ ] Target repo's AGENTS.md was read and its rules extracted
- [ ] Child DWP plan folder created at `repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/`
- [ ] README.md references parent orchestrator plan
- [ ] README.md uses target repo's conventions (validation, test patterns, etc.)
- [ ] All task files use target repo's validation commands
- [ ] Task files reference target repo's test naming convention
- [ ] Task files use target repo's commit format and scope
- [ ] PROMPTS.md, PROGRESS.md, analysis_results/ all created
- [ ] The single Final Review is included as the last task
- [ ] Orchestrator plan's Child DWP Plans table updated (`[x] Created`)
- [ ] Child DWP README includes "Orchestrator Context" section with shared context snapshot
- [ ] Child DWP README includes "Input Dependencies" section (with blocking notice if applicable)
- [ ] Child DWP README includes "Expected Outputs" section
- [ ] Manifest referenced in child DWP README (if manifest exists)
## 6. Outputs
- **Created:** `repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/`
- **Updated:** Parent plan README (Child DWP Plans table)
## 7. Validation
```bash
# Verify child plan structure
test -f repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/README.md && echo "PASS: README exists" || { echo "FAIL" >&2; exit 1; }
test -f repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/PROMPTS.md && echo "PASS: PROMPTS exists" || { echo "FAIL" >&2; exit 1; }
test -f repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/PROGRESS.md && echo "PASS: PROGRESS exists" || { echo "FAIL" >&2; exit 1; }
test -d repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/analysis_results && echo "PASS: analysis_results exists" || { echo "FAIL" >&2; exit 1; }
# Verify child plan uses target repo's conventions
grep -q "{validation_command}" repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/README.md && echo "PASS: Uses repo validation" || { echo "FAIL" >&2; exit 1; }
# Verify parent plan updated
grep -q "{CHILD_PLAN_NAME}" .dwp/plans/{PARENT_PLAN_NAME}/README.md && echo "PASS: Parent updated" || { echo "FAIL" >&2; exit 1; }
# Verify parent reference in child
grep -q "{PARENT_PLAN_NAME}" repositories/{repo_name}/.dwp/plans/{CHILD_PLAN_NAME}/README.md && echo "PASS: Parent referenced" || { echo "FAIL" >&2; exit 1; }
```
## 8. Execution Checklist
- [ ] 1. Read this task file fully.
- [ ] 2. Navigate to target repository.
- [ ] 3. Read target repo's AGENTS.md — extract conventions.
- [ ] 4. Read target repo's DWP guide (if exists).
- [ ] 5. Design child DWP task breakdown.
- [ ] 6. Create child DWP plan with all required files.
- [ ] 7. Verify child DWP uses repo-specific conventions.
- [ ] 8. Return to the saved Core Hub root (`cd "$HUB_ROOT"`).
- [ ] 9. Update orchestrator README (Child DWP Plans table).
- [ ] 10. Run validation commands.
- [ ] 11. Update the plan README to mark this task as `[x]`.
- [ ] 12. Update PROGRESS.md with task summary.
- [ ] 13. Commit: `git commit -m "docs(technical): create child DWP for {repo_name} - Task {N} of {PARENT_PLAN_NAME}"`
- [ ] 14. Send Dailybot progress report (non-blocking).
- [ ] 15. Update the Log section below.
## 9. Completion & Log (filled by the agent)
- **Status:** (completed / blocked / failed validation)
- **Timestamp:**
- **Summary of work:**
- **Child DWP location:**
- **Child DWP task count:**
- **Repo conventions extracted:** (validation, test pattern, commit format)
- **Shared context injected:** (yes/no — list key items injected)
- **Input dependencies declared:** (list or "None")
- **Output declarations set:** (list or "None")
- **Validation results:**
- **Notes / follow-ups:**
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |