Skip to content

Add headless project onboarding primitives + Coda prompt (0.5.2)#48

Merged
dilawarabbas1 merged 1 commit into
mainfrom
claude/push-code-dotagent-SloI4
May 21, 2026
Merged

Add headless project onboarding primitives + Coda prompt (0.5.2)#48
dilawarabbas1 merged 1 commit into
mainfrom
claude/push-code-dotagent-SloI4

Conversation

@dilawarabbas1

Copy link
Copy Markdown
Owner

Summary

Three dotagent commands gain --from-stdin + --format json so Coda (or any orchestrator) can run the full project-setup ceremony headlessly. dotagent stays the data layer; the conversation lives in the orchestrator. Plus a complete drop-in Coda system prompt that drives them.

New primitives

# Brief — markdown body on stdin, JSON receipt out
echo "<brief.md>" | dotagent project brief upload --from-stdin --force --format json

# Project — JSON payload on stdin, JSON receipt out
echo '{"name":"X","goal":"...","success_criteria":[...]}' \
  | dotagent project init --from-stdin --format json

# Module — JSON payload on stdin, JSON receipt out
echo '{"name":"Auth","plan":{"acceptance_criteria":[...]}}' \
  | dotagent project add-module --from-stdin --format json

JSON receipts return structured success/error data. Structured errors: missing required field → exit 2; invalid JSON → exit 2; already-initialized → exit 1 with {ok: false, error: "already-initialized"}.

Coda onboarding prompt

CODA_ONBOARDING_PROMPT.md — drop-in system prompt with:

  • Phase 1: Brief — 14 questions, probe rule for vague answers, brief upload
  • Phase 2: Project init — payload JSON shape, brief-linkage fields
  • Phase 3: Module slate — per-feature decomposition, dependency wiring
  • End-of-setup checklist — 5 verification commands with brief check as the gate
  • Failure handling table — branchable on each receipt error

Fresh-project reality (the second part of the ask)

Explicit section telling Coda which files are EXPECTED to be absent on day-zero and must not be created during setup:

docs/feature_master.md + docs/feature_master/FM-*.md
docs/db-impact-map*.md   docs/redis-key-registry*.md
docs/bug-registry*.md    docs/anti-patterns.md
docs/architecture.md     docs/ARCHITECTURE.md
docs/dependency-map.md   docs/ops/*.md
src/*  (no code yet)

Schema marks all required=False. CLAUDE.md still points at them (canonical pointer); the AI reading the manifest sees the pointers, finds the files absent, and knows "fresh project — I'm the one who creates them as work ships."

The boundary holds on day zero: dotagent never writes hand-maintained docs; Coda doesn't write them during onboarding either. Claude inside cycles populates them, with rationale, as features ship.

The end-of-setup summary lists these explicitly so the user understands what's empty and why.

Test plan

  • tests/test_headless_onboarding.py — 15 tests (5 brief · 4 project · 5 module · 1 end-to-end)
  • Full suite: 748 passed, 2 skipped

Docs

  • CODA_ONBOARDING_PROMPT.md — drop-in system prompt
  • CODA_PROMPT.md — added "Headless project onboarding (0.5.2)" pointer in Section 8.5
  • CHANGELOG.md — 0.5.2 entry

Version

0.5.1 → 0.5.2


Generated by Claude Code

Three dotagent commands gain --from-stdin + --format json so an
orchestrator (Coda) can drive the entire project-setup ceremony
headlessly. dotagent stays the data layer; conversation lives in Coda.

### New primitives

- `dotagent project brief upload --from-stdin --force [--format json]`
  Accepts brief markdown on stdin. JSON receipt returns parsed counts
  (objectives/features/hard_rules/integrations) + name + vision so the
  orchestrator can verify structure landed correctly.

- `dotagent project init --from-stdin [--format json]`
  Accepts Project JSON on stdin (name required; goal, description,
  success_criteria, stakeholders, constraints, out_of_scope, brief
  metadata, tools, features_to_modules optional). Writes plan.yaml +
  SCOPE.md. JSON receipt confirms paths + name + module_ids.

- `dotagent project add-module --from-stdin [--format json]`
  Accepts Module JSON on stdin (name required; id, cross_module,
  implements_features, plan.{purpose,in_scope,out_of_scope,
  acceptance_criteria,dependencies,technical_approach,risks,
  estimated_effort} optional). Writes module.yaml + PLAN.md. JSON
  receipt confirms id + state + acceptance_criteria_count + paths.

`--format json` mode also returns structured errors on misuse
(missing field → exit 2; invalid JSON → exit 2; already-initialized →
exit 1 with `{ok:false, error:"already-initialized"}`) so callers can
branch programmatically without parsing stderr.

### Coda onboarding prompt

CODA_ONBOARDING_PROMPT.md — drop-in system prompt for the Coda agent
that handles "start a new project." Drives a 3-phase conversation:

  Phase 1: Brief (business why)         → brief upload --from-stdin
  Phase 2: Project init (technical what) → project init --from-stdin
  Phase 3: Module slate (first units)   → add-module --from-stdin (×N)

Per-phase: questions to ask, probe rule (push for numbers, accept
TBDs with decided-by/revisit), payload shape, receipt verification.
End-of-setup checklist runs `brief check` as the gate.

### Critical — fresh-project reality

Explicit section in the prompt enumerating files that are EXPECTED to
be absent on day-zero onboarding and must NOT be created by Coda:

  - docs/feature_master.md + docs/feature_master/FM-*.md
  - docs/db-impact-map*.md
  - docs/redis-key-registry*.md
  - docs/bug-registry*.md
  - docs/anti-patterns.md
  - docs/architecture.md / docs/ARCHITECTURE.md
  - docs/dependency-map.md
  - docs/ops/*.md
  - everything under src/ (no code yet)

Schema marks all of these `required=False`. CLAUDE.md still POINTS at
them (canonical pointer); the AI reading the manifest sees the
pointers, finds the files absent, and knows "fresh project, I'm the
one who creates them as work ships."

The end-of-setup summary now lists these explicitly so the user
understands what's empty and why. The boundary (dotagent never writes
hand-maintained docs; Coda doesn't write them during onboarding either)
holds on day zero. Claude inside cycles is what populates them.

### CODA_PROMPT.md

Added "Headless project onboarding (0.5.2)" pointer in Section 8.5
directing the Coda team at the new prompt + the three commands.

### Tests (+15 in tests/test_headless_onboarding.py)

- Brief upload: writes file · json receipt · refuses without force ·
  rejects path+stdin · rejects neither
- Project init: writes plan · requires name · invalid JSON · refuses
  when already initialized
- Add-module: full payload · minimum payload · cross_module support ·
  requires name · explicit id override
- End-to-end: brief → init → add-module receipt chain

Full suite: 748 passed, 2 skipped.

Version: 0.5.1 → 0.5.2.
@dilawarabbas1 dilawarabbas1 merged commit 35de888 into main May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants