Idea

From indigoai-us/hq-core · View interactive version

Idea is an AI agent skill from the GitHub repository indigoai-us/hq-core. Capture a lightweight project idea on the board.

How to use this skill

Skill file

/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:

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:

  1. --company / -c flag → use exact slug
  2. cwd inside companies/{slug}/ → infer from path
  3. cwd inside repos/{pub|priv}/{name} → look up owning company in companies/manifest.yaml
  4. 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:

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):

  1. What's the idea? (1-2 sentences)

Skip if description already extracted from args.

  1. Scope?

Skip if --app flag provided or company has no repos.

  1. 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:

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

  1. Read companies/{co}/board.json
  2. 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.

  1. 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.
  2. 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.

  1. Append to projects array. Update root updated_at. Write board.json.
  2. 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

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.