Skip to content

refactor: legal-ops v3.0.0 — 1 agent + 6 skills#8

Merged
mjunaidca merged 5 commits into
mainfrom
redesign/legal-ops-v3
Mar 14, 2026
Merged

refactor: legal-ops v3.0.0 — 1 agent + 6 skills#8
mjunaidca merged 5 commits into
mainfrom
redesign/legal-ops-v3

Conversation

@mjunaidca

Copy link
Copy Markdown
Collaborator

Summary

Radical redesign of legal-ops plugin based on official Claude Code plugin/subagent docs.

  • 1 agent (contract-intake.md) — flat .md with YAML frontmatter, genuine orchestrator
  • 6 skills (1 router + 5 products) — router references product skills in routing table
    • legal-global-router — routing + NDA RED flags + playbook loading + jurisdiction overlays
    • compliance-calendar, dsar-privacy, ip-protection, legal-spend, regulatory-monitoring — each user-invocable: false
  • Removed: all commands (Anthropic collisions), workflow recipes, exercises (book content)
  • Kept: evals, hooks, scripts (CI infrastructure)
  • Agent format: flat .md per official docs
  • Product skills are standalone (proven unique) but user-invocable: false — router auto-activates them

What changed from PR #7 (v2.0.0)

v2.0.0 (PR #7) v3.0.0 (this PR)
3 commands 0 commands
7 skills 6 skills (1 router + 5 products)
0 agents 1 agent
Commands directory No commands directory
Router was a skill Router is still a skill
No agents directory agents/ with contract-intake.md

Test plan

  • Evals pass: uv run evals/run-evals.py
  • Router auto-activates on jurisdiction query
  • Contract-intake agent activates on intake trigger phrases
  • Product skills activate through router, not directly
  • Jurisdiction overlays load correctly

🤖 Generated with Claude Code

mjunaidca and others added 5 commits March 14, 2026 17:55
- Transform legal-global-router skill -> legal-ops-router agent
- Transform contract-intake-agent skill -> contract-intake agent
- Keep 5 unique skills: compliance-calendar, dsar-privacy, ip-protection, legal-spend, regulatory-monitoring
- Absorb 9 NDA RED flags and playbook loading into router agent
- Absorb contract-intake-workflow recipe into contract-intake agent
- Absorb /legal-brief routing table into router agent
- Remove all commands (absorbed into agents/skills or Anthropic-owned)
- Remove workflow-recipes, exercises, hooks, scripts, evals
- Remove plugin-commands field from all skill frontmatter
- Plugin now contains ONLY agents/ and skills/ directories
- v2.0.0 -> v3.0.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem 1: Agents were directory-based (agents/name/AGENT.md) but the
official Claude Code spec requires flat markdown files with YAML
frontmatter (agents/name.md). Fixed by creating thin orchestrator
agents that preload skills via the 'skills:' field.

Problem 2: evals/, hooks/, scripts/ were wrongly deleted as part of
the v3 restructure. These are standard plugin CI components. Restored
from main and updated to reflect v3.0.0 architecture.

Changes:
- agents/legal-ops-router.md: flat file, preloads legal-global-router
- agents/contract-intake.md: flat file, preloads contract-intake-agent
- Deleted agents/legal-ops-router/ and agents/contract-intake/ dirs
- Restored skills/legal-global-router/ with enhanced SKILL.md (v2.0):
  - Absorbed NDA 9 RED flags from dropped jurisdiction-nda-triage
  - Added playbook loading logic from dropped jurisdiction-contract-review
  - Added research routing table (replaces former /legal-brief command)
  - Routes contract-review/nda-triage to Anthropic commands (not dupes)
- Restored skills/contract-intake-agent/ with enhanced SKILL.md (v2.0):
  - Added trigger conditions from workflow recipe
  - Added escalation/review checkpoints table
  - Routes to Anthropic /review-contract and /triage-nda
- Restored evals/, hooks/, scripts/ from main
- Updated hooks.json SessionStart prompt to v3.0.0
- Updated routing-golden.json with expected_route field (anthropic/skill/agent)
- Updated run-evals.py to validate route type coverage
- Updated CLAUDE.md and README.md for agents+skills architecture
- Jurisdiction overlays back in skills/legal-global-router/references/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Products (ip-protection, regulatory-monitoring, dsar-privacy, legal-spend,
  compliance-calendar) are now reference files in skills/legal-global-router/products/
  loaded on demand by the router — not standalone invocable skills
- Router is a skill (not an agent) — needs main conversation context,
  not isolated context window
- contract-intake remains as the sole agent (genuine orchestrator)
- contract-intake-agent skill content merged into agent system prompt
- 1 agent + 1 skill + 5 product refs + 6 jurisdiction overlays + CI infra

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s them

- Products restored as standalone skills/<name>/SKILL.md with user-invocable: false
- Router skill references product skills in routing table (not file loads)
- Each product is a proven unique capability worthy of standalone skill status
- Final: 1 agent + 6 skills (1 router + 5 products) + 6 jurisdiction overlays + CI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skill was absorbed into agent; eval references must match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mjunaidca mjunaidca changed the base branch from fix/legal-ops-dedup-v2 to main March 14, 2026 20:18
@mjunaidca mjunaidca merged commit 69b4aa2 into main Mar 14, 2026
@mjunaidca mjunaidca deleted the redesign/legal-ops-v3 branch March 14, 2026 20:20
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