/idea - Capture Project Idea
Quickly add a project idea to the board. No PRD, no stories — just capture the thought.
Input: $ARGUMENTS
Step 1: Parse Input
Extract from $ARGUMENTS:
--company <slug>or-c <slug>— explicit company override--app <repo-name>— target repo/app (setsscope: "app")- Everything else → idea description text
If $ARGUMENTS is empty and no flags, go to Step 2 (full interview).
If description text is present (>5 words after flag extraction), skip the description question in Step 3.
Step 2: Resolve Company
Priority order:
--company/-cflag → use exact slug- cwd inside
companies/{slug}/→ infer from path - cwd inside
repos/{pub|priv}/{name}→ look up owning company incompanies/manifest.yaml - If still ambiguous → ask in Step 3
Read companies/manifest.yaml. Validate company slug exists and has a non-empty board_path.
If board_path is empty or missing:
- Ask: "Company {slug} has no board. Create one? [Y/n]"
- If yes: write fresh board.json at
companies/{slug}/board.jsonwith{"company":"{slug}","updated_at":"ISO8601","initiatives":[],"projects":[]}, update manifestboard_path - If no: abort
Step 3: Interview (1 AskUserQuestion call)
Batch all missing info into one AskUserQuestion call. Skip any field already resolved from args/context.
Questions (include only what's missing):
- What's the idea? (1-2 sentences)
Skip if description already extracted from args.
- Scope?
- A. Company-wide (no specific repo)
- B. App/repo → list company repos from manifest as sub-options
Skip if --app flag provided or company has no repos.
- Goal alignment? (optional)
If board schema_version >= 2 and objectives[] is non-empty, list objectives:
```
1. {obj-title-1}
2. {obj-title-2}
N. None
```
If board is v1 or has no objectives, fall back to listing active initiatives:
```
1. {init-title-1}
2. {init-title-2}
N. None
```
If board has neither objectives nor active initiatives, skip and default to null.
If company was unresolved in Step 2, prepend a company question:
- Which company? List all companies from manifest that have a
board_path.
Target: 1 AskUserQuestion call total. If everything is provided via args (description + company + app), skip straight to Step 4 — no interview needed.
Step 4: Write Board Entry
- Read
companies/{co}/board.json - Generate ID: the next id is one more than the HIGHEST number used with
the board's prefix anywhere in projects, never the last entry + 1 (entries
are not kept in id order). This prints it:
```bash
jq -r '[.projects[]? | .id? | strings | capture("^(?<p>[a-z0-9]+)-proj-(?<n>[0-9]+)$")?] as $ids
| (($ids | group_by(.p) | max_by(length) | .[0].p) // error("no {prefix}-proj-{NNN} ids yet")) as $p
| ([$ids[] | select(.p == $p) | (.n | tonumber)] | max) + 1 | tostring
| "\($p)-proj-\(if length < 3 then ("000" + .)[-3:] else . end)"' companies/{co}/board.json
```
The prefix is the one most {prefix}-proj-{NNN} ids use (lowercase, e.g.
lr, ab, pe). Zero-pad to 3 digits (4+ if >999). When the board has no
such ids yet, ask for or derive a short lowercase prefix and use
{prefix}-proj-001.
- Derive title: If description is >50 chars, derive a concise 3-6 word title. If ≤50 chars, use as-is for both title and description.
- Build entry:
```json
{
"id": "{prefix}-proj-{NNN}",
"title": "{concise title}",
"description": "{user's full description}",
"status": "idea",
"scope": "company|app",
"app": "{repo-name|null}",
"initiative_id": "{xx-init-NNN|null}",
"objective_id": "{xx-obj-NNN|null}",
"prd_path": null,
"created_at": "{ISO8601}",
"updated_at": "{ISO8601}"
}
```
If user selected an objective in Step 3, set objective_id to that objective's ID. Also find the objective's initiative_ids[0] (if any) and set initiative_id for backward compatibility.
- Append to
projectsarray. Update rootupdated_at. Write board.json. - Check for duplicates: after writing, this must print nothing:
```bash
jq -r '[.projects[]? | .id? | strings] | group_by(.) | map(select(length > 1) | .[0]) | .[]' companies/{co}/board.json
```
If it prints the id you just wrote, give your entry the next free id (step 2)
and write again. If it prints other ids, those duplicates were already on the
board: leave them and tell the user which ids are duplicated.
Step 5: Confirm & Reindex
Before printing confirmation, optional best-effort note (presence is automatic):
hq mesh session note --session-id <sid> --enqueue --seq <n> --summary "Idea captured: {title}"
If the daemon/helper is unavailable, continue silently. Manual verbs only:
task-status, blocked, note.
Print:
Idea captured: **{title}** ({id})
Board: companies/{co}/board.json
Status: idea
Next steps:
/prd {title} → promote to full PRD
/idea → add another idea
/idea --company {co} → add idea to same board
Reindex: qmd update 2>/dev/null || true
Rules
- No PRD files — this command ONLY writes to board.json
- No orchestrator registration — ideas are not executable;
/prdhandles that on promotion - No Linear sync — ideas are pre-planning; Linear sync happens at
/prdtime - 1 AskUserQuestion max — batch everything into one call
- No TodoWrite — single-step output, not needed
- No EnterPlanMode — this command IS the quick capture
- Board.json is the only file written (plus manifest if board_path was empty)
- Follow existing ID conventions — lowercase prefix, zero-padded 3-digit numbers
- Inline mode: if all info is provided via args/flags, write the entry with zero questions
- Work mesh is best-effort — for cloud-connected company boards, report the captured idea through
hq mesh; never block idea capture on mesh availability. Presence is automatic; usehq mesh session notefor discrete milestones.
See also
/brainstorm— compare approaches/prd— promote it to a full PRD