Conversation
…docs Three ergonomic fixes for `bin/agentos init` so rerunning it for a new project doesn't silently clobber the operator's existing configuration and so a newly onboarded repo actually starts life with the right documents in place. 1. Preserve existing config.yaml scalars. The previous merge path unconditionally overwrote `telegram_bot_token`, `telegram_chat_id`, and the repo's own `github_projects[name]` / `github_repos[name]` entries every time init ran. Those now `setdefault` — first-run values land as before, re-runs keep what the operator already has. Added a "this will merge into existing config" confirmation at the write step so the operator sees what's about to happen and can abort to hand-edit if they prefer. 2. New "Step 5/8 — Tuning cadence and thresholds" phase prompts the operator for the cadence knobs that used to be hardcoded: sprint_cadence_days, groomer_cadence_days, max_parallel_workers, max_runtime_minutes, plan_size, default_max_attempts, dependency_watcher.cadence_days. Defaults come from the existing config when present, so pressing enter on each keeps what's already there. Only records an override when the new value differs, to keep the config minimal. 3. Extend the architect prompt to also produce VISION.md, STRATEGY.md, and PLANNING_PRINCIPLES.md alongside NORTH_STAR.md. The commit step writes only the docs the architect actually returned — older payloads that only have north_star_md still commit cleanly, so a resumed init from before this change doesn't fail.
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 ergonomic fixes for `bin/agentos init` so rerunning it for a new project doesn't silently clobber the operator's existing configuration and so a newly onboarded repo starts life with the right documents in place.
1. Preserve existing `config.yaml` scalars
The previous merge path unconditionally overwrote `telegram_bot_token`, `telegram_chat_id`, and the repo's own `github_projects[name]` / `github_repos[name]` entries every time init ran. These now `setdefault` — first-run values land as before, re-runs keep what the operator already set. Added a confirmation prompt at the write step so the operator sees what's about to happen and can abort to hand-edit if preferred.
2. New "Step 5/8 — Tuning cadence and thresholds"
Walks the operator through the knobs that used to be hardcoded in `build_config`:
Defaults come from the existing config when present, so pressing enter preserves what's already set. Only records an override when the chosen value differs from the existing-config default, to keep the config minimal.
3. Extended charter output: VISION + STRATEGY + PLANNING_PRINCIPLES
The architect prompt now also produces `VISION.md`, `STRATEGY.md`, and `PLANNING_PRINCIPLES.md` alongside `NORTH_STAR.md`. The commit step writes only the docs actually returned — older payloads that only have `north_star_md` still commit cleanly, so a resumed init from before this change doesn't break.
Test plan
Follow-up discovered while writing this
The `_ensure_repo_initialized` flow in github_scaffold (merged yesterday in #335) already adds `.agent_result.md` to `.gitignore`. The vision/strategy/principles docs land in the initial charter commit, so they benefit from the same ignore-the-handoff-contract protection automatically.