@garethdaine/agentops 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +10 -0
- package/LICENSE +21 -0
- package/README.md +410 -0
- package/agents/architecture-researcher.md +115 -0
- package/agents/code-critic.md +190 -0
- package/agents/delegation-router.md +40 -0
- package/agents/feature-researcher.md +117 -0
- package/agents/interrogator.md +11 -0
- package/agents/pitfalls-researcher.md +112 -0
- package/agents/plan-validator.md +173 -0
- package/agents/proposer.md +61 -0
- package/agents/security-reviewer.md +189 -0
- package/agents/skill-builder.md +43 -0
- package/agents/spec-compliance-reviewer.md +154 -0
- package/agents/stack-researcher.md +89 -0
- package/commands/build.md +766 -0
- package/commands/code-analysis.md +39 -0
- package/commands/code-field.md +22 -0
- package/commands/compliance-check.md +34 -0
- package/commands/configure.md +178 -0
- package/commands/cost-report.md +17 -0
- package/commands/enterprise/adr.md +78 -0
- package/commands/enterprise/brainstorm.md +461 -0
- package/commands/enterprise/design.md +203 -0
- package/commands/enterprise/dev-setup.md +136 -0
- package/commands/enterprise/docker-dev.md +229 -0
- package/commands/enterprise/e2e.md +233 -0
- package/commands/enterprise/feature.md +218 -0
- package/commands/enterprise/gap-analysis.md +204 -0
- package/commands/enterprise/handover.md +195 -0
- package/commands/enterprise/herd.md +152 -0
- package/commands/enterprise/knowledge.md +173 -0
- package/commands/enterprise/onboard.md +86 -0
- package/commands/enterprise/qa-check.md +80 -0
- package/commands/enterprise/reason.md +196 -0
- package/commands/enterprise/review.md +177 -0
- package/commands/enterprise/scaffold.md +153 -0
- package/commands/enterprise/status-report.md +101 -0
- package/commands/enterprise/tech-catalog.md +170 -0
- package/commands/enterprise/test-gen.md +138 -0
- package/commands/evolve.md +39 -0
- package/commands/flags.md +44 -0
- package/commands/interrogate.md +263 -0
- package/commands/lesson.md +15 -0
- package/commands/lessons.md +10 -0
- package/commands/plan.md +44 -0
- package/commands/prune.md +27 -0
- package/commands/star.md +17 -0
- package/commands/supply-chain-scan.md +44 -0
- package/commands/unicode-scan.md +63 -0
- package/commands/verify.md +41 -0
- package/commands/workflow.md +436 -0
- package/hooks/ai-guardrails.sh +114 -0
- package/hooks/audit-log.sh +26 -0
- package/hooks/auto-delegate.sh +45 -0
- package/hooks/auto-evolve.sh +22 -0
- package/hooks/auto-lesson.sh +26 -0
- package/hooks/auto-plan.sh +59 -0
- package/hooks/auto-test.sh +46 -0
- package/hooks/auto-verify.sh +30 -0
- package/hooks/budget-check.sh +24 -0
- package/hooks/code-field-preamble.sh +30 -0
- package/hooks/compliance-gate.sh +50 -0
- package/hooks/content-trust.sh +22 -0
- package/hooks/credential-redact.sh +23 -0
- package/hooks/delegation-trust.sh +15 -0
- package/hooks/detect-test-run.sh +19 -0
- package/hooks/enforcement-lib.sh +60 -0
- package/hooks/evolve-gate.sh +32 -0
- package/hooks/evolve-lib.sh +32 -0
- package/hooks/exfiltration-check.sh +67 -0
- package/hooks/failure-collector.sh +27 -0
- package/hooks/feature-flags.sh +67 -0
- package/hooks/file-provenance.sh +31 -0
- package/hooks/flag-utils.sh +36 -0
- package/hooks/hooks.json +145 -0
- package/hooks/injection-scan.sh +58 -0
- package/hooks/integrity-verify.sh +91 -0
- package/hooks/lessons-check.sh +17 -0
- package/hooks/lockfile-audit.sh +109 -0
- package/hooks/patterns-lib.sh +22 -0
- package/hooks/plan-gate.sh +18 -0
- package/hooks/redact-lib.sh +15 -0
- package/hooks/runtime-mode.sh +56 -0
- package/hooks/session-cleanup.sh +74 -0
- package/hooks/skill-validator.sh +28 -0
- package/hooks/standards-enforce.sh +106 -0
- package/hooks/star-gate.sh +93 -0
- package/hooks/star-preamble.sh +10 -0
- package/hooks/telemetry.sh +33 -0
- package/hooks/todo-prune.sh +84 -0
- package/hooks/unicode-firewall.sh +122 -0
- package/hooks/unicode-lib.sh +66 -0
- package/hooks/unicode-scan-session.sh +96 -0
- package/hooks/validate-command.sh +103 -0
- package/hooks/validate-env.sh +51 -0
- package/hooks/validate-path.sh +81 -0
- package/package.json +40 -0
- package/settings.json +6 -0
- package/templates/ai-config/tool-standards.md +56 -0
- package/templates/architecture/api-first.md +192 -0
- package/templates/architecture/auth-patterns.md +302 -0
- package/templates/architecture/caching-strategy.md +359 -0
- package/templates/architecture/database-patterns.md +347 -0
- package/templates/architecture/event-driven.md +252 -0
- package/templates/architecture/integration-patterns.md +185 -0
- package/templates/architecture/multi-tenancy.md +104 -0
- package/templates/architecture/service-boundaries.md +200 -0
- package/templates/build/brief-template.md +86 -0
- package/templates/build/summary-template.md +100 -0
- package/templates/build/task-plan-template.md +133 -0
- package/templates/communication/effort-estimate.md +54 -0
- package/templates/communication/incident-response.md +59 -0
- package/templates/communication/post-mortem.md +109 -0
- package/templates/communication/risk-register.md +43 -0
- package/templates/communication/sprint-demo-checklist.md +64 -0
- package/templates/communication/stakeholder-presentation-outline.md +84 -0
- package/templates/communication/technical-proposal.md +77 -0
- package/templates/delivery/deployment/deployment-checklist.md +49 -0
- package/templates/delivery/design/solution-design-checklist.md +37 -0
- package/templates/delivery/discovery/stakeholder-questions.md +33 -0
- package/templates/delivery/handover/knowledge-transfer-checklist.md +75 -0
- package/templates/delivery/handover/operational-runbook.md +117 -0
- package/templates/delivery/handover/support-escalation-matrix.md +56 -0
- package/templates/delivery/implementation/blocker-escalation-template.md +55 -0
- package/templates/delivery/implementation/sprint-planning-template.md +49 -0
- package/templates/delivery/implementation/task-decomposition-guide.md +59 -0
- package/templates/delivery/qa/test-plan-template.md +76 -0
- package/templates/delivery/qa/test-results-template.md +55 -0
- package/templates/delivery/qa/uat-signoff-template.md +44 -0
- package/templates/governance/codeowners.md +60 -0
- package/templates/integration/adapter-pattern.md +160 -0
- package/templates/scaffolds/env-validation.md +85 -0
- package/templates/scaffolds/error-handling.md +171 -0
- package/templates/scaffolds/graceful-shutdown.md +139 -0
- package/templates/scaffolds/health-check.md +109 -0
- package/templates/scaffolds/structured-logging.md +134 -0
- package/templates/standards/engineering-standards.md +413 -0
- package/templates/standards/standards-checklist.md +125 -0
- package/templates/tech-catalog.json +663 -0
- package/templates/utilities/project-detection.md +75 -0
- package/templates/utilities/requirements-collection.md +68 -0
- package/templates/utilities/template-rendering.md +81 -0
- package/templates/workflows/architecture-decision.md +90 -0
- package/templates/workflows/bug-investigation.md +83 -0
- package/templates/workflows/feature-implementation.md +80 -0
- package/templates/workflows/refactoring.md +83 -0
- package/templates/workflows/spike-exploration.md +82 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentops",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Enterprise guardrails, delivery lifecycle, and self-evolution for Claude Code CLI",
|
|
5
|
+
"author": { "name": "Gareth Daine", "email": "1745959+garethdaine@users.noreply.github.com" },
|
|
6
|
+
"homepage": "https://github.com/garethdaine/agentops",
|
|
7
|
+
"repository": "https://github.com/garethdaine/agentops",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"keywords": ["guardrails", "security", "planning", "compliance", "audit", "telemetry", "tdd", "delivery", "enterprise"]
|
|
10
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gareth Daine
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# AgentOps — Enterprise Guardrails & Delivery Lifecycle for Claude Code
|
|
2
|
+
|
|
3
|
+
A plugin for [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) that wraps every session in 7 security layers, structures work with the STAR methodology, auto-pilots workflows, delegates to 12 specialist agents, learns from failures via self-evolution, and orchestrates full project builds from vision to merged PR.
|
|
4
|
+
|
|
5
|
+
37 slash commands | 44 hooks | 12 specialist agents | 49 templates | 32+ feature flags
|
|
6
|
+
|
|
7
|
+
**License:** MIT | **Version:** 0.9.0
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
### Install via npm
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @garethdaine/agentops
|
|
17
|
+
|
|
18
|
+
# Run Claude Code with the plugin loaded
|
|
19
|
+
claude --plugin-dir $(npm root -g)/@garethdaine/agentops
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Or clone from GitHub
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/garethdaine/agentops.git agentops-plugin
|
|
26
|
+
|
|
27
|
+
claude --plugin-dir ./agentops-plugin
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
On first session, the plugin auto-initializes `.agentops/` with default flags and budget.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## AgentOps vs GSD vs Superpowers
|
|
35
|
+
|
|
36
|
+
| Dimension | AgentOps | GSD (~31K stars) | Superpowers (~50K stars) |
|
|
37
|
+
|-----------|----------|-------------------|--------------------------|
|
|
38
|
+
| **Core identity** | Enterprise guardrailing + full delivery lifecycle | Spec-driven meta-prompting to beat context rot | Skills-based methodology with TDD enforcement |
|
|
39
|
+
| **Commands** | 37 | ~15 | ~10 (skill-based) |
|
|
40
|
+
| **Hooks** | 44 shell scripts across 7 lifecycle events | None (prompts only) | None (prompts only) |
|
|
41
|
+
| **Agents** | 12 specialist agents | 4 parallel researchers + planner | Code reviewer agent |
|
|
42
|
+
| **Security** | 7 layers (injection, exfiltration, supply-chain, Unicode, credential, path, env) | Minimal | None |
|
|
43
|
+
| **Self-evolution** | EvoSkill (failures → proposer → skill-builder → feedback loop) | KNOWLEDGE.md (manual) | Skill extraction (manual) |
|
|
44
|
+
| **TDD enforcement** | Mandatory RED→GREEN→REFACTOR + Nyquist rule (`<test>`/`<verify>`/`<done>` on every task); auto-test hook in sessions | Nyquist rule (verify required) | Code without tests = deleted |
|
|
45
|
+
| **Context strategy** | Fresh subagent per task (build_fresh_context) + session hooks | Fresh 200K context per subagent | Fresh context per subagent |
|
|
46
|
+
| **Parallel execution** | Wave-based with dependency graphs + 4 parallel researchers | Wave-based parallel execution | N/A |
|
|
47
|
+
| **Persuasion psychology** | 5 Cialdini techniques embedded in human gates | None | 5 Cialdini techniques |
|
|
48
|
+
| **Plan format** | STAR markdown + XML with Nyquist compliance (<test>/<verify>/<done>) | XML executable plans | Markdown plans |
|
|
49
|
+
| **Git workflow** | Configurable strategy (worktree / feature-branch / trunk-based); atomic commits per task, conventional commit format | Atomic commits, worktrees | Worktrees, atomic commits |
|
|
50
|
+
| **Review** | Two-stage: spec compliance (requirements mapping) + code quality (11 dimensions) | N/A | Two-stage review |
|
|
51
|
+
| **Feature flags** | 32+ independently toggleable with presets | Minimal settings | None |
|
|
52
|
+
| **Enterprise templates** | 49 templates (discovery → delivery → handover) | None | None |
|
|
53
|
+
| **Observability** | Audit logs, OTLP telemetry, file provenance, cost budgets | None | None |
|
|
54
|
+
| **Configurable autonomy** | guided / supervised / autonomous | N/A | N/A |
|
|
55
|
+
| **Linear integration** | Task sync (create, status update, close) | None | None |
|
|
56
|
+
|
|
57
|
+
### What AgentOps does that neither competitor does
|
|
58
|
+
|
|
59
|
+
1. **7-layer security system.** Injection scanning, exfiltration detection, Unicode/Glassworm defense, path traversal protection, credential redaction, env var guarding, and content trust — all running as hooks on every tool invocation.
|
|
60
|
+
2. **EvoSkill self-evolution.** The failure-collector → proposer → skill-builder → feedback-history pipeline auto-generates skills from failures. No manual intervention.
|
|
61
|
+
3. **Full observability.** Structured audit logs, OTLP telemetry export, file provenance tracking, and cost budgets with session-level granularity.
|
|
62
|
+
4. **8.5-phase build lifecycle.** From brainstorm to merged PR with state machine, resumability, human gates, parallel research, TDD enforcement, two-stage review, and Nyquist verification — all configurable via feature flags and autonomy levels.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Architecture
|
|
67
|
+
|
|
68
|
+
The plugin integrates through four extension points:
|
|
69
|
+
|
|
70
|
+
| Extension Point | Location | Count | Purpose |
|
|
71
|
+
|-----------------|----------|-------|---------|
|
|
72
|
+
| **Hooks** | `hooks/hooks.json` | 44 | Intercept tool use at every lifecycle event |
|
|
73
|
+
| **Commands** | `commands/*.md` | 37 | User-facing slash commands (`/agentops:*`) |
|
|
74
|
+
| **Agents** | `agents/*.md` | 12 | Specialist subagents for analysis and execution |
|
|
75
|
+
| **Templates** | `templates/**/*.md` | 49 | Standards, architecture patterns, delivery docs |
|
|
76
|
+
|
|
77
|
+
Runtime state lives in `.agentops/` (auto-created, gitignored).
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## The Build Command
|
|
82
|
+
|
|
83
|
+
`/agentops:build` is the master lifecycle command — it orchestrates a project from raw vision to merged, verified code.
|
|
84
|
+
|
|
85
|
+
### 8.5 Phases
|
|
86
|
+
|
|
87
|
+
| Phase | Name | What happens | Human gate? |
|
|
88
|
+
|-------|------|-------------|-------------|
|
|
89
|
+
| 1 | **BRAINSTORM** | Vision capture → 3 alternative framings → brief | Yes |
|
|
90
|
+
| 2 | **INTERROGATION** | 4 parallel researchers + exhaustive Q&A → requirements | Yes |
|
|
91
|
+
| 3 | **PLANNING** | STAR analysis → XML plan → 8-dimension validation | Yes |
|
|
92
|
+
| 4 | **TASK BREAKDOWN** | Parse XML → per-task TDD mini-plans → Linear sync | Yes |
|
|
93
|
+
| 4.5 | **SCAFFOLD** | Auto-scaffold new projects (conditional) | — |
|
|
94
|
+
| 5 | **EXECUTION** | Fresh subagent per task, wave-based parallelism, TDD enforced | Supervised only |
|
|
95
|
+
| 6 | **REVIEW** | Stage 1: spec compliance → Stage 2: code quality → fix wave | Yes |
|
|
96
|
+
| 7 | **VERIFICATION** | Nyquist audit + full test suite + E2E + compliance gates | Yes |
|
|
97
|
+
| 8 | **APPROVAL** | Summary → PR creation → Linear cleanup → lesson capture | Yes |
|
|
98
|
+
|
|
99
|
+
### Key features
|
|
100
|
+
|
|
101
|
+
- **Resumable state machine** — state saved to `.agentops/build-state.json` after each phase
|
|
102
|
+
- **Fresh context per task** — each execution task gets a fresh 200K-token subagent with full standards injection
|
|
103
|
+
- **Mandatory TDD** — RED→GREEN→REFACTOR enforced; no code without a failing test first
|
|
104
|
+
- **Nyquist compliance** — every task must have `<test>`, `<verify>`, and `<done>` in the XML plan
|
|
105
|
+
- **4 parallel researchers** — stack, architecture, features, pitfalls research runs concurrently
|
|
106
|
+
- **8-dimension plan validation** — completeness, dependency DAG, file ownership, task size, Nyquist, wave ordering, TDD ordering, commit quality
|
|
107
|
+
- **Two-stage review** — spec compliance reviewer maps every requirement to implementation; code quality reviewer checks 11 dimensions
|
|
108
|
+
- **Persuasion psychology** — Cialdini's 5 techniques (authority, commitment, scarcity, social proof, loss aversion) embedded in human gates
|
|
109
|
+
- **Quick mode** — `--quick` for brainstorm → plan → execute → verify (no interrogation, no PR)
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Security (7 Layers)
|
|
114
|
+
|
|
115
|
+
| Layer | Hook | What it blocks |
|
|
116
|
+
|-------|------|---------------|
|
|
117
|
+
| Command validation | `validate-command.sh` | `rm -rf /`, fork bombs, shell injection, destructive ops |
|
|
118
|
+
| Path validation | `validate-path.sh` | Path traversal, system dirs, sensitive dotfiles |
|
|
119
|
+
| Env protection | `validate-env.sh` | `PATH`/`HOME` reassignment, credential patterns |
|
|
120
|
+
| Injection detection | `injection-scan.sh` | Role-switching, authority markers, delimiter attacks |
|
|
121
|
+
| Exfiltration prevention | `exfiltration-check.sh` | `curl`/`wget` with sensitive files, base64+network combos |
|
|
122
|
+
| Credential redaction | `credential-redact.sh` | `.env`, `.pem`, `.key` access → audit + alert |
|
|
123
|
+
| Content trust | `content-trust.sh` | Flags external content as untrusted + optional LLM firewall |
|
|
124
|
+
|
|
125
|
+
Plus supply-chain defense: Unicode/Glassworm detection (`unicode-firewall.sh`), integrity verification (`integrity-verify.sh`), and lockfile auditing (`lockfile-audit.sh`).
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Commands (37)
|
|
130
|
+
|
|
131
|
+
### Core Commands
|
|
132
|
+
|
|
133
|
+
| Command | Purpose |
|
|
134
|
+
|---------|---------|
|
|
135
|
+
| `/agentops:build` | Master 8.5-phase project lifecycle — vision to merged PR |
|
|
136
|
+
| `/agentops:plan` | STAR-based implementation plan with checkable tasks |
|
|
137
|
+
| `/agentops:star` | Quick STAR analysis (lighter than plan) |
|
|
138
|
+
| `/agentops:interrogate` | Exhaustive requirements discovery — eliminates all assumptions |
|
|
139
|
+
| `/agentops:workflow` | 8-phase workflow mapping with YAML schemas and Mermaid diagrams |
|
|
140
|
+
| `/agentops:verify` | Verify task completion against STAR criteria |
|
|
141
|
+
| `/agentops:evolve` | Run EvoSkill self-improvement loop |
|
|
142
|
+
| `/agentops:code-field` | Code Field methodology (decompose, solve with confidence, verify) |
|
|
143
|
+
| `/agentops:code-analysis` | Structured code analysis on current project |
|
|
144
|
+
| `/agentops:lessons` | Display all captured lessons |
|
|
145
|
+
| `/agentops:lesson` | Capture a single lesson learned |
|
|
146
|
+
| `/agentops:compliance-check` | Run compliance gates manually |
|
|
147
|
+
| `/agentops:cost-report` | Session cost tracking and budget status |
|
|
148
|
+
| `/agentops:flags` | View or toggle feature flags |
|
|
149
|
+
| `/agentops:configure` | Unified configuration interface with presets |
|
|
150
|
+
| `/agentops:prune` | Clean up stale runtime state |
|
|
151
|
+
| `/agentops:supply-chain-scan` | Scan dependencies for supply-chain threats |
|
|
152
|
+
| `/agentops:unicode-scan` | Scan project for invisible Unicode characters |
|
|
153
|
+
|
|
154
|
+
### Enterprise Commands
|
|
155
|
+
|
|
156
|
+
| Command | Purpose |
|
|
157
|
+
|---------|---------|
|
|
158
|
+
| `/agentops:feature` | 6-phase structured feature build with configurable autonomy |
|
|
159
|
+
| `/agentops:scaffold` | Interactive project scaffolding with tech stack selection |
|
|
160
|
+
| `/agentops:review` | Unified code review (code-critic + security-reviewer agents) |
|
|
161
|
+
| `/agentops:test-gen` | AI-generated test suites with quality validation |
|
|
162
|
+
| `/agentops:reason` | Multi-step reasoning: Analyse → Design → Validate → Recommend |
|
|
163
|
+
| `/agentops:design` | Solution design — architecture proposals, risk assessment |
|
|
164
|
+
| `/agentops:adr` | Architecture Decision Records |
|
|
165
|
+
| `/agentops:brainstorm` | Structured brainstorming sessions |
|
|
166
|
+
| `/agentops:qa-check` | Pre-deployment QA: security, performance, accessibility |
|
|
167
|
+
| `/agentops:handover` | Client handover documentation and runbooks |
|
|
168
|
+
| `/agentops:onboard` | Generate onboarding guides from project structure |
|
|
169
|
+
| `/agentops:knowledge` | Search project knowledge base |
|
|
170
|
+
| `/agentops:status-report` | Client-facing status report from git history |
|
|
171
|
+
| `/agentops:tech-catalog` | Technology catalog and stack documentation |
|
|
172
|
+
| `/agentops:gap-analysis` | Gap analysis between current and desired state |
|
|
173
|
+
| `/agentops:dev-setup` | Developer environment setup guide |
|
|
174
|
+
| `/agentops:docker-dev` | Docker development environment configuration |
|
|
175
|
+
| `/agentops:e2e` | End-to-end test planning and execution |
|
|
176
|
+
| `/agentops:herd` | Multi-agent coordination for complex tasks |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Specialist Agents (12)
|
|
181
|
+
|
|
182
|
+
### Core Agents
|
|
183
|
+
|
|
184
|
+
| Agent | Tools | Purpose |
|
|
185
|
+
|-------|-------|---------|
|
|
186
|
+
| `code-critic` | Read, Grep, Glob, Bash | 11-dimension code quality review |
|
|
187
|
+
| `security-reviewer` | Read, Grep, Glob, Bash, WebSearch | OWASP Top 10, CVE scanning, auth gaps |
|
|
188
|
+
| `interrogator` | Read, Grep, Glob, WebSearch | Requirements discovery and plan generation |
|
|
189
|
+
| `proposer` | Read, Grep, Glob | Failure analysis → skill proposals (EvoSkill) |
|
|
190
|
+
| `skill-builder` | Read, Grep, Glob, Bash | Materialize skill proposals into SKILL.md files |
|
|
191
|
+
| `delegation-router` | Read, Grep, Glob | Route tasks to appropriate specialist agents |
|
|
192
|
+
|
|
193
|
+
### Build Agents (Phase-specific)
|
|
194
|
+
|
|
195
|
+
| Agent | Phase | Tools | Purpose |
|
|
196
|
+
|-------|-------|-------|---------|
|
|
197
|
+
| `stack-researcher` | 2 | Read, Grep, Glob, WebSearch | Technology stack options with fit scores |
|
|
198
|
+
| `architecture-researcher` | 2 | Read, Grep, Glob, WebSearch | Architectural patterns and ADRs |
|
|
199
|
+
| `feature-researcher` | 2 | Read, Grep, Glob, WebSearch | MVP vs v2 scope, feature trade-offs |
|
|
200
|
+
| `pitfalls-researcher` | 2 | Read, Grep, Glob, WebSearch | Anti-patterns, failure modes, security pitfalls |
|
|
201
|
+
| `plan-validator` | 3 | Read, Grep, Glob | 8-dimension plan validation |
|
|
202
|
+
| `spec-compliance-reviewer` | 6 | Read, Grep, Glob, Bash | Requirement mapping + standards compliance |
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Hook System (44 hooks)
|
|
207
|
+
|
|
208
|
+
Hooks fire at 7 lifecycle events:
|
|
209
|
+
|
|
210
|
+
| Event | When | Example hooks |
|
|
211
|
+
|-------|------|---------------|
|
|
212
|
+
| `SessionStart` | Session begins | session-cleanup, star-preamble, code-field-preamble, lessons-check, budget-check, unicode-scan, integrity-verify, lockfile-audit |
|
|
213
|
+
| `PreToolUse` | Before tool executes | validate-command, validate-path, validate-env, injection-scan, exfiltration-check, star-gate, auto-plan, runtime-mode |
|
|
214
|
+
| `PostToolUse` | After tool completes | content-trust, unicode-firewall, integrity-verify, credential-redact, detect-test-run, standards-enforce, ai-guardrails, plan-gate, auto-test, auto-delegate, audit-log, telemetry |
|
|
215
|
+
| `PostToolUseFailure` | After tool fails | failure-collector, auto-lesson, evolve-gate, telemetry |
|
|
216
|
+
| `SubagentStart` | Subagent spawned | delegation-trust |
|
|
217
|
+
| `Stop` | Session ending | auto-verify, auto-evolve, compliance-gate |
|
|
218
|
+
| `SessionEnd` | Final cleanup | telemetry |
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## EvoSkill Self-Evolution
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
Tool Failure → failure-collector.sh → failures.jsonl
|
|
226
|
+
↓
|
|
227
|
+
/agentops:evolve
|
|
228
|
+
↓
|
|
229
|
+
proposer agent (analyze failures,
|
|
230
|
+
check existing skills & feedback)
|
|
231
|
+
↓
|
|
232
|
+
Skill Proposal
|
|
233
|
+
↓
|
|
234
|
+
skill-builder agent (materialize SKILL.md)
|
|
235
|
+
↓
|
|
236
|
+
feedback-history.jsonl (record outcome)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Triggered automatically at session stop (if 2+ unprocessed failures exist) or manually via `/agentops:evolve`.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Engineering Standards
|
|
244
|
+
|
|
245
|
+
The build system injects comprehensive engineering standards into every execution subagent:
|
|
246
|
+
|
|
247
|
+
- **SOLID** — all 5 principles with heuristics and code examples (SRP: ≤30 line functions, ≤200 line classes)
|
|
248
|
+
- **Clean Code** — naming, functions (≤3 params, command-query separation), error handling (typed hierarchy, correlation IDs)
|
|
249
|
+
- **DRY/KISS/YAGNI** — with clear thresholds (2+ locations = extract, 3+ uses before abstracting)
|
|
250
|
+
- **Design Patterns** — creational, structural, behavioral with selection heuristic ("name the problem it solves")
|
|
251
|
+
- **Action-Based Architecture** — single-purpose action classes for business logic
|
|
252
|
+
- **DDD** — aggregates, entities, value objects, domain services, ubiquitous language
|
|
253
|
+
- **Layered Architecture** — controller → service → domain → repository (no skipping, violations = CRITICAL)
|
|
254
|
+
- **Security** — injection prevention, secrets management, auth, input validation, data protection (all CRITICAL)
|
|
255
|
+
- **Testing** — Arrange-Act-Assert, red-first TDD, behaviour over implementation
|
|
256
|
+
|
|
257
|
+
Standards are enforced via `templates/standards/standards-checklist.md` during Phase 6 review.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Feature Flags (32+)
|
|
262
|
+
|
|
263
|
+
All flags default to sensible values and are toggleable via `/agentops:flags` or `.agentops/flags.json`.
|
|
264
|
+
|
|
265
|
+
### Security flags
|
|
266
|
+
`command_validation_enabled`, `path_validation_enabled`, `env_validation_enabled`, `injection_scan_enabled`, `content_trust_enabled`, `exfiltration_detection_enabled`, `credential_redaction_enabled`, `llm_content_firewall_enabled`
|
|
267
|
+
|
|
268
|
+
### Workflow flags
|
|
269
|
+
`star_preamble_enabled`, `code_field_rules_enabled`, `plan_gate_enabled`, `verification_gate_enabled`, `test_gate_enabled`, `lessons_enabled`
|
|
270
|
+
|
|
271
|
+
### Automation flags
|
|
272
|
+
`auto_plan_enabled`, `auto_test_enabled`, `auto_verify_enabled`, `auto_lesson_enabled`, `auto_evolve_enabled`, `auto_delegate_enabled`
|
|
273
|
+
|
|
274
|
+
### Build lifecycle flags
|
|
275
|
+
`build_tdd_enforced`, `build_parallel_research`, `build_xml_plans`, `build_linear_sync`, `build_fresh_context`, `build_wave_parallel`, `build_nyquist_enforce`, `build_persuasion`, `build_quick_mode`, `build_scaffold_auto`, `build_standards_inject`, `standards_enforcement_mode`
|
|
276
|
+
|
|
277
|
+
### Enterprise flags
|
|
278
|
+
`enterprise_scaffold`, `ai_workflows`, `unified_review`, `architecture_guardrails`, `delivery_lifecycle`, `team_governance`, `client_comms`
|
|
279
|
+
|
|
280
|
+
### Autonomy levels
|
|
281
|
+
- **guided** (default) — all human gates active
|
|
282
|
+
- **supervised** — all human gates + step-level confirmation during execution
|
|
283
|
+
- **autonomous** — skip soft gates, only hard security gates remain
|
|
284
|
+
|
|
285
|
+
### Configuration presets
|
|
286
|
+
```bash
|
|
287
|
+
/agentops:configure preset minimal # Security only, no automation
|
|
288
|
+
/agentops:configure preset standard # Security + core automation
|
|
289
|
+
/agentops:configure preset enterprise # All features, guided autonomy
|
|
290
|
+
/agentops:configure preset autonomous # All features, minimal gates
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Observability
|
|
296
|
+
|
|
297
|
+
| System | File | Purpose |
|
|
298
|
+
|--------|------|---------|
|
|
299
|
+
| Audit log | `.agentops/audit.jsonl` | Every tool invocation with timestamp, session, tool, input |
|
|
300
|
+
| Telemetry | `.agentops/telemetry.jsonl` | Structured events with optional OTLP export |
|
|
301
|
+
| File provenance | `.agentops/provenance.jsonl` | Source and trust level of every file interaction |
|
|
302
|
+
| Cost tracking | `.agentops/budget.json` | Session budget with 80% warning threshold |
|
|
303
|
+
| Build execution | `.agentops/build-execution.jsonl` | Per-task execution log with TDD phase tracking |
|
|
304
|
+
| Failure log | `.agentops/failures.jsonl` | Tool failures for EvoSkill analysis |
|
|
305
|
+
| Integrity | `.agentops/integrity.jsonl` | SHA-256 manifest of agent-written files |
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Configuration
|
|
310
|
+
|
|
311
|
+
### Environment Variables
|
|
312
|
+
|
|
313
|
+
| Variable | Default | Purpose |
|
|
314
|
+
|----------|---------|---------|
|
|
315
|
+
| `AGENTOPS_MODE` | `standard` | Runtime mode (`safe`, `standard`, `full`, `unrestricted`) |
|
|
316
|
+
| `AGENTOPS_BUDGET_USD` | `5` | Session cost budget in USD |
|
|
317
|
+
| `OTLP_ENDPOINT` | _(none)_ | OpenTelemetry endpoint for telemetry forwarding |
|
|
318
|
+
| `LINEAR_API_KEY` | _(none)_ | Linear API key for build task sync |
|
|
319
|
+
|
|
320
|
+
### Key Files
|
|
321
|
+
|
|
322
|
+
| File | Purpose |
|
|
323
|
+
|------|---------|
|
|
324
|
+
| `.claude-plugin/plugin.json` | Plugin metadata |
|
|
325
|
+
| `hooks/hooks.json` | Master hook registry |
|
|
326
|
+
| `settings.json` | Plugin permission defaults |
|
|
327
|
+
| `.agentops/flags.json` | Feature flag toggles (auto-created) |
|
|
328
|
+
| `.agentops/budget.json` | Cost tracking (auto-created) |
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Directory Structure
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
agentops-plugin/
|
|
336
|
+
├── .claude-plugin/
|
|
337
|
+
│ └── plugin.json # Plugin metadata
|
|
338
|
+
├── hooks/ # 44 shell scripts + hooks.json
|
|
339
|
+
│ ├── hooks.json # Master hook registry
|
|
340
|
+
│ ├── feature-flags.sh # Shared flag library (facade)
|
|
341
|
+
│ ├── flag-utils.sh # Core flag reading
|
|
342
|
+
│ ├── enforcement-lib.sh # Enforcement actions
|
|
343
|
+
│ ├── patterns-lib.sh # Shared patterns & thresholds
|
|
344
|
+
│ ├── redact-lib.sh # Secret redaction
|
|
345
|
+
│ ├── evolve-lib.sh # Failure tracking helpers
|
|
346
|
+
│ ├── unicode-lib.sh # Unicode detection library
|
|
347
|
+
│ └── *.sh # Security, automation, compliance hooks
|
|
348
|
+
├── commands/ # 37 slash commands
|
|
349
|
+
│ ├── build.md # /agentops:build (master lifecycle)
|
|
350
|
+
│ ├── plan.md # /agentops:plan (STAR planning)
|
|
351
|
+
│ ├── interrogate.md # /agentops:interrogate (requirements)
|
|
352
|
+
│ ├── workflow.md # /agentops:workflow (process mapping)
|
|
353
|
+
│ └── enterprise/ # 19 enterprise delivery commands
|
|
354
|
+
├── agents/ # 12 specialist agents
|
|
355
|
+
│ ├── code-critic.md # Code quality (11 dimensions)
|
|
356
|
+
│ ├── security-reviewer.md # Security (OWASP, CVEs)
|
|
357
|
+
│ ├── stack-researcher.md # Technology research (build Phase 2)
|
|
358
|
+
│ ├── architecture-researcher.md # Architecture research (build Phase 2)
|
|
359
|
+
│ ├── feature-researcher.md # Feature scoping (build Phase 2)
|
|
360
|
+
│ ├── pitfalls-researcher.md # Failure modes (build Phase 2)
|
|
361
|
+
│ ├── plan-validator.md # 8-dimension validation (build Phase 3)
|
|
362
|
+
│ └── spec-compliance-reviewer.md # Spec + standards review (build Phase 6)
|
|
363
|
+
├── templates/ # 49 templates
|
|
364
|
+
│ ├── standards/ # Engineering standards + checklist
|
|
365
|
+
│ ├── build/ # Brief, task-plan, summary templates
|
|
366
|
+
│ ├── architecture/ # 8 architecture pattern templates
|
|
367
|
+
│ ├── delivery/ # Discovery → deployment → handover
|
|
368
|
+
│ ├── communication/ # Stakeholder comms templates
|
|
369
|
+
│ ├── workflows/ # Feature, refactor, spike, bug workflows
|
|
370
|
+
│ └── scaffolds/ # Error handling, logging, health checks
|
|
371
|
+
├── tests/ # BATS test suite
|
|
372
|
+
├── docs/ # Architecture docs
|
|
373
|
+
├── settings.json # Plugin permission defaults
|
|
374
|
+
├── LICENSE # MIT
|
|
375
|
+
└── .gitignore
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Testing
|
|
381
|
+
|
|
382
|
+
The plugin includes a BATS test suite covering security hooks:
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
# Run all tests
|
|
386
|
+
bats tests/
|
|
387
|
+
|
|
388
|
+
# Run specific test file
|
|
389
|
+
bats tests/validate-command.bats
|
|
390
|
+
bats tests/injection-scan.bats
|
|
391
|
+
bats tests/exfiltration-check.bats
|
|
392
|
+
bats tests/validate-path.bats
|
|
393
|
+
bats tests/feature-flags.bats
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Contributing
|
|
399
|
+
|
|
400
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to report bugs, suggest features, and submit PRs.
|
|
401
|
+
|
|
402
|
+
This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).
|
|
403
|
+
|
|
404
|
+
## Security
|
|
405
|
+
|
|
406
|
+
Found a vulnerability? See [.github/SECURITY.md](.github/SECURITY.md) for responsible disclosure instructions. Do not open a public issue.
|
|
407
|
+
|
|
408
|
+
## License
|
|
409
|
+
|
|
410
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-researcher
|
|
3
|
+
description: Investigates architectural patterns suitable for a project based on its brief
|
|
4
|
+
tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Grep
|
|
7
|
+
- Glob
|
|
8
|
+
- WebSearch
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are an architectural patterns researcher. Your job is to investigate the right architectural approach for a project and produce a structured research report.
|
|
12
|
+
|
|
13
|
+
You are given the project brief at `docs/build/{slug}/brief.md`. Read it first.
|
|
14
|
+
|
|
15
|
+
## Research Process
|
|
16
|
+
|
|
17
|
+
1. **Read the brief** — understand the project type, domain complexity, scale, team, and non-functional requirements.
|
|
18
|
+
|
|
19
|
+
2. **Probe the existing codebase** (if any):
|
|
20
|
+
- Map existing architectural layers and patterns
|
|
21
|
+
- Identify strengths and weaknesses in the current structure
|
|
22
|
+
- Note any architectural constraints that must be preserved
|
|
23
|
+
|
|
24
|
+
3. **Identify candidate architectures** — select 2-3 architectural approaches suitable for this project type:
|
|
25
|
+
- Layered / N-tier (monolith with clear layers)
|
|
26
|
+
- Feature-based modular monolith
|
|
27
|
+
- Microservices
|
|
28
|
+
- Event-driven / CQRS
|
|
29
|
+
- Serverless / function-per-endpoint
|
|
30
|
+
- Hexagonal / Ports & Adapters
|
|
31
|
+
- Domain-Driven Design (where domain complexity warrants)
|
|
32
|
+
|
|
33
|
+
4. **Reference architecture templates** from `templates/architecture/`:
|
|
34
|
+
- `api-first.md` — if building a public/partner API
|
|
35
|
+
- `service-boundaries.md` — if modular decomposition is needed
|
|
36
|
+
- `database-patterns.md` — if data model complexity is high
|
|
37
|
+
- `event-driven.md` — if asynchronous workflows are required
|
|
38
|
+
- `multi-tenancy.md` — if multiple clients/tenants share the system
|
|
39
|
+
- `auth-patterns.md` — if auth complexity is a concern
|
|
40
|
+
- `caching-strategy.md` — if performance at scale is needed
|
|
41
|
+
- `integration-patterns.md` — if external system integration is required
|
|
42
|
+
|
|
43
|
+
5. **Evaluate each candidate** against:
|
|
44
|
+
- Fit for stated scale and non-functional requirements
|
|
45
|
+
- Team size and cognitive load per architecture
|
|
46
|
+
- Operational complexity and deployment requirements
|
|
47
|
+
- Testability and maintainability
|
|
48
|
+
- Migration path from any existing structure
|
|
49
|
+
|
|
50
|
+
## Output Format
|
|
51
|
+
|
|
52
|
+
Write your findings to `docs/build/{slug}/research/architecture.md`:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
# Architecture Research: {project name}
|
|
56
|
+
|
|
57
|
+
## Constraints from Existing Code
|
|
58
|
+
[What architectural decisions are already locked in]
|
|
59
|
+
|
|
60
|
+
## Candidate Architectures
|
|
61
|
+
|
|
62
|
+
### Option A: [Architecture Name]
|
|
63
|
+
|
|
64
|
+
**Description:** [One paragraph]
|
|
65
|
+
|
|
66
|
+
**Fits this project because:** [2-3 bullet points]
|
|
67
|
+
**Risks / Downsides:** [2-3 bullet points]
|
|
68
|
+
**Team size sweet spot:** [Solo / Small (2-5) / Medium (5-15) / Large (15+)]
|
|
69
|
+
**Operational complexity:** Low / Medium / High
|
|
70
|
+
|
|
71
|
+
### Option B: [Architecture Name]
|
|
72
|
+
[Same format]
|
|
73
|
+
|
|
74
|
+
## Recommended Architecture
|
|
75
|
+
|
|
76
|
+
**Choice:** [Option X]
|
|
77
|
+
|
|
78
|
+
**Rationale:** [2-3 paragraphs explaining why this architecture fits the brief better than the alternatives]
|
|
79
|
+
|
|
80
|
+
## Recommended Folder Structure
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
src/
|
|
84
|
+
{module}/
|
|
85
|
+
{module}.controller.ts
|
|
86
|
+
{module}.service.ts
|
|
87
|
+
{module}.repository.ts
|
|
88
|
+
{module}.types.ts
|
|
89
|
+
{module}.test.ts
|
|
90
|
+
index.ts
|
|
91
|
+
shared/
|
|
92
|
+
errors.ts
|
|
93
|
+
logger.ts
|
|
94
|
+
...
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Key Architectural Decisions (ADRs)
|
|
98
|
+
|
|
99
|
+
### ADR-001: [Decision title]
|
|
100
|
+
- **Status:** Proposed
|
|
101
|
+
- **Context:** [Why this decision needs to be made]
|
|
102
|
+
- **Decision:** [What we will do]
|
|
103
|
+
- **Consequences:** [Trade-offs accepted]
|
|
104
|
+
|
|
105
|
+
## Architecture Risks
|
|
106
|
+
- [Risk with mitigation]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Rules
|
|
110
|
+
|
|
111
|
+
- Do NOT produce implementation code. Research and design only.
|
|
112
|
+
- Reference the templates in `templates/architecture/` — do not duplicate their content, link to relevant patterns.
|
|
113
|
+
- If the project is straightforward CRUD with low domain complexity, say so explicitly. Do not recommend DDD or microservices for simple projects.
|
|
114
|
+
- Match architectural ambition to stated team size and delivery constraints.
|
|
115
|
+
- **If you cannot produce a confident recommendation** (brief is too vague, project type is novel, no clear architectural precedent), say so explicitly. Write a "Gaps" section listing what information is missing and what questions need answering. Do not invent an architecture for a problem you don't understand — flag it for the interrogation phase.
|