Generate new CPS work items by scanning project knowledge, transcripts, and structural gaps. Tier 1 (Ideation Mode): lightweight Idea candidates. Tier 2 (Creative Design): structured design session to Roadmap or Task entries. Both bypass capture gate. Triggers: "ideation mode", "generate ideas", "scan for ideas", "what could I build", "creative design", "design session", "help me design", "brainstorm".
Generate new work items by scanning project knowledge, transcripts, and structural gaps.
Tier 1 (Ideation Mode) produces lightweight Idea candidates; Tier 2 (Creative Design) runs
a structured design session yielding Roadmap or Task entries. Both bypass the capture gate.
Server-side SCAN via portal /creative/scan endpoint. LLM judgment retained for synthesis,
ranking, and full Tier 2 design sessions.
Full design spec: Documentation/md/design-cps-creative.md.
Read portal port from <session_dir>/portal-port.txt. Base URL: http://localhost:{port}.
If portal unreachable: degrade to index-only reads (old pattern).
| Phrase | Route |
|---|---|
| "ideation mode", "generate ideas", "scan for ideas", "what could I build" | Tier 1 |
| "creative design", "design session", "help me design", "brainstorm" |
| Tier 2 |
| EMPTY-STATE auto-trigger (backlog + Roadmap + Ideas all empty) | Tier 1 |
ideas_empty_sessions counter >= 3 in EMPTY-STATE | Auto-offer Tier 2 |
Four phases: SCAN -> GENERATE -> SURFACE -> SEED.
POST /api/projects/current/creative/scan with optional body:
{ "grep_limit": 20, "completion_log_lines": 10 }
Server reads 6 index files, greps TODO/FIXME/HACK/XXX, reads completion log. Returns:
{
"scan_hits": [
{ "source_category": "index|todo|completion_log|transcript_meta",
"source_file": "...", "signal": "...", "signal_type": "gap|saturated|sparse|deferred_work|follow_up|deferred|error",
"entries": ["..."] // optional, for index categories
}
],
"summary": {
"total_hits": 12,
"by_category": { "index": 6, "todo": 4, "completion_log": 2 },
"gaps": ["patterns", "ideas"]
}
}
Session metadata enrichment (Claude-side): Server cannot access MCP session tools.
After receiving server scan_hits, optionally call mcp__session_info__list_sessions to scan
recent session titles for signal words ("should", "annoying", "keep having to", "what if",
"idea", "wish", "broken", "slow", "missing"). Append matches to scan_hits.
Degrade silently if MCP unavailable.
Print one-line summary: "Scan: [N] hits -- [X] gaps, [Y] deferred work, [Z] follow-ups."
Fallback (portal unreachable): Read the 6 index files directly + grep. Session scan + completion log still Claude-side. Significantly more tokens but functional.
Read current_constraint and project_goal from portal: GET /api/projects/current/meta.
Process scan_hits into 3-5 candidate ideas using these heuristics in order:
Cap at 5. Fill by diversity-first: one per heuristic type, then strongest remaining.
For each candidate assign:
| Field | How |
|---|---|
title | Verb + noun, 5-10 words |
source | "[source_category]: [signal]" |
constraint_alignment | exploits (directly serves) / elevates (removes bottleneck) / subordinates (orthogonal) |
rationale | One sentence connecting signal to project goal |
Deduplicate against existing Ideas, Roadmap, and active tasks (from scan_hits entries data). Drop duplicates: same verb + same noun domain.
Rank: exploits > elevates > subordinates. Within tier: diversity tiebreaker, then
heuristic order.
Present via AskUserQuestion with multiSelect: true.
Label: "Ideation scan found [N] candidates. Select ideas to capture:"
Options: each candidate as title -- rationale.
For each selected candidate, invoke cps-capture with bucket: Ideas and
source: cps-creative. Capture gate bypass applies.
Four phases: CLARIFY -> IDEATE -> DEVELOP -> DELIVER. All LLM judgment -- no portal offload.
Run Tier 1 SCAN (portal /creative/scan) to get server-side scan_hits.
Then enrich Claude-side:
mcp__session_info__list_sessions + read_transcript for 3-5 recent sessions. Scan for: "we should..." (aspirational), "this is annoying" (pain_point), repeated questions (knowledge_gap), abandoned threads..cps/cps_server.py exists, extract domain keywords from scan_hits and run python .cps/cps_server.py search --query="[keywords]". Cap at 10 hits.Degrade silently when MCP or CPS runtime unavailable.
Print: "Deep scan: [N] sources -- [X] index, [Y] transcript, [Z] cps-query, [W] structural."
Generate 3-5 "the problem is..." statements. Each references a different scan source category. Span lenses: user experience, system architecture, knowledge gaps, process friction, scale.
Format: "The problem is that [observation] -- [consequence]."
Ask 1-2 clarifying questions via AskUserQuestion to narrow design space. Select from:
| Category | Template |
|---|---|
| Scope | "Should this cover [A] only, or also [B]?" |
| Priority | "This [exploits/elevates/subordinates] the constraint. Match your intent?" |
| Effort | "Effort is [S/M/L]. Worth it given current backlog?" |
| Design fork | "Could be [A] or [B]. Which fits?" |
Synthesize into a single "How might we...?" statement referencing current constraint. Must be specific enough to generate two concrete approaches.
Apply four techniques to the HMW statement:
| Technique | Prompt |
|---|---|
| Analogy | "What existing CPS pattern solves a similar problem?" |
| Inversion | "What if we did the opposite?" |
| Constraint removal | "What would we build if [constraint] didn't exist?" |
| Recombination | "What if we combined [A] with [B]?" |
Produce 5-8 raw concepts: title + one-sentence description + source technique.
Narrow to 2-3 via AskUserQuestion (multi-select from IDEATE output).
For each selected concept, produce:
| Element | Content |
|---|---|
| title | Verb + noun |
| description | 2-3 sentences |
| effort | S / M / L with justification |
| negative_branches | 1-2 risks per S14 Rule 4 |
| dependency_map | CPS components touched |
| constraint_alignment | exploits / elevates / subordinates + rationale |
Ask via AskUserQuestion at design forks.
Present final sketches. Ask via AskUserQuestion:
| Option | Action |
|---|---|
| Roadmap | cps-capture bucket: Roadmap, assign horizon |
| Tasks | task ADD. S->T3, M->T2, L->T1 |
| Ideas | Demote to Ideas for incubation |
| Discard | No write |
All writes tagged source: cps-creative -- capture gate bypass.
| Missing capability | Effect |
|---|---|
| Portal unreachable | Fall back to manual index reads + grep (old pattern, more tokens) |
mcp__session_info__* unavailable | Skip transcript sources. Index + structural scan only. |
.cps/cps_server.py absent | Skip cps-query sweep. Index-only deep scan for Tier 2. |
| Both MCP + CPS absent | Index-only scan. Still produces candidates from Reference/Documentation gaps. |
| Surface | Mechanism |
|---|---|
| Task EMPTY-STATE | RECOMMEND invokes Tier 1 when all empty. ideas_empty_sessions in portal meta. |
cps-capture | Called with source: cps-creative -- gate bypass |
mcp__session_info__* | Session listing + transcript reading for signal extraction |
cps-query | Tier 2 deep scan. Degrades gracefully. |