@skathio/somi 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/.claude/settings.json +108 -0
- package/.claude/settings.local.json +9 -0
- package/.claude/somi-state/last-context-signature +1 -0
- package/.claude-plugin/marketplace.json +21 -0
- package/.claude-plugin/plugin.json +24 -0
- package/.copilot-extension/extension.json +51 -0
- package/.copilot-extension/marketplace.json +19 -0
- package/LICENSE +21 -0
- package/README.md +209 -0
- package/VERSION +1 -0
- package/agents/architecture-reviewer.md +86 -0
- package/agents/coder.md +222 -0
- package/agents/discovery-analyst.md +305 -0
- package/agents/planner.md +256 -0
- package/agents/refactorer.md +72 -0
- package/agents/reviewer.md +233 -0
- package/agents/security-reviewer.md +85 -0
- package/agents/test-strategist.md +74 -0
- package/commands/architecture-review.md +92 -0
- package/commands/code-loop.md +142 -0
- package/commands/code-parallel.md +155 -0
- package/commands/code.md +138 -0
- package/commands/discover.md +175 -0
- package/commands/plan-loop.md +124 -0
- package/commands/plan.md +174 -0
- package/commands/refactor.md +44 -0
- package/commands/review-panel.md +123 -0
- package/commands/review.md +149 -0
- package/commands/security-review.md +73 -0
- package/commands/ship-loop.md +135 -0
- package/commands/ship.md +108 -0
- package/commands/test-strategy.md +82 -0
- package/examples/README.md +19 -0
- package/examples/code-review-example.md +88 -0
- package/examples/discovery-example.md +200 -0
- package/examples/feature-plan-example.md +377 -0
- package/examples/full-pipeline-example.md +188 -0
- package/examples/sample-consumer/.claude/settings.json +29 -0
- package/examples/sample-consumer/CLAUDE.md +41 -0
- package/examples/sample-consumer/README.md +77 -0
- package/hooks/hooks.json +64 -0
- package/hooks/lib/common.sh +120 -0
- package/hooks/post-tool/audit-log.sh +40 -0
- package/hooks/post-tool/lint-changed-files.sh +80 -0
- package/hooks/pre-tool/block-dangerous-bash.sh +83 -0
- package/hooks/pre-tool/block-secret-writes.sh +83 -0
- package/hooks/pre-tool/gate-dep-install.sh +72 -0
- package/hooks/pre-tool/guard-protected-paths.sh +74 -0
- package/hooks/user-prompt-submit/inject-workflow-context.sh +143 -0
- package/package.json +51 -0
- package/rules/00-priorities.md +48 -0
- package/rules/10-solid.md +87 -0
- package/rules/20-clean-code.md +62 -0
- package/rules/30-security-owasp.md +83 -0
- package/rules/40-engineering-practices.md +65 -0
- package/rules/50-collaboration.md +108 -0
- package/rules/99-overrides.md +52 -0
- package/rules/CLAUDE.md +164 -0
- package/skills/api-design/SKILL.md +147 -0
- package/skills/clean-code/SKILL.md +142 -0
- package/skills/market-research/SKILL.md +125 -0
- package/skills/observability/SKILL.md +133 -0
- package/skills/owasp-defense/SKILL.md +141 -0
- package/skills/requirements-engineering/SKILL.md +137 -0
- package/skills/solid-principles/SKILL.md +143 -0
- package/skills/test-strategy/SKILL.md +133 -0
- package/skills/threat-modeling/SKILL.md +117 -0
- package/templates/ADR.md.tmpl +73 -0
- package/templates/BRD.md.tmpl +68 -0
- package/templates/CONTEXT.md.tmpl +74 -0
- package/templates/DECISIONS.md.tmpl +104 -0
- package/templates/DIARY.md.tmpl +65 -0
- package/templates/DOD.md.tmpl +66 -0
- package/templates/FRD.md.tmpl +64 -0
- package/templates/PHASE.md.tmpl +80 -0
- package/templates/PROGRESS.md.tmpl +76 -0
- package/templates/RD-README.md.tmpl +70 -0
- package/templates/RESEARCH.md.tmpl +96 -0
- package/templates/REVIEW.md.tmpl +81 -0
- package/templates/SDD.md.tmpl +82 -0
- package/templates/SOMI-README.md.tmpl +66 -0
- package/templates/SPEC.md.tmpl +123 -0
- package/templates/SRS.md.tmpl +85 -0
- package/templates/TDD.md.tmpl +77 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"_comment": "Reference settings for somi when used VENDORED (copied into a project's .claude/ tree) instead of installed as a plugin. For the plugin install path, hooks/hooks.json is the source of truth and Claude Code merges it automatically using ${CLAUDE_PLUGIN_ROOT}. Vendored installs may copy this file (or merge its hooks block) into their own .claude/settings.json and adjust SOMI_VENDOR_ROOT to point at the hook scripts.",
|
|
4
|
+
"env": {
|
|
5
|
+
"SOMI_VENDOR_ROOT": "${CLAUDE_PROJECT_DIR}/.claude/plugins/somi",
|
|
6
|
+
"SOMI_AUDIT_LOG": "${CLAUDE_PROJECT_DIR}/.claude/audit.log"
|
|
7
|
+
},
|
|
8
|
+
"permissions": {
|
|
9
|
+
"allow": [
|
|
10
|
+
"Read(**)",
|
|
11
|
+
"Grep(**)",
|
|
12
|
+
"Glob(**)",
|
|
13
|
+
"Bash(git status:*)",
|
|
14
|
+
"Bash(git diff:*)",
|
|
15
|
+
"Bash(git log:*)",
|
|
16
|
+
"Bash(git show:*)",
|
|
17
|
+
"Bash(git branch:*)",
|
|
18
|
+
"Bash(git remote:*)",
|
|
19
|
+
"Bash(ls:*)",
|
|
20
|
+
"Bash(pwd)",
|
|
21
|
+
"Bash(cat:*)",
|
|
22
|
+
"Bash(wc:*)",
|
|
23
|
+
"Bash(head:*)",
|
|
24
|
+
"Bash(tail:*)",
|
|
25
|
+
"Bash(rg:*)",
|
|
26
|
+
"Bash(jq:*)"
|
|
27
|
+
],
|
|
28
|
+
"deny": [
|
|
29
|
+
"Read(./.env)",
|
|
30
|
+
"Read(./.env.local)",
|
|
31
|
+
"Read(./.env.production)",
|
|
32
|
+
"Read(./*.pem)",
|
|
33
|
+
"Read(./*.key)",
|
|
34
|
+
"Read(./id_rsa*)",
|
|
35
|
+
"Read(./id_ed25519*)",
|
|
36
|
+
"Bash(curl * | sh)",
|
|
37
|
+
"Bash(curl * | bash)",
|
|
38
|
+
"Bash(wget * | sh)",
|
|
39
|
+
"Bash(wget * | bash)",
|
|
40
|
+
"Bash(rm -rf /:*)",
|
|
41
|
+
"Bash(rm -rf ~:*)",
|
|
42
|
+
"Bash(rm -rf $HOME:*)",
|
|
43
|
+
"Bash(git push --force:*)",
|
|
44
|
+
"Bash(git push -f:*)",
|
|
45
|
+
"Bash(git push --force-with-lease:*)"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"hooks": {
|
|
49
|
+
"PreToolUse": [
|
|
50
|
+
{
|
|
51
|
+
"matcher": "Bash",
|
|
52
|
+
"hooks": [
|
|
53
|
+
{
|
|
54
|
+
"type": "command",
|
|
55
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/pre-tool/block-dangerous-bash.sh"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "command",
|
|
59
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/pre-tool/gate-dep-install.sh"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"matcher": "Write|Edit",
|
|
65
|
+
"hooks": [
|
|
66
|
+
{
|
|
67
|
+
"type": "command",
|
|
68
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/pre-tool/block-secret-writes.sh"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "command",
|
|
72
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/pre-tool/guard-protected-paths.sh"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"PostToolUse": [
|
|
78
|
+
{
|
|
79
|
+
"matcher": "Write|Edit",
|
|
80
|
+
"hooks": [
|
|
81
|
+
{
|
|
82
|
+
"type": "command",
|
|
83
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/post-tool/lint-changed-files.sh"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"matcher": "*",
|
|
89
|
+
"hooks": [
|
|
90
|
+
{
|
|
91
|
+
"type": "command",
|
|
92
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/post-tool/audit-log.sh"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"UserPromptSubmit": [
|
|
98
|
+
{
|
|
99
|
+
"hooks": [
|
|
100
|
+
{
|
|
101
|
+
"type": "command",
|
|
102
|
+
"command": "${SOMI_VENDOR_ROOT}/hooks/user-prompt-submit/inject-workflow-context.sh"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
::
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "somi",
|
|
3
|
+
"description": "Self-hosted marketplace for the somi plugin. Add this repo to Claude Code to install somi.",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "somi",
|
|
6
|
+
"url": "https://github.com/skathio/somi"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "somi",
|
|
11
|
+
"source": {
|
|
12
|
+
"source": "url",
|
|
13
|
+
"url": "https://github.com/skathio/somi.git"
|
|
14
|
+
},
|
|
15
|
+
"description": "Discovery → plan / code / review workflow system with SOLID, OWASP, and clean-code guardrails.",
|
|
16
|
+
"version": "1.0.0",
|
|
17
|
+
"tags": ["workflow", "agents", "review", "security"],
|
|
18
|
+
"homepage": "https://github.com/skathio/somi"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "somi",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"displayName": "SoMi",
|
|
5
|
+
"description": "Multi-agent engineering workflow system: plan, code, review — with SOLID/OWASP guardrails, deterministic hooks, and a global ruleset.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"workflow",
|
|
8
|
+
"agents",
|
|
9
|
+
"planning",
|
|
10
|
+
"code-review",
|
|
11
|
+
"security",
|
|
12
|
+
"owasp",
|
|
13
|
+
"solid",
|
|
14
|
+
"clean-code",
|
|
15
|
+
"engineering"
|
|
16
|
+
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Skathi",
|
|
19
|
+
"url": "https://github.com/skathio/somi"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/skathio/somi",
|
|
22
|
+
"repository": "https://github.com/skathio/somi",
|
|
23
|
+
"license": "MIT"
|
|
24
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "somi",
|
|
3
|
+
"displayName": "SoMi",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Multi-agent engineering workflow system: plan, code, review — with SOLID/OWASP guardrails, deterministic hooks, and a global ruleset.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"workflow",
|
|
8
|
+
"agents",
|
|
9
|
+
"planning",
|
|
10
|
+
"code-review",
|
|
11
|
+
"security",
|
|
12
|
+
"owasp",
|
|
13
|
+
"solid",
|
|
14
|
+
"clean-code",
|
|
15
|
+
"engineering"
|
|
16
|
+
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Skathi",
|
|
19
|
+
"url": "https://github.com/skathio"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/skathio/somi",
|
|
22
|
+
"repository": "https://github.com/skathio/somi",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"type": "agent",
|
|
25
|
+
"components": {
|
|
26
|
+
"agents": "./agents",
|
|
27
|
+
"commands": "./commands",
|
|
28
|
+
"skills": "./skills",
|
|
29
|
+
"hooks": "./hooks"
|
|
30
|
+
},
|
|
31
|
+
"rules": "./rules/CLAUDE.md",
|
|
32
|
+
"commands": [
|
|
33
|
+
{ "name": "discover", "description": "Pre-development discovery: research competition + author the requirements & design foundation (BRD/SRS/FRD/SDD/TDD) for a new product. Feeds /plan." },
|
|
34
|
+
{ "name": "plan", "description": "Generate a structured engineering plan (phases, risks, DoD, test strategy)" },
|
|
35
|
+
{ "name": "plan-loop", "description": "Bounded plan → review → revise loop. Stops on approve, cap, divergence, or user stop." },
|
|
36
|
+
{ "name": "code", "description": "Implement against an approved plan with senior-engineer judgment" },
|
|
37
|
+
{ "name": "code-loop", "description": "Bounded code → review → fix loop on a single iteration. Stops on approve, cap, diff cap, circuit breaker, or user stop." },
|
|
38
|
+
{ "name": "code-parallel", "description": "Fan out provably-independent iterations into isolated git worktrees, then integrate them sequentially behind a gate. Falls back to sequential /code-loop on hosts without worktrees/concurrent sub-agents." },
|
|
39
|
+
{ "name": "review", "description": "Strict code or plan review with severity-graded findings (use `plan <slug>` for plan-level review)" },
|
|
40
|
+
{ "name": "review-panel", "description": "Parallel multi-lens review: seats reviewer + security/architecture/test lenses as the diff warrants, merges and de-duplicates findings into one verdict. Runs sequentially on Copilot (no concurrent sub-agents)." },
|
|
41
|
+
{ "name": "ship", "description": "Full plan → code → review pipeline against a problem statement. Code iterations run under /code-loop's caps." },
|
|
42
|
+
{ "name": "ship-loop", "description": "Bounded composition of /plan-loop → [hard human gate] → /code-loop per iteration." },
|
|
43
|
+
{ "name": "security-review", "description": "Security-focused review: auth, crypto, input validation, injection risks" },
|
|
44
|
+
{ "name": "architecture-review", "description": "Architectural review: boundaries, contracts, dependency direction, reversibility" },
|
|
45
|
+
{ "name": "test-strategy", "description": "Test-strategy review: risk-driven coverage, level selection, mock policy, determinism" },
|
|
46
|
+
{ "name": "refactor", "description": "Untangle complex code before patching antipatterns" }
|
|
47
|
+
],
|
|
48
|
+
"compatibility": {
|
|
49
|
+
"copilot": ">=1.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "somi",
|
|
3
|
+
"displayName": "SoMi",
|
|
4
|
+
"description": "SoMi marketplace. Add this repo to GitHub Copilot to install SoMi.",
|
|
5
|
+
"owner": {
|
|
6
|
+
"name": "Skathi",
|
|
7
|
+
"url": "https://github.com/skathio"
|
|
8
|
+
},
|
|
9
|
+
"extensions": [
|
|
10
|
+
{
|
|
11
|
+
"name": "somi",
|
|
12
|
+
"source": "github:skathio/somi",
|
|
13
|
+
"description": "Discovery → plan / code / review workflow system with SOLID, OWASP, and clean-code guardrails.",
|
|
14
|
+
"version": "1.0.0",
|
|
15
|
+
"tags": ["workflow", "agents", "review", "security"],
|
|
16
|
+
"homepage": "https://github.com/skathio/somi"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Skathi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# SoMi
|
|
2
|
+
|
|
3
|
+
> An opinionated, reusable multi-agent engineering workflow system for Claude Code and GitHub Copilot.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@skathio/somi)
|
|
6
|
+
|
|
7
|
+
The latest published version is on [npm](https://www.npmjs.com/package/@skathio/somi) and in the
|
|
8
|
+
[GitHub Releases](https://github.com/skathio/somi/releases); see [CHANGELOG.md](CHANGELOG.md) for
|
|
9
|
+
release notes.
|
|
10
|
+
|
|
11
|
+
SoMi gives engineering teams a shared, version-controlled "operating system" for working with Claude:
|
|
12
|
+
three first-class build workflows — **plan → code → review** — plus an upstream **discovery** workflow
|
|
13
|
+
that turns a raw product idea into a research-grounded requirements & design foundation. All backed by
|
|
14
|
+
specialised subagents, deterministic guardrail hooks, composable skills, and a global ruleset that
|
|
15
|
+
enforces SOLID, clean code, and OWASP defenses.
|
|
16
|
+
|
|
17
|
+
It is designed to be:
|
|
18
|
+
|
|
19
|
+
- **Reusable** across many repositories and teams
|
|
20
|
+
- **Installable** as a Claude Code plugin (via marketplace or npm) or as a GitHub Copilot chat extension
|
|
21
|
+
- **Opinionated but extensible** — strong defaults, clean overrides
|
|
22
|
+
- **Deterministic where possible** (hooks) and **judgment-heavy where needed** (agents)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## The workflows
|
|
27
|
+
|
|
28
|
+
| Command | Workflow | Agent | Purpose |
|
|
29
|
+
|---------------|---------------------|---------------------|------------------------------------------------------------------------------------------|
|
|
30
|
+
| `/discover` | Discovery (pre-dev) | `discovery-analyst` | Research the competition, then author the requirements & design foundation (BRD/SRS/FRD/SDD/TDD) for a new product |
|
|
31
|
+
| `/plan` | Planning | `planner` | Staff-engineer-grade plan: phases, risks, slices, DoD, test & rollout strategy |
|
|
32
|
+
| `/code` | Coding | `coder` | Execute against an approved plan with senior-level design judgment |
|
|
33
|
+
| `/review` | Reviewing | `reviewer` | Strict, skeptical review of code / plans / architecture with severity-graded findings |
|
|
34
|
+
| `/ship` | Pipeline | planner+coder+reviewer | Full plan → code → review pipeline against a single problem statement |
|
|
35
|
+
|
|
36
|
+
`/discover` is the upstream, greenfield-only step that feeds `/plan`; the plan → code → review trio is the
|
|
37
|
+
daily build loop. Supporting agents (used by handoff): `security-reviewer`, `architecture-reviewer`,
|
|
38
|
+
`test-strategist`, `refactorer`.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
### Option 1 — Claude Code plugin (marketplace)
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
# Add the SoMi marketplace and install the plugin:
|
|
48
|
+
/plugin marketplace add https://github.com/skathio/somi
|
|
49
|
+
/plugin install somi@somi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Updates flow through `/plugin update somi`.
|
|
53
|
+
|
|
54
|
+
### Option 2 — npm (Claude Code)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install -g @skathio/somi
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then in Claude Code: `/plugin install somi`.
|
|
61
|
+
|
|
62
|
+
### Option 3 — GitHub Copilot (extension marketplace)
|
|
63
|
+
|
|
64
|
+
SoMi is also a GitHub Copilot extension, installable the same way as the Claude Code plugin:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
copilot plugin marketplace add https://github.com/skathio/somi
|
|
68
|
+
copilot plugin install somi@somi
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Once installed, use `@somi` in GitHub Copilot chat:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
@somi /plan Add per-team rate limiting to the public webhook endpoint
|
|
75
|
+
@somi /code rate-limiting-webhooks phase 1, iteration 1
|
|
76
|
+
@somi /review rate-limiting-webhooks
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
> **Parity caveat — Copilot is not feature-equivalent to Claude Code.** Two things do **not** carry
|
|
80
|
+
> over, because they depend on Claude Code host capabilities Copilot doesn't expose:
|
|
81
|
+
>
|
|
82
|
+
> - **The deterministic guardrail hooks do not fire.** Blocking dangerous bash, secret-writes,
|
|
83
|
+
> protected-path writes, dep-install gating, and the audit log are Claude Code `hooks` — on Copilot
|
|
84
|
+
> they are **absent**, so those safety nets are not enforced. The agent/skill judgment still
|
|
85
|
+
> applies, but the hard stops don't.
|
|
86
|
+
> - **Multi-agent orchestration degrades to sequential.** The loops (`/code-loop`, `/plan-loop`,
|
|
87
|
+
> `/ship`) and the parallel commands (`/review-panel`, `/code-parallel`) drive Claude Code
|
|
88
|
+
> sub-agents via the Task tool. Where the host can't spawn sub-agents concurrently, these run
|
|
89
|
+
> **one lens / one iteration at a time** — same result, no parallelism, and the sonnet-orchestrator
|
|
90
|
+
> / opus-agent model split may not apply.
|
|
91
|
+
>
|
|
92
|
+
> The commands, agents, skills, rules, and templates are shared; the **enforcement and concurrency
|
|
93
|
+
> layers are Claude Code features**. Treat Copilot as the portable subset, not a drop-in equal. See
|
|
94
|
+
> [`docs/HOOKS.md`](docs/HOOKS.md) and [`docs/PLUGIN.md`](docs/PLUGIN.md).
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## What's in the box
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
.claude-plugin/ Plugin + marketplace manifests (Claude Code plugin distribution)
|
|
102
|
+
agents/ Subagent definitions (planner, coder, reviewer, + support)
|
|
103
|
+
commands/ Slash-command entrypoints (/plan, /code, /review, /ship, ...)
|
|
104
|
+
skills/ On-demand expert knowledge packs (OWASP, SOLID, test strategy, ...)
|
|
105
|
+
rules/ Global ruleset composed into CLAUDE.md
|
|
106
|
+
hooks/ Deterministic guardrails (block dangerous bash, secret writes, ...)
|
|
107
|
+
templates/ Artifact templates (CONTEXT, SPEC, DECISIONS, PHASE, PROGRESS, DIARY, REVIEW, ADR, DOD; R&D: RD-README, RESEARCH, BRD, SRS, FRD, SDD, TDD)
|
|
108
|
+
.copilot-extension/ Copilot extension + marketplace manifests (mirrors .claude-plugin/)
|
|
109
|
+
examples/ Worked examples + a minimal consuming project
|
|
110
|
+
docs/ Full documentation
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
When you use SoMi in a project, workflows write their artifacts into a `.somi/` directory
|
|
114
|
+
at the project root. Discovery foundations live under `.somi/rd/<slug>/` (research report, BRD, SRS,
|
|
115
|
+
FRD, SDD, TDD); plans live under `.somi/plans/<slug>/` (context, spec, decisions, progress, diary,
|
|
116
|
+
phases); reviews live under `.somi/reviews/<slug>/` — separate directories, no clutter.
|
|
117
|
+
See [`docs/WORKFLOWS.md`](docs/WORKFLOWS.md) for the full layout.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Quick start (after install)
|
|
122
|
+
|
|
123
|
+
For a **brand-new product**, start one step earlier with discovery:
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
> /discover A self-hosted alternative to Calendly for clinics, with HIPAA-aware
|
|
127
|
+
scheduling, SMS reminders, and no per-seat pricing.
|
|
128
|
+
|
|
129
|
+
# Claude proposes a slug ("clinic-scheduler"), researches competitors and real user
|
|
130
|
+
# complaints (cited), pauses on each crossroads (persona, scope, build-vs-integrate,
|
|
131
|
+
# expensive-to-reverse architecture), and writes a traceable requirements & design set
|
|
132
|
+
# to .somi/rd/clinic-scheduler/ (research report, BRD, SRS, FRD, SDD, TDD). Then run
|
|
133
|
+
# /plan clinic-scheduler — the planner consumes that foundation.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
For an **incremental change** (the daily loop), start at planning:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
> /plan Add per-team rate limiting to the public webhook ingestion endpoint
|
|
140
|
+
with audit logging and an emergency kill switch.
|
|
141
|
+
|
|
142
|
+
# Claude proposes a slug ("rate-limiting-webhooks"), reads the repo, drafts context.md,
|
|
143
|
+
# then pauses inline on each architectural decision — presenting options with concrete
|
|
144
|
+
# pros/cons, plus "Other" and "Discover" escape hatches. You decide. Verified decisions
|
|
145
|
+
# land in decisions.md; the spec, phases, progress, and diary fill in. Review the
|
|
146
|
+
# artifacts at .somi/plans/rate-limiting-webhooks/, edit if needed, approve.
|
|
147
|
+
|
|
148
|
+
> /code rate-limiting-webhooks phase 1, iteration 1
|
|
149
|
+
|
|
150
|
+
# Claude implements with senior-engineer judgment, writes tests, updates docs, and
|
|
151
|
+
# keeps the plan in sync — if implementation reveals the plan needs to change, it
|
|
152
|
+
# updates spec/decisions/phases in place and appends a diary entry.
|
|
153
|
+
|
|
154
|
+
> /review rate-limiting-webhooks
|
|
155
|
+
|
|
156
|
+
# Claude returns severity-graded findings (written under reviews/), rejects weak
|
|
157
|
+
# solutions, flags plan-vs-code divergence.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
For the all-in-one pipeline: `/ship <problem statement>`.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Why a shared OS, not per-project setups
|
|
165
|
+
|
|
166
|
+
- **Consistency** — every repo gets the same review bar, the same security posture, the same plan shape.
|
|
167
|
+
- **Upgrade once** — update the plugin; every project benefits.
|
|
168
|
+
- **Override locally** — projects keep their own `CLAUDE.md` and `rules/99-overrides.md`; SoMi never silently overrides them.
|
|
169
|
+
- **Auditable** — hooks log denied actions; reviewers can see what the system blocked vs. what humans approved.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Documentation
|
|
174
|
+
|
|
175
|
+
- [Installation](docs/INSTALL.md) — Claude Code plugin, npm, or Copilot extension
|
|
176
|
+
- [Usage](docs/USAGE.md) — running each workflow with examples
|
|
177
|
+
- [Workflows](docs/WORKFLOWS.md) — plan / code / review semantics and handoffs
|
|
178
|
+
- [Agents](docs/AGENTS.md) — full agent catalogue, escalation rules
|
|
179
|
+
- [Hooks](docs/HOOKS.md) — guardrails and how to add your own
|
|
180
|
+
- [Skills](docs/SKILLS.md) — on-demand expertise packs
|
|
181
|
+
- [Rules](docs/RULES.md) — global ruleset philosophy and conflict resolution
|
|
182
|
+
- [Commands](docs/COMMANDS.md) — slash-command reference
|
|
183
|
+
- [Extending](docs/EXTENDING.md) — adding workflows, agents, skills
|
|
184
|
+
- [Versioning](docs/VERSIONING.md) — SemVer policy, breaking-change rules
|
|
185
|
+
- [Governance](docs/GOVERNANCE.md) — how teams adopt updates safely
|
|
186
|
+
- [Plugin distribution](docs/PLUGIN.md) — marketplace and VS Code setup
|
|
187
|
+
- [Architecture](docs/architecture.md) — how the pieces fit together
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Versioning
|
|
192
|
+
|
|
193
|
+
SoMi follows [Semantic Versioning](https://semver.org/). Releases are **automated from
|
|
194
|
+
[Conventional Commits](https://www.conventionalcommits.org/)**: merging to `main` runs the publish
|
|
195
|
+
workflow, which derives the next version, publishes to npm (with a signed provenance attestation via
|
|
196
|
+
OIDC trusted publishing), pushes the `v<version>` git tag, and creates the matching GitHub Release.
|
|
197
|
+
|
|
198
|
+
The **published git tags and the npm registry are the source of truth** for the released version —
|
|
199
|
+
the in-repo `VERSION` / `package.json` are not committed back on each release, so don't rely on them
|
|
200
|
+
for "what's published." Check the [npm page](https://www.npmjs.com/package/@skathio/somi) or
|
|
201
|
+
[Releases](https://github.com/skathio/somi/releases) instead.
|
|
202
|
+
|
|
203
|
+
See [docs/VERSIONING.md](docs/VERSIONING.md) for the breaking-change policy and migration guide template.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
MIT — see [LICENSE](LICENSE).
|
package/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.0
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-reviewer
|
|
3
|
+
description: Reviews architectural decisions, ADRs, new modules/services, dependency direction changes, and contract changes. Use before introducing a new service, splitting/merging modules, or changing a published interface. Optimizes for long-term maintainability, clear boundaries, and reversibility of decisions.
|
|
4
|
+
model: opus
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Architecture Reviewer
|
|
8
|
+
|
|
9
|
+
You are a principal engineer reviewing structural decisions. Your time horizon is years, not weeks. You
|
|
10
|
+
optimize for the change that follows this change, not just this one. You operate inside SOMI and apply
|
|
11
|
+
[`rules/10-solid.md`](../rules/10-solid.md) and [`rules/CLAUDE.md`](../rules/CLAUDE.md) at the system level.
|
|
12
|
+
|
|
13
|
+
> **Canonical knowledge:** the [`solid-principles`](../skills/solid-principles/SKILL.md) and
|
|
14
|
+
> [`api-design`](../skills/api-design/SKILL.md) skills are the single source of truth for module/
|
|
15
|
+
> boundary design and contract shape. When this file and a skill diverge on a *technique*, the
|
|
16
|
+
> **skill wins**. This agent owns the *actor* role: evaluating a specific structural decision,
|
|
17
|
+
> reversibility, and team fit.
|
|
18
|
+
|
|
19
|
+
## When to invoke
|
|
20
|
+
|
|
21
|
+
- Introducing a new module, package, or service.
|
|
22
|
+
- Splitting an existing module or merging modules.
|
|
23
|
+
- Adding a new contract / public interface (HTTP, RPC, library API, event schema).
|
|
24
|
+
- Changing the direction of a dependency, especially around the domain ↔ infrastructure boundary.
|
|
25
|
+
- Choosing between two architectural patterns (sync vs. async, monolith vs. service, push vs. pull).
|
|
26
|
+
- Reviewing an ADR or design doc before it's approved.
|
|
27
|
+
|
|
28
|
+
## Operating procedure
|
|
29
|
+
|
|
30
|
+
1. **Restate the decision** in your own words. If the proposal can't be restated cleanly, the proposal
|
|
31
|
+
isn't done.
|
|
32
|
+
2. **Identify the forces** — the constraints, requirements, and pressures that this decision is responding
|
|
33
|
+
to. Are they real? Are they current? Are they ranked?
|
|
34
|
+
3. **Locate the boundaries**. Where are the trust boundaries, the data ownership boundaries, the team
|
|
35
|
+
boundaries, the deployment boundaries? Does the proposed architecture line up with them?
|
|
36
|
+
4. **Trace the dependencies**. Does the dependency graph flow in one direction at each layer? Is there
|
|
37
|
+
anything that would force the domain to depend on infrastructure?
|
|
38
|
+
5. **Stress-test the contract.** Take the proposed interface and walk three plausible future requirements
|
|
39
|
+
through it. Does it survive? At what cost?
|
|
40
|
+
6. **Check reversibility.** If we're wrong about this in 18 months, what's the cost to undo? Decisions
|
|
41
|
+
with high reversibility deserve looser scrutiny; decisions with low reversibility deserve much
|
|
42
|
+
tighter scrutiny.
|
|
43
|
+
7. **Check team fit.** Is the team set up to maintain this? A microservices split that requires a platform
|
|
44
|
+
team you don't have is a bad architectural fit even if the abstract design is fine.
|
|
45
|
+
|
|
46
|
+
## What to look for
|
|
47
|
+
|
|
48
|
+
- **Boundaries that don't match reality** — services split along technology lines instead of business
|
|
49
|
+
domains; modules that share state through globals; "shared kernel" that's really a god module.
|
|
50
|
+
- **Dependency inversions in the wrong direction** — domain importing storage clients; UI importing
|
|
51
|
+
business logic constants.
|
|
52
|
+
- **Premature distribution** — function calls that became network calls without a forcing function.
|
|
53
|
+
- **Coupling via shape** — two services that "happen to" share a wire format and now can't evolve
|
|
54
|
+
independently.
|
|
55
|
+
- **Contract design that locks in the wrong axis of variation** — exposing what should be hidden;
|
|
56
|
+
hiding what should be exposed.
|
|
57
|
+
- **Versioning afterthoughts** — a public interface with no versioning plan.
|
|
58
|
+
- **Failure-mode opacity** — components whose partial-failure behavior is undefined.
|
|
59
|
+
|
|
60
|
+
## Output shape
|
|
61
|
+
|
|
62
|
+
Use [`templates/ADR.md.tmpl`](../templates/ADR.md.tmpl)-shaped commentary. At minimum:
|
|
63
|
+
|
|
64
|
+
1. **What's being decided** — your restatement.
|
|
65
|
+
2. **Forces evaluated** — the constraints/requirements you're weighing.
|
|
66
|
+
3. **Alternatives considered** — at least two real options, each with the case for and against.
|
|
67
|
+
4. **Verdict** — `approve`, `approve-with-changes`, `request-changes`, `reject`.
|
|
68
|
+
5. **Findings** — severity-graded (same scale as `reviewer`).
|
|
69
|
+
6. **Reversibility note** — how hard is this to undo, and what would force us to.
|
|
70
|
+
7. **Follow-ups** — issues to file, monitoring to add, sunset criteria for any compromises.
|
|
71
|
+
|
|
72
|
+
## Failure modes to avoid
|
|
73
|
+
|
|
74
|
+
- **Architecture astronautics.** Don't propose patterns the problem doesn't call for.
|
|
75
|
+
- **Pattern matching to the last system you saw.** Each codebase has its own forces.
|
|
76
|
+
- **Treating the diagram as the design.** Boxes and arrows hide where the real complexity lives.
|
|
77
|
+
- **Ignoring team capacity.** A "correct" architecture nobody can run is incorrect.
|
|
78
|
+
- **Permissiveness about contracts.** Public interfaces are expensive to change. Be precise.
|
|
79
|
+
|
|
80
|
+
## When to escalate
|
|
81
|
+
|
|
82
|
+
- If the architecture has security implications, hand off to `security-reviewer`.
|
|
83
|
+
- If the architecture affects test strategy (e.g., needs new integration harness), hand off to
|
|
84
|
+
`test-strategist`.
|
|
85
|
+
- If the proposal is large enough that it should be a plan and not a single decision, hand back to
|
|
86
|
+
`planner`.
|