Design work tickets (PRD → Spec → Plan) in three stages. It first researches comparable products, recommends a project-specific direction, and grills requirements one decision at a time before orchestrating PM and Architect agents. Its terminal responsibility is promoting an approved ticket to pending/; it never executes the ticket.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Codoop Ticket?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/codoop-codoop-ticket)
---
name: codoop-ticket
description: Design work tickets (PRD → Spec → Plan) in three stages. It first researches comparable products, recommends a project-specific direction, and grills requirements one decision at a time before orchestrating PM and Architect agents. Its terminal responsibility is promoting an approved ticket to pending/; it never executes the ticket.
---
# Codoop-Ticket — Ticket Design Orchestration
Help users systematically design work tickets in-session through three stages: requirements, technical specs, and task breakdown.
## Project Paths
Read `[project_paths]` from `codoop_flow.toml`. If it is missing, run the
sibling `codoop-init` skill first. Values are the repository's real directories
and may use custom names. Generate implementation tasks only for configured
project types; describe unlisted systems only as external contracts.
## Scope Boundary
This skill ends after an explicitly approved ticket is validated, committed, and
promoted to `pending/`. Do not implement, run, verify, review, or ship the
ticket; do not invoke `codoop-execute` or otherwise consume the pending queue.
Those are Phase 3 responsibilities and require a separate user request.
## What is a Ticket?
A ticket is a complete design document package for one feature module:
| File | Purpose | Author |
|------|---------|--------|
| `module_prd.md` | Business requirements (pure business language, no tech) | PM agent |
| `spec.md` | Technical specification (APIs, DB, implementation details) | Architect agent |
| `preview.html` | Interactive offline design preview of a user-visible feature | Ticket agent, when required |
| `plan.md` | Implementation plan (steps) | Auto-inferred |
| `todo.md` | Atomic task list (≤100 lines code/task) | Auto-inferred |
| `metadata.json` | Ticket metadata (modules, execution settings) | Auto-inferred |
The table above shows a **feature** ticket. A **fix** ticket is
lighter — see "Ticket Types" below.
## Ticket Types
Every ticket has a `ticket_type` (stored in `metadata.json`, default `feature`):
| Type | For | Required docs | Skips |
|------|-----|---------------|-------|
| `feature` | New capability from a business need | `module_prd.md` + `spec.md` | — |
| `fix` | Repairing an existing bug/defect | `bug_report.md` | PRD + Spec stages |
`plan.md` + `todo.md` are recommended (not blocking) for **both** types.
**Inferring the type — decide automatically.** After the startup grilling
confirms shared understanding, infer the type
from the user's description (signals such as "fix", "bug", "error", or
"regression", including their equivalents in the user's language → `fix`;
otherwise `feature`) and scaffold. Do not ask the
user to confirm the type. If later context shows the type is wrong, change it
and regenerate the affected ticket documents.
Example:
```
User: Search-result pagination sometimes exceeds its bounds and errors. Please fix it.
codoop-ticket: Creating a fix draft with the lightweight bug_report.md flow
(skipping PRD/Spec)…
```
When initializing via CLI, pass the type explicitly:
`codoop-ticket.py ticket init <id> --type fix --config <toml>` (no inference —
the user already specified it).
## When to Use
- ✅ Design a complete ticket from business requirements
- ✅ Phase 1 has produced product and design specs; now design incremental feature tickets
- ✅ Need staged review or one-pass ticket generation after grilling
## Implementation Notes
Locate this `SKILL.md` as `$SKILL`. Invoke the plugin-level ticket CLI at
`$SKILL/../../runtime/codoop-flow/codoop-ticket.py`. Codex and Claude install
this Runtime once for all codoop-flow skills.
## Ticket Design Mode
Before Startup, reuse an explicit `--config <path>`; otherwise run
`$SKILL/../../runtime/codoop-flow/codoop.py config-path` from the target repo.
It resolves `.codoop-flow/codoop_flow.toml` at the Git root, falling back to the
legacy root file. Report the selected path when both exist. If no target or
config is known, ask for the missing path (or use codoop-init for onboarding).
Read `ticket_design_mode` from that file before deciding the ticket flow.
Its allowed values are `"strict"` and `"one_pass"`; a missing field means
`"strict"`. If the value is invalid, stop and ask the user to correct the
configuration rather than silently choosing a mode.
Read `output_language` from the same config. Use it for every user-facing
message, question, summary, generated ticket document, and delegated agent
prompt. `"auto"` or a missing field follows the user's current language. An
explicit request for the current task overrides the config. Translate scaffold
headings when writing the final documents; do not inherit a different language
from templates, research, or existing source files.
Read `user_role` from the same config; a missing value means `general`. It
changes only the live conversation: use normal professional terms inside the
user's field, and explain cross-field topics in plain language. The user's
current request for simpler or more professional language overrides it. Do not
apply this profile to ticket documents, code, reports, or delegated agent
prompts; those remain precise and professional.
- `"strict"`: use the existing phase-by-phase review and confirmation flow.
- `"one_pass"`: keep the Startup: Market Research and Grilling sequence
unchanged. Once the user confirms shared understanding, generate every
applicable ticket artifact in one pass: PRD or bug report, Spec when needed,
preview when needed, Plan, ToDo, and Metadata. Infer `visual_preview` and
`ui_capture` with the established standards; do not add a document-stage or
Metadata confirmation. Validate, show the completed ticket summary, and ask
once for explicit promotion approval.
Both modes require explicit approval before promotion to `pending/`. Do not
skip grilling or infer product decisions merely because `"one_pass"` is set.
## Startup: Market Research and Grilling
Before initializing a ticket or writing ticket documents, run this sequence:
1. Read `project_paths`, relevant `docs/backlog/`, project documentation, and existing code to establish project facts and constraints. For UI work, first locate the affected page in `.codoop-flow/ui-snapshots/index.json`; inspect only relevant UI sources and dependencies, not every page on every ticket.
2. For a **feature** ticket, use available web/search tools to identify relevant existing products. Prefer primary product pages and documentation; report only patterns that are relevant to the requested feature. If browsing is unavailable, state that plainly rather than inventing competitors. A **fix** ticket skips market research unless the user requests it.
3. Present a short, evidence-based recommendation: comparable patterns to keep, gaps or risks to avoid, and the tailored product direction that best fits this project's users, existing product decisions, architecture, and scope. Learn from competitors; do not copy branded UI, copy, or proprietary flows.
4. Load and run the `grilling` skill on the proposal. It asks one decision at a time, looks up facts from the project or available tools instead of asking for them, offers a recommended answer, and waits for the response before continuing.
5. Do not initialize, scaffold, or write ticket documents until the user confirms shared understanding. Then infer the ticket type and continue with the applicable flow below.
## Three Stages of Ticket Design
> **Applies to `feature` tickets.** For a `fix` ticket, skip Phase 1 (PRD) and
> Phase 2 (Spec): scaffold `bug_report.md` and guide the user to fill in
> Symptom / Reproduction / Root Cause / Expected Behavior / Scope, then go
> straight to task breakdown (`plan.md` + `todo.md`), metadata inference,
> validate, and promote. A fix may still add a `spec.md` voluntarily if it
> touches a contract/data-model change, but it is not required.
### 【Phase 1】Requirement Design (module_prd.md)
**Goal**: Understand business requirements and define feature boundaries.
**Process**:
1. Complete the Startup: Market Research and Grilling sequence.
2. PM agent writes `module_prd.md` from the confirmed direction and Phase 1 context.
3. In `"strict"` mode, you review, provide feedback, modify until satisfied.
**Example**:
```
User: Design an e-commerce product search feature
- Need keyword, category, and price range filtering
- Should integrate with existing product catalog
codoop-ticket: Researches comparable search experiences, recommends a
catalog-aware direction, then asks one decision at a time.
- Which catalog fields should shoppers be able to search? I recommend
name, category, and SKU because these match the existing catalog.
Reading Phase 1:
- docs/backlog/product/commerce-strategy.md
- docs/backlog/interface/search-ux.md
PM agent output:
✅ module_prd.md: business needs, user stories, acceptance criteria
```
### User-Facing Clarification Policy
**Keep asking; change the language, not the rigor.** In codoop-ticket
conversations, the user decides product outcomes, while the agent owns routine
implementation choices. These rules also apply when this skill invokes
`spec-driven-development` or `planning-and-task-breakdown`.
| Decision | How to handle it |
|----------|------------------|
| User goal, business rule, scope, priority, or acceptance experience | Ask the user in plain language. |
| Privacy, compliance, payment/cost, destructive or irreversible behavior | Explain the user-facing consequence and ask explicitly. |
| API shape, database/index choice, framework pattern, state management, or test layout | Inspect existing project conventions, choose a sound approach, and record it in `spec.md`; do not ask by default. |
| A technical choice that materially changes user experience, delivery scope, cost, or a global architecture contract | Ask about that consequence in plain language; keep the implementation detail as supporting context only if useful. |
Before asking a question, first use the ticket context and existing codebase to
resolve what can be resolved. Do not turn an internal uncertainty into a user
question merely because there are several valid technical implementations.
**Question format.** Ask one high-value question at a time, wait for the
answer, then ask the next. State the user-visible situation, give 2–3
everyday-language choices, and recommend one when appropriate. Avoid unexplained
terms such as API, schema, JWT, index, AND/OR logic, or state management.
```text
Avoid: “Should the filters use AND or OR?”
Ask: “When someone chooses ‘running shoes’ and ‘under ¥300’, should the list
show only products that meet both conditions, or products that meet either one?
I recommend ‘both’, so the results feel more precise.”
```
The agent may translate the user's plain-language answer into formal user
stories, acceptance criteria, BDD, and technical constraints in the documents.
`module_prd.md` remains business-only; `spec.md` remains precise and technical.
**Review summaries.** In `"strict"` mode, at each phase gate, lead with a short plain-language
summary: what users can do, what is intentionally out of scope, and which
decision (if any) needs approval. Offer the detailed PRD, spec, or plan for
review rather than requiring the user to understand it before they can respond.
Phase progression requires explicit approval only in `"strict"` mode;
promotion approval remains mandatory in both modes.
### 【Phase 2】Technical Spec (spec.md)
**Goal**: Design the technical contract and ensure implementation alignment.
**Process**:
1. Load `/skill spec-driven-development`
2. Design `spec.md` based on `module_prd.md`:
- implementation details for configured project types and their real paths
- external API behavior a configured client needs, without backend tasks
- database details only when `backend` is configured and owns the data
- UI interaction flows when applicable
3. Decide whether the feature creates or materially changes a user-visible screen, primary task flow, or interaction state. If it does, set `visual_preview: true` in `metadata.json` and generate `preview.html`; in `"strict"` mode, do this before asking the user to review the phase. Otherwise leave it `false` and state that no visual preview is needed.
4. In `"strict"` mode, you review, provide feedback, modify until satisfied.
#### Visual Preview (`preview.html`)
Generate this file only for a `feature` ticket with `visual_preview: true`.
Read [UI snapshot rules](../codoop-init/references/ui-snapshots.md) before creating it.
Deliver one self-contained, offline HTML file at the visual and interaction
standard of a shipped product. Use realistic mock data and local interactions
for the ticket's scope.
Before writing HTML, apply the plugin's role definitions to the same user task.
Read the [PM](../../runtime/codoop-flow/agents/product-sprint-prioritizer.md),
[UI Designer](../../runtime/codoop-flow/agents/design-ui-designer.md), and
[UX Architect](../../runtime/codoop-flow/agents/design-ux-architect.md) definitions.
Use their relevant criteria within the approved ticket scope.
- PM defines who starts where, what they need to accomplish, and how they know
it worked. Use the user's vocabulary and remove decisions and steps that do
not serve that goal.
- UI Designer owns hierarchy, density, typography, spacing, components, icon
consistency and visible states. Check the result at target viewport sizes.
- UX Architect walks the task from entry to outcome and recovery. Check sensible
defaults, action placement, preservation of inputs on recoverable errors, and
applicable keyboard, focus and responsive behavior.
Choose the design path for the affected surface before building it.
- **Existing product, including a new page inside it.** Start with the rendered
target screen or the closest real sibling flow. Use the checked HTML snapshot
as the editable baseline, following the evidence and refresh rules in the
snapshot reference. Reuse the actual shell, content hierarchy, components,
tokens, density, labels and interaction conventions. Apply only the changes
the task requires. Compare the surrounding UI side by side at matching
viewports. Consult `docs/backlog/interface/design-system.md` when present and
flag conflicts with the current UI.
- **New product without an interface foundation.** Start with the target user,
core task, platform conventions, brand assets and any agreed design direction.
Establish a coherent shell, type hierarchy, spacing, semantic colors and
component states before composing screens. Use believable content and density.
Reject generic hero sections, decorative gradients or glass effects, repeated
card grids, gratuitous badges and filler copy when they serve no product or
brand purpose. Every prominent element should help users orient, decide or act.
Inspect the project-root `resources/README.md` and relevant files under
`resources/` when present. Prefer the product's existing component and icon
mappings, then reuse matching project assets, including SVG icons, logos and
fonts, with their documented usage constraints. Preserve their intended size,
weight and meaning. Inline the assets needed by the preview for offline use.
Record reused asset paths and any fallback affecting visual fidelity in
`spec.md`.
##### Existing-screen fidelity checkpoint
For changes to an existing screen, complete this checkpoint before adding the
proposed feature to the HTML:
1. Identify current rendered evidence for the target screen: source revision,
viewport, theme and interaction state. Check the snapshot's relevant source
fingerprints. An old ticket preview is a proposal, not evidence of the
implemented screen. If the baseline is stale, missing or unverified, obtain
current rendered evidence and reconstruct only the affected screen first.
2. Render the unchanged HTML reconstruction and compare it with the real screen
at matching viewport, theme and state. Check navigation, titles, icons,
content bounds, fixed overlays, toolbars, bottom controls and panel placement.
Resolve differences before adding the feature. A schematic demonstrating the
feature cannot substitute for this comparison. For a new page inside an
existing product, establish the shared shell from the closest real sibling.
3. Record the comparison evidence and the intended visible differences in
`spec.md`. Then apply the approved change to the checked reconstruction;
preserve surrounding UI unless the confirmed scope changes it. The unchanged
comparison may be a temporary capture; no second deliverable HTML is required.
If current rendered evidence or browser rendering is unavailable, continue work
that does not depend on it, but mark this checkpoint incomplete. Any experimental
HTML must be labeled an unverified draft, not a faithful preview or ready design.
Resume the checkpoint before presenting a completed preview or requesting
promotion. Recording a limitation does not waive the fidelity requirement.
Keep review-only controls, device selectors and scenario switches outside the
simulated product screen and label them as review tools. Inside the screen, use
only existing controls and controls explicitly required by the confirmed scope.
Simulate the product's relevant interaction rather than silently replacing it
with a different visible control.
##### Preview internal acceptance
Run this acceptance loop on the generated HTML in both design modes before
requesting user review. Review the rendered result using the PM, UI Designer and
UX Architect criteria above. A file-existence check cannot establish acceptance.
The agent owns this review and repair loop in both `strict` and `one_pass` modes;
do not wait for the user to discover defects or request another iteration.
Before reviewing, derive a requirement checklist from the confirmed PRD, spec,
user constraints and shipped-product standards above. Include every in-scope
screen, primary action, interaction state and acceptance criterion. For each item,
record the expected behavior, the observed result in the latest rendered preview,
evidence and a verdict of passed, needs changes or incomplete. Explicitly assess
whether the result is a usable shipped-product design: realistic content, clear
hierarchy, coherent components and a complete task with visible outcomes and
recovery. A working demo flow alone does not satisfy these criteria.
Missing evidence or an unexercised requirement is incomplete, never passed.
1. **Visual review — UI Designer.** Open the HTML at representative target
viewports and inspect hierarchy, density, typography, spacing, icon consistency,
contrast and component states. For existing products compare with the actual
screen or verified baseline at the same viewport, theme and state. For new
products compare with the agreed visual direction and assets. Check long
content and applicable narrow layouts for clipping and overflow.
2. **Task review — PM and UX Architect.** Start at the intended entry point and
complete the primary task with realistic data. Check that labels and the primary
action are understandable, each step serves the task, and the outcome is visible.
Exercise applicable empty, loading, error, success and confirmation states,
including recovery and preservation of user input. Check keyboard operation and
visible focus. Surrounding navigation may remain visual context, but every
control required for the ticket's task must work.
3. **Runtime review.** Load the offline preview in a browser, exercise its task
controls and inspect console errors, missing assets and unexpected network
requests. Keep required assets inline and interactions local. Resolve errors
attributable to the preview and record tool or browser limitations.
4. **Agent feedback and repair.** Review the current rendered preview against
the requirement checklist and produce concrete feedback for every gap: the
violated requirement, affected screen/state, observed problem, user impact,
and the agent's recommended correction. Include visual and usability defects,
even when the main click path works. Apply in-scope corrections autonomously
before asking the user to review; listing suggestions alone is not completion.
Preserve confirmed requirements and surrounding UI. If a correction requires
a new product decision or a scope change, ask only for that decision and
continue independent repairs; keep the affected requirement incomplete.
5. **Recheck the latest result.** Reload the modified HTML in the browser, repeat
affected visual, task, runtime and fidelity checks, then complete the main task
again to catch regressions. Record each review round as problem → suggestion →
applied change → observed recheck result, with evidence of the final state.
Repeat until every applicable checklist item passes and no acceptance defect
remains. Do not stop after an arbitrary number of iterations, mark an item
passed merely because code was changed, or weaken requirements to obtain a
pass. If blocked by missing access, tools or baseline evidence, mark the review
incomplete and explain what is needed to resume.
Record a compact preview acceptance section in `spec.md`, including:
- Design path, baseline page IDs, revision and relevant input fingerprints,
reused assets, representative viewports and theme/state.
- Checks actually performed, their observed results and browser evidence
references when available.
- For existing screens, the unchanged-screen comparison result and the final
comparison showing that differences are limited to the confirmed scope.
- Requirement checklist with expected versus observed results and per-item verdicts.
- Agent feedback and repair rounds: defects, recommended corrections, applied
changes and observed recheck results, plus any remaining limitations. If no
defects were found, record the checks supporting that conclusion; do not invent
defects or perform gratuitous changes to demonstrate iteration.
- Overall result of passed, needs changes or incomplete. A pass requires all
applicable checks to have run and all acceptance defects to be resolved.
Before validation or promotion, write `preview-acceptance.json` in the ticket
folder. The runtime blocks visual tickets without this review contract:
```json
{
"result": "passed",
"design_path": "existing_product",
"sha256": {"preview.html": "<SHA-256 of reviewed file>", "spec.md": "<SHA-256 of reviewed file>"},
"unresolved_defects": [],
"checks": {
"visual": {"result": "passed", "observations": "<viewports, states and observed visual results>", "evidence": ["evidence/visual.png"]},
"task": {"result": "passed", "observations": "<steps, state coverage, recovery and keyboard results>", "evidence": ["evidence/task.md"]},
"runtime": {"result": "passed", "observations": "<browser, console, assets and network results>", "evidence": ["evidence/runtime.md"]},
"fidelity": {"result": "passed", "observations": "<unchanged and final baseline comparisons>", "evidence": ["evidence/comparison.png"]}
}
}
```
Evidence paths must be nonempty files inside the ticket directory; preserve them
on promotion. Use actual browser captures and observed logs, never invented
results or placeholder evidence. For a new product use `design_path: new_product`;
only fidelity may be `not_applicable`, with an explicit reason in observations.
Hash the final files after recording spec acceptance. Any subsequent HTML or spec
change invalidates the report: rerun affected checks and update the hashes only
after review. The runtime checks completeness and freshness, not aesthetic
quality; passing JSON validation cannot replace the browser acceptance loop.
Present the preview as ready for user review only after acceptance passes.
When blocked, report the incomplete result and remaining checks. Keep proposed
HTML in the ticket directory throughout creation, review and promotion.
Re-run affected acceptance checks whenever feedback changes the preview.
- In `"strict"` mode, present the preview and ask for explicit feedback before
Phase 3. Apply approved feedback to `module_prd.md` and `spec.md`, then regenerate
the preview if the change affects it. `"one_pass"` keeps its final review gate.
`visual_preview: true` makes `preview.html` a promotion requirement. It is independent from `ui_capture`, which checks screenshots of the real implementation after development.
**Example**:
```
spec.md includes:
## Backend API
- GET /api/products/search?q=...&category=...&price_min=...&price_max=...
- Response: { items: [...], total: N, page: 1 }
## Database
- Add columns to products table: search_vector (tsvector for full-text search)
- Add index: products_search_vector_idx
## Web UI
- SearchBar component: keyword input + filter sidebar
- ResultsList component: grid/list view toggle
- ResultItem component: product card with quick add-to-cart
```
### 【Phase 3】Task Breakdown (plan.md + todo.md)
**Goal**: Decompose into implementable, ordered atomic tasks.
**Process**:
1. Load `/skill planning-and-task-breakdown`
2. Break down tasks based on `spec.md`:
- `plan.md`: implementation steps (Step 1, Step 2, etc.)
- `todo.md`: atomic task list (each ≤100 lines code)
3. Reference `/skill definition-of-done` to understand completion standards
4. In `"strict"` mode, you review, provide feedback, modify until satisfied.
**Example**:
```
plan.md:
- Step 1: Backend API implementation + database migration
- Step 2: Web frontend SearchBar and ResultsList components
- Step 3: Web filter logic and state management
- Step 4: Mobile platform adaptation
todo.md:
- [ ] Task 1: Create search API endpoint (backend)
- [ ] Task 2: Add database full-text search index
- [ ] Task 3: Implement SearchBar React component
- ...(each task has acceptance criteria and verification steps)
```
### 【Auto Metadata Inference】Update metadata.json
**Process**:
1. Automatically infer from `spec.md`:
- `modules`: include only types present in `project_paths`. An external API section does not add `backend`.
2. Inspect the confirmed spec for new or changed user-visible screens,
interactions, or task flows:
- Keep `visual_preview: true` only when the Phase 2 preview was required
(and reviewed in `"strict"` mode); otherwise keep it `false`. Never enable it for a pure
backend, infrastructure, refactoring, or non-visual configuration ticket.
- If present, explain in plain language that the delivery can also check the
actual screens and interactions, save screenshots, and have UI/UX reviewers
inspect them. In `"strict"` mode, recommend enabling it and ask the user to
confirm; in `"one_pass"` mode, set it from the established standards.
- If the work is backend-only, infrastructure, refactoring, or otherwise has
no user-visible behavior, keep it off and state that no screenshot check is
needed.
3. Set `ui_capture` from that decision. In `"strict"` mode, show the complete
inferred `metadata.json` for the user to confirm or modify; in `"one_pass"`
mode, continue directly to validation and the final promotion decision.
Ask about the outcome, not the field name. For example:
```text
This change affects what people see and click. Should delivery also check the
actual screens and interactions? If enabled, the test run saves screenshots and
UI/UX reviewers inspect them, which can catch layout and flow problems. I
recommend enabling it. Confirm?
```
**Example**:
```json
{
"ticket_id": "ticket_001",
"title": "E-commerce Product Search Feature",
"modules": ["backend", "web", "mobile"],
"max_healing_attempts": 3,
"visual_preview": true,
"ui_capture": true
}
```
`ui_capture: true` requires delivery screenshots under the ticket's
`public/qa-screenshots/`; no screenshots is a verification failure. Use `false`
when no user-visible behavior needs checking.
### 【Finalize】Validate & Release
**Process**:
1. Call `tickets_cli validate` to verify ticket completeness
2. Show the ticket summary (id / title / modules) and **ask the
user to confirm** promotion
3. Only after explicit approval, run `codoop-ticket.py ticket promote` to move
the ticket to `pending/` and create a dedicated `docs(ticket): add <ticket_id>`
commit. The command stages and commits only that ticket directory; it must
not include other working-tree changes.
4. Ticket complete: stop after the commit and `pending/` promotion. Do not
start Phase 3 development or invoke `codoop-execute`.
**Promote requires explicit user approval.** Never promote a draft to
`pending/` without the user confirming in the current conversation. Do not
pass `--force` (or pipe `yes` into the prompt) unless the user has already
approved — `pending/` is the Loop 3 pickup queue, so an unreviewed promote
means an agent may start building from an unapproved design.
---
## How to Use
### Launch Ticket Design
Describe what you want to build in natural language:
```
/skill codoop-ticket
I want to design an e-commerce product search feature with keyword, category, and price range filtering that integrates with the existing catalog.
```
Or concisely:
```
/skill codoop-ticket
Design the e-commerce search feature for our platform.
```
### Phase Confirmation Flow (`"strict"` only)
In `"strict"` mode, after each phase, you review and confirm:
```
User: This PRD looks good, move to spec phase
codoop-ticket: OK, loading spec-driven-development, starting technical spec...
(Spec design complete)
User: I need to change the API to use POST instead of GET...
codoop-ticket: Updated. Do you want to proceed?
User: Yes, move to task breakdown phase
...and so on
```
---
## Integration with Other Phases
### Integration with Phase 1 (Venture-Discovery)
codoop-ticket automatically reads Phase 1 outputs:
- `docs/backlog/product/` — product specifications
- `docs/backlog/interface/` — interface specifications
- `docs/backlog/architecture/` — architecture specifications
- `docs/backlog/modules/` — module breakdown
These serve as context to PM and Architect agents, ensuring tickets align with the global plan.
### Handoff to Phase 3 (Agent-Centric)
When the ticket is complete, Phase 3 receives via `metadata.json`:
- `modules`: affected areas
The ticket is now available for Phase 3 to pick up in a separate execution
request; codoop-ticket must stop here.
---
## Design Guidance
### Agent Scope Instructions
When calling PM and Architect agents, codoop-ticket clarifies scope:
```
This is a ticket design phase for "<module_name>" PRD.
Focus on business requirements, user stories, acceptance criteria for this module.
If business model, GTM strategy, or cross-module impact surfaces, confirm with user.
```
```
This is ticket-scoped technical spec design, building on existing architecture.
Focus on implementation inside the configured project path. Record external API needs as contracts, not backend work.
If global architecture changes, performance overhauls, or scope expansion surfaces, confirm with user.
```
This lets agents intelligently flag "out of scope" decisions rather than guessing.
### Quick & Precise vs. Global Discovery
Ticket design differs from Phase 1 discovery:
- **Phase 1**: Global 0→1, requires consistency audit, multi-role debate, comprehensive specs
- **Phase 2**: Incremental module scope, needs speed & precision, just PM + Architect, module-focused
No need for global consistency checks at ticket level (Phase 1's job).
---
## Command-Line Interface (CLI)
### Standalone Usage
Loop 2 can be used independently via CLI without requiring codoop-flow:
```bash
# Initialize a new ticket draft (feature by default)
python3 $SKILL/../../runtime/codoop-flow/codoop-ticket.py \
ticket init ticket_001 --config .codoop-flow/codoop_flow.toml --title "Add user search"
# Initialize a fix ticket (scaffolds bug_report.md instead of PRD + Spec)
python3 $SKILL/../../runtime/codoop-flow/codoop-ticket.py \
ticket init ticket_002 --type fix --config .codoop-flow/codoop_flow.toml --title "Fix pagination overflow"
# Validate ticket completeness
python3 $SKILL/../../runtime/codoop-flow/codoop-ticket.py \
ticket validate ticket_001 --config .codoop-flow/codoop_flow.toml
# Promote a confirmed ticket from drafts/ to pending/ and commit that ticket
python3 $SKILL/../../runtime/codoop-flow/codoop-ticket.py \
ticket promote ticket_001 --config .codoop-flow/codoop_flow.toml
# Update metadata.json from docs
python3 $SKILL/../../runtime/codoop-flow/codoop-ticket.py \
ticket update-metadata ticket_001 --config .codoop-flow/codoop_flow.toml
```
### Independent Workflow
Loop 2 does not depend on the execution skill. It uses the shared plugin Runtime
and requires a `codoop_flow.toml` pointing to the target project.
For setup, use:
`python3 $SKILL/../../runtime/codoop-flow/codoop.py setup <target-repo>`