KeiSeiKit-1.0/skills/compose-solution/phase-1-intake.md
Parfii-bot 5c2dc98d54 feat(compose-solution): meta-orchestrator skill for 7-phase artefact creation
Adds a pure-click meta-composer that converts a free-text task description
into the right durable KeiSeiKit artefact — agent, skill, hook, rule, or
block — by composing existing primitives:

- Phase 1 intake (one free-text DESC + target-type click)
- Phase 2 wave-based decomposition (delegates to /research for heavy tasks)
- Phase 3 prior-art grep sweep across _blocks/, _manifests/, skills/,
  _bridges/, hooks/ + optional PROJECT-E + external docs
- Phase 4 gap analysis (AskUserQuestion multi-select)
- Phase 5 math-first architecture proposal (derive-first, "what is
  unnecessary" pass, Constructor-Pattern check)
- Phase 6 block augmentation — drafts + persists new _blocks/<slug>.md
  on user click; kit gets smarter each session
- Phase 7 recipe assembly — branches by type, hands off to /new-agent
  (agent) or /escalate-recurrence (hook / rule)

Split into SKILL.md (121-LOC index) + seven phase-*.md files (each <160
LOC) to stay under the 500-LOC/file Constructor-Pattern limit. Minimum 6
AskUserQuestion calls per session enforced by the pipeline; every
referenced block / skill / manifest / bridge path verified to exist on
disk before commit (RULE 0.4 — no fabricated references).

Writes only to _blocks/<slug>.md and skills/<slug>/SKILL.md;
handoffs to /new-agent and /escalate-recurrence own their own files.
2026-04-21 18:22:00 +08:00

1.7 KiB

Phase 1 — Intake

One free-text line + one click batch. This is the only typed input required by the whole skill (Phase 6 may add optional per-block edit prose).

1a — Ask for the task description

Emit a regular message (NOT AskUserQuestion):

Describe the task in one paragraph: what do you want to solve, for which project or concern, and what's the expected surface (something that runs, something that blocks a mistake, something that documents a pattern)? Reply in one message.

Store the user's reply verbatim as DESC.

1b — Target-type click (AskUserQuestion, ONE call)

{
  "questions": [
    {
      "question": "Target artefact type?",
      "header": "Type",
      "multiSelect": false,
      "options": [
        {"label": "Auto-detect",          "description": "Orchestrator infers from intake — recommended when unsure"},
        {"label": "Agent (specialist)",   "description": "New kit-agent manifest — specialist for a project or concern"},
        {"label": "Skill (user-invoked)", "description": "A /slash skill in ~/.claude/skills/ or KeiSeiKit/skills/"},
        {"label": "Hook (enforcement)",   "description": "Shell hook registered in settings.json (block / enforce / warn / remind)"},
        {"label": "Rule (documentation)", "description": "Rule file in ~/.claude/rules/ with optional hook partner"},
        {"label": "Block (reusable)",     "description": "Behavioural block in _blocks/ — composable via manifests"}
      ]
    }
  ]
}

Store the choice as T. If T == "Auto-detect", leave resolution until Phase 7 (after architecture is known).

Verify-criterion

  • DESC is non-empty.
  • T is exactly one of the six labels above.
  • If either fails — re-ask the failing input; do not fall through.