Skip to content

manager: an agent's instructions, their sources and its local rules - #177

Merged
delpher merged 1 commit into
masterfrom
manager/instructions
Nov 28, 2026
Merged

delpher merged 1 commit into
masterfrom
manager/instructions

Conversation

@delpher

@delpher delpher commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Stage 1.2, step 1, part 5. Implemented by antigravity-alexey (AIChat 4112). I reviewed it, ran the tests and fixed one test.

What it adds

  • The «Інструкції» inspector tab (page.ts, without innerHTML):
    • shows source and version badges and the composed text, with a link to /#settings/rules;
    • warns about a leftover AGENTS.md, an OpenCode profile without .aichat/instructions.md, and a session running older rules than the broker has;
    • has an editor for the local block («Зберегти» / «Зберегти і перезапустити»).
  • GET /api/agents/<folder>/instructions (instructions.ts) builds its answer from:
    • status.instructions from .aichat/status.json (agy, OpenCode);
    • otherwise a preview from the broker's rules, which never includes the token (a test checks this);
    • for Claude, the broker's rules + the Claude Code block + CLAUDE.md.
  • Settings: local instructions become editable for agy, Codex and OpenCode. The new textarea field takes multi-line text up to 20,000 characters, and the readBody limit is raised to 64 KB.
  • The wizard adds "instructions": [".aichat/instructions.md"] to a new OpenCode profile.

My fix: in the test, the manager key instr01 wasn't hex. The manager only accepts hex keys (aichat_manager=[0-9a-f]+), so the API answered 401. It's now c0ffee01.

npm test: 345 pass, 0 fail. typecheck passes. I haven't checked the page visually yet. That will happen after the release, on the live manager.

🤖 Generated with Claude Code

Stage 1.2, step 1, part 5, by antigravity-alexey (AIChat 4112). The agent
inspector gets an "Instructions" tab: the composed text with the source and
version of each part (from the adapter's status.json, else a preview from the
broker's rules), warnings for a stale AGENTS.md, an OpenCode profile without
.aichat/instructions.md, or a session on older rules than the broker's; and an
editor for the local instructions (multi-line, up to 20,000 characters) for
agy, Codex and OpenCode. Claude shows broker rules + its runtime block +
CLAUDE.md. The wizard writes "instructions": [".aichat/instructions.md"] into a
new OpenCode profile. GET /api/agents/<folder>/instructions never returns a
token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@delpher
delpher merged commit c1fb716 into master Nov 28, 2026
3 checks passed
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.

1 participant