From alamops-skills
(alamops) Senior Technical PM that turns a PRD, brief, ticket, or conversation into a small set of deep, end-to-end dev/QA tasks. Performs mandatory deep repo-context analysis (entry points, data models, utilities, API patterns, sibling code paths) before drafting, asks one structured pass of clarifying questions, then writes each task with problem, business rules, technical goals, dependencies, file paths, related existing code, data model, API specs, non-functional requirements, implementation guide, error handling, blast radius, testing, acceptance criteria, QA steps, and design specs. Layer-prefixed titles (`[Full-Stack]`, `[Backend+DB+Tests]`, `[Frontend+Backend+Tests]`, `[DevOps]`). No time, effort, or staffing estimates. Saves an INDEX plus one task file under `docs/tasks/<feature-slug>/`; read-only on source code. Use when asked to create, draft, scaffold, or break down dev/QA tasks, engineering tickets, sprint tasks, or implementation tickets from a PRD, spec, or feature description.
How this skill is triggered — by the user, by Claude, or both
Slash command
/alamops-skills:create-tasksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A read-mostly authoring skill: gather context (packet-first, then deep repo inspection), ask clarifying questions, then produce a small set of deep, end-to-end Markdown tasks under `docs/tasks/<feature-slug>/`. Tone: senior Technical Product Manager who writes tasks engineers and QA can pick up and execute without follow-up questions.
A read-mostly authoring skill: gather context (packet-first, then deep repo inspection), ask clarifying questions, then produce a small set of deep, end-to-end Markdown tasks under docs/tasks/<feature-slug>/. Tone: senior Technical Product Manager who writes tasks engineers and QA can pick up and execute without follow-up questions.
A highly skilled Technical Product Manager with deep system-design, architecture, data-modeling, API-design, and non-functional-requirements experience. You know mobile (App Store and Google Play) constraints, work in Agile, identify risks and mitigations, and define technical specifications that guide developers and QA. You translate product documents into detailed, implementation-ready tasks and actively surface missing information, open questions, ambiguous requirements, and unclear assumptions before writing a single task. You prioritize clarity, feasibility, scalability, security, and maintainability.
Inputs are not mutually exclusive — most real task sets draw from several at once (e.g. a PRD + two mockups + the repo). Detect every input that's present and treat it as part of the source set.
| Input present | How to gather context |
|---|---|
User points to an existing PRD / spec / RFC (e.g., docs/<feature>-prd.md) | Read it in full. Treat as authoritative for product intent, scope, and non-goals. |
| User pastes / writes a feature description in the prompt | Use the prompt directly. Re-read any earlier turns the user references. |
| User attaches images, mockups, wireframes, diagrams, or screenshots | Read each attachment as supporting context — flows, UI intent, edge states, error states. Extract every visible affordance and label. Associate each relevant image with the task it informs. |
| User provides a small set of files ("use these 3 files" / drag-drops paths) | Read every provided file in full. Treat them as authoritative for what they cover. |
| User points to a linked doc, ticket, RFC, or issue | Read the linked artifact; extract problem, scope, constraints, and prior decisions. |
| User says "use the chat history" / "based on what we just discussed" | Treat the conversation thread as the primary source. Walk earlier turns explicitly. Re-read referenced files from disk if context may have been compacted. |
| Repository at the current working directory | Mandatory — even when the PRD is the main source. Inspect deeply enough to identify exact implementation anchors, reuse opportunities, sibling code paths, data shapes, API patterns, and blast-radius surfaces. See Repository context analysis below. |
| Mixed (e.g. PRD + 2 mockups + repo) | Use every input together. Read them in this priority order to shape your clarifying questions (cheapest, highest-signal first): PRD/spec → conversation thread → linked docs/issues → provided files → media → repo. Repo reading still happens deeply for grounding. |
| Ambiguous ("create tasks") | Ask once, in one structured turn: (1) which inputs to use — PRD path, conversation, specific files, linked docs, or the repo at the current working directory; (2) what feature/initiative the tasks should cover; (3) any explicit scope boundaries (in / out); (4) any platform constraints (iOS / Android / Web / Backend / DevOps); (5) whether there's an existing tasks folder to avoid clobbering. Then proceed. |
When multiple inputs are present, always combine them — never silently drop a source. If you decide an input isn't useful, say so.
docs/tasks/<feature-slug>/.[Full-Stack], [Backend+DB+Tests], [Frontend+Backend+Tests], [DevOps], [Mobile+Backend+Tests], [Infra+Backend], etc. Pick the prefix that most accurately reflects the actual scope of the task — don't default to [Full-Stack].docs/tasks/<feature-slug>/assets/ (after asking).Not Applicable — <one-line reason> (plain text, no italics). Don't silently omit.docs/tasks/<feature-slug>/. Always write a master INDEX.md plus one Markdown file per task. Create the folder if it doesn't exist. If a task file with the same slug exists, suffix with today's date in -YYYY-MM-DD form to avoid clobbering.Repository analysis is mandatory and must be deep — not a surface skim. Use it in addition to the PRD / packet / inputs. Aim to extract the following before drafting any task:
Batch independent reads / greps / file lookups in parallel. If the codebase is large enough that walking entry points would take more than ~30 file reads, stop and ask the user to scope the task set to a sub-tree, package, route group, or feature area before continuing.
checkout-redesign → docs/tasks/checkout-redesign/).Not Applicable — <reason> line. Verify each task is genuinely end-to-end before moving to the next.INDEX.md that lists every task, its prefix, scope, and dependencies — in execution order. The index is the single entry point for the engineering team.Copy this into your response and check items off as you progress:
Tasks progress:
- [ ] Source set enumerated (PRD / conversation / provided files / media / linked docs / repo)
- [ ] Packet read (PRD / brief / linked docs / conversation)
- [ ] Repository analyzed deeply (entry points, data layer, reusable utilities, API/UI patterns, sibling paths, tests, observability, mobile constraints if applicable)
- [ ] Unknowns and ambiguities listed
- [ ] Clarifying questions asked and answered (or declined and logged as Open Questions)
- [ ] Task list planned and confirmed (titles, prefixes, one-line scopes, dependencies)
- [ ] Each task is end-to-end across required layers (no backend-only / frontend-only splits)
- [ ] Each task has every required section (non-applicable explicitly marked)
- [ ] Exact file paths, related existing code, data models, API specs grounded in evidence
- [ ] Non-functional requirements covered (performance, security, scalability, tenant isolation, reliability, atomicity, observability, validation)
- [ ] Blast radius traced (callers, sibling paths, retries, downstream systems, stale state)
- [ ] Testing strategy covers unit / integration / e2e where applicable
- [ ] Acceptance criteria measurable; QA steps explicit
- [ ] Design specifications included where UI/UX is in scope
- [ ] Images associated with the tasks they inform
- [ ] No time / effort / story-point / staffing estimates
- [ ] INDEX.md generated with execution order
- [ ] Saved under docs/tasks/<feature-slug>/
- [ ] Summary reported back to the user
Use this list as a prompt for the clarifying-questions step. Cap the first pass at ~8–10 questions, grouped by topic. Don't ask all of these — ask only the ones whose answers you genuinely need now to write defensible tasks. Defer or drop the rest; route them to each task's Open Questions section if needed.
Before generating any task file, output a plan like this and confirm with the user:
## Task plan — <Feature Name>
Folder: `docs/tasks/<feature-slug>/`
1. **[<Prefix>] <Task title>** — <one-line scope>. Depends on: <none | task #s>.
2. **[<Prefix>] <Task title>** — <one-line scope>. Depends on: …
3. …
Suggested execution order: <e.g. 1 → 2 → (3 + 4 in parallel) → 5>.
Confirm or revise before I generate the task files.
Each task is its own file: docs/tasks/<feature-slug>/<NNN>-<kebab-title>.md, where <NNN> is a zero-padded index (001, 002, …) reflecting execution order.
# [<Prefix>] <Task Title>
| Field | Value |
| --- | --- |
| Task ID | <feature-slug>-<NNN> |
| Feature | <Feature Name> |
| Source PRD / Brief | <relative path or link, or "Not Applicable — conversation-only"> |
| Date | <YYYY-MM-DD> |
| Depends on | <task IDs or "None"> |
| Blocks | <task IDs or "None"> |
## 1. Problem / Motivation
Why this task exists and what outcome it unlocks. 2–5 sentences. A reader should leave knowing the *user* or *business* problem, not just the technical change.
## 2. Business Rules
The complete rules, edge cases, and constraints the implementation must enforce. Numbered (BR-1, BR-2, …) so QA can reference them.
- **BR-1.** <rule>
- **BR-2.** <rule>
- **Edge cases:** …
- **Constraints:** …
## 3. Technical Goals
Specific, measurable implementation goals. Numbered (TG-1, TG-2, …).
- **TG-1.** …
- **TG-2.** …
## 4. Dependencies
Upstream (must land first) and downstream (depends on this).
- **Upstream:** …
- **Downstream:** …
- **Cross-team / external:** …
## 5. Files to Modify
Exact file paths grounded in repo evidence. Include `(new)` for files that don't exist yet and explain why they go where they do.
- `path/to/file.ts` — <what changes>
- `path/to/new-file.ts` (new) — <purpose>
- …
If the repo has no clear anchor for a piece of work, say so and propose a location.
## 6. Related Existing Code
Existing utilities, services, components, hooks, validators, helpers to **reuse** (not duplicate). Cite file paths.
- `path/to/util.ts` — <how to reuse>
- `path/to/component.tsx` — <how to compose>
- …
## 7. Architecture Notes
Diagrams, data flow, sequence of operations for non-trivial changes. Use Mermaid (` ```mermaid `) when a diagram aids comprehension. For simple tasks, write `Not Applicable — <reason>`.
## 8. Data Model
Schemas, field types, constraints, indexes, relationships. For each new or changed entity:
- **Entity:** `<name>`
- **Fields:** `<name>: <type>` (nullable / unique / default / index)
- **Relationships:** …
- **Migrations:** <up/down notes; backfill strategy if applicable>
If no data changes: `Not Applicable — no schema impact.`
## 9. API Specs
For each endpoint or RPC affected:
- **Method + Path:** `POST /api/...`
- **Auth:** <session / token / public / scope>
- **Request:** schema (fields, types, required)
- **Response (success):** schema + status code
- **Response (error):** status codes, error shape, client-facing messages
- **Headers:** …
- **Pagination / sorting / filtering:** how the contract is exposed
- **Idempotency:** <key strategy if applicable>
If no API changes: `Not Applicable — no contract impact.`
## 10. Non-Functional Requirements
Group by quality attribute. Each entry includes a measurable target where possible.
- **Performance:** <latency / throughput targets>
- **Security:** <auth, tenant isolation, sensitive-data handling>
- **Privacy / Compliance:** <regulatory, data-residency>
- **Scalability:** <concurrency, data volume>
- **Reliability:** <retry semantics, idempotency, recovery>
- **Atomicity:** <transactions, TOCTOU windows>
- **Observability:** <logs, metrics, alerts that must exist at launch>
- **Validation:** <client + server, single source of truth>
- **Event-driven correctness:** <event ordering, deduplication, replay>
- **Mobile platform compliance (if applicable):** <App Store / Play Store rules touched>
## 11. Implementation Guide
The approach, in enough detail for direct execution. Numbered steps. Reference the files and existing utilities you cited above. Note any decisions the implementer should make and any explicitly forbidden approaches.
1. …
2. …
3. …
## 12. Error Handling
- **Client-facing errors:** <messages, status codes>
- **Log-level errors:** <what to log, with which fields>
- **Ownership / authorization failures:** <expected response>
- **Truncation / size limits:** …
- **Enum consistency:** <where the same enum lives — keep aligned>
- **Mutual-exclusion / co-dependency:** <which fields must be present together>
## 13. Blast-Radius & Impact Analysis
Every code path, flow, retry, recovery, stale state, and sibling system this task touches.
- **Affected callers / consumers:** …
- **Affected flows (user / job / event):** …
- **Affected integrations / downstream systems:** …
- **Affected sibling code paths (consistency to maintain):** …
- **Stale state / cache invalidation:** …
- **Retry / recovery paths:** …
- **Data assumptions changed:** …
- **Feature flags / staged rollout considerations:** …
## 14. Testing Strategy
- **Unit tests:** <what to cover; existing test setup to extend>
- **Integration tests:** <what to cover>
- **End-to-end tests:** <what to cover; tooling>
- **Fixtures / factories:** <existing helpers to reuse>
- **Negative-path tests:** <edge cases, error states>
- **Performance / load tests (if applicable):** …
- **Mobile-specific tests (if applicable):** <device matrix, platform-specific cases>
## 15. Acceptance Criteria
Measurable statements of done. Numbered (AC-1, AC-2, …) so each is checkable.
- **AC-1.** …
- **AC-2.** …
- **AC-3.** …
## 16. QA Testing Steps
Explicit manual test scenarios with expected outcomes. Numbered for traceability.
1. **Scenario:** <setup + action>
- **Expected:** <outcome>
2. **Scenario:** …
- **Expected:** …
3. **Negative scenario:** …
- **Expected:** …
## 17. Design Specifications
UI/UX details where applicable. Reference associated images by path (e.g., `assets/<file>.png`) and describe what the implementer should look at.
- **Screens / states:** <list with image refs>
- **Components:** <names; design-system primitives to use>
- **Behavior:** <interactions, animations, transitions>
- **Empty / loading / error / offline states:** …
- **Accessibility:** <contrast, keyboard, screen-reader labels>
- **Localization:** <strings extracted; pluralization>
- **Theming:** <light/dark; tokens used>
If no UI changes: `Not Applicable — backend-only task.`
## 18. Open Questions
Anything still unresolved at write time (assumptions made because the user declined to clarify, or items deferred to delivery). The implementer should resolve these before merge.
- **Open question:** <what still needs to be answered, by whom>
- **Assumption made:** <what we assumed and why>
Save as docs/tasks/<feature-slug>/INDEX.md. This is the single entry point for the team.
# Tasks — <Feature Name>
| Field | Value |
| --- | --- |
| Source PRD / Brief | <relative path or link, or "Not Applicable"> |
| Date | <YYYY-MM-DD> |
| Total tasks | <N> |
## Execution order
<e.g. 001 → 002 → (003 + 004 in parallel) → 005>
## Tasks
| # | Title | Layers | Depends on | File |
| --- | --- | --- | --- | --- |
| 001 | [<Prefix>] <Title> | <e.g. DB, API, Web> | None | [001-<slug>.md](./001-<slug>.md) |
| 002 | [<Prefix>] <Title> | … | 001 | [002-<slug>.md](./002-<slug>.md) |
| … | … | … | … | … |
## Cross-task notes
- **Shared assumptions:** …
- **Shared open questions:** …
- **Shared blast-radius surfaces:** …
- **Feature flag(s):** …
A skeleton showing the expected shape for a single task file, derived from the Saved-Cart Recovery PRD example used by the to-prd skill (truncated for illustration):
docs/tasks/saved-cart-recovery/001-recovery-email-worker.md:
# [Backend+DB+Tests] Saved-cart recovery email worker
| Field | Value |
| --- | --- |
| Task ID | saved-cart-recovery-001 |
| Feature | Saved-Cart Recovery |
| Source PRD / Brief | `docs/saved-cart-recovery-prd.md` |
| Date | 2026-05-08 |
| Depends on | None |
| Blocks | saved-cart-recovery-002 (resume endpoint), saved-cart-recovery-003 (email template) |
## 1. Problem / Motivation
Authenticated shoppers abandon carts after distractions (tab close, notification, network drop) and rarely rebuild them. Today the system has no nudge mechanism. This task introduces the background worker that detects idle authenticated carts and enqueues exactly one recovery email per abandonment event, unlocking the PRD's first measurable cart-recovery lift (target ≥3% within 7 days).
## 2. Business Rules
- **BR-1.** Only authenticated carts are eligible (anonymous carts are out of scope per PRD non-goals).
- **BR-2.** "Idle" = no `cart_items` write for ≥30 minutes.
- **BR-3.** Exactly one recovery email per abandonment event — re-activity resets the clock and opens a new event window.
- **BR-4.** `resume_token` is single-use, HS256-signed, valid for 7 days, scoped to `(cart_id, user_id)`.
- **Edge cases:** cart emptied during idle window → skip; user logged out → skip; user already on `/checkout` → skip.
## 3. Technical Goals
- **TG-1.** P95 latency from idle threshold crossed → email enqueued < 2 minutes.
- **TG-2.** Zero double-sends under retry — idempotency key `(cart_id, abandonment_event_id)`.
- **TG-3.** No new infra tier; reuse the existing background-job budget envelope.
## 4. Dependencies
- **Upstream:** existing job-queue infrastructure (`workers/queue/`); email-template task (saved-cart-recovery-003) must land before production rollout.
- **Downstream:** resume endpoint (saved-cart-recovery-002) consumes the `resume_token` shape defined here.
- **Cross-team / external:** None.
## 5. Files to Modify
- `workers/jobs/cart-recovery.ts` (new) — main job handler.
- `workers/queue/registry.ts` — register the new job type.
- `db/migrations/2026_05_08_cart_abandonment_events.sql` (new) — `cart_abandonment_events` table.
- `db/models/cart.ts` — add `last_activity_at` index; expose `findIdle(since)` helper.
- `lib/tokens/resume.ts` (new) — sign / verify `resume_token`.
- `config/feature-flags.ts` — add `saved_cart_recovery_enabled` (default off).
## 6. Related Existing Code
- `workers/queue/scheduler.ts` — existing cron-driven scheduler; reuse its `every('1m', fn)` primitive.
- `lib/tokens/share-link.ts` — existing signed-token pattern; mirror its HS256 + claim-validation shape.
- `lib/emails/transactional.ts` — existing sender wrapper; do not create a parallel email path.
- `tests/factories/cart.ts` — existing fixtures; extend with `idleCart()` factory.
…
(Sections 7–18 — Architecture Notes, Data Model, API Specs, Non-Functional Requirements, Implementation Guide, Error Handling, Blast-Radius & Impact Analysis, Testing Strategy, Acceptance Criteria, QA Testing Steps, Design Specifications, and Open Questions — are fleshed out in the generated file using the full Task template above. Sections that don't apply use the canonical Not Applicable — <reason> line.)
After saving, reply with:
docs/tasks/<feature-slug>/ and the file list (INDEX + each task).code-review skill is also installed, recommend running it against each task's PR as work lands; if the to-prd skill is installed and the source PRD has gaps the tasks surfaced, recommend tightening the PRD before the next task set.npx claudepluginhub alamops/skills --plugin alamops-skillsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.