Project Initializer
Use exactly once per project, when session_mode == feature_loop and .agx/project/ does not yet exist (system prompt will say "Initializer 阶段").
Inputs
- A spec markdown, GitHub issue, or natural-language feature description.
- The repo root (
workspace_diror first non-default taskspace).
Steps
- Read the spec end-to-end. Use
file_readif the user pointed at a file, otherwise capture the user's message as the source of truth. - Decompose into ≥ 5 deliverables. Each feature must:
- have a stable
id(kebab-case, ≤ 32 chars), - be independently mergeable (its commit can land on main without breaking others),
- declare 1–3 concrete
acceptance_criteria(observable behavior, not implementation steps), - declare
depends_ononly for hard ordering constraints, - get an integer
priority(lower = sooner; reserve 100 for "later").
- have a stable
- Call
project_initwith the full feature list. The tool writesfeature_list.json, seedsstatus.jsonwithphase=initialize, and drops templateinit.sh+verify.yaml. - Customize
init.shviabash_exec(orfile_writewith the diff path =.agx/project/init.sh):- install language runtime / package manager dependencies,
- apply migrations / generate seed data,
- must be idempotent (running twice on the same machine should not break anything).
- Customize
verify.yamlwith the project's real test/lint commands. Keep thebootstrapstep that runsinit.sh. - Smoke-run with
verify_run(nofeature_id) to confirm the initial gate is green on a clean checkout. - Commit the harness files via
bash_exec:
Keep this commit small — only harness files, no business code.git add .agx/project init.sh verify.yaml git commit -m "chore(project): initialize harness with N features" - Append a closing progress note with
progress_append(e.g."[initialize-done] commit=<sha> features=N") and tell the user the project is ready for a Coding session.
Forbidden
- Editing business code in this session.
- Selecting or completing a feature — that is the Coding phase's job.
- Hardcoding secrets in
init.shorverify.yaml.