Context
Filed at PR 1 close of the init-wizard arc (#94). PR 1 shipped Approach A (structured Q&A + one starter template, no LLM call mid-wizard). Approach B from the office-hours D2 question is the natural fast-follow: a --ai-assist flag that swaps the seven-question Q&A for a single open-ended question and uses the operator's configured LLM to draft IDENTITY/SOUL/USER bodies.
What
Add --ai-assist to atomic-agents init. When the flag is set:
- Wizard runs the same entry guards (non-TTY refusal, persona-backend warning, API key pre-flight).
- Instead of Q1-Q7 Q&A, the wizard asks ONE question: "Describe your agent in 2-3 sentences. What is its job, how should it behave, who is the operator?"
- Wizard calls the configured LLM (
_llm._call_anthropic or equivalent) with a system prompt that produces a structured JSON response: {identity_md, soul_md, user_md, tools_md_hard_nos, autonomy_preset}.
- Wizard renders each field through the existing
string.Template.safe_substitute templates so the file structure stays identical to the structured-Q&A path.
- Operator reviews each generated file inline (rich.panel) and can Accept / Edit / Regenerate.
Why
Persona text quality from day one matches what a thoughtful operator would hand-write. Closes the last "hand-edit afterward" gap from the half-day deploy that PR 1's structured Q&A leaves on the table.
ANTHROPIC_API_KEY is already required for the agent's first call, so no new dependency or auth surface.
Effort
human ~1.5 weeks / CC ~3 days. Reuses everything PR 1 builds; one new flag + one new code path + ~5 tests + spec/35 amendment.
Acceptance
atomic-agents init my-agent --ai-assist produces a doctor-clean scaffold whose persona text reflects the operator's description.
- Tests cover the happy path (mocked LLM returns valid JSON), parse error (LLM returns malformed JSON), accept/edit/regenerate UX loop, and the existing entry guards still fire on this path.
- spec/35 documents the flag + the prompt shape.
Deferred from
Office-hours D2 (Approach B fast-follow): #317
Context
Filed at PR 1 close of the init-wizard arc (#94). PR 1 shipped Approach A (structured Q&A + one starter template, no LLM call mid-wizard). Approach B from the office-hours D2 question is the natural fast-follow: a
--ai-assistflag that swaps the seven-question Q&A for a single open-ended question and uses the operator's configured LLM to draft IDENTITY/SOUL/USER bodies.What
Add
--ai-assisttoatomic-agents init. When the flag is set:_llm._call_anthropicor equivalent) with a system prompt that produces a structured JSON response:{identity_md, soul_md, user_md, tools_md_hard_nos, autonomy_preset}.string.Template.safe_substitutetemplates so the file structure stays identical to the structured-Q&A path.Why
Persona text quality from day one matches what a thoughtful operator would hand-write. Closes the last "hand-edit afterward" gap from the half-day deploy that PR 1's structured Q&A leaves on the table.
ANTHROPIC_API_KEY is already required for the agent's first call, so no new dependency or auth surface.
Effort
human ~1.5 weeks / CC ~3 days. Reuses everything PR 1 builds; one new flag + one new code path + ~5 tests + spec/35 amendment.
Acceptance
atomic-agents init my-agent --ai-assistproduces a doctor-clean scaffold whose persona text reflects the operator's description.Deferred from
Office-hours D2 (Approach B fast-follow): #317