pantheon-opencode 1.0.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/AGENTS.md +37 -0
- package/LICENSE +21 -0
- package/README.md +1013 -0
- package/bin/pantheon-init.mjs +183 -0
- package/commands/pantheon-audit.md +25 -0
- package/commands/pantheon-bg.md +10 -0
- package/commands/pantheon-consolidate.md +11 -0
- package/commands/pantheon-deepwork.md +128 -0
- package/commands/pantheon-doc.md +10 -0
- package/commands/pantheon-focus.md +9 -0
- package/commands/pantheon-forget.md +58 -0
- package/commands/pantheon-hash.md +11 -0
- package/commands/pantheon-optimize.md +79 -0
- package/commands/pantheon-remember.md +44 -0
- package/commands/pantheon-search.md +48 -0
- package/commands/pantheon-status.md +71 -0
- package/commands/pantheon-todo.md +11 -0
- package/commands/pantheon.md +49 -0
- package/docs/AGENT-MCP.md +194 -0
- package/docs/ARCHITECTURE.md +384 -0
- package/docs/BRANCH-PROTECTION.md +142 -0
- package/docs/INDEX.md +81 -0
- package/docs/INSTALLATION.md +217 -0
- package/docs/MCP.md +238 -0
- package/docs/MEMORY.md +471 -0
- package/docs/MIGRATION-MEMORY-BANK.md +139 -0
- package/docs/PLATFORMS.md +5 -0
- package/docs/QUICKSTART.md +49 -0
- package/docs/README.md +18 -0
- package/docs/RELEASING.md +256 -0
- package/docs/SETUP.md +5 -0
- package/docs/UPGRADING.md +41 -0
- package/docs/mcp-recommendations.md +439 -0
- package/docs/mcp-tools.md +156 -0
- package/docs/mcp-user-guide.md +204 -0
- package/docs/persistence-mcp.md +111 -0
- package/package.json +72 -0
- package/pantheon.schema.json +158 -0
- package/scripts/__init__.py +0 -0
- package/scripts/_pantheon_paths.py +68 -0
- package/scripts/check-version-consistency.sh +23 -0
- package/scripts/code_mode_server.py +202 -0
- package/scripts/doctor.mjs +763 -0
- package/scripts/generate-prompts.sh +222 -0
- package/scripts/generate-routing-docs.mjs +104 -0
- package/scripts/hash_verify.py +192 -0
- package/scripts/init-pantheon-mcp.sh +118 -0
- package/scripts/install/agents-md.mjs +214 -0
- package/scripts/install/health-check.mjs +196 -0
- package/scripts/install/migrate.mjs +209 -0
- package/scripts/install/opencode.mjs +645 -0
- package/scripts/install/shared.mjs +655 -0
- package/scripts/install/venv.mjs +116 -0
- package/scripts/install-mcp.mjs +885 -0
- package/scripts/install.mjs +26 -0
- package/scripts/manifest.mjs +622 -0
- package/scripts/mcp_persistence_server.py +459 -0
- package/scripts/mcp_resources_server.py +206 -0
- package/scripts/memory_cache.py +78 -0
- package/scripts/memory_mcp_server.py +605 -0
- package/scripts/paths.py +64 -0
- package/scripts/prune_context.py +72 -0
- package/scripts/release-bundle.mjs +109 -0
- package/scripts/scrub-secrets.py +282 -0
- package/scripts/scrub_secrets.py +281 -0
- package/scripts/test-context-compression.sh +166 -0
- package/scripts/themis_heuristic_scan.py +287 -0
- package/scripts/todo_enforcer.py +242 -0
- package/scripts/uninstall.mjs +1057 -0
- package/scripts/validate-routing.mjs +160 -0
- package/scripts/validate_agent_frontmatter.py +226 -0
- package/scripts/versioning.mjs +254 -0
- package/skills-lock.json +16 -0
- package/src/agents/aphrodite.md +162 -0
- package/src/agents/apollo.md +109 -0
- package/src/agents/athena.md +226 -0
- package/src/agents/demeter.md +146 -0
- package/src/agents/gaia.md +82 -0
- package/src/agents/hephaestus.md +105 -0
- package/src/agents/hermes.md +302 -0
- package/src/agents/iris.md +99 -0
- package/src/agents/mnemosyne.md +226 -0
- package/src/agents/nyx.md +87 -0
- package/src/agents/prometheus.md +199 -0
- package/src/agents/talos.md +93 -0
- package/src/agents/themis.md +187 -0
- package/src/agents/zeus.md +209 -0
- package/src/instructions/agent-return-format.instructions.md +26 -0
- package/src/instructions/backend-standards.instructions.md +45 -0
- package/src/instructions/documentation-standards.instructions.md +53 -0
- package/src/instructions/frontend-standards.instructions.md +46 -0
- package/src/instructions/memory-protocol.instructions.md +67 -0
- package/src/instructions/yagni.instructions.md +21 -0
- package/src/instructions/zeus-anti-stall.instructions.md +72 -0
- package/src/instructions/zeus-communication-rules.instructions.md +15 -0
- package/src/instructions/zeus-council-synthesis.instructions.md +105 -0
- package/src/instructions/zeus-timeout-retry.instructions.md +127 -0
- package/src/mcp/_pantheon_paths.py +67 -0
- package/src/mcp/code_mode_server.py +202 -0
- package/src/mcp/init-pantheon-mcp.sh +118 -0
- package/src/mcp/install-mcp.mjs +885 -0
- package/src/mcp/mcp_persistence_server.py +458 -0
- package/src/mcp/mcp_resources_server.py +205 -0
- package/src/mcp/memory_mcp_server.py +604 -0
- package/src/mcp/requirements-mcp-core.txt +5 -0
- package/src/mcp/requirements-mcp.txt +5 -0
- package/src/plugin.ts +19 -0
- package/src/plugins/tui/dist/tui.js +143 -0
- package/src/plugins/tui/dist/tui.tsx +144 -0
- package/src/plugins/tui/package.json +32 -0
- package/src/plugins/tui/src/index.tsx +144 -0
- package/src/plugins/tui/tsdown.config.ts +22 -0
- package/src/routing.yml +499 -0
- package/src/skills/README.md +230 -0
- package/src/skills/agent-coordination/SKILL.md +95 -0
- package/src/skills/artifact-management/SKILL.md +118 -0
- package/src/skills/auto-continue/SKILL.md +280 -0
- package/src/skills/code-review-checklist/SKILL.md +139 -0
- package/src/skills/context-compression/SKILL.md +861 -0
- package/src/skills/git-workflow-and-versioning/SKILL.md +32 -0
- package/src/skills/incremental-implementation/SKILL.md +27 -0
- package/src/skills/memory-bank/SKILL.md +165 -0
- package/src/skills/orchestration-workflow/SKILL.md +311 -0
- package/src/skills/security-hardening/SKILL.md +36 -0
- package/src/skills/session-goal/SKILL.md +138 -0
- package/src/skills/spec-driven-development/SKILL.md +23 -0
- package/src/skills/tdd-with-agents/SKILL.md +170 -0
- package/src/skills/visual-review-pipeline/SKILL.md +200 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auto-continue
|
|
3
|
+
description: "Auto-continue through todos with idle detection and safety gates. Use for multi-step orchestration."
|
|
4
|
+
context: fork
|
|
5
|
+
globs: []
|
|
6
|
+
alwaysApply: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Auto-Continue Mode
|
|
10
|
+
|
|
11
|
+
Disciplined automatic continuation through multi-step tasks. Eliminates unnecessary pauses while preserving mandatory safety gates.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Core Principle
|
|
16
|
+
|
|
17
|
+
> **Auto-continue through unambiguous work. Stop only at real decision points.**
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Mandatory Gates (ALWAYS STOP)
|
|
22
|
+
|
|
23
|
+
| Gate | Trigger | What happens |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| **GATE 0 — Agora Gate** | Agora outputs `AWAITING_APPROVAL` OR `## 🏛️ Agora Council` synthesis block appears | **HARD STOP.** Do not call any tool, do not continue any todo, do not suggest next steps. Wait for user to type: APPROVE / REQUEST CHANGES / DISCARD. "ok", "yes", "sure", "continue" are NOT valid. |
|
|
26
|
+
| **GATE 1 — Plan Approval** | Athena generates a plan | User confirms scope before code is written |
|
|
27
|
+
| **GATE 2 — Phase Review** | Themis reviews implementation | User sees changes before next phase |
|
|
28
|
+
| **GATE 3 — Git Commit** | After each phase is approved | User controls git history; no auto-commit |
|
|
29
|
+
|
|
30
|
+
> **Agora is always GATE 0**: any response containing `AWAITING_APPROVAL` or a `## 🏛️ Agora Council` block overrides all auto-continue rules.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Auto-Continue Rules
|
|
35
|
+
|
|
36
|
+
**Continue automatically when:**
|
|
37
|
+
- Next todo is a direct consequence of the current one
|
|
38
|
+
- Action is reversible (file edits, tests, linting)
|
|
39
|
+
- Scope is within the approved plan
|
|
40
|
+
- No new ambiguity has emerged
|
|
41
|
+
|
|
42
|
+
**Stop and ask when:**
|
|
43
|
+
- A todo requires a decision not covered by the plan
|
|
44
|
+
- An unexpected error changes the approach
|
|
45
|
+
- A dependency is missing or broken
|
|
46
|
+
- A task would exceed remaining `steps` budget
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Implementation Pattern
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
1. Create todos for all steps at start
|
|
56
|
+
2. Mark first todo in_progress
|
|
57
|
+
3. Complete work → mark completed immediately
|
|
58
|
+
4. Mark next todo in_progress → repeat
|
|
59
|
+
5. Do NOT ask "should I continue?" between clear steps
|
|
60
|
+
6. Stop at Gate 1, 2, or 3
|
|
61
|
+
7. After gate approval, resume with next todo
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Never batch-complete todos.** Mark each completed as soon as done.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Safety Checks Before Continuing
|
|
69
|
+
|
|
70
|
+
- [ ] Previous step completed successfully (tests pass, no errors)
|
|
71
|
+
- [ ] Next step is within approved plan scope
|
|
72
|
+
- [ ] No new blocking issues emerged
|
|
73
|
+
- [ ] `steps` counter has sufficient budget remaining
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Cooldown Pattern
|
|
78
|
+
|
|
79
|
+
Between phases, execute a brief synthesis handoff to prevent context drift and prepare the next phase:
|
|
80
|
+
|
|
81
|
+
### Phase Summary Template
|
|
82
|
+
```
|
|
83
|
+
Phase N complete. Summary:
|
|
84
|
+
- What was done: <2 bullet points>
|
|
85
|
+
- What changed: <files modified>
|
|
86
|
+
- What's next: <Gate 2 review OR next phase>
|
|
87
|
+
- Will continue: <YES / after gate approval>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Cooldown Rules
|
|
91
|
+
1. **Between parallel waves (no dependency):** No cooldown needed — wave results are independent
|
|
92
|
+
2. **Between sequential waves (with dependency):** Always run cooldown — dependencies may have changed context
|
|
93
|
+
3. **After Themis review (GATE 2):** Cooldown is mandatory — review findings may change the plan
|
|
94
|
+
4. **Session reuse check:** Before starting next phase, check if a specialist session from a previous phase can be reused (see session-goal skill)
|
|
95
|
+
|
|
96
|
+
### Abbreviated Cooldown
|
|
97
|
+
When auto-continuing between sequential non-gated phases, the cooldown is abbreviated to one line:
|
|
98
|
+
```
|
|
99
|
+
→ Phase N done. Next: Phase N+1. [auto-continuing]
|
|
100
|
+
```
|
|
101
|
+
Only expand to full cooldown when hitting a mandatory gate.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Timeout & Retry Enforcement
|
|
106
|
+
|
|
107
|
+
When a delegated agent does not respond in time, enforce the timeout policy from routing.yml.
|
|
108
|
+
|
|
109
|
+
### Behavior by Agent Role
|
|
110
|
+
|
|
111
|
+
| Agent Role | Timeout | Retry Policy | Fallback | Timeout Parcial? |
|
|
112
|
+
|------------|---------|-------------|----------|------------------|
|
|
113
|
+
| Explorer (apollo) | 60s | 2 retries, exponential backoff | athena | ✅ Yes — partial results OK |
|
|
114
|
+
| Implementer (hermes, aphrodite) | 180s | 3 retries, exponential backoff | talos | ❌ No — must produce artifact |
|
|
115
|
+
| Reviewer (themis) | 120s | 2 retries, exponential backoff | zeus | ❌ No — must produce verdict |
|
|
116
|
+
| Infrastructure (prometheus) | 300s | 2 retries, exponential backoff | hermes | ❌ No |
|
|
117
|
+
| Hotfix (talos) | 30s | 1 retry, no backoff | hermes | ✅ Yes — one-liner fix OK |
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Timeout Parcial (Partial Results)
|
|
121
|
+
|
|
122
|
+
Timeout parcial is **only** allowed for read-only, independent agents:
|
|
123
|
+
- ✅ @apollo (codebase search) — can return partial file list
|
|
124
|
+
- ✅ @gaia (literature review) — can return partial findings
|
|
125
|
+
- ✅ @talos (hotfix confirmation) — can return without fix if timeout
|
|
126
|
+
- ❌ Never for implementers (@hermes, @aphrodite, @demeter) — must complete or fail
|
|
127
|
+
- ❌ Never for reviewers (@themis) — must produce a verdict
|
|
128
|
+
|
|
129
|
+
**How to signal timeout parcial:**
|
|
130
|
+
When dispatching, set the expectation explicitly:
|
|
131
|
+
```
|
|
132
|
+
@apollo Search for all auth-related files. If you hit timeout, return whatever you have found so far — partial results are acceptable.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Timeout Tracking Table
|
|
136
|
+
|
|
137
|
+
Maintain a mental table of in-flight delegations:
|
|
138
|
+
|
|
139
|
+
| Agent | Started | Timeout | Status | Partial OK? |
|
|
140
|
+
|-------|---------|---------|--------|-------------|
|
|
141
|
+
| apollo | T+0s | T+60s | ✅ complete | ✅ |
|
|
142
|
+
| hermes | T+0s | T+180s | ⏳ in progress | ❌ |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
**Good (auto-continues):**
|
|
149
|
+
```
|
|
150
|
+
✅ Wrote migration file.
|
|
151
|
+
→ Running migration tests...
|
|
152
|
+
✅ Tests pass (3/3).
|
|
153
|
+
→ Next: write UserRepository query methods.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Good (stops at Gate 2):**
|
|
157
|
+
```
|
|
158
|
+
✅ Phase 1 complete: migration + repository layer.
|
|
159
|
+
⏸️ GATE 2 — Themis review summary:
|
|
160
|
+
- Coverage: 87% ✅ | No OWASP issues ✅
|
|
161
|
+
Ready for Phase 2? Waiting for go-ahead.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Bad (stops unnecessarily):**
|
|
165
|
+
```
|
|
166
|
+
✅ Wrote the migration file.
|
|
167
|
+
Should I now run the migration tests? [waiting]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Session Heartbeat
|
|
171
|
+
|
|
172
|
+
Auto-save checkpoint every N turns (configurable, default 5).
|
|
173
|
+
|
|
174
|
+
### Heartbeat File
|
|
175
|
+
|
|
176
|
+
`.pantheon/deepwork/<slug>/heartbeat.json`
|
|
177
|
+
|
|
178
|
+
### Heartbeat JSON Format
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"slug": "task-identifier",
|
|
183
|
+
"last_action": "2026-07-16T20:00:00Z",
|
|
184
|
+
"turn_count": 10,
|
|
185
|
+
"current_phase": 2,
|
|
186
|
+
"status": "alive | warning | stalled | paused | completed",
|
|
187
|
+
"next_action": "brief description of next planned action"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Heartbeat Rules
|
|
192
|
+
1. Update every 5 turns minimum (by default)
|
|
193
|
+
2. Contains NO context — only timestamps and counters
|
|
194
|
+
3. Single file, always overwritten (not versioned)
|
|
195
|
+
4. Used for quick "is this session alive?" checks
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Checkpoint Persistence
|
|
200
|
+
|
|
201
|
+
### Checkpoint File Structure
|
|
202
|
+
|
|
203
|
+
Each deepwork task maintains:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
.pantheon/deepwork/<slug>/
|
|
207
|
+
├── PLAN.md # Immutable plan (created at start)
|
|
208
|
+
├── STATUS.md # Human-readable current state (updated every phase)
|
|
209
|
+
├── heartbeat.json # Lightweight ping (updated every N turns)
|
|
210
|
+
├── checkpoint-<N>.json # Full state snapshot (created at phase boundaries)
|
|
211
|
+
├── session.json # Session metadata (created at start, updated on stop)
|
|
212
|
+
└── REVIEW.md # Final Themis review (created at end)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Checkpoint JSON Schema
|
|
216
|
+
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"slug": "string — unique task identifier",
|
|
220
|
+
"phase": "integer — current phase number",
|
|
221
|
+
"turn_count": "integer — total turns elapsed",
|
|
222
|
+
"timestamp": "string — ISO 8601 timestamp",
|
|
223
|
+
"context_hash": "string — first 8 hex chars of SHA-256 of STATUS.md",
|
|
224
|
+
"version": "integer — schema version (current: 2)"
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Checkpoint Rules
|
|
229
|
+
1. Save at every phase boundary AND before any delegate dispatch
|
|
230
|
+
2. Numbered sequentially (`checkpoint-1.json`, `checkpoint-2.json`, …)
|
|
231
|
+
3. Keep last 10 checkpoints; archive older ones
|
|
232
|
+
4. On resume: read the highest-numbered checkpoint for full state
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Safety Policy Configuration
|
|
237
|
+
|
|
238
|
+
Configurable gates for different platforms and risk levels:
|
|
239
|
+
|
|
240
|
+
| Gate | Default | Auto-Approval Condition |
|
|
241
|
+
|------|---------|------------------------|
|
|
242
|
+
| GATE 0 — Council/Plan | Always Ask | N/A — always requires human |
|
|
243
|
+
| GATE 1 — Plan Approval | Always Ask | Plan matches acceptance criteria + no risks flagged |
|
|
244
|
+
| GATE 2 — Themis Review | Ask by Default | Auto-approve if: Themis APPROVED + no CRITICAL/HIGH issues + coverage ≥80% |
|
|
245
|
+
| GATE 3 — Git Commit | Never Auto | N/A — always manual |
|
|
246
|
+
| Deploy | Always Ask | N/A — always requires human |
|
|
247
|
+
| Destructive DB Ops | Always Ask | N/A — always requires human |
|
|
248
|
+
|
|
249
|
+
### Configuration Format (for agents/PLAN.md)
|
|
250
|
+
|
|
251
|
+
```yaml
|
|
252
|
+
auto-continue:
|
|
253
|
+
checkpoint_interval: 5 # turns between checkpoints
|
|
254
|
+
idle_warning: 60 # seconds before warning
|
|
255
|
+
idle_stall: 120 # seconds before stall detection
|
|
256
|
+
idle_pause: 300 # seconds before auto-pause
|
|
257
|
+
gates:
|
|
258
|
+
plan_approval: always_ask
|
|
259
|
+
themis_review: auto_approve_if_clean
|
|
260
|
+
git_commit: never_auto
|
|
261
|
+
deploy: always_ask
|
|
262
|
+
destructive_ops: always_ask
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Idle Detection
|
|
266
|
+
|
|
267
|
+
| Condition | Action |
|
|
268
|
+
|-----------|--------|
|
|
269
|
+
| No tool call for 60s | Log warning heartbeat (status: warning) |
|
|
270
|
+
| No tool call for 120s | Trigger anti-stall protocol |
|
|
271
|
+
| No tool call for 300s | Auto-save checkpoint and pause session |
|
|
272
|
+
| Resume | User must acknowledge and restart |
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Scope
|
|
277
|
+
|
|
278
|
+
**Applies to:** Zeus (multi-phase), Hermes/Aphrodite/Demeter (TDD cycles), Apollo (parallel searches), Talos (bug fixes).
|
|
279
|
+
|
|
280
|
+
**Does NOT apply to:** Athena planning (always presents plan = Gate 1), Iris (confirms before push), destructive operations (always ask).
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review-checklist
|
|
3
|
+
description: "Systematic code review with quality gates, security audit, and parallel checks. Use for structured feedback on pull requests."
|
|
4
|
+
context: fork
|
|
5
|
+
globs: []
|
|
6
|
+
alwaysApply: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Code Review Checklist
|
|
10
|
+
|
|
11
|
+
Systematic code review combining quality gates, security audit (OWASP Top 10), and parallel checks for comprehensive validation.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Review Scope
|
|
16
|
+
|
|
17
|
+
- Review **ONLY changed files** (check diff, not entire file)
|
|
18
|
+
- Check related commits
|
|
19
|
+
- Link to related PRs/issues
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Automated Quality Checks (Run FIRST)
|
|
24
|
+
|
|
25
|
+
**Before any manual review, run automated checks:**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Python
|
|
29
|
+
ruff check --select F,E,W,UP,B,SIM --output-format concise <files> && ruff format --check <files>
|
|
30
|
+
|
|
31
|
+
# TypeScript/JavaScript
|
|
32
|
+
biome check --write --unsafe <files>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Block review if checks fail.** Return NEEDS_REVISION with specific violations.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Review Checklist
|
|
40
|
+
|
|
41
|
+
### Correctness
|
|
42
|
+
- [ ] Logic is correct and complete
|
|
43
|
+
- [ ] Edge cases handled
|
|
44
|
+
- [ ] Error handling appropriate
|
|
45
|
+
- [ ] Performance acceptable
|
|
46
|
+
|
|
47
|
+
### Code Quality
|
|
48
|
+
- [ ] No duplication (DRY principle)
|
|
49
|
+
- [ ] Single responsibility functions
|
|
50
|
+
- [ ] Clear and descriptive naming
|
|
51
|
+
- [ ] Reasonable complexity (no god functions)
|
|
52
|
+
- [ ] Proper file sizes (<300 lines)
|
|
53
|
+
|
|
54
|
+
### Testing
|
|
55
|
+
- [ ] Unit tests written
|
|
56
|
+
- [ ] Coverage ≥80%
|
|
57
|
+
- [ ] Integration tests for workflows
|
|
58
|
+
- [ ] Edge cases tested
|
|
59
|
+
- [ ] Error conditions tested
|
|
60
|
+
|
|
61
|
+
### Security (OWASP Top 10)
|
|
62
|
+
- [ ] Input validation present
|
|
63
|
+
- [ ] No hardcoded secrets/credentials
|
|
64
|
+
- [ ] No XXE, CSRF, XSS vulnerabilities
|
|
65
|
+
- [ ] Authentication/authorization proper
|
|
66
|
+
- [ ] Sensitive data encrypted
|
|
67
|
+
- [ ] Rate limiting on sensitive endpoints
|
|
68
|
+
- [ ] Audit logging for security events
|
|
69
|
+
|
|
70
|
+
### Documentation
|
|
71
|
+
- [ ] Public functions documented
|
|
72
|
+
- [ ] Comments explain WHY not WHAT
|
|
73
|
+
- [ ] README/guides accurate
|
|
74
|
+
- [ ] API documentation complete
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Feedback Format
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
## Verdict: APPROVED | NEEDS_REVISION | FAILED
|
|
82
|
+
|
|
83
|
+
### Issues
|
|
84
|
+
- CRITICAL: X | HIGH: Y | MEDIUM: Z | LOW: W
|
|
85
|
+
|
|
86
|
+
### Details
|
|
87
|
+
- [CRITICAL] file.py:42 — SQL injection risk, use parameterized queries
|
|
88
|
+
- [HIGH] component.tsx:15 — Missing input validation
|
|
89
|
+
- [MEDIUM] test_utils.py:8 — Edge case not covered
|
|
90
|
+
|
|
91
|
+
### 🔍 Human Review Focus
|
|
92
|
+
1. [Item AI cannot fully validate — e.g., business logic correctness]
|
|
93
|
+
2. [Item 2 — e.g., UX flow matches requirements]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Parallel Review Pattern
|
|
99
|
+
|
|
100
|
+
For comprehensive reviews, run 5 checks simultaneously:
|
|
101
|
+
|
|
102
|
+
| Check | Focus | Agent |
|
|
103
|
+
|-------|-------|-------|
|
|
104
|
+
| **Goal** | Does it meet requirements? | Themis |
|
|
105
|
+
| **Quality** | Code quality, SOLID, DRY | Themis |
|
|
106
|
+
| **Security** | OWASP Top 10, secrets | Themis |
|
|
107
|
+
| **QA** | Tests, coverage, edge cases | Themis |
|
|
108
|
+
| **Context** | Fits architecture, no regressions | Themis |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Severity Definitions
|
|
113
|
+
|
|
114
|
+
| Level | Action | Example |
|
|
115
|
+
|-------|--------|---------|
|
|
116
|
+
| **CRITICAL** | Block merge | Security vulnerability, data loss risk |
|
|
117
|
+
| **HIGH** | Must fix before merge | Missing auth, broken error handling |
|
|
118
|
+
| **MEDIUM** | Should fix soon | Missing tests, code duplication |
|
|
119
|
+
| **LOW** | Nice to have | Naming, formatting, minor docs |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## SOLID Principles Check
|
|
124
|
+
|
|
125
|
+
- **S**ingle Responsibility: Each class/function does one thing
|
|
126
|
+
- **O**pen/Closed: Extensible without modification
|
|
127
|
+
- **L**iskov Substitution: Subtypes behave like base types
|
|
128
|
+
- **I**nterface Segregation: Small, focused interfaces
|
|
129
|
+
- **D**ependency Inversion: Depend on abstractions, not concretions
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Anti-Patterns
|
|
134
|
+
|
|
135
|
+
- ❌ Reviewing entire file instead of diff
|
|
136
|
+
- ❌ Approving without running tests
|
|
137
|
+
- ❌ Ignoring security implications
|
|
138
|
+
- ❌ Vague feedback ("looks good", "needs work")
|
|
139
|
+
- ❌ Nitpicking style over substance
|