feat: Add AI-assisted setup path for complex repos (setup.sh --ai) - #2
Draft
mlgitdev wants to merge 3 commits into
Draft
feat: Add AI-assisted setup path for complex repos (setup.sh --ai)#2mlgitdev wants to merge 3 commits into
mlgitdev wants to merge 3 commits into
Conversation
Adds an AI-installer skill that enables intelligent, complexity-aware setup for existing repositories. Users run setup.sh --ai to bootstrap workspace infrastructure and invoke the AI skill which scans repo structure, classifies complexity (Zero/Simple/Multi/Complex), proposes configuration proportional to detected needs, previews as unified diffs, and writes after approval. Key capabilities: - Workspace bootstrapping (dirs, skills, workflows, AGENTS.md inference) - 4 runtime adapters (Claude, Cursor, Cline, Antigravity) - --target for running against external repos - --auto for unattended execution (requires explicit --runtime) - Non-destructive: never modifies user files, companion file pattern - Framework coexistence (defers persona routing when BMAD detected) - Clean uninstall via setup.sh --remove (manifest-tracked) - Test infrastructure: shell + Python tests, 4 UJ-based fixtures Planned using BMad Method. Planning artifacts in _bmad-output/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dget The agentic-os-setup skill instructed the AI to generate a "complete operational manual" inline in AGENTS.md, contradicting the repo's own progressive-disclosure principle and producing a fat always-on file that burns tokens every turn and can overflow the runtime context-file cap. - SKILL.md: invert the AGENTS.md generation rule — keep always-on RULES inline, emit step-by-step PROCEDURES as on-demand skills (task-management, orchestration-model). Add a Context Budget rule (~10k char target, ~20k hard cap, relocate-not-delete). Update Complex tier expectations and Write Sequence to create + manifest + gitignore the emitted skill packs (privacy/removal coverage). Add an MCP "on-demand, not all up front" note for the integration tool surface. - templates/context-budget.md: new keep-inline-vs-emit-as-skill rubric template. - examples/complex-output.md: demonstrate the split across all four runtimes (claude, cursor, cline, antigravity) — lean AGENTS.md managed block + emitted task-management skill + per-runtime companion files. - README.md: align the Memory Stack section with progressive disclosure. Verified: validate_skills.py (no new failures; resolves 2 prior), test_content.py 24/24, skill evals 6/6, routing evals 5/5, eval-case validation pass.
…4-runtime verification Follow-up to the progressive-disclosure change. Adds executable guardrails and real-world test evidence, and stops tracking generated eval output. - tests/test_content.py: new TestContextBudget class (7 assertions) that locks the lean-AGENTS.md contract — the Complex calibration example's managed block must stay within budget, carry a "Skills & Workflows" index, and inline NO procedure sections; SKILL.md must define the context budget and instruct emitting procedures as on-demand skills; the example must cover all four runtimes. Guards against silent regression back to the fat operational manual. 24 -> 31 tests, all pass. - .gitignore: ignore generated eval results (Evals/skills|memory/results/*.json) while keeping the READMEs; untrack the 7 result JSONs that were committed upstream. Mirrors the existing tests/results/ rule — these are run artifacts, not source. - pull-request.md: replace the stale "AGENTS.md = full behavioral instructions" notes with verified results from running the installer against the architect-docs monorepo cloned four times (one runtime each). All four produced a lean AGENTS.md within budget (Claude 5.2k, Cursor 4.8k, Cline 4.2k, Antigravity 4.2k), an emitted task-management skill, correct BMAD persona deferral, and clean per-runtime files — verified on disk. Gate: shell 29/29, python 31/31, skill evals 6/6, routing 5/5.
Owner
|
I like the idea and the direction. I checked the current PR head. Shell tests pass, but a few things need fixing before I'd merge this:
Once those are fixed, happy to re-review :) |
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
setup.sh --aibootstraps workspace infrastructure and invokes the AI which scans, classifies (Zero/Simple/Multi/Complex), proposes config, and writes after approvalsetup.sh --removeKey Features
--target <path>— run against any repo without cd--auto— unattended execution (requires explicit--runtime)--dry-run— preview without writingVerification Status
.cursor/rules/(806-809), proper numbering, no collisionsTest plan
sh tests/test_setup.sh— all 29 passpytest tests/test_content.py— all 24 pass./setup.sh --ai --target examples/uj-3-flask-simple --runtime claudeand invoke/agentic-os-setupsetup.sh --removecleanly removes all generated filesPlanning Methodology
Planned using BMad Method. Artifacts in
_bmad-output/prd-ai-assisted-setup-2026-06-20/.🤖 Generated with Claude Code