Skip to content

Cortex: work briefs enter a project through its declared assistant - #367

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/cortex-assistant-entry
Sep 8, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/cortex-assistant-entry

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Closes #362 (Brain half; the PyAutoCortex half is the paired PR that adds the assistant: row field — merge this PR first, the Cortex refresh CI renders through Brain main).

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.yaml row declares (read the assistant's AGENTS.md first, then the project's wiki/project/ state and journal, then the named skills), to finish by writing the journal entry and rewriting state.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 as none, so this merges cleanly against a Cortex main that predates the field.

Docs: /cortex gains step 4 "Work on a project" and the rule "the door names the assistant, never reads it"; WORKFLOW.md gains the "Cortex project work" subsection under the subagent prompt contract; the conductor's AGENTS.md and the /cortex row in COMMANDS.md are updated.

API Changes

  • agents/conductors/cortex/_cortex.py: new _work_brief(r, projects) and _with_brief(payload, r, projects); _planned_payload now 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 in census --by-project; none row and missing key carry no brief; ruling/check-in payloads contain no "assistant"; chips-everywhere invariant unchanged)
  • pytest tests — 920 passed
  • cortex dashboard --check current against the paired Cortex branch; cortex check: OK
  • grep -ril cortex autolens_assistant empty — assistants stay Cortex-unaware
Full API Changes (for automation & release notes)

Added

  • _cortex._work_brief(r, projects) — the entry-protocol text for a task of a project whose row declares assistant:; "" for none or a missing key
  • _cortex._with_brief(payload, r, projects) — appends the brief under a payload

Changed

  • _cortex._planned_payload(r, projects) — gains the projects map (was (r))

Migration

  • None for callers; task_chips is the only call site.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AuStnf9YpNvDVdwkyaG81J

)

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
@Jammy2211

Copy link
Copy Markdown
Contributor Author

Paired Cortex PR (merge after this one): PyAutoLabs/PyAutoCortex#23

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
@Jammy2211
Jammy2211 merged commit 29dc479 into main Sep 8, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/cortex-assistant-entry branch September 8, 2026 01:15
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.

Cortex: route project work through the domain assistant

1 participant