softspark-architecture-audit
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "softspark-architecture-audit" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-619629642c77877ff6571e69162eda0dc9ba3864f158d339f127c4ea59bf78b4. Verify the upstream source and version against https://github.com/softspark/ai-toolkit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Audit a codebase for architectural friction and shallow modules and produce RFC recommendations. Triggered when architecture improvements, identifying shallow or deepening modules, or reducing coupling are needed.
Introduction source: third_party · softspark · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Audits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling.
- Testing
- Not tested
Browse files
Frontmatter
name: architecture-audit
description: "Audits codebase for architectural friction, shallow modules; proposes RFCs. Triggers: improve architecture, shallow modules, deepen modules, reduce coupling."
user-invocable: true
effort: high
argument-hint: "[area to audit or 'full codebase']"
allowed-tools: Read, Grep, Glob, Bash, AgentArchitecture Audit
$ARGUMENTS
Explore a codebase organically, surface architectural friction, and propose module-deepening refactors as GitHub issue RFCs.
Usage
/architecture-audit [area to audit or 'full codebase']
What This Command Does
- Explores codebase organically — friction IS the signal
- Presents deepening candidates to user
- Frames problem space for chosen candidate
- Spawns 3+ parallel sub-agents for radically different interface designs
- Compares and recommends
- Files RFC as GitHub issue
Key Concept
A deep module (Ousterhout) has a small interface hiding a large implementation. Deep modules enhance testability, AI navigation, and enable boundary testing.
A shallow module has a large interface with thin implementation — avoid.
Process
1. Organic Exploration
Use Agent (subagent_type=Explore) to navigate the codebase naturally. Note friction:
- Where does understanding one concept require bouncing between many small files?
- Where are modules so shallow the interface is nearly as complex as the implementation?
- Where have pure functions been extracted just for testability but real bugs hide in how they're called?
- Where do tightly-coupled modules create integration risk in the seams?
- What is untested or hard to test?
2. Present Candidates
Numbered list. For each candidate show:
| Field | Content |
|---|---|
| Cluster | Which modules/concepts are involved |
| Why coupled | Shared types, call patterns, co-ownership |
| Dependency category | In-process, Local-substitutable, Ports & Adapters, or True external (see reference/) |
| Test impact | What existing tests would be replaced by boundary tests |
Do NOT propose interfaces yet. Ask: "Which would you like to explore?"
3. Frame the Problem Space
For the chosen candidate, write a user-facing explanation:
- Constraints any new interface would satisfy
- Dependencies it would rely on
- Rough illustrative code sketch (not a proposal — just grounding)
Show to user, then immediately proceed to step 4.
4. Design Multiple Interfaces
Spawn 3+ sub-agents in parallel via Agent tool. Each gets a different constraint:
| Agent | Constraint |
|---|---|
| Agent 1 | Minimize interface — 1-3 entry points max |
| Agent 2 | Maximize flexibility — many use cases and extension |
| Agent 3 | Optimize for most common caller — default case trivial |
| Agent 4 | Ports & adapters pattern (if cross-boundary) |
Each outputs: interface signature, usage example, what it hides, dependency strategy, trade-offs.
Present sequentially, compare in prose, give opinionated recommendation.
5. Create GitHub Issue RFC
Use gh issue create with template below. Don't ask for review.
Issue Template
<issue-template>
Problem
Architectural friction:
- Which modules are shallow and tightly coupled
- Integration risk in the seams
- Why this makes the codebase harder to navigate/maintain
Proposed Interface
- Interface signature (types, methods, params)
- Usage example
- What complexity it hides
Dependency Strategy
- In-process: merged directly
- Local-substitutable: tested with [specific stand-in]
- Ports & adapters: port definition, production adapter, test adapter
- Mock: mock boundary for external services
Testing Strategy
- New boundary tests to write
- Old shallow tests to delete
- Test environment needs
Implementation Recommendations
Durable guidance NOT coupled to file paths:
- What the module should own
- What it should hide
- What it should expose
- How callers migrate
</issue-template>
Dependency Categories
| Category | Description | Deepenable? |
|---|---|---|
| In-process | Pure computation, no I/O | Always |
| Local-substitutable | Has local test stand-ins (PGLite, in-memory FS) | If stand-in exists |
| Remote but owned | Your services across network (Ports & Adapters) | Via port injection |
| True external | Third-party (Stripe, Twilio) — mock at boundary | Via mock injection |
Testing Principle
Replace, don't layer. Old unit tests on shallow modules are waste once boundary tests exist — delete them. Tests assert on observable outcomes through public interface, not internal state.
Rules
- MUST explore the codebase organically (Explore sub-agent) before proposing deepening targets — do not anchor on what you already know
- MUST present numbered candidates to the user and wait for selection before step 3 — auto-picking skips the product decision
- NEVER design interfaces in step 2; interface work only happens in step 4 after the problem space is framed
- CRITICAL: step 4 spawns parallel sub-agents with genuinely different constraints (minimize / maximize-flexibility / optimize-common / ports-adapters). Sequential variations of the same idea defeat the purpose.
- MANDATORY: deliverable is a GitHub issue RFC created via
gh issue create. Never open a PR from this skill.
Gotchas
- "Depth" is measured against actual call patterns, not the method count. A module exporting 20 functions where callers only use 2 is effectively 2-deep — the other 18 are dead interface, not richness.
- Shared TypeScript types and Python protocols count as coupling. A "just types" file imported by 30 modules creates a deep blast radius; deleting or renaming it is structurally significant even though no runtime code moves.
- Parallel sub-agents collapse into echo chambers when their constraints are not sharply different. Spell out the opposing tensions ("minimize interface" vs "maximize flexibility") — soft variations produce near-identical designs.
gh issue createwithout--bodyor--body-fileopens$EDITOR. In automated flows this hangs the skill indefinitely. Always pass the body explicitly.- Ports & Adapters introduces indirection that IDE "find references" and static analysis sometimes miss (dynamic dispatch via interface). Count on broken tooling during the transition period and compensate with runtime smoke tests.
When NOT to Use
- For executing a known refactor plan — use
/refactor(direct edits) or/refactor-plan(incremental) - For designing a single module's interface from scratch — use
/design-an-interface - For deciding between 2-3 named architectural options — use
/architecture-decision - For code-quality metrics (complexity, duplication, coverage) — use
/analyze - For understanding a codebase without proposing changes — use
/explore
Version history
-
v6.2.0
GitHub ↗
Original release notes
**Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v6.1.0...v6.2.0
-
v6.1.0
GitHub ↗
Original release notes
**Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v6.0.0...v6.1.0
-
v6.0.0
GitHub ↗
Original release notes
## What's Changed * chore: bump softprops/action-gh-release from 3.0.3 to 3.0.4 by @dependabot[bot] in https://github.com/softspark/ai-toolkit/pull/45 * fix: handle Windows status output and clarify Antigravity workflow support by @softspark in https://github.com/softspark/ai-toolkit/pull/46 **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v5.5.0...v6.0.0
-
v5.5.0
GitHub ↗
Original release notes
### Ecosystem - **OpenCode V2 and V1 compatibility:** `scripts/generate_opencode_plugin.py` emits the documented `id/setup/server` contract for V2 and V1 **1.18.29+**. Upgrade older V1 clients before using this plugin, then run `ai-toolkit update` to regenerate managed copies. `doctor` warns about obsolete V1-only exports. Scoped global/project IDs avoid native collisions; advisory work has one owner per location, while safety guards execute in every registered layer. The current V2 package is `@opencode/cli`; `opencode-ai` still publishes V1. - **Claude guard failure policy:** destructive-command, home-path and configuration guards use `onFailure: block` on Claude Code **2.1.295+**. Legacy entries migrate without duplication; hooks owned by other plugins survive. Older clients do not have this infrastructure-failure guarantee. - **Codex, Gemini and Devin:** Codex refresh accepts the two diagnostic model-request events. Gemini advisory hooks return native JSON and save native completion responses; Devin prompt/edit hooks emit event-labelled context. - **All 13 integrations reviewed:** refresh release metadata and the ecosystem snapshot, distinguish stable/preview channels, and pin Auggie's stable v0 references. User model, effort and approval selections remain unchanged. ### Fixed - **One Claude Stop checker:** remove the duplicate advisory handler from the global and app manifests. `quality-gate.sh` keeps PHPStan advisory through `quality-check.sh --php-only`, preserving checker precedence and Makefile settings. PHPStan now runs synchronously on Stop and TaskCompleted (#43). - **OpenCode guard execution:** replace the unsupported Bun stdin path with real subprocess execution in both APIs. Denial, missing guards, crashes and timeouts block tools. Transactional generation refuses user-owned collisions and symlinked destinations; lifecycle cleanup releases advisory ownership. - **Isolated release smoke:** `scripts/release.sh` installs the packed artifact in a disposable, network-disabled container with no mounts and the OS user's default home. Host settings are not used as a smoke sandbox. ### Changed - Hook entries: 29 to 28 across the same 14 Claude events. Skills remain 116 and agents remain 44. Bats coverage grows from 2012 to 2037 tests. - Refresh compatibility documentation and remove stale inventory counts from the backward-compatibility policy. All protected public surfaces remain. - Skill body budget is unchanged: the largest body remains `design-engineering` at 17,197 bytes, less than 2,000 bytes below the 18,000-byte warning threshold, so the release ratchet does not apply. **Included pull request:** [#43: run the project checker once on Claude Code Stop](https://github.com/softspark/ai-toolkit/pull/43), contributed by @jacekprzybyl. **Full changelog:** https://github.com/softspark/ai-toolkit/compare/v5.4.2...v5.5.0
-
v5.4.2
GitHub ↗
Original release notes
## What's Changed * fix(install): read state.json on native Windows by @jacekprzybyl in https://github.com/softspark/ai-toolkit/pull/39 * test: isolate USERPROFILE together with HOME on Windows by @jacekprzybyl in https://github.com/softspark/ai-toolkit/pull/41 **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v5.4.1...v5.4.2
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决开发者高频痛点:架构摩擦、浅层模块、耦合度
- 提出 RFC 并生成 GitHub Issue,形成完整闭环
- 适用于广泛代码库场景,实用性强
Highlights
- 触发词精准完整,覆盖多种变体
- 边界清晰,不易误触或漏触
- description 位于顶层 frontmatter 且内容完整
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档中虽有 'When NOT to Use' 章节,但缺少正向的 'When to Use' 说明
Recommendation: 建议在文档开头或 Usage 后增加 'When to Use' 章节,明确说明适用场景
Highlights
- Phase/步骤清晰,共 6 个阶段
- 有出口条件(用户选择候选),含端到端示例
- frontmatter 完整,单文件未超 500 行
Areas to improve
-
缺少对 gh issue create 命令失败的处理说明 Reported severity: Minor
文档中提到了 `gh issue create` 的使用陷阱,但未说明命令执行失败时的重试或回退机制
Recommendation: 建议在 Gotchas 或 Rules 中增加对 `gh issue create` 命令失败的处理说明,如重试机制或错误提示
Highlights
- 工具来源明确(Read, Grep, Glob, Bash, Agent),参数正确
- 覆盖主要异常(Gotchas 中列出关键陷阱)
- 不可逆操作有确认机制(用户选择候选后才执行)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.