Skip to content

Implement initial PyAutoBrain Feature Agent - #4

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/pyautomind-feature-agent-6s8ndp
Jun 29, 2026
Merged

Implement initial PyAutoBrain Feature Agent#4
Jammy2211 merged 1 commit into
mainfrom
claude/pyautomind-feature-agent-6s8ndp

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Adds the Feature Agent, the growth function of PyAutoBrain: the reasoning agent that reads feature intent from PyAutoMind and decides how the organism should grow. Implements PyAutoMind/feature/pyautobrain/feature.md.

It reasons; it never edits source. It emits a structured FeatureDecision that the existing development workflow (start_dev → start_library/ship_library, start_workspace/ship_workspace) consumes. Built on the Build Agent template, so it follows the established agents/<name>/ shape (concise AGENTS.md + deterministic entrypoint + a capability audit of the organs it reads).

Mind (PyAutoMind feature/*)  →  Feature Agent  →  start_dev
                                              →  start_library / ship_library
                                              →  start_workspace / ship_workspace
       consults ↘                    ↙ consults
        Health Agent            PyAutoMemory (scientific / architectural context)

Three modes

  • specific — plan a named prompt for start_dev.
  • selection — choose the best next feature task (not just the first), down-ranking in-flight work read from active.md / planned.md.
  • difficulty-constrained — select by --difficulty / --model / --budget / --ambitious / --impact.

What it reasons about

  • Difficulty — transparent heuristic (repos affected, prompt size, scientific complexity, architectural risk, test burden, memory-context need) → small | medium | large | too-large, with the factor breakdown in every decision.
  • Phasingdirect / split-into-phases (emits _phase_1_design.md … _phase_4_docs.md stubs) / research-first / re-home when mis-filed.
  • Workflowlibrary | workspace | combined decided from the prompt's @RepoName references (per PyAutoMind ROUTING.md); combined enforces library-first ordering so the workspace consumes the library PR's ## API Changes summary.
  • Scientific/architectural context — maps the task to the relevant PyAutoMemory sub-wiki (lensing/smbh/cti/methods/galaxies) and cites it, never invents it; degrades gracefully if PyAutoMemory is absent.
  • Society of agents — for risky / multi-repo / release-bound work it consults the sibling Health Agent (--check-health) rather than querying Heart directly.

Files

  • agents/feature/feature.sh — entrypoint: resolves PyAutoMind/PyAutoMemory checkouts, normalises the subcommand (bare path → specific, nothing → selection), optional health consult.
  • agents/feature/_feature.py — stdlib-only, never-writes analysis core: discovery, classification, difficulty, phasing, memory routing, FeatureDecision in human + --json form.
  • agents/feature/AGENTS.md + MIND_TAXONOMY.md — concise agent doc and the PyAutoMind/PyAutoMemory surface audit (both 116 lines, under the 200-line skill cap).
  • agents/_common.sh — sibling-aware resolve_mind / resolve_memory directory resolvers.
  • bin/pyauto-brain + root AGENTS.md — register and document the agent.

Validation

Exercised against the 30 real feature/** prompts in PyAutoMind:

  • ✅ identifies feature prompts; selects when none specified (down-ranking in-flight work)
  • ✅ respects difficulty constraints (easy / strong-model / impact)
  • ✅ recommends phasing + emits phase stubs for too-large tasks
  • ✅ references PyAutoMemory sub-wikis where appropriate
  • ✅ outputs plans compatible with start_dev / ship_*; combined library+workspace detected with library-first ordering
  • bash -n / py_compile clean; edge cases (unknown task → exit 5, --help, --json, CLI dispatch) verified

🤖 Generated with Claude Code


Generated by Claude Code

Add the Feature Agent, the growth function of PyAutoBrain: the reasoning agent
that reads feature intent from PyAutoMind and decides how the organism should
grow. It reasons; it never edits source — it emits a structured FeatureDecision
that the existing start_dev -> ship_library/ship_workspace workflow consumes.

Three modes (per the PyAutoMind feature/pyautobrain/feature.md prompt):
- specific: plan a named prompt for start_dev.
- selection: choose the best next feature task (not just the first), down-ranking
  in-flight work read from active.md / planned.md.
- difficulty-constrained: select by --difficulty / --model / --budget /
  --ambitious / --impact.

It estimates difficulty from a transparent heuristic (repos affected, size,
scientific complexity, architectural risk, test burden, memory-context need),
decides phasing (direct / split-into-phases with phase stubs / research-first /
re-home), maps the task to library / workspace / combined workflows from the
prompt's @reponame references, consults PyAutoMemory sub-wikis for scientific and
architectural context (cited, never invented), and — as a society-of-agents
citizen — can consult the sibling Health Agent (--check-health) rather than
querying Heart directly.

- agents/feature/feature.sh: entrypoint (resolves PyAutoMind/PyAutoMemory,
  normalises the subcommand, optional health consult).
- agents/feature/_feature.py: stdlib-only, never-writes analysis core (discovery,
  classification, difficulty, phasing, memory routing, FeatureDecision in human +
  --json form).
- agents/feature/AGENTS.md + MIND_TAXONOMY.md: concise agent doc and the
  PyAutoMind/PyAutoMemory surface audit (both <200 lines per skill guidance).
- _common.sh: resolve_mind / resolve_memory directory resolvers (sibling-aware).
- bin/pyauto-brain + root AGENTS.md: register and document the agent.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012VbJJGXaAsEQz7U4twT9c1
Copilot AI review requested due to automatic review settings June 29, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants