@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.
Files changed (153) hide show
  1. package/.claude-plugin/marketplace.json +22 -0
  2. package/.claude-plugin/plugin.json +17 -0
  3. package/.mcp.json +17 -0
  4. package/AGENTS.md +59 -0
  5. package/CLAUDE.md.template +62 -0
  6. package/LICENSE +202 -0
  7. package/README.md +258 -0
  8. package/commands/autocompact.md +37 -0
  9. package/commands/checkpoint.md +85 -0
  10. package/commands/cleanup.md +99 -0
  11. package/commands/debug.md +145 -0
  12. package/commands/delegate.md +56 -0
  13. package/commands/ideate.md +82 -0
  14. package/commands/plan.md +150 -0
  15. package/commands/refactor.md +139 -0
  16. package/commands/reload.md +37 -0
  17. package/commands/resume.md +130 -0
  18. package/commands/review.md +51 -0
  19. package/commands/sync-schemas.md +74 -0
  20. package/commands/synthesize.md +122 -0
  21. package/commands/tdd.md +58 -0
  22. package/dist/exarchos-cli.js +8828 -0
  23. package/dist/exarchos-mcp.js +50 -0
  24. package/hooks/hooks.json +53 -0
  25. package/package.json +59 -0
  26. package/rules/coding-standards.md +46 -0
  27. package/rules/mcp-tool-guidance.md +26 -0
  28. package/rules/pr-descriptions.md +12 -0
  29. package/rules/rm-safety.md +9 -0
  30. package/rules/skill-path-resolution.md +10 -0
  31. package/rules/tdd.md +41 -0
  32. package/rules/telemetry-awareness.md +9 -0
  33. package/scripts/assess-refactor-scope.sh +239 -0
  34. package/scripts/check-benchmark-regression.sh +229 -0
  35. package/scripts/check-coderabbit.sh +288 -0
  36. package/scripts/check-coverage-thresholds.sh +194 -0
  37. package/scripts/check-polish-scope.sh +245 -0
  38. package/scripts/check-property-tests.sh +167 -0
  39. package/scripts/check-tdd-compliance.sh +265 -0
  40. package/scripts/coderabbit-review-gate.sh +518 -0
  41. package/scripts/debug-review-gate.sh +201 -0
  42. package/scripts/extract-fix-tasks.sh +179 -0
  43. package/scripts/extract-task.sh +67 -0
  44. package/scripts/generate-traceability.sh +209 -0
  45. package/scripts/investigation-timer.sh +171 -0
  46. package/scripts/needs-schema-sync.sh +174 -0
  47. package/scripts/new-project.sh +103 -0
  48. package/scripts/post-delegation-check.sh +317 -0
  49. package/scripts/pre-synthesis-check.sh +440 -0
  50. package/scripts/reconcile-state.sh +346 -0
  51. package/scripts/reconstruct-stack.sh +432 -0
  52. package/scripts/review-diff.sh +63 -0
  53. package/scripts/review-verdict.sh +169 -0
  54. package/scripts/security-scan.sh +248 -0
  55. package/scripts/select-debug-track.sh +186 -0
  56. package/scripts/setup-worktree.sh +323 -0
  57. package/scripts/spec-coverage-check.sh +230 -0
  58. package/scripts/static-analysis-gate.sh +236 -0
  59. package/scripts/sync-labels.sh +122 -0
  60. package/scripts/validate-companion.sh +161 -0
  61. package/scripts/validate-dotnet-standards.sh +267 -0
  62. package/scripts/validate-installation.sh +101 -0
  63. package/scripts/validate-plugin.sh +223 -0
  64. package/scripts/validate-refactor.sh +234 -0
  65. package/scripts/validate-rm.sh +93 -0
  66. package/scripts/verify-delegation-saga.sh +240 -0
  67. package/scripts/verify-doc-links.sh +211 -0
  68. package/scripts/verify-ideate-artifacts.sh +296 -0
  69. package/scripts/verify-plan-coverage.sh +228 -0
  70. package/scripts/verify-review-triage.sh +219 -0
  71. package/scripts/verify-worktree-baseline.sh +159 -0
  72. package/scripts/verify-worktree.sh +84 -0
  73. package/settings.json +47 -0
  74. package/skills/brainstorming/SKILL.md +127 -0
  75. package/skills/brainstorming/references/design-template.md +65 -0
  76. package/skills/cleanup/SKILL.md +147 -0
  77. package/skills/cleanup/references/merge-verification.md +40 -0
  78. package/skills/debug/SKILL.md +204 -0
  79. package/skills/debug/references/hotfix-track.md +134 -0
  80. package/skills/debug/references/investigation-checklist.md +217 -0
  81. package/skills/debug/references/rca-template.md +150 -0
  82. package/skills/debug/references/state-schema.md +294 -0
  83. package/skills/debug/references/thorough-track.md +194 -0
  84. package/skills/debug/references/triage-questions.md +155 -0
  85. package/skills/debug/references/troubleshooting.md +47 -0
  86. package/skills/delegation/SKILL.md +150 -0
  87. package/skills/delegation/references/adaptive-orchestration.md +31 -0
  88. package/skills/delegation/references/agent-teams-saga.md +248 -0
  89. package/skills/delegation/references/fix-mode.md +74 -0
  90. package/skills/delegation/references/fixer-prompt.md +162 -0
  91. package/skills/delegation/references/implementer-prompt.md +322 -0
  92. package/skills/delegation/references/parallel-strategy.md +124 -0
  93. package/skills/delegation/references/pbt-patterns.md +172 -0
  94. package/skills/delegation/references/pr-fixes-mode.md +154 -0
  95. package/skills/delegation/references/state-management.md +51 -0
  96. package/skills/delegation/references/testing-patterns.md +129 -0
  97. package/skills/delegation/references/troubleshooting.md +33 -0
  98. package/skills/delegation/references/workflow-steps.md +127 -0
  99. package/skills/delegation/references/worktree-enforcement.md +64 -0
  100. package/skills/dotnet-standards/SKILL.md +269 -0
  101. package/skills/dotnet-standards/references/csharp-standards.md +120 -0
  102. package/skills/dotnet-standards/templates/.editorconfig +366 -0
  103. package/skills/dotnet-standards/templates/Directory.Build.props +56 -0
  104. package/skills/dotnet-standards/templates/Directory.Packages.props +69 -0
  105. package/skills/dotnet-standards/templates/global.json +6 -0
  106. package/skills/dotnet-standards/templates/nuget.config +9 -0
  107. package/skills/dotnet-standards/templates/stylecop.json +37 -0
  108. package/skills/git-worktrees/SKILL.md +255 -0
  109. package/skills/implementation-planning/SKILL.md +233 -0
  110. package/skills/implementation-planning/references/plan-document-template.md +42 -0
  111. package/skills/implementation-planning/references/spec-tracing-guide.md +51 -0
  112. package/skills/implementation-planning/references/task-template.md +43 -0
  113. package/skills/implementation-planning/references/testing-strategy-guide.md +88 -0
  114. package/skills/quality-review/SKILL.md +278 -0
  115. package/skills/quality-review/references/code-quality-checklist.md +159 -0
  116. package/skills/quality-review/references/review-report-template.md +65 -0
  117. package/skills/quality-review/references/security-checklist.md +79 -0
  118. package/skills/quality-review/references/typescript-standards.md +24 -0
  119. package/skills/refactor/COMMAND.md +67 -0
  120. package/skills/refactor/SKILL.md +198 -0
  121. package/skills/refactor/phases/auto-chain.md +262 -0
  122. package/skills/refactor/phases/brief.md +176 -0
  123. package/skills/refactor/phases/explore.md +132 -0
  124. package/skills/refactor/phases/overhaul-delegate.md +136 -0
  125. package/skills/refactor/phases/overhaul-plan.md +312 -0
  126. package/skills/refactor/phases/overhaul-review.md +304 -0
  127. package/skills/refactor/phases/polish-implement.md +349 -0
  128. package/skills/refactor/phases/polish-validate.md +218 -0
  129. package/skills/refactor/phases/update-docs.md +234 -0
  130. package/skills/refactor/references/brief-template.md +81 -0
  131. package/skills/refactor/references/doc-update-checklist.md +110 -0
  132. package/skills/refactor/references/explore-checklist.md +73 -0
  133. package/skills/refactor/references/overhaul-track.md +215 -0
  134. package/skills/refactor/references/polish-track.md +170 -0
  135. package/skills/shared/prompts/context-reading.md +58 -0
  136. package/skills/shared/prompts/report-format.md +54 -0
  137. package/skills/shared/prompts/tdd-requirements.md +39 -0
  138. package/skills/shepherd/SKILL.md +264 -0
  139. package/skills/shepherd/references/assess-checklist.md +124 -0
  140. package/skills/shepherd/references/fix-strategies.md +191 -0
  141. package/skills/spec-review/SKILL.md +229 -0
  142. package/skills/spec-review/references/review-checklist.md +60 -0
  143. package/skills/sync-schemas/SKILL.md +114 -0
  144. package/skills/sync-schemas/references/configuration.md +73 -0
  145. package/skills/synthesis/SKILL.md +129 -0
  146. package/skills/synthesis/references/pr-descriptions.md +87 -0
  147. package/skills/synthesis/references/synthesis-steps.md +109 -0
  148. package/skills/synthesis/references/troubleshooting.md +115 -0
  149. package/skills/validate-all-skills.sh +57 -0
  150. package/skills/validate-frontmatter.sh +237 -0
  151. package/skills/workflow-state/SKILL.md +210 -0
  152. package/skills/workflow-state/references/mcp-tool-reference.md +111 -0
  153. package/skills/workflow-state/references/phase-transitions.md +141 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "lvlup-sw",
3
+ "owner": {
4
+ "name": "Levelup Software",
5
+ "email": "oss@levelupsoftware.com"
6
+ },
7
+ "metadata": {
8
+ "description": "Production-quality agent governance tools for Claude Code",
9
+ "version": "1.0.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "exarchos",
14
+ "source": { "source": "npm", "package": "@lvlup-sw/exarchos", "version": "2.0.1" },
15
+ "description": "Event-sourced SDLC workflows with agent team coordination",
16
+ "version": "2.0.1",
17
+ "author": { "name": "Levelup Software" },
18
+ "category": "productivity",
19
+ "tags": ["workflow", "sdlc", "governance", "graphite", "tdd"]
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "exarchos",
3
+ "description": "Agent governance for Claude Code — event-sourced SDLC workflows with team coordination, quality gates, and progressive stacking via Graphite.",
4
+ "version": "2.0.0",
5
+ "author": { "name": "Levelup Software" },
6
+ "homepage": "https://github.com/lvlup-sw/exarchos",
7
+ "repository": "https://github.com/lvlup-sw/exarchos",
8
+ "license": "MIT",
9
+ "keywords": [
10
+ "workflow", "sdlc", "governance", "graphite",
11
+ "event-sourcing", "tdd", "code-review", "teams"
12
+ ],
13
+ "commands": "./commands/",
14
+ "skills": "./skills/",
15
+ "hooks": "./hooks/hooks.json",
16
+ "mcpServers": "./.mcp.json"
17
+ }
package/.mcp.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "mcpServers": {
3
+ "exarchos": {
4
+ "type": "stdio",
5
+ "command": "bun",
6
+ "args": ["run", "./dist/exarchos-mcp.js"],
7
+ "env": {
8
+ "WORKFLOW_STATE_DIR": "~/.claude/workflow-state"
9
+ }
10
+ },
11
+ "graphite": {
12
+ "type": "stdio",
13
+ "command": "gt",
14
+ "args": ["mcp"]
15
+ }
16
+ }
17
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,59 @@
1
+ # AGENTS.md
2
+
3
+ ## Project Overview
4
+
5
+ Exarchos is local agent governance for Claude Code. It provides event-sourced SDLC workflows with agent team coordination, installing commands, skills, rules, and MCP plugins to `~/.claude/` via symlinks. Workflows survive context compaction through persistent state and auto-resume on session start.
6
+
7
+ ## Tech Stack
8
+
9
+ - **Languages:** TypeScript (strict mode, ESM), Bash, Markdown (structured with YAML frontmatter)
10
+ - **Runtime:** Node.js >= 20, Bun (bundler)
11
+ - **Testing:** Vitest (co-located `*.test.ts`), bash integration tests (co-located `*.test.sh`)
12
+ - **MCP Framework:** `@modelcontextprotocol/sdk` + `zod`
13
+ - **Build:** `tsc` for type checking, `bun build` for bundling MCP server and CLI
14
+ - **Tools:** Claude Code CLI, Graphite CLI (stacked PRs)
15
+
16
+ ## Code Organization
17
+
18
+ | Directory | Purpose |
19
+ |-----------|---------|
20
+ | `commands/` | Slash commands (`/ideate`, `/plan`, `/delegate`, `/debug`, `/refactor`, `/review`, `/synthesize`, `/checkpoint`, `/resume`, `/tdd`, `/sync-schemas`) |
21
+ | `skills/` | Reusable workflow modules with `SKILL.md` and `references/` subdirectories |
22
+ | `rules/` | Global behavioral constraints (coding standards, TDD, orchestrator constraints) |
23
+ | `scripts/` | Deterministic validation scripts replacing prose checklists in skills |
24
+ | `servers/exarchos-mcp/` | Unified MCP server: workflow HSM, event store, CQRS views, team coordination |
25
+ | `src/` | Root installer TypeScript source |
26
+ | `docs/` | Designs, plans, ADRs, schemas, audits, bug reports |
27
+ | `renovate-config/` | Renovate dependency management presets |
28
+ | `hooks.json` | CLI hooks for workflow auto-continue and guardrails |
29
+ | `manifest.json` | Package manifest consumed by installer |
30
+
31
+ ## MCP Server Architecture
32
+
33
+ Single server at `servers/exarchos-mcp/` exposing 5 composite tools:
34
+
35
+ - **exarchos_workflow** — HSM-based workflow lifecycle (init/get/set/cancel)
36
+ - **exarchos_event** — Append-only JSONL event store with 39 event types
37
+ - **exarchos_orchestrate** — Agent team spawn/message/shutdown + task claim/complete/fail
38
+ - **exarchos_view** — CQRS materialized views (pipeline, tasks, workflow status, team status, stack, telemetry)
39
+ - **exarchos_sync** — Remote sync (stub)
40
+
41
+ ## Security Considerations
42
+
43
+ - No secrets stored in repository
44
+ - Configuration templates use environment variables
45
+ - MCP server communicates over stdio only (no network listeners)
46
+ - Workflow state persists to `~/.claude/workflow-state/` (local filesystem only)
47
+ - Hook CLI validates tool calls against phase/role guardrails
48
+
49
+ ## Known Tech Debt
50
+
51
+ - `docs/follow-ups/` — Empty directory, pending cleanup
52
+ - Some design docs reference completed/superseded features (Jules integration, pre-Exarchos architecture)
53
+
54
+ ## Scan Preferences
55
+
56
+ - **Focus areas:** Security vulnerabilities, code quality, outdated patterns, dead code
57
+ - **Ignore patterns:** `node_modules/`, `.git/`, `dist/`, `coverage/`, `.worktrees/`, `.serena/`, `.terraform/`, `*.tfstate*`, `*.local.json`
58
+ - **Severity threshold:** Report Medium and above
59
+ - **Special files:** `*.md` files are structured content (commands/skills/rules), not just documentation — treat frontmatter as configuration
@@ -0,0 +1,62 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code when working in this repository.
4
+
5
+ ## Global Workflow
6
+
7
+ Uses global Claude Code workflow from `~/.claude/`:
8
+
9
+ | Command | Purpose |
10
+ |---------|---------|
11
+ | `/ideate` | Collaborative design exploration |
12
+ | `/plan` | TDD implementation task breakdown |
13
+ | `/delegate` | Subagent dispatch to git worktrees |
14
+ | `/review` | Two-stage: spec + quality review |
15
+ | `/synthesize` | Branch merge and PR creation |
16
+ | `/debug` | Bug investigation and fix workflow |
17
+ | `/refactor` | Code improvement (polish or overhaul) |
18
+ | `/tdd` | TDD workflow reference |
19
+
20
+ ## TDD (Mandatory)
21
+
22
+ All code changes follow strict Test-Driven Development:
23
+
24
+ 1. **RED**: Write a failing test FIRST
25
+ 2. **GREEN**: Write MINIMUM code to pass
26
+ 3. **REFACTOR**: Clean up while tests stay green
27
+
28
+ See `~/.claude/rules/tdd-{language}.md` for language-specific patterns.
29
+
30
+ ## Coding Standards
31
+
32
+ See `~/.claude/rules/coding-standards-{language}.md` for language-specific standards.
33
+
34
+ ## Project-Specific Configuration
35
+
36
+ ### Test Commands
37
+
38
+ ```bash
39
+ # Run tests
40
+ npm run test:run
41
+
42
+ # Coverage
43
+ npm run test:coverage
44
+
45
+ # Type check
46
+ npm run typecheck
47
+ ```
48
+
49
+ ### Additional Context
50
+
51
+ [Add project-specific notes, architectural decisions, or constraints here]
52
+
53
+ ## Project Structure
54
+
55
+ ```
56
+ project/
57
+ ├── src/ # Source code
58
+ ├── tests/ # Test files (or co-located with src)
59
+ ├── docs/ # Documentation
60
+ └── .claude/ # Project-specific overrides (optional)
61
+ └── settings.json
62
+ ```
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Level Up Software, LLC
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,258 @@
1
+ <div align="center">
2
+ <img src="exarchos-logo.png" alt="Exarchos" width="280" />
3
+
4
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
5
+
6
+ **Structured SDLC workflows with multi-agent orchestration for Claude Code**<br>
7
+ Verifiable outcomes · Graphite stacked PRs · Full auditability via event sourcing
8
+ </div>
9
+
10
+ ---
11
+
12
+ ## Installation
13
+
14
+ ### From Claude Code Marketplace (Recommended)
15
+
16
+ ```
17
+ claude plugin install exarchos@lvlup-sw
18
+ ```
19
+
20
+ ### For Development
21
+
22
+ ```bash
23
+ git clone https://github.com/lvlup-sw/exarchos.git
24
+ cd exarchos
25
+ npm install && npm run build
26
+ claude --plugin-dir .
27
+ ```
28
+
29
+ ### Dev Companion (Optional)
30
+
31
+ Adds GitHub, Serena, Context7, and Microsoft Learn MCP for enhanced development:
32
+
33
+ ```bash
34
+ npx @lvlup-sw/exarchos-dev
35
+ ```
36
+
37
+ ### Legacy Installer
38
+
39
+ ```bash
40
+ npx -y github:lvlup-sw/exarchos
41
+ ```
42
+
43
+ The interactive wizard walks you through setup:
44
+
45
+ ```
46
+ ? Installation mode: Standard / Dev
47
+ ? MCP servers: [Exarchos ✓] [Graphite ✓] [Microsoft Learn]
48
+ ? Plugins: [GitHub] [Serena] [Context7]
49
+ ? Rule sets: [TypeScript] [C#/.NET] [Workflow]
50
+ ? Proceed with install? Yes
51
+ ```
52
+
53
+ ### Prerequisites
54
+
55
+ - **Node.js** >= 20
56
+ - **Graphite CLI** (`gt`) — required for stacked PR workflows
57
+
58
+ ## Workflows
59
+
60
+ | Task | Command |
61
+ |------|---------|
62
+ | New feature/design | `/exarchos:ideate` |
63
+ | Bug fix | `/exarchos:debug` |
64
+ | Code improvement | `/exarchos:refactor` |
65
+
66
+ ## Build & Test
67
+
68
+ ```bash
69
+ npm run build # tsc + bun → dist/
70
+ npm run test:run # vitest single run
71
+ npm run typecheck # tsc --noEmit
72
+ npm run validate # Validate plugin structure
73
+ ```
74
+
75
+ ## Why Exarchos?
76
+
77
+ Claude Code is powerful, but complex features expose three gaps: sessions lose state during context compaction, subagents can't collaborate or challenge each other, and there's no structured way to verify what agents produce. Exarchos fills these gaps.
78
+
79
+ - **Verifiable outcomes** — Layered quality gates enforce spec compliance, code quality, and TDD at every stage. Work that doesn't pass doesn't merge.
80
+ - **Multi-agent orchestration** — Agent teams work in parallel git worktrees with independent context. The orchestrator steers; teammates execute, review, and coordinate.
81
+ - **Graphite stacked PRs** — Completed tasks are progressively stacked as PRs via Graphite, with merge queue integration. No monolithic PRs.
82
+ - **Full auditability** — Every workflow transition, task completion, and agent interaction is recorded in an append-only event store. Saga compensation ensures safe cancellation and recovery. CQRS materialized views provide real-time observability.
83
+ - **Context resilience** — HSM-driven workflow state survives context compaction. Sessions auto-resume exactly where they left off.
84
+ - **Token efficient** — 5 composite MCP tools using action discriminators replace what would otherwise be 26+ individual tool definitions. Fewer tool schemas in context means lower per-call token overhead. Structured Markdown content layers (commands, skills, rules) load on demand — only what's relevant enters the context window.
85
+
86
+ ## Architecture
87
+
88
+ Exarchos is a unified MCP server combining workflow state management, event sourcing, CQRS views, and team coordination.
89
+
90
+ ```
91
+ ┌─────────────────────────────────────────────────────────────┐
92
+ │ Claude Code Lead │
93
+ │ Orchestrator — /ideate, /plan, /delegate, etc. │
94
+ └────────────────────────────┬────────────────────────────────┘
95
+
96
+ ┌────────┴────────┐
97
+ │ Exarchos MCP │
98
+ │ │
99
+ │ Event Store │ Append-only JSONL
100
+ │ CQRS Views │ Materialized read models
101
+ │ Team Coord │ Spawn/message/shutdown
102
+ │ Workflow HSM │ State machine transitions
103
+ └────────┬────────┘
104
+
105
+ ┌──────────────┼──────────────┐
106
+ │ │ │
107
+ Teammate 1 Teammate 2 Teammate N
108
+ (worktree) (worktree) (worktree)
109
+ ```
110
+
111
+ ### MCP Tools (5 Composite)
112
+
113
+ Each tool uses an `action` discriminator to route to specific operations:
114
+
115
+ | Tool | Actions | Purpose |
116
+ |------|---------|---------|
117
+ | **`exarchos_workflow`** | `init`, `get`, `set`, `cancel`, `cleanup` | HSM state transitions, phase tracking, lifecycle management |
118
+ | **`exarchos_event`** | `append`, `query` | Append-only event log, temporal queries |
119
+ | **`exarchos_orchestrate`** | `task_claim`, `task_complete`, `task_fail` | Task lifecycle for delegated work |
120
+ | **`exarchos_view`** | `pipeline`, `tasks`, `workflow_status`, `stack_status`, `stack_place`, `telemetry`, `team_performance`, `delegation_timeline` | CQRS materialized read models |
121
+ | **`exarchos_sync`** | `now` | Remote state synchronization |
122
+
123
+ ### Companion MCP Servers & Plugins
124
+
125
+ Configured during install via the interactive wizard:
126
+
127
+ | Server/Plugin | Type | Purpose |
128
+ |---------------|------|---------|
129
+ | **Exarchos** | MCP (bundled) | Workflow orchestration, event sourcing, team coordination |
130
+ | **Graphite** | MCP (external) | Stacked PR management and merge queue |
131
+ | **Microsoft Learn** | MCP (remote) | Official Azure/.NET documentation |
132
+ | **GitHub** | Claude plugin | PRs, issues, code search |
133
+ | **Serena** | Claude plugin | Semantic code analysis |
134
+ | **Context7** | Claude plugin | Up-to-date library documentation |
135
+
136
+ ## Workflow Details
137
+
138
+ Three HSM-driven SDLC workflows with automatic state checkpointing. All workflows auto-resume on session start. Human checkpoints only at plan approval and merge confirmation.
139
+
140
+ ### Feature Workflow
141
+
142
+ ```
143
+ /ideate → /plan → plan-review ←──┐
144
+ │ gaps? │
145
+ [CONFIRM] │
146
+ │ ─────────┘
147
+
148
+ ┌─ implementation ──────────────────┐
149
+ │ │
150
+ │ /delegate → /review ──┐ │
151
+ │ ▲ fail (≤3x) │ │
152
+ │ └─────────────────┘ │
153
+ └───────────────────────────────────┘
154
+ │ pass
155
+
156
+ /synthesize → [CONFIRM] → completed
157
+ ```
158
+
159
+ | Phase | Command | Purpose |
160
+ |-------|---------|---------|
161
+ | Design | `/ideate` | Collaborative design exploration with trade-offs |
162
+ | Plan | `/plan` | TDD task decomposition + stack ordering |
163
+ | Plan review | — | Human approval checkpoint |
164
+ | Delegate | `/delegate` | Spawn agent teams in worktrees, progressive PR stacking |
165
+ | Review | `/review` | Two-stage: spec compliance → code quality |
166
+ | Synthesize | `/synthesize` | Enqueue Graphite stack in merge queue |
167
+
168
+ ### Debug Workflow
169
+
170
+ ```
171
+ /debug → triage → investigate ─────┬──────────────────────────┐
172
+ │ │
173
+ thorough track hotfix track
174
+ │ │
175
+ rca → design → implement implement → validate
176
+ │ │
177
+ validate → review completed
178
+
179
+ synthesize → completed
180
+ ```
181
+
182
+ | Track | Phases | Use when |
183
+ |-------|--------|----------|
184
+ | **Thorough** | RCA → design → implement → validate → review → synthesize | Root cause analysis needed |
185
+ | **Hotfix** | implement → validate | Cause is known, quick fix |
186
+
187
+ ### Refactor Workflow
188
+
189
+ ```
190
+ /refactor → explore → brief ───────┬──────────────────────────────────┐
191
+ │ │
192
+ polish track overhaul track
193
+ │ │
194
+ implement → validate → docs plan → delegate → review ──┐
195
+ │ ▲ fail (≤3x) │
196
+ completed └─────────────────┘
197
+ │ pass
198
+ docs → synthesize
199
+
200
+ completed
201
+ ```
202
+
203
+ | Track | Phases | Use when |
204
+ |-------|--------|----------|
205
+ | **Polish** | implement → validate → update docs → completed | Small changes, ≤5 files, direct edits |
206
+ | **Overhaul** | plan → delegate → review → update docs → synthesize | Large restructuring, delegation required |
207
+
208
+ ### TDD Iron Law
209
+
210
+ Every task follows Red-Green-Refactor:
211
+ 1. **RED**: Write failing test first
212
+ 2. **GREEN**: Minimum code to pass
213
+ 3. **REFACTOR**: Clean up, tests stay green
214
+
215
+ ## What's Installed
216
+
217
+ The installer copies (standard mode) or symlinks (dev mode) into `~/.claude/`:
218
+
219
+ | Type | Count | Examples |
220
+ |------|-------|----------|
221
+ | Commands | 12 | `/ideate`, `/plan`, `/delegate`, `/review`, `/synthesize`, `/debug`, `/refactor` |
222
+ | Skills | 14 | brainstorming, delegation, debug, refactor, spec-review, quality-review |
223
+ | Rule sets | 3 | TypeScript, C#/.NET, Workflow & Orchestration |
224
+ | MCP servers | 1–3 | Exarchos (required), Graphite (required), Microsoft Learn (optional) |
225
+ | Plugins | 0–3 | GitHub, Serena, Context7 |
226
+
227
+ ### Installation Modes
228
+
229
+ | Mode | What it does | For whom |
230
+ |------|-------------|----------|
231
+ | **Standard** | Copies files to `~/.claude/` with content hash tracking | End users |
232
+ | **Dev** | Symlinks to repo for live editing | Exarchos contributors |
233
+
234
+ Standard mode tracks file hashes in `~/.claude/exarchos.json`. Re-running the installer only updates changed files.
235
+
236
+ ## Configuration
237
+
238
+ ### Discovery Order
239
+
240
+ 1. **Project local**: `./.claude/` (highest priority)
241
+ 2. **Global**: `~/.claude/` (installed by Exarchos)
242
+
243
+ ### Project Overrides
244
+
245
+ ```bash
246
+ # Add project-specific rule
247
+ mkdir -p .claude/rules
248
+ cat > .claude/rules/my-rule.md << 'EOF'
249
+ ---
250
+ paths: '**/*.ts'
251
+ ---
252
+ # My project rule
253
+ EOF
254
+ ```
255
+
256
+ ## License
257
+
258
+ Apache-2.0 — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,37 @@
1
+ ---
2
+ description: Toggle autocompact on/off or set threshold percentage
3
+ ---
4
+
5
+ # Autocompact Toggle
6
+
7
+ Manage the `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` setting in `~/.claude/settings.json`.
8
+
9
+ ## Arguments
10
+
11
+ - No arguments or `status`: Show current autocompact state
12
+ - `on`: Enable autocompact at 95%
13
+ - `off`: Disable autocompact (remove the env var)
14
+ - A number (1-100): Set autocompact to that percentage
15
+
16
+ **Input:** "$ARGUMENTS"
17
+
18
+ ## Process
19
+
20
+ 1. Read `~/.claude/settings.json`
21
+ 2. Check `env.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`:
22
+ - If present: autocompact is **on** at that percentage
23
+ - If absent: autocompact is **off** (uses Claude Code default behavior)
24
+ 3. Apply the requested action:
25
+ - **`on`**: Set `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` to `"95"` in the `env` object
26
+ - **`off`**: Remove `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` from the `env` object
27
+ - **Number**: Set `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` to that number as a string
28
+ - **`status` or empty**: Just report current state
29
+ 4. Write updated JSON back (preserve all other settings)
30
+ 5. Report the change — note it takes effect on the **next session**
31
+
32
+ ## Output Format
33
+
34
+ ```
35
+ Autocompact: ON (95%) → OFF
36
+ Changes take effect on next session.
37
+ ```