Pack Availability Guard
Before telling the user to run a skill from another project-local pack, check .agents/project.json.enabled_packs. If the target pack is not enabled, recommend npx skillpacks install <pack> instead of the target skill. Only the currently running skill and skills verified available in the active session or project-local install state are directly recommendable. For unavailable pack skills, recommend npx skillpacks install <pack-or-skill>; for unavailable base skills, recommend npx skillpacks init before the skill.
Research Roadmap - Documentation Queue Manager
Invoke as $research-roadmap.
Use this skill to make the project documentation contract complete before build work continues. It scans research, specs, and task docs, then updates tasks/todo.md with immediately actionable documentation work and uses tasks/record-todo.md or tasks/recurring-todo.md for non-blocking future documentation records.
Do not run the queued research skills from this skill. The job here is to maintain the documentation queue so the user can complete research and planning artifacts in the right order.
Queue direct skill commands only: the unchecked todo item must name the research or planning skill itself, such as $customer-discovery, $journey-map, or $devtool-user-map. Do not prepend $exec, $exec --phase, or any execution-loop wrapper to named research-skill routes; users invoke those research skills directly.
When an existing canonical research artifact needs only a bounded low/medium post-canonical amendment, queue $research-amend instead of a full rerun. This applies to narrow corrections such as one missed competitor, one corrected source fact, or a small evidence update with a known affected section. Preserve full rerun routing for high-impact or systemic changes: changed ICP/category strategy, competitor-set changes that alter positioning, broad source staleness, conflicts spanning multiple frameworks, or anything that requires re-synthesis. Do not route review-pending Pattern A alignment pages to $research-amend; those pages continue through their approval YAML until the approved artifact has been written.
Process
0. Product-Path Scope Resolution
Resolve research scope by product path before using code or app structure as a hint:
- If
$ARGUMENTSnames a non-archivedresearch/{slug}/directory or a product-path ID whosescope_pathpoints there, use that path. Treat{slug}as the product/app name, not the ICP, audience, or segment label. - If
$ARGUMENTSnames onlyresearch/_archive/{slug}/or a manifest entry withstatus: archivedor legacystatus: abandoned, stop and warn that the path is archived; do not write or update scoped outputs there. - Read
research/.progress.yamlwhen present. Normalize legacyactive_pathtoactive_pathson read and write backactive_pathson manifest updates. Treat legacyabandonedasarchived; excludearchived,abandoned,deferred,revisit_candidate,promoted, and anyscope_pathunderresearch/_archive/from active target selection. - If active product paths exist in the manifest, use those paths. If multiple active paths exist, ask which one to target unless this skill explicitly supports cross-path output.
- If no active manifest target exists, list non-archived product directories under
research/, excludingresearch/_archive/and dot directories. Auto-select only when exactly one exists; ask when multiple exist. - If no product directories exist, use flat
research/single-product mode. - Detect monorepo/app/package structure only as a secondary hint. Suggest creating a missing
research/{slug}/product path when code clearly exposes an app, but do not require code or monorepo detection before usingresearch/{slug}/.
When product path {slug} is active, read and write research under research/{slug}/, specs under specs/{slug}/, and treat top-level research/*.md files as flat-mode documents or cross-path summaries.
0. Parse Mode Arguments
Parse $ARGUMENTS for mode flags:
--post-prototype: Post-prototype research refresh mode--post-spec: Post-spec research refresh mode- No flags: default documentation queue mode (existing behavior)
If --post-prototype is present, skip to the Post-Prototype Process below.
If --post-spec is present, skip to the Post-Spec Process below.
Otherwise, continue with the standard process starting at step 1.
1. Resolve Project Pack
- Read
.agents/project.jsonif it exists. - Use
project_typeandenabled_packsto decide which project-pack research skills apply. - If
.agents/project.jsonis missing, infer the project type from repository signals:- game: game engine files, Steam/store assets, playable prototypes, or game-specific README/spec language
- devtool: SDK, CLI, API, library, infra, docs, examples, or package-first developer workflow
- business-app: SaaS, marketplace, productivity, workflow, enterprise, or user-facing app
- If the project type cannot be inferred, default to
business-app. - If an expected pack is not installed, add a priority todo for
npx skillpacks install <pack>before pack-specific research todos.
2. Resolve Documentation Roots
Treat top-level research/, specs/, and tasks/ as canonical.
- If a canonical root exists, use it directly.
- If a canonical root is missing, search shallowly near the repo root for likely aliases such as
docs/,planning/,notes/, orwork/. - Prefer roots that contain multiple expected documentation files over isolated matches.
- If no credible task root exists, create/update top-level
tasks/todo.md; createtasks/record-todo.mdortasks/recurring-todo.mdonly when advisory items exist. - If a fallback root is used for research or specs, mention it in the generated todo item reasons.
For writing the priority queue, prefer tasks/todo.md. Use a fallback task root only when the project already has a clear existing task contract and no top-level tasks/ directory. Do not put condition-gated records or recurring obligations into tasks/todo.md unless they are immediately actionable execution work.
Read research/.progress.yaml when present. Normalize active_path (singular legacy) to active_paths (plural list) when reading; treat legacy abandoned as archived and exclude archived/deferred/revisit/promoted paths plus research/_archive/ scopes from active target selection. Interpret active_paths as the current product/app/ICP focuses and product_paths[] as the product-path manifest. Valid statuses include active, deferred, archived, promoted, and revisit_candidate; these are research product-path states, not git branches.
3. Discover Research-Producing Skills
Build the research queue from enabled project packs. Include every enabled research-producing skill whose output is missing or stale, even if its prerequisites are not yet present. When prerequisites are missing, keep the item in the queue but note that it is blocked by earlier documentation items.
Prefer dynamic discovery when skill files are available:
- Inspect enabled pack skill files under
.codex/skills/*/SKILL.mdorpacks/<pack>/codex/*/SKILL.md. - Include skills with
type: research. - Also include skills whose
## Outputsection writesresearch/*.md,research/{slug}/*.md,research/experiments/*.md, or dated research files.
If dynamic discovery is unavailable, use these fallback maps.
Business-app research outputs:
| Skill | Output |
|---|---|
$customer-discovery |
research/icp.md |
$competitive-analysis |
research/competitive-analysis.md |
$journey-map |
research/journey-map.md |
$positioning |
research/positioning.md |
$metrics |
research/metrics.md |
$gtm |
research/gtm.md |
$monetization |
research/monetization.md |
$landing-copy |
research/landing-copy.md |
$customer-feedback |
research/customer-feedback.md |
$assumption-tracker |
research/assumption-tracker.md |
$experiment |
research/experiments/<experiment>.md |
$enterprise-icp |
research/enterprise-icp.md |
$risk-register |
research/risk-register.md |
$burn-rate |
research/burn-rate.md |
$runway-model |
research/runway-model.md |
$cohort-review |
research/cohort-review-YYYY-MM-DD.md |
$retro |
research/retro-YYYY-MM-DD.md |
$investor-update |
research/investor-update-YYYY-MM.md |
$platform-strategy |
research/platform-strategy.md |
$product-line review |
research/.progress.yaml |
$mvp-gap |
research/mvp-gap.md |
Game research outputs:
| Skill | Output |
|---|---|
$game-audience |
research/game-audience.md |
$game-fantasy |
research/game-fantasy.md |
$game-genre-map |
research/game-genre-map.md |
$game-comparables |
research/game-comparables.md |
$game-core-loop |
research/game-core-loop.md |
$game-prototype-test |
research/game-prototype-test.md |
$game-playtest-metrics |
research/game-playtest-metrics.md |
$game-store-page-test |
research/game-store-page-test.md |
$game-launch |
research/game-launch.md |
Devtool research outputs:
| Skill | Output |
|---|---|
$devtool-user-map |
research/devtool-user-map.md |
$devtool-integration-map |
research/devtool-integration-map.md |
$devtool-dx-journey |
research/devtool-dx-journey.md |
$devtool-adoption |
research/devtool-adoption.md |
$devtool-positioning |
research/devtool-positioning.md |
$devtool-monetization |
research/devtool-monetization.md |
$devtool-docs-audit |
research/devtool-docs-audit.md |
Also include documentation-producing non-research skills when their outputs are missing or stale:
| Skill | Output |
|---|---|
$idea-scope-brief |
research/idea-brief.md or research/{slug}/idea-brief.md |
$user-flow-map |
specs/user-flow-*.md or specs/{slug}/user-flow-*.md |
$spec-interview |
specs/*.md |
$ux-variations |
specs/ux-variations-*.md |
$ui-interview |
specs/ui-*.md |
$scale-audit |
specs/scale-audit.md |
$roadmap |
tasks/roadmap.md, tasks/todo.md |
$game-roadmap |
tasks/roadmap.md, tasks/todo.md |
$reconcile-research fix all |
research/reconciliation-report.md |
$reconcile-dev-docs fix all |
reconciled tasks/, specs/, and phase archives |
$youtube-audit |
research/youtube-audit-YYYY-MM-DD.md |
4. Scan Documentation State
Record existence and last-modified timestamps for:
- all discovered research outputs
research/idea-brief.mdand product-path-scopedresearch/{slug}/idea-brief.mdwhen presentresearch/*-search-log.mdandresearch/*-interview.mdonly as supporting context, not primary completion artifactsspecs/*.mdand product-path-scopedspecs/{slug}/*.mdspecs/user-flow-*.mdand product-path-scopedspecs/{slug}/user-flow-*.mdspecs/ux-variations-*.mdand product-path-scopedspecs/{slug}/ux-variations-*.mdspecs/ui-*.mdand product-path-scopedspecs/{slug}/ui-*.mdprototypes/prototype directories and consolidated prototype directories when presenttasks/roadmap.mdtasks/todo.mdtasks/history.mdtasks/ideas.mdtasks/manual-todo.mdtasks/record-todo.mdtasks/recurring-todo.md
When research/ contains product-path subdirectories, treat it as product-path mode. Build a separate documentation queue per product path and include product-path arguments in commands, such as $customer-discovery web.
5. Classify Missing And Stale Items
An item is missing when its expected output file does not exist.
An item is stale when a newer upstream document should invalidate or refresh it. Include the exact timestamps in the todo reason. Use these default rules:
| Newer input | Stale target |
|---|---|
research/idea-brief.md or research/{slug}/idea-brief.md |
matching research/icp.md or research/{slug}/icp.md |
research/customer-feedback.md |
research/icp.md, research/journey-map.md, research/monetization.md, research/landing-copy.md |
research/icp.md |
research/competitive-analysis.md, research/positioning.md, research/gtm.md, research/monetization.md, research/landing-copy.md |
research/competitive-analysis.md |
research/positioning.md, research/gtm.md, research/monetization.md, research/landing-copy.md |
research/positioning.md |
specs/user-flow-*.md, research/gtm.md, research/landing-copy.md |
research/journey-map.md |
specs/user-flow-*.md, research/metrics.md, research/gtm.md, research/monetization.md, research/landing-copy.md |
research/metrics.md |
research/cohort-review-*.md, research/runway-model.md, research/investor-update-*.md |
research/gtm.md |
research/monetization.md, research/runway-model.md, research/investor-update-*.md |
research/monetization.md |
research/burn-rate.md, research/runway-model.md, research/investor-update-*.md |
research/experiments/*.md with results |
research/assumption-tracker.md |
research/cohort-review-*.md latest |
research/metrics.md, research/gtm.md, research/monetization.md, research/investor-update-*.md |
research/enterprise-icp.md |
specs/scale-audit.md |
research/journey-map.md |
specs/user-flow-*.md, specs/*.md, specs/ux-variations-*.md, specs/ui-*.md, research/metrics.md, research/gtm.md, research/monetization.md, research/landing-copy.md |
specs/user-flow-*.md |
specs/ui-*.md, specs/ux-variations-*.md, prototypes/**, tasks/roadmap.md |
any non-UX/UI specs/*.md |
specs/ux-variations-*.md, specs/ui-*.md, tasks/roadmap.md |
specs/ui-requirements-*.md |
specs/ux-variations-*.md, prototypes/**, tasks/roadmap.md |
specs/ux-variations-*.md |
prototypes/**, tasks/roadmap.md |
specs/ui-*.md |
tasks/roadmap.md |
research/runway-model.md |
tasks/roadmap.md |
Also flag potentially stale specs when source code has commits newer than the spec files. Add $spec-drift fix all as a priority documentation item when specs are probably behind implementation.
Before queueing a full research rerun for stale existing canonical research, classify the change impact. If the scan finds a bounded low/medium correction to an already-approved artifact, queue $research-amend with the affected path and reason. If the change is high/systemic or its blast radius is unclear, keep the targeted skill rerun or synthesis/full Pattern A rerun.
Do not queue a missing $idea-scope-brief item for established projects that already have research/icp.md, research/competitive-analysis.md, research/journey-map.md, or specs/. Queue it only for idea-only projects where no idea brief or downstream research/spec artifact exists.
6. Order The Priority Queue
Order immediately actionable todo items so the user can complete documentation without guessing:
- Pack installation needed for the selected project type.
- Stale foundational research.
- Missing foundational research.
- Stale downstream research.
- Missing downstream research.
- Missing or stale flow/spec artifacts.
- Missing or stale user-flow, UI-requirements, UX/UI planning, and prototype artifacts for user-facing work, in that order.
- Missing or stale roadmap/task docs.
- Reconciliation items when conflicting docs are detected.
Within research items, use this dependency order when relevant. When emitting queued commands for pack-based skills, apply the Pack Availability Guard — if the target skill's pack is not in .agents/project.json enabled_packs, queue npx skillpacks install <pack> before the skill:
When research/.progress.yaml exists, show per-path pipeline progress alongside the priority queue. For each path in active_paths, show its pipeline_stage and queue the next missing research step. For deferred or revisit_candidate paths, add a concise record or queue note with the revisit_trigger and next_skill rather than scheduling full downstream research. When 3+ deferred paths accumulate with no recent activation, add $product-line review as a priority queue item to prompt portfolio review.
$idea-scope-brief
-> $customer-discovery
-> $competitive-analysis
-> $journey-map
-> $positioning
-> $user-flow-map
-> $ui-interview --requirements-only
-> $ux-variations --layout-mode
-> $prototype
-> $uat --variant-evaluation
-> $consolidate-prototypes
-> $research-roadmap --post-prototype
-> $spec-interview
-> $roadmap
-> $metrics
-> $gtm
-> $monetization
-> $landing-copy
3+ research docs -> $assumption-tracker -> $experiment -> $customer-feedback
$enterprise-icp -> $scale-audit
$metrics + launch data -> $cohort-review
$monetization -> $burn-rate -> $runway-model
quarterly/outcome data -> $retro
stakeholder reporting -> $investor-update
multi-product expansion -> $platform-strategy
3+ deferred product paths -> $product-line review
For game and devtool projects, follow the default pack flow from docs/skills-reference.md when available. Add review or planning skills such as $devtool-docs-audit and $game-roadmap only when their documented output is missing from the documentation contract.
Default devtool order:
$devtool-user-map
-> $devtool-integration-map
-> $devtool-dx-journey
-> $devtool-adoption
-> $devtool-positioning
-> $devtool-monetization
-> $devtool-docs-audit
-> $research-roadmap
6b. Classify Advisory Documentation Work
Before writing any queue, choose the correct task surface:
tasks/todo.md: missing/stale documentation work that can be performed now with available repo context and normal skill inputs.tasks/record-todo.md: one-time documentation records or measurements that are blocked on future conditions, production aggregate access, external reports, user-provided data, or launch data, and are not launch gates.tasks/recurring-todo.md: cohort reviews, retros, investor updates, playtest/adoption checks, docs-health checks, or other documentation jobs that recur on a cadence.
Record items must include task, source, condition, non-blocking reason, required data/access, measurement/query, target/acceptance note, revisit cadence/date, completion evidence, and promotion rule. Recurring items must include task, cadence, owner/agent, scope, trigger, last run, next due, command/skill, evidence/output path, and escalation conditions.
7. Update tasks/todo.md
Write a single top-level section named exactly:
## Priority Documentation Todo
Rules:
- If
tasks/todo.mddoes not exist, create it. - If a previous
## Priority Documentation Todosection exists, replace only that section. - Put the section before existing implementation work. If the file starts with a title or status block, keep that orientation text at the top and insert the priority section immediately after it.
- Preserve all other todo content exactly unless it is inside the old priority section.
- Do not mark existing implementation tasks complete.
- Do not remove unrelated todo sections.
- Use unchecked boxes only for missing/stale documentation work that is immediately actionable.
- Use checked boxes only when an item is already current.
Todo item format:
- [ ] `$skill [optional-app-or-argument]` - create/update `path/to/output.md` because [missing/stale reason with evidence].
The command must be the direct named skill route, for example $customer-discovery, not $exec $customer-discovery, $exec --phase, or another execution-loop wrapper.
If prerequisites are missing:
- [ ] `$metrics` - create/update `research/metrics.md` after `$journey-map`; currently blocked because `research/journey-map.md` is missing.
Do not write unavailable-data or cadence-gated items here. Write those to tasks/record-todo.md or tasks/recurring-todo.md instead.
7b. Update tasks/record-todo.md
When non-blocking condition-gated documentation records exist, append or replace a ## Documentation Records section in tasks/record-todo.md. Preserve all other sections exactly.
Use this item format:
- [ ] [record task]
- Source: [skill/spec/phase/criterion]
- Condition: [future condition or required access]
- Non-blocking reason: [why this does not block launch or current execution]
- Required data/access: [data, aggregate, portal, credential, or user-provided output]
- Measurement/query: [how to produce the record]
- Target/acceptance note: [threshold or expected note]
- Revisit: [date or cadence]
- Completion evidence: [research path, history entry, or report path]
- Promotion rule: [when to move into `tasks/todo.md`]
7c. Update tasks/recurring-todo.md
When recurring documentation work exists, append or replace a ## Documentation Recurring Work section in tasks/recurring-todo.md. Preserve all other sections exactly.
Use this item format:
- [ ] [recurring task]
- Cadence: [daily/weekly/monthly/quarterly/on release/etc.]
- Owner/agent: [$skill or responsible role]
- Scope: [project/app/area]
- Trigger: [time, release, data threshold, user request]
- Last run: [date or never]
- Next due: [date or rule]
- Command/skill: [$skill args]
- Evidence/output path: [research/report path]
- Escalation conditions: [when this becomes executable or blocking]
If all documentation is current:
- [x] Documentation is current; no missing or stale research, spec, roadmap, or task artifacts found.
8. Output To User
After editing, summarize:
## Research Roadmap Updated
- Wrote/updated `tasks/todo.md` and any needed advisory task files
- Priority documentation items: N
- Stale items: N
- Missing items: N
- Blocked-by-prerequisite items: N
- Record items: N
- Recurring items: N
Next: start at the first unchecked item in `tasks/todo.md`; review advisory task files separately. If there are no unchecked priority documentation items and no promotable advisory items, route to `$brainstorm` for candidate next-phase discovery unless the latest user request explicitly asks to pause, park, archive, or wait.
If fallback discovery was used, include a short note naming the inferred roots.
Next-Step Routing
Before handing back, identify the next concrete documentation, planning, or discovery route from project state.
Output exactly two lines beyond the normal report:
- Next work: <specific documentation task, promotable advisory review, discovery task, or explicit parked state>
- Recommended next command:
Rules:
- Recommend the first unchecked
## Priority Documentation Todoitem when one exists. - If a record or recurring item appears promotable to concrete execution work, recommend reviewing or promoting that item rather than discovery.
- Do not emit
Recommended next command: noneunless the latest user request explicitly asks to pause, park, archive, or wait. - If documentation is current and no advisory item is promotable, route to new-phase discovery:
**Next work:** discover candidate next phase or explicitly park the projectand**Recommended next command:** $brainstorm. - Use
$feature-interviewinstead of$brainstormwhen the project already has a concrete unspecced idea selected but still needs planning-destination triage. Use$spec-interviewonly when full-spec creation is already confirmed.
Post-Prototype Process (--post-prototype)
Gate
A consolidated prototype must exist at prototypes/{topic}/consolidated/. If missing, halt and recommend $consolidate-prototypes first.
When an AFPS graduation document exists at design/afps-graduation-{topic}.md or design/{slug}/afps-graduation-{topic}.md, read it before scanning research. Treat it as the durable marker that research/prototyping is complete and production planning can begin after cleanup and $spec-interview.
Scan
- Read the consolidated prototype directory to understand what was built.
- Read the AFPS graduation document when present. Use its source prototypes reviewed, UAT evidence used, final MVP decisions, rejected alternatives, unresolved risks or assumptions, and stale research cleanup status to bound the cleanup pass.
- Read only research docs needed to validate contradictions, stale assumptions, or blocking pre-spec risks. Start with
research/idea-brief.md,research/icp.md,research/competitive-analysis.md,research/journey-map.md, and any research explicitly named by the graduation document. Readspecs/user-flow-*.mdwhen present as the approved flow-structure bridge between research and prototype. - For each relevant research document, compare against the consolidated prototype and graduation decisions:
- User flows: Does the prototype's flow match the journey map's discovery -> onboarding -> aha -> conversion -> retention path?
- Approved flow map: Does the prototype preserve the
specs/user-flow-*.mdentry points, screen order, decisions, branches, required states, failure/recovery paths, and handoffs? - Onboarding: Does the prototype's first-run experience match ICP expectations for technical sophistication and time-to-value?
- Density and copy: Does the prototype's information density and copy tone match ICP communication preferences?
- Interactions: Do the prototype's interaction patterns match journey-map touchpoints and competitive differentiation?
- Differentiation: Does the prototype demonstrate the competitive advantages identified in competitive analysis?
- Queue only research that is contradicted, made stale by prototype/graduation decisions, or required before
$spec-interview. Do not reload broad research packs or recommend broad discovery skills merely because they are normally upstream. - If
research/positioning.mdexists and contains> Mode: Market Positioning, flag it only when the graduation document or consolidated prototype contains customer-facing product evidence that contradicts or materially sharpens the existing positioning. Use: "Positioning was hypothesized pre-product. Prototype evidence may support re-running$positioning productfor customer-grounded product positioning."
Output
Populate tasks/todo.md ## Priority Documentation Todo with research skills that need re-running, using the same format as the standard process. Each item must explain what the prototype revealed that contradicts or supersedes the current research document.
If the graduation document is present and no contradictions, stale assumptions, or blocking pre-spec research gaps are found, write the checked status item: - [x] Post-prototype research cleanup is current; AFPS graduation reviewed and no blocking research refresh is required before $spec-interview.
Next step: first unchecked queued item in tasks/todo.md, using the direct skill command written in that item.
Post-Spec Process (--post-spec)
Gate
A production spec must exist at specs/{topic}.md. If missing, halt and recommend $spec-interview first.
Scan
- Read the production spec to understand implementation constraints.
- Read all research docs.
- For each research document, compare against spec constraints:
- Auth model: Does the research assume an auth model that the spec changed?
- Data model: Does the research assume data structures that the spec redesigned?
- Performance: Does the research assume performance characteristics that the spec's architecture contradicts?
- Deployment: Does the research assume a deployment model that the spec changed?
- Flag research documents that are invalidated by spec constraints.
- If
research/positioning.mdexists and contains> Mode: Market Positioning, flag as: "Positioning was hypothesized pre-product. Spec constraints and prototype evidence may support re-running$positioning productfor customer-grounded product positioning."
Output
Populate tasks/todo.md ## Priority Documentation Todo with research skills that need re-running. Each item must explain what spec constraint invalidates the current research document.
Next step: first unchecked queued item in tasks/todo.md, using the direct skill command written in that item.
Constraints
- Update
tasks/todo.md,tasks/record-todo.md, andtasks/recurring-todo.md; it must not run the queued skills. - Preserve user-authored todo content outside
## Priority Documentation Todo. - Preserve user-authored record/recurring content outside
## Documentation Recordsand## Documentation Recurring Work. - Every stale item must include timestamp evidence.
- Every enabled research-producing skill must be represented unless its output is present and fresh.
- Prefer canonical
research/,specs/, andtasks/paths over aliases. - In product-path mode, include product-path-scoped commands and output paths.
- Do not put condition-gated measurements, future validation records, or cadence-based research jobs into
tasks/todo.mdunless they are immediately executable. - Do not create or modify source code.
Alignment Page
Follow the shared alignment-page convention via the packaged convention resolver; output path is alignment/research-roadmap-{topic}.html. By default, report results inline and write only this skill's normal durable artifacts; create an alignment page only when explicitly requested or when a concrete clarification/review need cannot be handled cleanly inline.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.