Repository navigation
feat(cortex): birth — register a scaffolded Science project in one step - #546
Merged
Merged
Conversation
`cortex birth <key> --category active|development --assistant A --summary S` derives the projects.yaml row from <Science root>/<category>/<key>/ (remote from git origin, ral_root from the rows' RAL base, sync_verbs from the hpc/sync dispatch case, the ledger file) and prints it. --apply cuts claude/birth-<key> from origin/main, writes through the Cortex's own `cortex.py birth`, commits, pushes only when `ledger_merge.py classify --base origin/main` calls it a birth, and returns to main; any failed write or commit abandons the branch and leaves main clean (exit 1). Scaffolding stays with the assistant's start-new-project; the /cortex skill gains "Start a new project". Refs #545 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
Merged
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #545 (phase 2 of making the Cortex the Science project manager; phase 1 was #544).
Summary
pyauto-brain cortex birth <key> --category active|development --assistant A --summary Sregisters a project folder that the domain assistant'sstart-new-projectalready scaffolded. Scaffolding stays with the assistants.projects.yamlrow from the folder and the other rows:ral_root, the rows' RAL base plus the category and key;sync_verbs, from thehpc/syncdispatchcase(helpexcluded);--apply(needs the Cortex clean onmain) does five things:claude/birth-<key>fromorigin/main;cortex.py birth; the conductor writes no ledger itself;ledger_merge.py classify --base origin/maincalls the commit a birth, so it lands by itself;main.mainclean. Exit codes: 2 refused, 1 for any git, write or push failure, 0 landed or--no-push./cortexskill gains a "Start a new project" section: scaffold with the assistant, take data fromdataset/orsimulators/, thencortex birth.API Changes
None to the library API. The conductor gains a verb:
cortex birth. It needs PyAutoLabs/PyAutoCortex's companion PR (cortex.py birth); until that merges, the three--applytests skip.Validation
euclid_detailedderives a row identical to its registered one, then refuses because the key and path are taken.--applyagainst a throwaway clone with a local bare origin: written, classified as a birth, pushed, back on cleanmain, drift clean.sync_verbsmatch four of the seven registered active Science rows exactly. Foranalytic_gaussian,ep_toy_gaussianandslope_hierarchy_scale, the registered rows list fewer verbs than theirhpc/syncnow dispatches. That's stale rows, not this code.Review findings addressed
git commit, for example from a hook, used to leave the birth staged onmainand exit 0 with a false "committed locally" message. It now abandons the branch, leavesmainclean and exits 1. There's a test that uses a rejecting pre-commit hook.helpis no longer counted as a sync verb.Open question for the human: a
development/birth'sral_rootis<base>/development/<key>, mirroring the laptop as decision 61 anddriftexpect. But the four existing development projects still sit under RALactive/, and nodevelopment/folder exists on RAL yet.Heart RED override (development only)
Authorized by the live human on 2026-10-29: "I authorize development only heart override" (for PyAutoBrain#545, after the exact RED reasons were shown). Development ship only: commit, push, PR-open. Merge needs a separate human
/prmwith every required check green. No release.Exact RED reasons (
pyauto-heart readiness, 2026-10-29):None of these involves PyAutoBrain or PyAutoCortex. This branch does not fix them.
Passed branch gates: Brain
tests/test_cortex_conductor.py80 passed (3 end-to-end tests skip cleanly against a Cortex withoutbirth); Cortex 70 tests +cortex check: OK; no new lint beyond the file's existing idiom; smoke n/a (organ tooling); independent review FINDINGS, all addressed (below).🤖 Generated with Claude Code