Repository navigation
Add feature_split tool and stop agents passing unverified features (#68) - #318
zwanski-start wants to merge 1 commit into
Conversation
…AutoForgeAI#68) Add a feature_split MCP tool so a coding agent that finds a feature too large breaks it into 2-10 sub-features instead of skipping it or marking it passing partially done. Sub-features inherit the parent's category, dependencies and priority; the parent is released and made to depend on them so it is re-verified end-to-end once they all pass. Harden coding/testing prompts, the parallel-mode assignment headers and the mark_passing/skip tool descriptions: a feature whose verification could not run (e.g. the browser failed to open) must never be marked passing, and 'too large' is not a valid skip reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔍 QA report: ✅ PassedTester: Dennis (cubefarm agent, in a fresh session) · Round: 1 · Author: Guido The new feature_split MCP tool works end to end through a real MCP stdio client: sub-features inherit the parent's category, priority and dependencies; the parent is released and stays blocked until every sub-feature passes, then becomes ready again; nested splits also work; and invalid input is rejected without changing the database. The prompt hardening is consistent: the template and the v0→v1 migration text are identical, YOLO mode strips the browser-failure section, and the parallel single and batch headers carry the new rules. ruff is clean, mypy has the same 24 errors as master, and the security tests and the 6 new tests pass. The full pytest run has 21 failures that are identical on master (pre-existing, not caused by this PR). The UI is unchanged; it builds, and the Kanban board and dependency graph render a split project with no console errors.
🧪 Commands run
No browser screenshots were taken in this round. Posted by cubefarm · merges automatically once GitHub's checks pass |
…ied features Adaptations: split-depth limit (MAX_SPLIT_DEPTH = 2): each sub-feature's description ends with 'Split from feature #N, split depth d.', which feature_split reads back to refuse a deeper split (no schema change). Ported AutoForgeAI#318's test that the parent becomes ready only after its sub-features pass. The coding prompt's tool list keeps my-features' quality gate tools (items 8-9); feature_split is item 10. Integrates AutoForgeAI#263 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeH26pcsqoxPb3CDs8g1VN
Closes #68
Problem
Coding agents sometimes (a) skip a feature, or pass it partially done, when it's too large, and (b) mark a feature passing after browser automation failed to launch, assuming it works.
Changes
New MCP tool
feature_split(mcp_server/feature_mcp.py, exposed to coding agents inclient.py)name,description,steps, optionalcategory).in_progress=0) and made to depend on all its sub-features. It becomes ready again only after every sub-feature passes, and then it acts as the end-to-end check of the whole original feature. A cycle can't form because sub-features only depend on the parent's existing dependencies.MAX_DEPENDENCIES_PER_FEATURE, and changes nothing on error.Prompt and tool-description hardening
coding_prompt.template.md:feature_splitadded to the allowed-tools list.testing_prompt.template.md: same rule about browser failures.feature_mark_passingandfeature_skipdocstrings, which agents see as tool descriptions, now state these rules.prompts.pynow mentionfeature_splitand the never-pass-unverified rule. These headers are generated in code, so they also reach existing projects whose copiedcoding_prompt.mdpredates this change._CLI_STEP5_CONTENTand_CLI_TESTING_STEP2(the v0→v1 migration text) are kept in sync with the templates.Verification
test_feature_split.py(6 tests): creating and inheriting fields, the parent staying blocked until its sub-features pass (viafeature_get_ready), rejecting passing or missing features, rejecting invalid input with no DB changes, and the dependency limit.mcp.list_tools()that the tool registers with the expected schema.ruff check .is clean.mypyreports no new errors in the changed files. Errors that already existed in other files are unchanged.test_security.py,test_client.py,test_dependency_resolver.pyandtest_feature_split.pyall pass.Assumptions / notes
feature_mark_passing, such as requiring verification evidence, because it would break the testing agent, the auto-improve agent and existing project prompts. Enforcement happens through prompts and tool descriptions.coding_prompt.md. They get the new behaviour through the generated assignment headers and the tool descriptions, but not the full new template sections.🤖 Generated with Claude Code