Add headless project onboarding primitives + Coda prompt (0.5.2)#48
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three dotagent commands gain
--from-stdin+--format jsonso 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
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:brief checkas the gateFresh-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:
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)Docs
CODA_ONBOARDING_PROMPT.md— drop-in system promptCODA_PROMPT.md— added "Headless project onboarding (0.5.2)" pointer in Section 8.5CHANGELOG.md— 0.5.2 entryVersion
0.5.1 → 0.5.2Generated by Claude Code