RAGE #51: first-class context and Agent Skills #269

Open
nsaspy wants to merge 28 commits from feat/zara-031-context-management into master
Owner

Consumes #51 under the repository RAGE protocol.

Immutable RAGE start: 7a9c25cf31c4088568e2b50e49f47ce05a0a0172.

Operator request: add first-class Zara skills and MCP-server composition. Research found Zara already ships a substantial MCP v2 client/actor/tool/resource/prompt implementation, so this PR deliberately reuses it instead of creating a duplicate MCP stack.

RAGE state: TDD red. Research/design and tests are committed before production implementation.

Research/design decisions:

  • one ContextManager owns base prompt, persistent model context, transient memory, selected skill context and existing MCP capability-routing context;
  • adopt the Agent Skills SKILL.md open format with standard YAML frontmatter and namespaced Zara metadata;
  • deterministic progressive disclosure/selection, dependency/conflict validation and token sub-budgets;
  • skills are context, not execution authority; allowed-tools cannot bypass Zara tool approval;
  • existing MCPManager remains owner of transports, actors, discovery, tools/resources/prompts and reconnect;
  • truncate/compress operate only on complete turn/tool groups;
  • generation leases reject stale turn commits.

Evidence:

  • rage/51-context-skills.org
  • rage/51-context-skills-research.org
  • rage/51-context-skills-design.org
  • t/test_context_management.py
  • t/test_skill_registry.py
  • scripts/test-context-management.sh

The first CI run is expected to fail because zara.agent.context / zara.agent.skills do not exist yet. That red result is intentional TDD evidence; do not merge until implementation, full Nix gates, and exact-head CI are green.

Closes #51.

Consumes #51 under the repository RAGE protocol. Immutable RAGE start: `7a9c25cf31c4088568e2b50e49f47ce05a0a0172`. Operator request: add first-class Zara skills and MCP-server composition. Research found Zara already ships a substantial MCP v2 client/actor/tool/resource/prompt implementation, so this PR deliberately reuses it instead of creating a duplicate MCP stack. RAGE state: **TDD red**. Research/design and tests are committed before production implementation. Research/design decisions: - one `ContextManager` owns base prompt, persistent model context, transient memory, selected skill context and existing MCP capability-routing context; - adopt the Agent Skills `SKILL.md` open format with standard YAML frontmatter and namespaced Zara metadata; - deterministic progressive disclosure/selection, dependency/conflict validation and token sub-budgets; - skills are context, not execution authority; `allowed-tools` cannot bypass Zara tool approval; - existing `MCPManager` remains owner of transports, actors, discovery, tools/resources/prompts and reconnect; - truncate/compress operate only on complete turn/tool groups; - generation leases reject stale turn commits. Evidence: - `rage/51-context-skills.org` - `rage/51-context-skills-research.org` - `rage/51-context-skills-design.org` - `t/test_context_management.py` - `t/test_skill_registry.py` - `scripts/test-context-management.sh` The first CI run is expected to fail because `zara.agent.context` / `zara.agent.skills` do not exist yet. That red result is intentional TDD evidence; do not merge until implementation, full Nix gates, and exact-head CI are green. Closes #51.
feat: add built-in operational skill catalog
Some checks failed
CI / test (pull_request) Failing after 4s
CI / android skeleton gate (pull_request) Failing after 6s
CI / shared mic / Arch Linux (pull_request) Failing after 9m22s
CI / shared mic / Ubuntu 24.04 (pull_request) Failing after 8m3s
b9d3d5d308
Author
Owner

Parking this RAGE slice and closing the draft PR so the open PR queue reflects active work only. The #51 context/Agent Skills goal is not rejected: the branch remains as TDD/research evidence, but it predates multiple current runtime/backend/hooks/task changes and is not the operator's active Zara recovery priority. When #51 resumes, recover it from current master under fresh RAGE/TDD instead of treating this RED draft as a live merge candidate.

Parking this RAGE slice and closing the draft PR so the open PR queue reflects active work only. The #51 context/Agent Skills goal is not rejected: the branch remains as TDD/research evidence, but it predates multiple current runtime/backend/hooks/task changes and is not the operator's active Zara recovery priority. When #51 resumes, recover it from current master under fresh RAGE/TDD instead of treating this RED draft as a live merge candidate.
Some checks failed
CI / test (pull_request) Failing after 4s
CI / android skeleton gate (pull_request) Failing after 6s
CI / shared mic / Arch Linux (pull_request) Failing after 9m22s
CI / shared mic / Ubuntu 24.04 (pull_request) Failing after 8m3s
This pull request has changes conflicting with the target branch.
  • zara/agent/__init__.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/zara-031-context-management:feat/zara-031-context-management
git switch feat/zara-031-context-management

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff feat/zara-031-context-management
git switch feat/zara-031-context-management
git rebase master
git switch master
git merge --ff-only feat/zara-031-context-management
git switch feat/zara-031-context-management
git rebase master
git switch master
git merge --no-ff feat/zara-031-context-management
git switch master
git merge --squash feat/zara-031-context-management
git switch master
git merge --ff-only feat/zara-031-context-management
git switch master
git merge feat/zara-031-context-management
git push origin master
Sign in to join this conversation.
No description provided.