Repository navigation
Cortex: work briefs enter a project through its declared assistant - #367
Merged
Merged
Conversation
) Every next-task, rerun and planned payload of a project whose projects.yaml row declares an assistant carries a work brief: the entry protocol for the execution-tier subagent (assistant AGENTS.md first, then the project's wiki/project state and journal, then the named skills; finish by writing the journal entry and rewriting state.md; return the outcome and assistant drift). The conductor names the assistant and never reads it; a row without the field renders as none. /cortex, WORKFLOW.md, COMMANDS.md and the conductor's AGENTS.md document the contract. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuStnf9YpNvDVdwkyaG81J
Contributor
Author
|
Paired Cortex PR (merge after this one): PyAutoLabs/PyAutoCortex#23 |
This was referenced Sep 7, 2026
The Brain's test fixtures carried the instance name autolens_assistant; the tenant firewall gate rightly flagged it. Fixture names are not load-bearing, so the row now declares example_assistant and the brief assertion follows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuStnf9YpNvDVdwkyaG81J
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
Closes #362 (Brain half; the PyAutoCortex half is the paired PR that adds the
assistant:row field — merge this PR first, the CortexrefreshCI renders through Brainmain).The Cortex check-in now hands every work-shaped task prompt (next task, rerun, planned) a work brief: the entry protocol for the execution-tier subagent that does the project's work. The brief tells the subagent to enter the project through the domain assistant its
projects.yamlrow declares (read the assistant'sAGENTS.mdfirst, then the project'swiki/project/state and journal, then the named skills), to finish by writing the journal entry and rewritingstate.md, and to return the outcome against the witness plus any assistant drift. The check-in, ruling, live, gate and retire prompts are unchanged. The conductor names the assistant and never reads it: no stat, no resolve, still stdlib-only. A row without the field renders asnone, so this merges cleanly against a Cortexmainthat predates the field.Docs:
/cortexgains step 4 "Work on a project" and the rule "the door names the assistant, never reads it";WORKFLOW.mdgains the "Cortex project work" subsection under the subagent prompt contract; the conductor's AGENTS.md and the/cortexrow in COMMANDS.md are updated.API Changes
agents/conductors/cortex/_cortex.py: new_work_brief(r, projects)and_with_brief(payload, r, projects);_planned_payloadnow takes(r, projects). Internal conductor helpers, no public surface.See full details below.
Test Plan
pytest tests/test_cortex_conductor.py— 91 passed (new: brief on the three chips on both twins and incensus --by-project;nonerow and missing key carry no brief; ruling/check-in payloads contain no "assistant"; chips-everywhere invariant unchanged)pytest tests— 920 passedcortex dashboard --checkcurrent against the paired Cortex branch;cortex check: OKgrep -ril cortex autolens_assistantempty — assistants stay Cortex-unawareFull API Changes (for automation & release notes)
Added
_cortex._work_brief(r, projects)— the entry-protocol text for a task of a project whose row declaresassistant:;""fornoneor a missing key_cortex._with_brief(payload, r, projects)— appends the brief under a payloadChanged
_cortex._planned_payload(r, projects)— gains theprojectsmap (was(r))Migration
task_chipsis the only call site.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AuStnf9YpNvDVdwkyaG81J