@lvlup-sw/exarchos 2.0.1
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/marketplace.json +22 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.mcp.json +17 -0
- package/AGENTS.md +59 -0
- package/CLAUDE.md.template +62 -0
- package/LICENSE +202 -0
- package/README.md +258 -0
- package/commands/autocompact.md +37 -0
- package/commands/checkpoint.md +85 -0
- package/commands/cleanup.md +99 -0
- package/commands/debug.md +145 -0
- package/commands/delegate.md +56 -0
- package/commands/ideate.md +82 -0
- package/commands/plan.md +150 -0
- package/commands/refactor.md +139 -0
- package/commands/reload.md +37 -0
- package/commands/resume.md +130 -0
- package/commands/review.md +51 -0
- package/commands/sync-schemas.md +74 -0
- package/commands/synthesize.md +122 -0
- package/commands/tdd.md +58 -0
- package/dist/exarchos-cli.js +8828 -0
- package/dist/exarchos-mcp.js +50 -0
- package/hooks/hooks.json +53 -0
- package/package.json +59 -0
- package/rules/coding-standards.md +46 -0
- package/rules/mcp-tool-guidance.md +26 -0
- package/rules/pr-descriptions.md +12 -0
- package/rules/rm-safety.md +9 -0
- package/rules/skill-path-resolution.md +10 -0
- package/rules/tdd.md +41 -0
- package/rules/telemetry-awareness.md +9 -0
- package/scripts/assess-refactor-scope.sh +239 -0
- package/scripts/check-benchmark-regression.sh +229 -0
- package/scripts/check-coderabbit.sh +288 -0
- package/scripts/check-coverage-thresholds.sh +194 -0
- package/scripts/check-polish-scope.sh +245 -0
- package/scripts/check-property-tests.sh +167 -0
- package/scripts/check-tdd-compliance.sh +265 -0
- package/scripts/coderabbit-review-gate.sh +518 -0
- package/scripts/debug-review-gate.sh +201 -0
- package/scripts/extract-fix-tasks.sh +179 -0
- package/scripts/extract-task.sh +67 -0
- package/scripts/generate-traceability.sh +209 -0
- package/scripts/investigation-timer.sh +171 -0
- package/scripts/needs-schema-sync.sh +174 -0
- package/scripts/new-project.sh +103 -0
- package/scripts/post-delegation-check.sh +317 -0
- package/scripts/pre-synthesis-check.sh +440 -0
- package/scripts/reconcile-state.sh +346 -0
- package/scripts/reconstruct-stack.sh +432 -0
- package/scripts/review-diff.sh +63 -0
- package/scripts/review-verdict.sh +169 -0
- package/scripts/security-scan.sh +248 -0
- package/scripts/select-debug-track.sh +186 -0
- package/scripts/setup-worktree.sh +323 -0
- package/scripts/spec-coverage-check.sh +230 -0
- package/scripts/static-analysis-gate.sh +236 -0
- package/scripts/sync-labels.sh +122 -0
- package/scripts/validate-companion.sh +161 -0
- package/scripts/validate-dotnet-standards.sh +267 -0
- package/scripts/validate-installation.sh +101 -0
- package/scripts/validate-plugin.sh +223 -0
- package/scripts/validate-refactor.sh +234 -0
- package/scripts/validate-rm.sh +93 -0
- package/scripts/verify-delegation-saga.sh +240 -0
- package/scripts/verify-doc-links.sh +211 -0
- package/scripts/verify-ideate-artifacts.sh +296 -0
- package/scripts/verify-plan-coverage.sh +228 -0
- package/scripts/verify-review-triage.sh +219 -0
- package/scripts/verify-worktree-baseline.sh +159 -0
- package/scripts/verify-worktree.sh +84 -0
- package/settings.json +47 -0
- package/skills/brainstorming/SKILL.md +127 -0
- package/skills/brainstorming/references/design-template.md +65 -0
- package/skills/cleanup/SKILL.md +147 -0
- package/skills/cleanup/references/merge-verification.md +40 -0
- package/skills/debug/SKILL.md +204 -0
- package/skills/debug/references/hotfix-track.md +134 -0
- package/skills/debug/references/investigation-checklist.md +217 -0
- package/skills/debug/references/rca-template.md +150 -0
- package/skills/debug/references/state-schema.md +294 -0
- package/skills/debug/references/thorough-track.md +194 -0
- package/skills/debug/references/triage-questions.md +155 -0
- package/skills/debug/references/troubleshooting.md +47 -0
- package/skills/delegation/SKILL.md +150 -0
- package/skills/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/delegation/references/agent-teams-saga.md +248 -0
- package/skills/delegation/references/fix-mode.md +74 -0
- package/skills/delegation/references/fixer-prompt.md +162 -0
- package/skills/delegation/references/implementer-prompt.md +322 -0
- package/skills/delegation/references/parallel-strategy.md +124 -0
- package/skills/delegation/references/pbt-patterns.md +172 -0
- package/skills/delegation/references/pr-fixes-mode.md +154 -0
- package/skills/delegation/references/state-management.md +51 -0
- package/skills/delegation/references/testing-patterns.md +129 -0
- package/skills/delegation/references/troubleshooting.md +33 -0
- package/skills/delegation/references/workflow-steps.md +127 -0
- package/skills/delegation/references/worktree-enforcement.md +64 -0
- package/skills/dotnet-standards/SKILL.md +269 -0
- package/skills/dotnet-standards/references/csharp-standards.md +120 -0
- package/skills/dotnet-standards/templates/.editorconfig +366 -0
- package/skills/dotnet-standards/templates/Directory.Build.props +56 -0
- package/skills/dotnet-standards/templates/Directory.Packages.props +69 -0
- package/skills/dotnet-standards/templates/global.json +6 -0
- package/skills/dotnet-standards/templates/nuget.config +9 -0
- package/skills/dotnet-standards/templates/stylecop.json +37 -0
- package/skills/git-worktrees/SKILL.md +255 -0
- package/skills/implementation-planning/SKILL.md +233 -0
- package/skills/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/implementation-planning/references/task-template.md +43 -0
- package/skills/implementation-planning/references/testing-strategy-guide.md +88 -0
- package/skills/quality-review/SKILL.md +278 -0
- package/skills/quality-review/references/code-quality-checklist.md +159 -0
- package/skills/quality-review/references/review-report-template.md +65 -0
- package/skills/quality-review/references/security-checklist.md +79 -0
- package/skills/quality-review/references/typescript-standards.md +24 -0
- package/skills/refactor/COMMAND.md +67 -0
- package/skills/refactor/SKILL.md +198 -0
- package/skills/refactor/phases/auto-chain.md +262 -0
- package/skills/refactor/phases/brief.md +176 -0
- package/skills/refactor/phases/explore.md +132 -0
- package/skills/refactor/phases/overhaul-delegate.md +136 -0
- package/skills/refactor/phases/overhaul-plan.md +312 -0
- package/skills/refactor/phases/overhaul-review.md +304 -0
- package/skills/refactor/phases/polish-implement.md +349 -0
- package/skills/refactor/phases/polish-validate.md +218 -0
- package/skills/refactor/phases/update-docs.md +234 -0
- package/skills/refactor/references/brief-template.md +81 -0
- package/skills/refactor/references/doc-update-checklist.md +110 -0
- package/skills/refactor/references/explore-checklist.md +73 -0
- package/skills/refactor/references/overhaul-track.md +215 -0
- package/skills/refactor/references/polish-track.md +170 -0
- package/skills/shared/prompts/context-reading.md +58 -0
- package/skills/shared/prompts/report-format.md +54 -0
- package/skills/shared/prompts/tdd-requirements.md +39 -0
- package/skills/shepherd/SKILL.md +264 -0
- package/skills/shepherd/references/assess-checklist.md +124 -0
- package/skills/shepherd/references/fix-strategies.md +191 -0
- package/skills/spec-review/SKILL.md +229 -0
- package/skills/spec-review/references/review-checklist.md +60 -0
- package/skills/sync-schemas/SKILL.md +114 -0
- package/skills/sync-schemas/references/configuration.md +73 -0
- package/skills/synthesis/SKILL.md +129 -0
- package/skills/synthesis/references/pr-descriptions.md +87 -0
- package/skills/synthesis/references/synthesis-steps.md +109 -0
- package/skills/synthesis/references/troubleshooting.md +115 -0
- package/skills/validate-all-skills.sh +57 -0
- package/skills/validate-frontmatter.sh +237 -0
- package/skills/workflow-state/SKILL.md +210 -0
- package/skills/workflow-state/references/mcp-tool-reference.md +111 -0
- package/skills/workflow-state/references/phase-transitions.md +141 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-review
|
|
3
|
+
description: "Implementation-to-spec compliance verification (code review stage 1). Use when verifying implementation matches design specification (stage 1 of /review). Checks functional completeness, TDD compliance, and test coverage. Do NOT use for code quality checks — use quality-review instead. Do NOT use for debugging."
|
|
4
|
+
metadata:
|
|
5
|
+
author: exarchos
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
mcp-server: exarchos
|
|
8
|
+
category: workflow
|
|
9
|
+
phase-affinity: review
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Spec Review Skill
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Stage 1 of two-stage review: Verify implementation matches specification and follows TDD.
|
|
17
|
+
|
|
18
|
+
## Triggers
|
|
19
|
+
|
|
20
|
+
Activate this skill when:
|
|
21
|
+
- User runs `/review` command (first stage)
|
|
22
|
+
- Task implementation is complete
|
|
23
|
+
- Need to verify spec compliance before quality review
|
|
24
|
+
- Subagent reports task completion
|
|
25
|
+
|
|
26
|
+
## Execution Context
|
|
27
|
+
|
|
28
|
+
This skill runs in a SUBAGENT spawned by the orchestrator, not inline.
|
|
29
|
+
|
|
30
|
+
The orchestrator provides:
|
|
31
|
+
- State file path (preferred) OR design/plan paths
|
|
32
|
+
- Diff output from `~/.claude/scripts/review-diff.sh` (context-efficient)
|
|
33
|
+
- Task ID being reviewed
|
|
34
|
+
|
|
35
|
+
The subagent:
|
|
36
|
+
- Reads state file to get artifact paths
|
|
37
|
+
- Uses diff output instead of reading full files
|
|
38
|
+
- Runs verification commands
|
|
39
|
+
- Generates report
|
|
40
|
+
- Returns verdict to orchestrator
|
|
41
|
+
|
|
42
|
+
### Context-Efficient Input
|
|
43
|
+
|
|
44
|
+
Instead of per-worktree diffs, receive an integrated diff from the
|
|
45
|
+
integration branch (e.g., `feature/integration-branch`) against main:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Generate integrated diff for review
|
|
49
|
+
git diff main...integration > /tmp/combined-diff.patch
|
|
50
|
+
|
|
51
|
+
# Alternative: use review-diff script against integration branch
|
|
52
|
+
~/.claude/scripts/review-diff.sh integration main
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This provides the complete picture of all changes across all tasks and reduces context consumption by 80-90%.
|
|
56
|
+
|
|
57
|
+
## Review Scope
|
|
58
|
+
|
|
59
|
+
### Review Scope: Combined Changes
|
|
60
|
+
|
|
61
|
+
After delegation completes, spec review examines:
|
|
62
|
+
- The **complete integrated diff** (main...feature/integration branch)
|
|
63
|
+
- All changes across all tasks in one view
|
|
64
|
+
- The full picture of combined functionality
|
|
65
|
+
|
|
66
|
+
This enables catching:
|
|
67
|
+
- Cross-task interface mismatches
|
|
68
|
+
- Bugs not visible in isolation
|
|
69
|
+
- Combined behavior vs specification
|
|
70
|
+
|
|
71
|
+
**Spec Review focuses on:**
|
|
72
|
+
- Functional completeness
|
|
73
|
+
- TDD compliance
|
|
74
|
+
- Specification alignment
|
|
75
|
+
- Test coverage
|
|
76
|
+
|
|
77
|
+
**Does NOT cover (that's Quality Review):**
|
|
78
|
+
- Code style
|
|
79
|
+
- SOLID principles
|
|
80
|
+
- Performance optimization
|
|
81
|
+
- Error handling elegance
|
|
82
|
+
|
|
83
|
+
## Review Checklist
|
|
84
|
+
|
|
85
|
+
For the full checklist with verification commands, tables, and report template, see `references/review-checklist.md`.
|
|
86
|
+
|
|
87
|
+
**Verification:**
|
|
88
|
+
```bash
|
|
89
|
+
npm run test:run
|
|
90
|
+
npm run test:coverage
|
|
91
|
+
npm run typecheck
|
|
92
|
+
scripts/check-tdd-compliance.sh --repo-root <repo-root> --base-branch main
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Fix Loop
|
|
96
|
+
|
|
97
|
+
If review FAILS:
|
|
98
|
+
|
|
99
|
+
1. Create fix task with specific issues
|
|
100
|
+
2. Dispatch to implementer (same or new)
|
|
101
|
+
3. Re-review after fixes
|
|
102
|
+
4. Repeat until PASS
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
// Return to implementer
|
|
106
|
+
Task({
|
|
107
|
+
model: "opus",
|
|
108
|
+
description: "Fix spec review issues",
|
|
109
|
+
prompt: `
|
|
110
|
+
# Fix Required: Spec Review Failed
|
|
111
|
+
|
|
112
|
+
## Issues to Fix
|
|
113
|
+
1. Missing rate limiting implementation
|
|
114
|
+
- Add rate limiter middleware
|
|
115
|
+
- Test: RateLimiter_ExceedsLimit_Returns429
|
|
116
|
+
|
|
117
|
+
2. Email validation incomplete
|
|
118
|
+
- Add MX record check
|
|
119
|
+
- Test: ValidateEmail_InvalidDomain_ReturnsError
|
|
120
|
+
|
|
121
|
+
## Success Criteria
|
|
122
|
+
- All tests pass
|
|
123
|
+
- Coverage >80%
|
|
124
|
+
- All issues resolved
|
|
125
|
+
`
|
|
126
|
+
})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Required Output Format
|
|
130
|
+
|
|
131
|
+
The subagent MUST return results as structured JSON. The orchestrator parses this JSON to populate state. Any other format is an error.
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"verdict": "pass | fail | blocked",
|
|
136
|
+
"summary": "1-2 sentence summary",
|
|
137
|
+
"issues": [
|
|
138
|
+
{
|
|
139
|
+
"severity": "HIGH | MEDIUM | LOW",
|
|
140
|
+
"category": "spec | tdd | coverage",
|
|
141
|
+
"file": "path/to/file",
|
|
142
|
+
"line": 123,
|
|
143
|
+
"description": "Issue description",
|
|
144
|
+
"required_fix": "What must change"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"test_results": {
|
|
148
|
+
"passed": 0,
|
|
149
|
+
"failed": 0,
|
|
150
|
+
"coverage_percent": 0
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Anti-Patterns
|
|
156
|
+
|
|
157
|
+
| Don't | Do Instead |
|
|
158
|
+
|-------|------------|
|
|
159
|
+
| Skip to quality review | Complete spec review first |
|
|
160
|
+
| Accept incomplete work | Return for fixes |
|
|
161
|
+
| Review code style here | Save for quality review |
|
|
162
|
+
| Approve without tests | Require test coverage |
|
|
163
|
+
| Let scope creep pass | Flag over-engineering |
|
|
164
|
+
|
|
165
|
+
## Cross-Task Integration Issues
|
|
166
|
+
|
|
167
|
+
If an issue spans multiple tasks:
|
|
168
|
+
1. Classify as "cross-task integration"
|
|
169
|
+
2. Create fix task specifying ALL affected tasks
|
|
170
|
+
3. Dispatch fix to implementer with context from all affected tasks
|
|
171
|
+
4. Mark original tasks as blocked until cross-task fix completes
|
|
172
|
+
|
|
173
|
+
## State Management
|
|
174
|
+
|
|
175
|
+
### On Review Complete
|
|
176
|
+
|
|
177
|
+
**Pass:**
|
|
178
|
+
```
|
|
179
|
+
action: "set", featureId: "<id>", updates: {
|
|
180
|
+
"reviews": { "spec": { "status": "pass", "summary": "...", "issues": [] } }
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Fail:**
|
|
185
|
+
```
|
|
186
|
+
action: "set", featureId: "<id>", updates: {
|
|
187
|
+
"reviews": { "spec": { "status": "fail", "summary": "...", "issues": [{ "severity": "...", "file": "...", "description": "..." }] } }
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Transition
|
|
192
|
+
|
|
193
|
+
All transitions happen **immediately** without user confirmation:
|
|
194
|
+
|
|
195
|
+
### Pre-Chain Validation (MANDATORY)
|
|
196
|
+
|
|
197
|
+
Before invoking quality-review:
|
|
198
|
+
1. Verify `reviews.spec.status === "pass"` in workflow state (all tasks passed)
|
|
199
|
+
2. If not: "Spec review did not pass, cannot proceed to quality review"
|
|
200
|
+
|
|
201
|
+
### If PASS:
|
|
202
|
+
1. Update state with review results
|
|
203
|
+
2. Output: "Spec review passed. Auto-continuing to quality review..."
|
|
204
|
+
3. Orchestrator dispatches quality-review subagent immediately
|
|
205
|
+
|
|
206
|
+
### If FAIL:
|
|
207
|
+
1. Update state with failed issues
|
|
208
|
+
2. Output: "Spec review found [N] issues. Auto-continuing to fixes..."
|
|
209
|
+
3. Auto-invoke delegate with fix tasks:
|
|
210
|
+
```typescript
|
|
211
|
+
Skill({ skill: "exarchos:delegate", args: "--fixes <plan-path>" })
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This is NOT a human checkpoint - workflow continues autonomously.
|
|
215
|
+
|
|
216
|
+
## Troubleshooting
|
|
217
|
+
|
|
218
|
+
| Issue | Cause | Resolution |
|
|
219
|
+
|-------|-------|------------|
|
|
220
|
+
| Test file not found | Task didn't create expected test | Check plan for test file paths, verify worktree contents |
|
|
221
|
+
| Coverage below threshold | Implementation incomplete or tests superficial | Add missing test cases, verify assertions are meaningful |
|
|
222
|
+
| TDD compliance check fails | Implementation committed before tests | Check git log order — test commits must precede or accompany implementation |
|
|
223
|
+
| Diff too large for context | Many tasks with large changes | Use `review-diff.sh` with `--per-task` flag to review incrementally |
|
|
224
|
+
|
|
225
|
+
## Performance Notes
|
|
226
|
+
|
|
227
|
+
- Use the integrated diff (`review-diff.sh`) instead of reading full files — reduces context by 80-90%
|
|
228
|
+
- Review per-task when the combined diff exceeds 2,000 lines
|
|
229
|
+
- Run TDD compliance check (`scripts/check-tdd-compliance.sh`) in parallel with spec tracing
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-review-checklist
|
|
3
|
+
description: "Validation script invocations and report template for spec compliance verification."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec Review Checklist
|
|
7
|
+
|
|
8
|
+
## Automated Verification
|
|
9
|
+
|
|
10
|
+
Run these scripts as the authoritative checks:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# TDD compliance (test-first ordering, naming conventions, coverage)
|
|
14
|
+
scripts/check-tdd-compliance.sh --repo-root <repo-root> --base-branch main
|
|
15
|
+
|
|
16
|
+
# Full test suite
|
|
17
|
+
npm run test:run
|
|
18
|
+
|
|
19
|
+
# Coverage thresholds (line >80%, branch >70%, function 100% for public APIs)
|
|
20
|
+
npm run test:coverage
|
|
21
|
+
|
|
22
|
+
# Type safety
|
|
23
|
+
npm run typecheck
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Manual Checks
|
|
27
|
+
|
|
28
|
+
After scripts pass, verify:
|
|
29
|
+
- All spec requirements implemented (compare to design/plan)
|
|
30
|
+
- No over-engineering beyond spec
|
|
31
|
+
- No missing edge cases
|
|
32
|
+
|
|
33
|
+
## Report Template
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
## Spec Review Report
|
|
37
|
+
|
|
38
|
+
### Summary
|
|
39
|
+
- Status: [PASS | FAIL | NEEDS_FIXES]
|
|
40
|
+
- Tested: [timestamp]
|
|
41
|
+
|
|
42
|
+
### Compliance Matrix
|
|
43
|
+
| Requirement | Implemented | Test Exists | Notes |
|
|
44
|
+
|-------------|-------------|-------------|-------|
|
|
45
|
+
|
|
46
|
+
### Issues Found
|
|
47
|
+
1. [Issue] — File: `path` — Fix: [required change]
|
|
48
|
+
|
|
49
|
+
### Verdict
|
|
50
|
+
[PASS] Ready for quality review
|
|
51
|
+
[FAIL] Return to implementer with fix list
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Completion Criteria
|
|
55
|
+
|
|
56
|
+
- [ ] `check-tdd-compliance.sh` passes
|
|
57
|
+
- [ ] All tests pass
|
|
58
|
+
- [ ] Coverage meets thresholds
|
|
59
|
+
- [ ] All spec requirements verified
|
|
60
|
+
- [ ] State file updated with review results
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-schemas
|
|
3
|
+
description: "Synchronize TypeScript types from backend OpenAPI specifications. Monorepo-specific to ares-elite-platform. Use when the user says \"sync schemas\", \"update types from API\", or runs /sync-schemas. Generates TypeScript interfaces from OpenAPI spec files and validates type compatibility. Do NOT use for manual type definitions or non-OpenAPI schemas."
|
|
4
|
+
metadata:
|
|
5
|
+
author: exarchos
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
category: utility
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Schema Sync Skill
|
|
11
|
+
|
|
12
|
+
## Project Requirement
|
|
13
|
+
|
|
14
|
+
This skill only works in the **ares-elite-platform** monorepo.
|
|
15
|
+
Detection: check for `azure.yaml` and `apps/` directory at repo root.
|
|
16
|
+
If not found: report "This skill requires the ares-elite-platform monorepo" and stop.
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
Synchronize TypeScript types and Zod schemas from backend OpenAPI specifications. This skill can be invoked manually via `/sync-schemas` or automatically after delegation tasks that modify API files.
|
|
21
|
+
|
|
22
|
+
## Triggers
|
|
23
|
+
|
|
24
|
+
Activate this skill when:
|
|
25
|
+
- User runs `/sync-schemas` command
|
|
26
|
+
- Subagent completes task that modified API files (auto-chain from delegation)
|
|
27
|
+
- CI schema-check job fails and user wants to regenerate
|
|
28
|
+
|
|
29
|
+
## Monorepo Detection
|
|
30
|
+
|
|
31
|
+
Detect monorepo root and verify `azure.yaml` + `apps/` exist. Handle worktrees. See `references/configuration.md` for detection script and API file trigger patterns.
|
|
32
|
+
|
|
33
|
+
## Process
|
|
34
|
+
|
|
35
|
+
### Step 1: Detect Working Directory
|
|
36
|
+
|
|
37
|
+
Find monorepo root via `git rev-parse --show-toplevel`. Handle `.worktrees` paths. See `references/configuration.md`.
|
|
38
|
+
|
|
39
|
+
### Step 2: Run Schema Sync
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run sync:schemas
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This command:
|
|
46
|
+
1. **Builds Aegis API** - Generates `apps/aegis-api/openapi.json`
|
|
47
|
+
2. **Runs Orval** - Generates TypeScript types and Zod schemas for both Aegis and Black Gate
|
|
48
|
+
3. **Rebuilds shared packages** - Compiles the generated code
|
|
49
|
+
|
|
50
|
+
### Step 3: Verify TypeScript
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm run typecheck
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 4: Report Results
|
|
57
|
+
|
|
58
|
+
Report what was regenerated:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## Schema Sync Complete
|
|
62
|
+
|
|
63
|
+
**OpenAPI Spec:** apps/aegis-api/openapi.json
|
|
64
|
+
**TypeScript Types:** shared/types/src/generated/aegis.ts
|
|
65
|
+
**Zod Schemas:** shared/validation/src/generated/aegis.zod.ts
|
|
66
|
+
**Black Gate Zod:** shared/validation/src/generated/black-gate.zod.ts
|
|
67
|
+
**Black Gate Component Schemas:** shared/validation/src/generated/schemas/black-gate/
|
|
68
|
+
**Frontend Types:** apps/ares-elite-web/src/api/generated/aegis.schemas.ts
|
|
69
|
+
|
|
70
|
+
Typecheck: PASS
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Auto-Detection for Delegation
|
|
74
|
+
|
|
75
|
+
After delegation tasks that modify API files, auto-detect and run sync. See `references/configuration.md` for detection script, trigger patterns, and generated file mapping.
|
|
76
|
+
|
|
77
|
+
## Failure Recovery
|
|
78
|
+
|
|
79
|
+
### Build Failure
|
|
80
|
+
```bash
|
|
81
|
+
# Check for C# compilation errors
|
|
82
|
+
cd apps/aegis-api && dotnet build src/Aegis.sln
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Orval Failure
|
|
86
|
+
```bash
|
|
87
|
+
# Verify OpenAPI spec exists and is valid
|
|
88
|
+
cat apps/aegis-api/openapi.json | jq . > /dev/null
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### TypeScript Errors
|
|
92
|
+
TypeScript errors after sync usually indicate breaking API changes. Review the generated types and update consumers accordingly.
|
|
93
|
+
|
|
94
|
+
## CI Integration
|
|
95
|
+
|
|
96
|
+
The `schema-check` CI job verifies schemas are in sync:
|
|
97
|
+
- Regenerates schemas from scratch
|
|
98
|
+
- Compares against committed files
|
|
99
|
+
- Fails if any drift detected
|
|
100
|
+
|
|
101
|
+
If CI fails on schema-check, run `/sync-schemas` locally and commit the results.
|
|
102
|
+
|
|
103
|
+
## Usage Examples
|
|
104
|
+
|
|
105
|
+
See `references/configuration.md` for manual, post-backend-change, and worktree usage examples.
|
|
106
|
+
|
|
107
|
+
## Completion Criteria
|
|
108
|
+
|
|
109
|
+
- [ ] OpenAPI spec generated successfully
|
|
110
|
+
- [ ] TypeScript types generated
|
|
111
|
+
- [ ] Zod schemas generated
|
|
112
|
+
- [ ] Black Gate Zod schemas generated
|
|
113
|
+
- [ ] Typecheck passes
|
|
114
|
+
- [ ] No uncommitted generated files (if committing)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Schema Sync Configuration
|
|
2
|
+
|
|
3
|
+
Project-specific to **ares-elite-platform** monorepo.
|
|
4
|
+
|
|
5
|
+
## Monorepo Detection
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MONOREPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
9
|
+
|
|
10
|
+
if [[ ! -f "$MONOREPO_ROOT/azure.yaml" ]] || [[ ! -d "$MONOREPO_ROOT/apps" ]]; then
|
|
11
|
+
echo "ERROR: Not in ares-elite-platform monorepo"
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Handle worktrees: if `pwd` contains `.worktrees`, use the worktree root as monorepo root.
|
|
17
|
+
|
|
18
|
+
## API File Trigger Patterns
|
|
19
|
+
|
|
20
|
+
Schema sync is needed after modifying files matching these patterns:
|
|
21
|
+
|
|
22
|
+
| Pattern | Description |
|
|
23
|
+
|---------|-------------|
|
|
24
|
+
| `apps/aegis-api/src/**/*Endpoints.cs` | API endpoint definitions |
|
|
25
|
+
| `apps/aegis-api/src/**/Models/*.cs` | Request/response DTOs |
|
|
26
|
+
| `apps/aegis-api/src/**/Requests/*.cs` | Request models |
|
|
27
|
+
| `apps/aegis-api/src/**/Responses/*.cs` | Response models |
|
|
28
|
+
| `apps/aegis-api/src/**/Dtos/*.cs` | Data transfer objects |
|
|
29
|
+
| `apps/black-gate/src/**/*.ts` | Black Gate route definitions |
|
|
30
|
+
|
|
31
|
+
## Generated Files
|
|
32
|
+
|
|
33
|
+
| File | Purpose |
|
|
34
|
+
|------|---------|
|
|
35
|
+
| `apps/aegis-api/openapi.json` | OpenAPI specification |
|
|
36
|
+
| `shared/types/src/generated/aegis.ts` | TypeScript types |
|
|
37
|
+
| `shared/validation/src/generated/aegis.zod.ts` | Zod validation schemas |
|
|
38
|
+
| `shared/validation/src/generated/black-gate.zod.ts` | Black Gate Zod schemas |
|
|
39
|
+
| `shared/validation/src/generated/schemas/black-gate/` | Black Gate component schemas |
|
|
40
|
+
| `apps/ares-elite-web/src/api/generated/aegis.schemas.ts` | TypeScript schema types |
|
|
41
|
+
|
|
42
|
+
## Auto-Detection for Delegation
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
git diff --name-only HEAD~1 | grep -E "(Endpoints|Models|Requests|Responses|Dtos).*\.cs$"
|
|
46
|
+
|
|
47
|
+
if [[ $? -eq 0 ]]; then
|
|
48
|
+
echo "API files modified - running schema sync..."
|
|
49
|
+
npm run sync:schemas
|
|
50
|
+
fi
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage Examples
|
|
54
|
+
|
|
55
|
+
### After Backend Changes
|
|
56
|
+
```bash
|
|
57
|
+
# After editing PatientEndpoints.cs
|
|
58
|
+
/sync-schemas
|
|
59
|
+
|
|
60
|
+
# Verify and commit via Graphite
|
|
61
|
+
git add shared/ apps/ares-elite-web/src/api/generated/
|
|
62
|
+
gt create chore/schema-sync -m "chore: regenerate TypeScript types from OpenAPI"
|
|
63
|
+
gt submit --no-interactive --publish
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**NEVER use `git commit` or `git push`** — always use `gt create` and `gt submit`.
|
|
67
|
+
|
|
68
|
+
### In Worktree
|
|
69
|
+
```bash
|
|
70
|
+
cd .worktrees/task-001
|
|
71
|
+
# ... make backend changes ...
|
|
72
|
+
/sync-schemas
|
|
73
|
+
```
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: synthesis
|
|
3
|
+
description: "Create pull request from completed feature branch using Graphite stacked PRs. Use when the user says 'create PR', 'submit for review', 'synthesize', or runs /synthesize. Validates branch readiness, creates PR with structured description, and manages merge queue. Do NOT use before review phase completes. Not for draft PRs."
|
|
4
|
+
metadata:
|
|
5
|
+
author: exarchos
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
mcp-server: exarchos
|
|
8
|
+
category: workflow
|
|
9
|
+
phase-affinity: synthesize
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Synthesis Skill
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Submit Graphite stack as pull requests after review phase completes.
|
|
17
|
+
|
|
18
|
+
**Prerequisites:**
|
|
19
|
+
- All delegated tasks complete
|
|
20
|
+
- All reviews (spec + quality) passed — integration must be complete and passing
|
|
21
|
+
- Graphite stack exists with task branches (the integration branch already exists from delegation)
|
|
22
|
+
|
|
23
|
+
Requires BOTH spec-review PASS AND quality-review APPROVED. If either review is incomplete or failed, do NOT proceed — return to /exarchos:review.
|
|
24
|
+
|
|
25
|
+
## Triggers
|
|
26
|
+
|
|
27
|
+
Activate this skill when:
|
|
28
|
+
- User runs `/synthesize` command
|
|
29
|
+
- All reviews have passed successfully
|
|
30
|
+
- Ready to submit PRs
|
|
31
|
+
|
|
32
|
+
## Simplified Process (Review Already Complete)
|
|
33
|
+
|
|
34
|
+
Since delegation creates Graphite stack branches and review validates them, synthesis focuses on:
|
|
35
|
+
1. Verifying the stack is ready
|
|
36
|
+
2. Submitting the stacked PRs
|
|
37
|
+
3. Handling PR feedback (if any)
|
|
38
|
+
4. Cleanup after merge
|
|
39
|
+
|
|
40
|
+
## Synthesis Process
|
|
41
|
+
|
|
42
|
+
1. **Verify readiness** -- `scripts/pre-synthesis-check.sh` (includes phase readiness check with transition guidance)
|
|
43
|
+
2. **REQUIRED: Verify/reconstruct Graphite stack** -- Run `scripts/reconstruct-stack.sh` before PR creation. If exit 1: stop and report error.
|
|
44
|
+
3. **Quick test verification** -- `npm run test:run && npm run typecheck`
|
|
45
|
+
4. **Check CodeRabbit reviews** -- `scripts/check-coderabbit.sh`
|
|
46
|
+
5. **Write PR descriptions** -- Follow `references/pr-descriptions.md` for title format and body structure
|
|
47
|
+
6. **Submit to merge queue** -- `gt submit --no-interactive --publish --merge-when-ready`
|
|
48
|
+
7. **Apply benchmark label** -- If `verification.hasBenchmarks` is `true` in workflow state, apply label to each PR: `gh pr edit <number> --add-label has-benchmarks`
|
|
49
|
+
8. **Cleanup after merge** -- `gt sync` + remove worktrees
|
|
50
|
+
|
|
51
|
+
For detailed step instructions, see `references/synthesis-steps.md`.
|
|
52
|
+
|
|
53
|
+
## Handling Failures
|
|
54
|
+
|
|
55
|
+
See `references/troubleshooting.md` for test failures, PR check failures, and merge queue rejections.
|
|
56
|
+
|
|
57
|
+
## Anti-Patterns
|
|
58
|
+
|
|
59
|
+
| Don't | Do Instead |
|
|
60
|
+
|-------|------------|
|
|
61
|
+
| Skip review phase | Always run `/exarchos:review` first |
|
|
62
|
+
| Force push stack branches | Use normal push |
|
|
63
|
+
| Delete worktrees before PR approval | Wait for merge confirmation |
|
|
64
|
+
| Create PR with failing tests | Ensure review phase passes first |
|
|
65
|
+
|
|
66
|
+
## State Management
|
|
67
|
+
|
|
68
|
+
Call `mcp__exarchos__exarchos_workflow` for all state operations. Full parameter reference: `@skills/workflow-state/SKILL.md` § Update State.
|
|
69
|
+
|
|
70
|
+
### Read Task State
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
action: "get", featureId: "<id>", fields: ["tasks", "synthesis"]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### On PR Created
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
action: "set", featureId: "<id>", updates: {
|
|
80
|
+
"artifacts": { "pr": ["<url1>", "<url2>"] },
|
|
81
|
+
"synthesis": { "mergeOrder": ["<branch1>", ...], "prUrl": ["<url1>", ...], "prFeedback": [] }
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### On PR Feedback Received
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
action: "set", featureId: "<id>", updates: {
|
|
89
|
+
"synthesis": { "prFeedback": [{ "pr": "<url>", "reviewer": "<name>", "status": "<status>" }] }
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### On Merge Complete
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
action: "cleanup", featureId: "<id>", mergeVerified: true, prUrl: ["<url>", ...], mergedBranches: ["<branch>", ...]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Completion Criteria
|
|
100
|
+
|
|
101
|
+
- [ ] Graphite stack verified via reconstruct-stack.sh
|
|
102
|
+
- [ ] Quick test verification passed
|
|
103
|
+
- [ ] CodeRabbit reviews checked (no CHANGES_REQUESTED blocking)
|
|
104
|
+
- [ ] PRs enqueued via `--merge-when-ready`
|
|
105
|
+
- [ ] PR links provided to user
|
|
106
|
+
- [ ] State file updated with PR URLs
|
|
107
|
+
|
|
108
|
+
## Handling PR Feedback
|
|
109
|
+
|
|
110
|
+
Route to `/exarchos:delegate --pr-fixes [PR_URL]` for automated fix dispatch. See `references/troubleshooting.md` for details.
|
|
111
|
+
|
|
112
|
+
## Transition
|
|
113
|
+
|
|
114
|
+
After stacked PRs enqueued in merge queue, this is a **human checkpoint**:
|
|
115
|
+
|
|
116
|
+
1. Update state: `action: "set", featureId: "<id>", updates: { "synthesis": { "prUrl": ["<urls>"] }, "artifacts": { "pr": ["<urls>"] } }`
|
|
117
|
+
2. Output: "Stacked PRs enqueued: [URLs]. Waiting for CI/merge queue."
|
|
118
|
+
3. **PAUSE for user input**: "Merge stack? (yes/no/feedback)"
|
|
119
|
+
|
|
120
|
+
This is one of only TWO human checkpoints in the workflow.
|
|
121
|
+
|
|
122
|
+
Options:
|
|
123
|
+
- **'yes'**: Merge PR, update state to "completed"
|
|
124
|
+
- **'feedback'**: Auto-continue to `/exarchos:delegate --pr-fixes` to address comments, then return here
|
|
125
|
+
- **'no'**: Pause workflow, can resume later with `/exarchos:resume`
|
|
126
|
+
|
|
127
|
+
## Troubleshooting
|
|
128
|
+
|
|
129
|
+
See `references/troubleshooting.md` for MCP failures, state desync, PR creation issues, and stack rebase conflicts.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# PR Description Guidelines
|
|
2
|
+
|
|
3
|
+
Write PR descriptions that help reviewers understand the change quickly. Aim for ~120-200 words. CodeRabbit adds detailed analysis—focus on motivation and high-level changes.
|
|
4
|
+
|
|
5
|
+
## Title Format
|
|
6
|
+
|
|
7
|
+
`<type>: <what>` (max 72 chars)
|
|
8
|
+
|
|
9
|
+
Examples:
|
|
10
|
+
- `feat: Add knowledge ingestion workflow`
|
|
11
|
+
- `fix: Resolve null state in workflow steps`
|
|
12
|
+
- `refactor: Simplify token ledger interface`
|
|
13
|
+
|
|
14
|
+
## Body Structure
|
|
15
|
+
|
|
16
|
+
### Summary (required)
|
|
17
|
+
2-3 sentences explaining what changed and why it matters. Include the motivation—what problem does this solve?
|
|
18
|
+
|
|
19
|
+
### Changes (required)
|
|
20
|
+
Scannable list of key changes. Use `**Bold**` for component names and `—` (em-dash) as separator.
|
|
21
|
+
|
|
22
|
+
### Test Plan (required)
|
|
23
|
+
Brief description of testing approach. What was tested and how?
|
|
24
|
+
|
|
25
|
+
### Footer (required)
|
|
26
|
+
Separated by `---`. Contains results, design doc, and related PRs.
|
|
27
|
+
|
|
28
|
+
## Template
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## Summary
|
|
32
|
+
|
|
33
|
+
[2-3 sentences: What changed, why it matters, what problem it solves]
|
|
34
|
+
|
|
35
|
+
## Changes
|
|
36
|
+
|
|
37
|
+
- **Component 1** — Brief description of what changed
|
|
38
|
+
- **Component 2** — Brief description of what changed
|
|
39
|
+
- **Component 3** — Brief description of what changed
|
|
40
|
+
|
|
41
|
+
## Test Plan
|
|
42
|
+
|
|
43
|
+
[1-2 sentences: Testing approach and coverage summary]
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
**Results:** Tests X ✓ · Build 0 errors
|
|
48
|
+
**Design:** [design-doc.md](docs/path/design-doc.md)
|
|
49
|
+
**Related:** #123, Continues #456
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Example
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
## Summary
|
|
56
|
+
|
|
57
|
+
Completes the Knowledge System foundation for RAG-based agent workflows. The platform needs to ingest documents, extract semantic concepts, and build a linked knowledge graph—this PR delivers that infrastructure.
|
|
58
|
+
|
|
59
|
+
## Changes
|
|
60
|
+
|
|
61
|
+
- **LLM Inference** — vLLM client with streaming SSE and LoRA adapter support
|
|
62
|
+
- **Token Accounting** — Multi-dimensional ledger tracking usage across categories
|
|
63
|
+
- **Vector Collections** — Registry with schema versioning for embedding spaces
|
|
64
|
+
- **Knowledge Models** — Core types for representing extracted knowledge
|
|
65
|
+
- **Ingestion Workflow** — 11-step pipeline from parsing to knowledge graph commit
|
|
66
|
+
|
|
67
|
+
## Test Plan
|
|
68
|
+
|
|
69
|
+
Added ~180 unit tests covering all new components. Integration tests verify the complete workflow with mocked dependencies.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
**Results:** Tests 3462 ✓ · Build 0 errors
|
|
74
|
+
**Design:** [shared-infrastructure.md](docs/adrs/workflow-designs/shared-infrastructure.md)
|
|
75
|
+
**Related:** Continues #5
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Anti-Patterns
|
|
79
|
+
|
|
80
|
+
Avoid these—they bloat descriptions without adding value:
|
|
81
|
+
|
|
82
|
+
- Bullet lists of every file changed
|
|
83
|
+
- Repeating commit messages in the body
|
|
84
|
+
- Low-level implementation details (class names, method signatures)
|
|
85
|
+
- "Generated with..." footers
|
|
86
|
+
- Phase-by-phase breakdowns
|
|
87
|
+
- Detailed test counts by project
|