Skip to content

feat(mantis-assistant): add constrained specialist hierarchy - #104

Merged
creatifcoding merged 4 commits into
feat/mantis-biomemetics-labfrom
cursor/mantis-a2-hierarchy-om-07dc
Aug 30, 2026
Merged

creatifcoding merged 4 commits into
feat/mantis-biomemetics-labfrom
cursor/mantis-a2-hierarchy-om-07dc

Conversation

@creatifcoding

@creatifcoding creatifcoding commented Aug 22, 2026 •

Copy link
Copy Markdown
Owner

Draft A2 slice for #52 (parent #49). Inspectable specialist registry, delegation policy, and thread-scoped assistant-memory ledger. Stay draft. Do not merge until Mantis Assistant A2 / agent-tree-limits is green.

Why

MantisController still only stubs hierarchy. delegate rejects forked: true and does nothing else. OM is not a ledger. This package puts the nine-specialist table and the memory rules behind the controller without editing the A0 harness.

A keeper later gets bounded specialist choice and conversation continuity that cannot become care truth. The next engineer inherits one openHierarchy object instead of a second copy of the pin.

GitHub had no A2-named check. .github/workflows/mantis-assistant-a2.yml is that check. Job agent-tree-limits runs the existing dry-run hierarchy tests.

Scope

Write-set is projects/biomemetics/labs/mantis/assistant/hierarchy/** plus .github/workflows/mantis-assistant-a2.yml.

In:

  • @tmnl/mantis-assistant-hierarchy with openHierarchy
  • nine JSON manifests under manifests/
  • A2 policies under hierarchy/policies/ (specialist-registry, delegation, observational-memory)
  • read-only imported-a0/ copies so this slice verifies without merging sibling PRs
  • policy dry-run delegate, append-only OM ledger, supersession, forget/export
  • one GitHub Actions job, agent-tree-limits, that runs npm ci, npm run typecheck, and npm test in the hierarchy package

Out:

  • A0 tooling/typescript/mantis-assistant and A0 contracts/policies (PR 100)
  • A1 app/**, golden-care, docs/OFFLINE.md (PR 98)
  • A3 workflows and mantis-workflow-lab (PR 101)
  • A4/A4a simulator and terrarium UI
  • A5 evidence/projection (PR 102)
  • CAD, EE, procurement, cluster, paper
  • Specimen mint, device-command, CopilotKit runtimeUrl
  • A0 OpenRouter prove job and OPENROUTER_API_KEY

Default execution is a policy dry-run. It does not call a model. Live observer/reflector stays QUARANTINED_UPSTREAM.

Tradeoffs

We accept a dry-run in place of a Mastra subagent call so A2 can prove deny cases without the A0 package and without a CopilotKit URL.

We duplicate specialist and mode string unions in this package so we never import @tmnl/mantis-assistant.

The CI job copies the A5 path-filtered npm shape, not A0's live prove job. Last turn's mantis-assistant-hierarchy-ci.yml is gone so this PR has one check name.

Blast Radius

Reviewers of assistant/hierarchy and this one workflow file. Parallel A0/A1/A3/A4/A5 drafts should merge without path fights.

Failed openHierarchy refuses the whole registry. A rejected delegate does not write OM.

The new check runs only when hierarchy files or this workflow change.

Verification

From projects/biomemetics/labs/mantis/assistant/hierarchy:

  • npm run typecheck clean
  • npm test 33 passed (registry, delegation denies, OM supersession/export, isolation scan, eval datasets)

Isolation scan fails if src imports @tmnl/mantis-assistant, @mastra, @copilotkit, or names runtimeUrl / agent.generate.

GitHub job Mantis Assistant A2 / agent-tree-limits must be green before merge. Stay draft until then. Independent review is later.

Open in Web Open in Cursor 

cursoragent and others added 4 commits August 22, 2026 01:54
Nine inspectable manifests, a policy dry-run delegate path, and a thread-scoped assistant-memory ledger live in assistant/hierarchy. forked true, device-command, mode elevation, self-admission, confirmed taxon, and specimen mint fail closed. Observer/reflector stays quarantined. This does not edit the A0 harness, A1 app, A3 workflows, or A5 evidence queue.

Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Remove running/timeout/cancelled variants the dry-run never constructs, drop the unused authorize policy argument, and drop the unused forbidden-tools path remap. Tests still pass 33.

Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
GitHub had no check on this package. Path filters keep the job off sibling slices. No live-model secret.

Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
Replace hierarchy-ci.yml with mantis-assistant-a2.yml. Same npm ci, typecheck, and test. No live-model secret.

Co-authored-by: digicoder <creatifcoding@users.noreply.github.com>
@creatifcoding
creatifcoding marked this pull request as ready for review August 30, 2026 02:08
@creatifcoding
creatifcoding merged commit 0626ea1 into feat/mantis-biomemetics-lab Aug 30, 2026
2 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.

2 participants