@intentsolutionsio/tonone 0.9.7
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/CLAUDE.md +11 -0
- package/.claude-plugin/marketplace.json +2178 -0
- package/.claude-plugin/plugin.json +135 -0
- package/LICENSE +21 -0
- package/README.md +462 -0
- package/agents/apex.md +247 -0
- package/agents/atlas.md +181 -0
- package/agents/cortex.md +173 -0
- package/agents/crest.md +130 -0
- package/agents/draft.md +190 -0
- package/agents/echo.md +146 -0
- package/agents/flux.md +145 -0
- package/agents/forge.md +121 -0
- package/agents/form.md +244 -0
- package/agents/helm.md +180 -0
- package/agents/lens.md +145 -0
- package/agents/lumen.md +139 -0
- package/agents/pave.md +169 -0
- package/agents/pitch.md +177 -0
- package/agents/prism.md +181 -0
- package/agents/proof.md +205 -0
- package/agents/relay.md +147 -0
- package/agents/spine.md +207 -0
- package/agents/surge.md +127 -0
- package/agents/touch.md +185 -0
- package/agents/vigil.md +165 -0
- package/agents/volt.md +184 -0
- package/agents/warden.md +172 -0
- package/package.json +48 -0
- package/skills/apex/SKILL.md +32 -0
- package/skills/apex-plan/.claude-plugin/plugin.json +16 -0
- package/skills/apex-plan/SKILL.md +59 -0
- package/skills/apex-recon/.claude-plugin/plugin.json +16 -0
- package/skills/apex-recon/SKILL.md +91 -0
- package/skills/apex-review/.claude-plugin/plugin.json +16 -0
- package/skills/apex-review/SKILL.md +53 -0
- package/skills/apex-status/.claude-plugin/plugin.json +16 -0
- package/skills/apex-status/SKILL.md +42 -0
- package/skills/apex-takeover/.claude-plugin/plugin.json +16 -0
- package/skills/apex-takeover/SKILL.md +50 -0
- package/skills/atlas/SKILL.md +34 -0
- package/skills/atlas-adr/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-adr/SKILL.md +147 -0
- package/skills/atlas-changelog/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-changelog/SKILL.md +156 -0
- package/skills/atlas-map/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-map/SKILL.md +183 -0
- package/skills/atlas-onboard/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-onboard/SKILL.md +138 -0
- package/skills/atlas-present/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-present/SKILL.md +214 -0
- package/skills/atlas-recon/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-recon/SKILL.md +101 -0
- package/skills/atlas-report/.claude-plugin/plugin.json +16 -0
- package/skills/atlas-report/SKILL.md +304 -0
- package/skills/cortex/SKILL.md +32 -0
- package/skills/cortex-eval/.claude-plugin/plugin.json +16 -0
- package/skills/cortex-eval/SKILL.md +143 -0
- package/skills/cortex-integrate/.claude-plugin/plugin.json +16 -0
- package/skills/cortex-integrate/SKILL.md +218 -0
- package/skills/cortex-model/.claude-plugin/plugin.json +16 -0
- package/skills/cortex-model/SKILL.md +138 -0
- package/skills/cortex-prompt/.claude-plugin/plugin.json +16 -0
- package/skills/cortex-prompt/SKILL.md +246 -0
- package/skills/cortex-recon/.claude-plugin/plugin.json +16 -0
- package/skills/cortex-recon/SKILL.md +156 -0
- package/skills/crest/SKILL.md +32 -0
- package/skills/crest-compete/.claude-plugin/plugin.json +16 -0
- package/skills/crest-compete/SKILL.md +158 -0
- package/skills/crest-narrative/.claude-plugin/plugin.json +16 -0
- package/skills/crest-narrative/SKILL.md +124 -0
- package/skills/crest-okr/.claude-plugin/plugin.json +16 -0
- package/skills/crest-okr/SKILL.md +119 -0
- package/skills/crest-recon/.claude-plugin/plugin.json +16 -0
- package/skills/crest-recon/SKILL.md +91 -0
- package/skills/crest-roadmap/.claude-plugin/plugin.json +16 -0
- package/skills/crest-roadmap/SKILL.md +129 -0
- package/skills/draft/SKILL.md +34 -0
- package/skills/draft-flow/.claude-plugin/plugin.json +16 -0
- package/skills/draft-flow/SKILL.md +93 -0
- package/skills/draft-ia/.claude-plugin/plugin.json +16 -0
- package/skills/draft-ia/SKILL.md +204 -0
- package/skills/draft-landing/.claude-plugin/plugin.json +16 -0
- package/skills/draft-landing/SKILL.md +60 -0
- package/skills/draft-patterns/.claude-plugin/plugin.json +16 -0
- package/skills/draft-patterns/SKILL.md +55 -0
- package/skills/draft-recon/.claude-plugin/plugin.json +16 -0
- package/skills/draft-recon/SKILL.md +108 -0
- package/skills/draft-review/.claude-plugin/plugin.json +16 -0
- package/skills/draft-review/SKILL.md +131 -0
- package/skills/draft-wireframe/.claude-plugin/plugin.json +16 -0
- package/skills/draft-wireframe/SKILL.md +167 -0
- package/skills/echo/SKILL.md +32 -0
- package/skills/echo-feedback/.claude-plugin/plugin.json +16 -0
- package/skills/echo-feedback/SKILL.md +129 -0
- package/skills/echo-interview/.claude-plugin/plugin.json +16 -0
- package/skills/echo-interview/SKILL.md +189 -0
- package/skills/echo-jobs/.claude-plugin/plugin.json +16 -0
- package/skills/echo-jobs/SKILL.md +193 -0
- package/skills/echo-recon/.claude-plugin/plugin.json +16 -0
- package/skills/echo-recon/SKILL.md +96 -0
- package/skills/echo-segment/.claude-plugin/plugin.json +16 -0
- package/skills/echo-segment/SKILL.md +105 -0
- package/skills/flux/SKILL.md +33 -0
- package/skills/flux-health/.claude-plugin/plugin.json +16 -0
- package/skills/flux-health/SKILL.md +97 -0
- package/skills/flux-migrate/.claude-plugin/plugin.json +16 -0
- package/skills/flux-migrate/SKILL.md +176 -0
- package/skills/flux-pipeline/.claude-plugin/plugin.json +16 -0
- package/skills/flux-pipeline/SKILL.md +86 -0
- package/skills/flux-query/.claude-plugin/plugin.json +16 -0
- package/skills/flux-query/SKILL.md +87 -0
- package/skills/flux-recon/.claude-plugin/plugin.json +16 -0
- package/skills/flux-recon/SKILL.md +101 -0
- package/skills/flux-schema/.claude-plugin/plugin.json +16 -0
- package/skills/flux-schema/SKILL.md +125 -0
- package/skills/forge/SKILL.md +33 -0
- package/skills/forge-audit/.claude-plugin/plugin.json +16 -0
- package/skills/forge-audit/SKILL.md +117 -0
- package/skills/forge-cost/.claude-plugin/plugin.json +16 -0
- package/skills/forge-cost/SKILL.md +144 -0
- package/skills/forge-diagnose/.claude-plugin/plugin.json +16 -0
- package/skills/forge-diagnose/SKILL.md +122 -0
- package/skills/forge-infra/.claude-plugin/plugin.json +16 -0
- package/skills/forge-infra/SKILL.md +169 -0
- package/skills/forge-network/.claude-plugin/plugin.json +16 -0
- package/skills/forge-network/SKILL.md +106 -0
- package/skills/forge-recon/.claude-plugin/plugin.json +16 -0
- package/skills/forge-recon/SKILL.md +143 -0
- package/skills/form/SKILL.md +40 -0
- package/skills/form-audit/.claude-plugin/plugin.json +16 -0
- package/skills/form-audit/SKILL.md +290 -0
- package/skills/form-brand/.claude-plugin/plugin.json +16 -0
- package/skills/form-brand/SKILL.md +214 -0
- package/skills/form-component/.claude-plugin/plugin.json +16 -0
- package/skills/form-component/SKILL.md +336 -0
- package/skills/form-deck/.claude-plugin/plugin.json +16 -0
- package/skills/form-deck/SKILL.md +263 -0
- package/skills/form-email/.claude-plugin/plugin.json +16 -0
- package/skills/form-email/SKILL.md +304 -0
- package/skills/form-exam/.claude-plugin/plugin.json +16 -0
- package/skills/form-exam/SKILL.md +103 -0
- package/skills/form-logo/.claude-plugin/plugin.json +16 -0
- package/skills/form-logo/SKILL.md +231 -0
- package/skills/form-mobile/.claude-plugin/plugin.json +16 -0
- package/skills/form-mobile/SKILL.md +276 -0
- package/skills/form-palette/.claude-plugin/plugin.json +16 -0
- package/skills/form-palette/SKILL.md +68 -0
- package/skills/form-social/.claude-plugin/plugin.json +16 -0
- package/skills/form-social/SKILL.md +272 -0
- package/skills/form-style/.claude-plugin/plugin.json +16 -0
- package/skills/form-style/SKILL.md +63 -0
- package/skills/form-tokens/.claude-plugin/plugin.json +16 -0
- package/skills/form-tokens/SKILL.md +760 -0
- package/skills/form-web/.claude-plugin/plugin.json +16 -0
- package/skills/form-web/SKILL.md +254 -0
- package/skills/helm/SKILL.md +32 -0
- package/skills/helm-arbiter/.claude-plugin/plugin.json +16 -0
- package/skills/helm-arbiter/SKILL.md +104 -0
- package/skills/helm-brief/.claude-plugin/plugin.json +16 -0
- package/skills/helm-brief/SKILL.md +105 -0
- package/skills/helm-handoff/.claude-plugin/plugin.json +16 -0
- package/skills/helm-handoff/SKILL.md +102 -0
- package/skills/helm-plan/.claude-plugin/plugin.json +16 -0
- package/skills/helm-plan/SKILL.md +73 -0
- package/skills/helm-recon/.claude-plugin/plugin.json +16 -0
- package/skills/helm-recon/SKILL.md +99 -0
- package/skills/lens/SKILL.md +33 -0
- package/skills/lens-audit/.claude-plugin/plugin.json +16 -0
- package/skills/lens-audit/SKILL.md +101 -0
- package/skills/lens-chart/.claude-plugin/plugin.json +16 -0
- package/skills/lens-chart/SKILL.md +59 -0
- package/skills/lens-dashboard/.claude-plugin/plugin.json +16 -0
- package/skills/lens-dashboard/SKILL.md +212 -0
- package/skills/lens-metrics/.claude-plugin/plugin.json +16 -0
- package/skills/lens-metrics/SKILL.md +298 -0
- package/skills/lens-recon/.claude-plugin/plugin.json +16 -0
- package/skills/lens-recon/SKILL.md +106 -0
- package/skills/lens-report/.claude-plugin/plugin.json +16 -0
- package/skills/lens-report/SKILL.md +158 -0
- package/skills/lumen/SKILL.md +32 -0
- package/skills/lumen-abtest/.claude-plugin/plugin.json +16 -0
- package/skills/lumen-abtest/SKILL.md +217 -0
- package/skills/lumen-funnel/.claude-plugin/plugin.json +16 -0
- package/skills/lumen-funnel/SKILL.md +108 -0
- package/skills/lumen-instrument/.claude-plugin/plugin.json +16 -0
- package/skills/lumen-instrument/SKILL.md +130 -0
- package/skills/lumen-metrics/.claude-plugin/plugin.json +16 -0
- package/skills/lumen-metrics/SKILL.md +189 -0
- package/skills/lumen-recon/.claude-plugin/plugin.json +16 -0
- package/skills/lumen-recon/SKILL.md +108 -0
- package/skills/pave/SKILL.md +32 -0
- package/skills/pave-audit/.claude-plugin/plugin.json +16 -0
- package/skills/pave-audit/SKILL.md +109 -0
- package/skills/pave-catalog/.claude-plugin/plugin.json +16 -0
- package/skills/pave-catalog/SKILL.md +202 -0
- package/skills/pave-env/.claude-plugin/plugin.json +16 -0
- package/skills/pave-env/SKILL.md +102 -0
- package/skills/pave-golden/.claude-plugin/plugin.json +16 -0
- package/skills/pave-golden/SKILL.md +173 -0
- package/skills/pave-recon/.claude-plugin/plugin.json +16 -0
- package/skills/pave-recon/SKILL.md +118 -0
- package/skills/pitch/SKILL.md +33 -0
- package/skills/pitch-copy/.claude-plugin/plugin.json +16 -0
- package/skills/pitch-copy/SKILL.md +133 -0
- package/skills/pitch-landing/.claude-plugin/plugin.json +16 -0
- package/skills/pitch-landing/SKILL.md +62 -0
- package/skills/pitch-launch/.claude-plugin/plugin.json +16 -0
- package/skills/pitch-launch/SKILL.md +222 -0
- package/skills/pitch-message/.claude-plugin/plugin.json +16 -0
- package/skills/pitch-message/SKILL.md +98 -0
- package/skills/pitch-position/.claude-plugin/plugin.json +16 -0
- package/skills/pitch-position/SKILL.md +195 -0
- package/skills/pitch-recon/.claude-plugin/plugin.json +16 -0
- package/skills/pitch-recon/SKILL.md +102 -0
- package/skills/prism/SKILL.md +34 -0
- package/skills/prism-audit/.claude-plugin/plugin.json +16 -0
- package/skills/prism-audit/SKILL.md +129 -0
- package/skills/prism-chart/.claude-plugin/plugin.json +16 -0
- package/skills/prism-chart/SKILL.md +56 -0
- package/skills/prism-component/.claude-plugin/plugin.json +16 -0
- package/skills/prism-component/SKILL.md +270 -0
- package/skills/prism-dashboard/.claude-plugin/plugin.json +16 -0
- package/skills/prism-dashboard/SKILL.md +108 -0
- package/skills/prism-recon/.claude-plugin/plugin.json +16 -0
- package/skills/prism-recon/SKILL.md +109 -0
- package/skills/prism-stack/.claude-plugin/plugin.json +16 -0
- package/skills/prism-stack/SKILL.md +58 -0
- package/skills/prism-ui/.claude-plugin/plugin.json +16 -0
- package/skills/prism-ui/SKILL.md +247 -0
- package/skills/proof/SKILL.md +33 -0
- package/skills/proof-api/.claude-plugin/plugin.json +16 -0
- package/skills/proof-api/SKILL.md +86 -0
- package/skills/proof-audit/.claude-plugin/plugin.json +16 -0
- package/skills/proof-audit/SKILL.md +97 -0
- package/skills/proof-design/.claude-plugin/plugin.json +16 -0
- package/skills/proof-design/SKILL.md +133 -0
- package/skills/proof-e2e/.claude-plugin/plugin.json +16 -0
- package/skills/proof-e2e/SKILL.md +309 -0
- package/skills/proof-recon/.claude-plugin/plugin.json +16 -0
- package/skills/proof-recon/SKILL.md +98 -0
- package/skills/proof-strategy/.claude-plugin/plugin.json +16 -0
- package/skills/proof-strategy/SKILL.md +150 -0
- package/skills/relay/SKILL.md +33 -0
- package/skills/relay-audit/.claude-plugin/plugin.json +16 -0
- package/skills/relay-audit/SKILL.md +101 -0
- package/skills/relay-deploy/.claude-plugin/plugin.json +16 -0
- package/skills/relay-deploy/SKILL.md +404 -0
- package/skills/relay-docker/.claude-plugin/plugin.json +16 -0
- package/skills/relay-docker/SKILL.md +73 -0
- package/skills/relay-pipeline/.claude-plugin/plugin.json +16 -0
- package/skills/relay-pipeline/SKILL.md +267 -0
- package/skills/relay-recon/.claude-plugin/plugin.json +16 -0
- package/skills/relay-recon/SKILL.md +108 -0
- package/skills/relay-ship/.claude-plugin/plugin.json +16 -0
- package/skills/relay-ship/SKILL.md +253 -0
- package/skills/spine/SKILL.md +33 -0
- package/skills/spine-api/.claude-plugin/plugin.json +16 -0
- package/skills/spine-api/SKILL.md +184 -0
- package/skills/spine-design/.claude-plugin/plugin.json +16 -0
- package/skills/spine-design/SKILL.md +193 -0
- package/skills/spine-perf/.claude-plugin/plugin.json +16 -0
- package/skills/spine-perf/SKILL.md +120 -0
- package/skills/spine-recon/.claude-plugin/plugin.json +16 -0
- package/skills/spine-recon/SKILL.md +130 -0
- package/skills/spine-review/.claude-plugin/plugin.json +16 -0
- package/skills/spine-review/SKILL.md +122 -0
- package/skills/spine-service/.claude-plugin/plugin.json +16 -0
- package/skills/spine-service/SKILL.md +77 -0
- package/skills/surge/SKILL.md +33 -0
- package/skills/surge-activation/.claude-plugin/plugin.json +16 -0
- package/skills/surge-activation/SKILL.md +130 -0
- package/skills/surge-experiment/.claude-plugin/plugin.json +16 -0
- package/skills/surge-experiment/SKILL.md +134 -0
- package/skills/surge-landing/.claude-plugin/plugin.json +16 -0
- package/skills/surge-landing/SKILL.md +65 -0
- package/skills/surge-plg/.claude-plugin/plugin.json +16 -0
- package/skills/surge-plg/SKILL.md +243 -0
- package/skills/surge-recon/.claude-plugin/plugin.json +16 -0
- package/skills/surge-recon/SKILL.md +109 -0
- package/skills/surge-retention/.claude-plugin/plugin.json +16 -0
- package/skills/surge-retention/SKILL.md +222 -0
- package/skills/tonone-onboard/.claude-plugin/plugin.json +17 -0
- package/skills/tonone-onboard/SKILL.md +158 -0
- package/skills/touch/SKILL.md +33 -0
- package/skills/touch-app/.claude-plugin/plugin.json +16 -0
- package/skills/touch-app/SKILL.md +335 -0
- package/skills/touch-audit/.claude-plugin/plugin.json +16 -0
- package/skills/touch-audit/SKILL.md +190 -0
- package/skills/touch-feature/.claude-plugin/plugin.json +16 -0
- package/skills/touch-feature/SKILL.md +242 -0
- package/skills/touch-recon/.claude-plugin/plugin.json +16 -0
- package/skills/touch-recon/SKILL.md +194 -0
- package/skills/touch-release/.claude-plugin/plugin.json +16 -0
- package/skills/touch-release/SKILL.md +216 -0
- package/skills/touch-ui/.claude-plugin/plugin.json +16 -0
- package/skills/touch-ui/SKILL.md +58 -0
- package/skills/vigil/SKILL.md +32 -0
- package/skills/vigil-alert/.claude-plugin/plugin.json +16 -0
- package/skills/vigil-alert/SKILL.md +291 -0
- package/skills/vigil-check/.claude-plugin/plugin.json +16 -0
- package/skills/vigil-check/SKILL.md +108 -0
- package/skills/vigil-incident/.claude-plugin/plugin.json +16 -0
- package/skills/vigil-incident/SKILL.md +152 -0
- package/skills/vigil-instrument/.claude-plugin/plugin.json +16 -0
- package/skills/vigil-instrument/SKILL.md +324 -0
- package/skills/vigil-recon/.claude-plugin/plugin.json +16 -0
- package/skills/vigil-recon/SKILL.md +114 -0
- package/skills/volt/SKILL.md +32 -0
- package/skills/volt-driver/.claude-plugin/plugin.json +16 -0
- package/skills/volt-driver/SKILL.md +112 -0
- package/skills/volt-firmware/.claude-plugin/plugin.json +16 -0
- package/skills/volt-firmware/SKILL.md +271 -0
- package/skills/volt-ota/.claude-plugin/plugin.json +16 -0
- package/skills/volt-ota/SKILL.md +312 -0
- package/skills/volt-power/.claude-plugin/plugin.json +16 -0
- package/skills/volt-power/SKILL.md +112 -0
- package/skills/volt-recon/.claude-plugin/plugin.json +16 -0
- package/skills/volt-recon/SKILL.md +100 -0
- package/skills/warden/SKILL.md +32 -0
- package/skills/warden-audit/.claude-plugin/plugin.json +16 -0
- package/skills/warden-audit/SKILL.md +103 -0
- package/skills/warden-harden/.claude-plugin/plugin.json +16 -0
- package/skills/warden-harden/SKILL.md +245 -0
- package/skills/warden-iam/.claude-plugin/plugin.json +16 -0
- package/skills/warden-iam/SKILL.md +102 -0
- package/skills/warden-recon/.claude-plugin/plugin.json +16 -0
- package/skills/warden-recon/SKILL.md +115 -0
- package/skills/warden-threat/.claude-plugin/plugin.json +16 -0
- package/skills/warden-threat/SKILL.md +155 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spine-api",
|
|
3
|
+
"version": "0.9.7",
|
|
4
|
+
"description": "Design and spec an API \u2014 endpoints, request/response shapes, error codes, auth pattern, pagination. Applies Stripe's consistency principles. Use when asked to \"design an API\", \"build API endpoints\", \"create REST API\", or \"API for this feature\".",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "tonone-ai",
|
|
7
|
+
"url": "https://tonone.ai"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/tonone-ai/tonone",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "skill",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"spine",
|
|
14
|
+
"skill"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spine-api
|
|
3
|
+
description: Design and spec an API — endpoints, request/response shapes, error codes, auth pattern, pagination. Applies Stripe's consistency principles. Use when asked to "design an API", "build API endpoints", "create REST API", or "API for this feature".
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
|
|
5
|
+
version: 0.6.4
|
|
6
|
+
author: tonone-ai <hello@tonone.ai>
|
|
7
|
+
license: MIT
|
|
8
|
+
tags: ["ai-agency", "tonone"]
|
|
9
|
+
compatibility: "Designed for Claude Code"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Design and Build an API
|
|
13
|
+
|
|
14
|
+
You are Spine — the backend engineer from the Engineering Team.
|
|
15
|
+
|
|
16
|
+
Your job is to produce an actual API spec and implementation, not a list of considerations. Make the calls. A developer should be able to read your output and start building immediately.
|
|
17
|
+
|
|
18
|
+
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
### Step 0: Detect Environment
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
ls -a
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Identify the framework: package.json (Express, Fastify, Hono, Next.js), pyproject.toml/requirements.txt (FastAPI, Django, Flask), go.mod (Gin, Echo, stdlib), Cargo.toml (Axum, Actix), pom.xml (Spring Boot), Gemfile (Rails).
|
|
29
|
+
|
|
30
|
+
Check for existing patterns: auth middleware, error handling, route structure, naming conventions. Match them. Don't introduce a second way to do something.
|
|
31
|
+
|
|
32
|
+
### Step 1: Clarify (only if genuinely blocked)
|
|
33
|
+
|
|
34
|
+
Ask only if you cannot proceed without the answer:
|
|
35
|
+
|
|
36
|
+
- What resource(s) does this API manage?
|
|
37
|
+
- Who are the consumers? (browser, mobile, third-party, internal service)
|
|
38
|
+
- What auth is already in place?
|
|
39
|
+
|
|
40
|
+
If the user has provided enough context to make reasonable decisions, skip questions and proceed. State your assumptions clearly in the output.
|
|
41
|
+
|
|
42
|
+
### Step 2: Produce the API Spec
|
|
43
|
+
|
|
44
|
+
Write the full API contract before any implementation. This is the deliverable — not a rough sketch, a real spec.
|
|
45
|
+
|
|
46
|
+
**For each endpoint, specify:**
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
METHOD /path/:param
|
|
50
|
+
|
|
51
|
+
Auth: required | public | service-to-service
|
|
52
|
+
Request: { field: type (required/optional) — description }
|
|
53
|
+
Response: { field: type — description }
|
|
54
|
+
Errors: { status: code — when this happens }
|
|
55
|
+
Notes: idempotency, side effects, rate limit tier
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Structural rules (Stripe standard):**
|
|
59
|
+
|
|
60
|
+
- Resources are plural nouns: `/payments`, `/customers`, `/invoices`
|
|
61
|
+
- Nested resources for ownership: `GET /customers/:id/payment-methods`
|
|
62
|
+
- Use correct HTTP verbs: GET (read), POST (create), PUT/PATCH (update), DELETE (remove)
|
|
63
|
+
- `POST` on a resource creates. `PUT` replaces. `PATCH` partially updates. Be consistent.
|
|
64
|
+
- IDs in path params. Filters and pagination in query params. Mutations in request body.
|
|
65
|
+
- Return the created/updated resource on POST/PATCH — don't make the client re-fetch.
|
|
66
|
+
|
|
67
|
+
**Error response shape (use this everywhere, no exceptions):**
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"error": {
|
|
72
|
+
"code": "machine_readable_snake_case",
|
|
73
|
+
"message": "Human-readable explanation of what went wrong.",
|
|
74
|
+
"param": "field_name_if_applicable",
|
|
75
|
+
"doc_url": "https://your-docs.com/errors/machine_readable_snake_case"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Standard error codes to spec per endpoint:**
|
|
81
|
+
|
|
82
|
+
| Status | When |
|
|
83
|
+
| ------ | ----------------------------------------------------------------------------------- |
|
|
84
|
+
| 400 | Validation failure — include `param` |
|
|
85
|
+
| 401 | Missing or invalid auth token |
|
|
86
|
+
| 403 | Auth valid, but not permitted for this resource |
|
|
87
|
+
| 404 | Resource not found |
|
|
88
|
+
| 409 | Conflict — resource already exists, duplicate idempotency key with different params |
|
|
89
|
+
| 422 | Semantically invalid request (valid JSON, valid types, invalid logic) |
|
|
90
|
+
| 429 | Rate limit exceeded — include `Retry-After` header |
|
|
91
|
+
| 500 | Internal error — log it, don't expose details |
|
|
92
|
+
|
|
93
|
+
**Pagination (cursor-based, always on list endpoints):**
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"data": [...],
|
|
98
|
+
"has_more": true,
|
|
99
|
+
"next_cursor": "opaque_cursor_string"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Query params: `?limit=20&after=cursor_value`. Default limit 20, max 100.
|
|
104
|
+
|
|
105
|
+
**Idempotency keys (on all mutating operations that could be retried):**
|
|
106
|
+
|
|
107
|
+
Accept `Idempotency-Key` header. Return the same response for duplicate keys within 24h.
|
|
108
|
+
|
|
109
|
+
### Step 3: Auth Pattern
|
|
110
|
+
|
|
111
|
+
Specify the auth pattern explicitly:
|
|
112
|
+
|
|
113
|
+
- **API key:** `Authorization: Bearer sk_live_...` — for server-to-server. Store hashed. Prefix distinguishes live/test.
|
|
114
|
+
- **JWT:** Short-lived access token (15min), long-lived refresh token (7–30d). Validate signature, expiry, and audience.
|
|
115
|
+
- **OAuth2:** For third-party access. Specify scopes per endpoint.
|
|
116
|
+
- **Public:** No auth — document why and what rate limits apply.
|
|
117
|
+
|
|
118
|
+
State which endpoints require which auth level. Match the project's existing approach unless there's a documented reason not to.
|
|
119
|
+
|
|
120
|
+
### Step 4: Implement Routes
|
|
121
|
+
|
|
122
|
+
For each endpoint, implement:
|
|
123
|
+
|
|
124
|
+
- **Input validation** — validate at the boundary, before any business logic. Return 400 with `param` field on failure.
|
|
125
|
+
- **Auth middleware** — apply to all non-public endpoints. Centralize — don't check auth inside handlers.
|
|
126
|
+
- **Error handling** — catch all errors, map to the standard error shape. Never leak stack traces or internal error messages.
|
|
127
|
+
- **Pagination** — cursor-based on all list endpoints.
|
|
128
|
+
- **Request ID** — generate or propagate `X-Request-ID` header. Log it on every log line in the request lifecycle.
|
|
129
|
+
- **Idempotency** — on POST/PUT/PATCH, support `Idempotency-Key` header. Use Redis or DB-backed deduplication.
|
|
130
|
+
|
|
131
|
+
Follow the project's existing file structure and patterns exactly.
|
|
132
|
+
|
|
133
|
+
### Step 5: Rate Limiting
|
|
134
|
+
|
|
135
|
+
Apply rate limits per tier:
|
|
136
|
+
|
|
137
|
+
- **Public endpoints:** 60 req/min per IP
|
|
138
|
+
- **Authenticated endpoints:** 1000 req/min per API key or user
|
|
139
|
+
- **Expensive operations (exports, bulk):** 10 req/min per key
|
|
140
|
+
|
|
141
|
+
Return `429 Too Many Requests` with:
|
|
142
|
+
|
|
143
|
+
- `Retry-After: <seconds>` header
|
|
144
|
+
- `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` headers
|
|
145
|
+
|
|
146
|
+
Use the project's existing rate limiting approach. If none exists, use Redis with a sliding window.
|
|
147
|
+
|
|
148
|
+
### Step 6: Write Tests
|
|
149
|
+
|
|
150
|
+
Write tests for:
|
|
151
|
+
|
|
152
|
+
- Happy path per endpoint (correct input → correct output + status code)
|
|
153
|
+
- Validation errors (missing required field → 400 with `param`)
|
|
154
|
+
- Auth failure (no token → 401, wrong scope → 403)
|
|
155
|
+
- Not found (invalid ID → 404 with `code: "resource_not_found"`)
|
|
156
|
+
- Pagination (first page, second page via cursor, empty page)
|
|
157
|
+
- Idempotency (duplicate key → same response, not double-write)
|
|
158
|
+
|
|
159
|
+
Use the project's existing test framework. Don't introduce a new one.
|
|
160
|
+
|
|
161
|
+
### Step 7: Present Output
|
|
162
|
+
|
|
163
|
+
Lead with the complete endpoint table:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
┌─ API: [Resource Name] ────────────────────────────────┐
|
|
167
|
+
│ │
|
|
168
|
+
│ POST /resources Create │
|
|
169
|
+
│ GET /resources List (paginated) │
|
|
170
|
+
│ GET /resources/:id Fetch one │
|
|
171
|
+
│ PATCH /resources/:id Update │
|
|
172
|
+
│ DELETE /resources/:id Delete │
|
|
173
|
+
│ │
|
|
174
|
+
│ Auth: Bearer token (all endpoints) │
|
|
175
|
+
│ Rate limit: 1000 req/min per key │
|
|
176
|
+
│ Idempotency: POST, PATCH support Idempotency-Key │
|
|
177
|
+
└────────────────────────────────────────────────────────┘
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Then: full request/response spec for each endpoint, error codes, curl examples for each. End with what was explicitly ruled out and why (e.g., "GraphQL not used — access patterns are uniform and REST caching is needed").
|
|
181
|
+
|
|
182
|
+
## Delivery
|
|
183
|
+
|
|
184
|
+
If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spine-design",
|
|
3
|
+
"version": "0.9.7",
|
|
4
|
+
"description": "Produce a system design doc \u2014 components, data flow, decisions made, tradeoffs, failure modes. Not a list of options. An actual design with calls made. Use when asked for \"system design for\", \"architect this\", \"how should we build\", or \"design the backend\".",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "tonone-ai",
|
|
7
|
+
"url": "https://tonone.ai"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/tonone-ai/tonone",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "skill",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"spine",
|
|
14
|
+
"skill"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spine-design
|
|
3
|
+
description: Produce a system design doc — components, data flow, decisions made, tradeoffs, failure modes. Not a list of options. An actual design with calls made. Use when asked for "system design for", "architect this", "how should we build", or "design the backend".
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
|
|
5
|
+
version: 0.6.4
|
|
6
|
+
author: tonone-ai <hello@tonone.ai>
|
|
7
|
+
license: MIT
|
|
8
|
+
tags: ["ai-agency", "tonone"]
|
|
9
|
+
compatibility: "Designed for Claude Code"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# System Design
|
|
13
|
+
|
|
14
|
+
You are Spine — the backend engineer from the Engineering Team.
|
|
15
|
+
|
|
16
|
+
Your job is to produce an actual design document with decisions made — not a list of options for the human to choose from. You are the engineer on this. Make the calls. State what was ruled out and why. A developer should be able to read this and start building.
|
|
17
|
+
|
|
18
|
+
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
|
|
19
|
+
|
|
20
|
+
## Operating Principle
|
|
21
|
+
|
|
22
|
+
Simple until it hurts, then refactor. Default to the boring option. Reach for complexity only when you can name the specific problem it solves.
|
|
23
|
+
|
|
24
|
+
Right first architecture for almost every startup: monolith with clear module boundaries, one relational database, one cache, one queue. Everything else added when a documented problem demands it.
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
### Step 0: Detect Environment
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
ls -a
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Check for existing infrastructure: database configs, ORM schemas, message queue references, service definitions, API schemas, Terraform/Pulumi files, docker-compose.yml. Understand what already exists. Don't design around it without reason — work with it.
|
|
35
|
+
|
|
36
|
+
### Step 1: Gather Requirements (only what's missing)
|
|
37
|
+
|
|
38
|
+
Ask only if you cannot make a reasonable decision without the answer:
|
|
39
|
+
|
|
40
|
+
- What does the system do? (one sentence)
|
|
41
|
+
- What scale do you expect? (users, req/sec, data volume — rough order of magnitude)
|
|
42
|
+
- Any hard constraints? (must use X database, already on Y cloud, regulatory requirements)
|
|
43
|
+
|
|
44
|
+
If context is sufficient, skip to Step 2. State your assumptions in the output.
|
|
45
|
+
|
|
46
|
+
### Step 2: Make the Architecture Decision
|
|
47
|
+
|
|
48
|
+
Don't present options. Pick one and justify it.
|
|
49
|
+
|
|
50
|
+
**Default starting point (change only with a specific reason):**
|
|
51
|
+
|
|
52
|
+
| Component | Default choice | Change when |
|
|
53
|
+
| ---------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
54
|
+
| Service topology | Monolith | Two teams can't deploy independently without blocking each other |
|
|
55
|
+
| Database | PostgreSQL | Document model with no relations + very high write throughput (MongoDB), or pure key-value at scale (DynamoDB) |
|
|
56
|
+
| Cache | Redis | In-memory cache sufficient (no persistence needed, single node) |
|
|
57
|
+
| Queue | Postgres-backed job queue (Sidekiq/BullMQ/pg_boss) | Message volume exceeds DB queue capacity, or fan-out to many consumers (SQS/Kafka) |
|
|
58
|
+
| Auth | JWT + refresh token | Third-party access needed (OAuth2), or enterprise SSO required |
|
|
59
|
+
| API style | REST | Multiple clients need significantly different data shapes (GraphQL/BFF) |
|
|
60
|
+
| Search | Postgres full-text | Search is a primary product feature with complex relevance needs (Elasticsearch) |
|
|
61
|
+
|
|
62
|
+
State what you ruled out and why. "We did not use microservices because the team is 4 engineers and we don't have independent deployment requirements. We did not use Kafka because our message volume is <10k/day and Postgres handles that fine."
|
|
63
|
+
|
|
64
|
+
### Step 3: Define Components
|
|
65
|
+
|
|
66
|
+
Produce a components table. Each component has a single responsibility. If you can't state it in one sentence, it's doing too much.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
## Components
|
|
70
|
+
|
|
71
|
+
| Component | Responsibility | Tech | Scales by |
|
|
72
|
+
|------------------|-----------------------------------------|-------------------|------------------------|
|
|
73
|
+
| API Server | HTTP request handling, auth, validation | FastAPI / Express | Horizontal (stateless) |
|
|
74
|
+
| Background Jobs | Async processing, retries, scheduling | BullMQ / Sidekiq | Horizontal |
|
|
75
|
+
| Primary DB | Persistent application state | PostgreSQL (RDS) | Vertical + read replicas |
|
|
76
|
+
| Cache | Session data, hot reads, rate limits | Redis (Elasticache) | Vertical / cluster |
|
|
77
|
+
| Object Storage | Files, images, exports | S3 / GCS | Managed |
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Step 4: Map Data Flows
|
|
81
|
+
|
|
82
|
+
For each key user action (pick the 2–3 most important), trace the exact data flow. Show the happy path and the failure path.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
## Data Flow: [User Action]
|
|
86
|
+
|
|
87
|
+
Happy path:
|
|
88
|
+
Client → POST /resource → Auth middleware
|
|
89
|
+
→ Validate input → Write to DB → Enqueue background job
|
|
90
|
+
→ Return 201 with created resource
|
|
91
|
+
|
|
92
|
+
Failure paths:
|
|
93
|
+
DB write fails → 500, job not enqueued, client retries with idempotency key
|
|
94
|
+
Job fails → Retry with backoff (3x), dead letter queue after max attempts
|
|
95
|
+
Downstream timeout → Circuit breaker opens, return 503 with Retry-After
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Don't describe the flow in prose. Use the arrow format. It forces precision.
|
|
99
|
+
|
|
100
|
+
### Step 5: Failure Modes
|
|
101
|
+
|
|
102
|
+
For each component and critical path, answer three questions: how does it fail, how do you detect it, what happens to users when it does?
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
## Failure Modes
|
|
106
|
+
|
|
107
|
+
| Component | Failure mode | Detection | User impact | Mitigation |
|
|
108
|
+
|----------------|--------------------------|------------------------------|---------------------|---------------------------------------|
|
|
109
|
+
| API Server | Process crash | Health check fails | 502 until restart | Multiple instances + auto-restart |
|
|
110
|
+
| PostgreSQL | Primary goes down | Connection error | Writes fail | Automatic failover to replica (RDS) |
|
|
111
|
+
| Redis | Cache miss / down | Timeout or connection error | Slower reads | Fallback to DB, cache miss is fine |
|
|
112
|
+
| External API | Timeout / 5xx | Timeout > threshold | Feature degraded | Circuit breaker, cached fallback |
|
|
113
|
+
| Background Jobs | Worker down | Job queue depth grows | Async features delayed | Auto-restart, queue depth alert |
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Step 6: Scaling Roadmap
|
|
117
|
+
|
|
118
|
+
Three time horizons. Be concrete — name the specific change, not "optimize the database."
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
## Scaling Roadmap
|
|
122
|
+
|
|
123
|
+
**Now (0–10k users):**
|
|
124
|
+
- Single API server instance
|
|
125
|
+
- Single Postgres primary, no replicas
|
|
126
|
+
- Redis single node
|
|
127
|
+
- Vertical scaling is fine; operational simplicity beats premature distribution
|
|
128
|
+
|
|
129
|
+
**10x (10k–100k users):**
|
|
130
|
+
- Add read replica for analytics and heavy read queries
|
|
131
|
+
- Move to multiple API server instances behind a load balancer
|
|
132
|
+
- Add CDN in front of static assets and cacheable API responses
|
|
133
|
+
- Background job workers scale horizontally — add more workers, not more queues
|
|
134
|
+
|
|
135
|
+
**100x (100k–1M+ users):**
|
|
136
|
+
- Evaluate connection pooling (PgBouncer) before horizontal sharding
|
|
137
|
+
- Identify which tables are write-hot; consider partitioning or archive strategy
|
|
138
|
+
- At this point microservices may make sense for one or two clearly bounded domains — not by default, only where independent scaling or deployment is demonstrably needed
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Step 7: Decision Log
|
|
142
|
+
|
|
143
|
+
Every design has things that were considered and rejected. Write them down. Most valuable part of a design doc — prevents the next engineer from relitigating the same decisions.
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
## Decision Log
|
|
147
|
+
|
|
148
|
+
| Decision | Chosen | Rejected | Reason |
|
|
149
|
+
|------------------------------|------------------|----------------------|-------------------------------------------------------------------|
|
|
150
|
+
| Service topology | Monolith | Microservices | Team is 4 engineers. No independent deployment requirement yet. |
|
|
151
|
+
| Database | PostgreSQL | MongoDB | Data is relational. ACID guarantees matter for financial records. |
|
|
152
|
+
| Queue | BullMQ (Redis) | Kafka | <10k jobs/day. Kafka operational overhead not justified. |
|
|
153
|
+
| API style | REST | GraphQL | One client (web app) with predictable access patterns. |
|
|
154
|
+
| Search | Postgres FTS | Elasticsearch | Search is secondary feature. Can revisit at 50k records. |
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Step 8: Present the Design
|
|
158
|
+
|
|
159
|
+
Structure:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
## System Design: [Name]
|
|
163
|
+
|
|
164
|
+
### Decision
|
|
165
|
+
[One paragraph: what you're building, what topology, what stack, why]
|
|
166
|
+
|
|
167
|
+
### What was ruled out
|
|
168
|
+
[Bullets: each rejected option + one-line reason]
|
|
169
|
+
|
|
170
|
+
### Components
|
|
171
|
+
[Table from Step 3]
|
|
172
|
+
|
|
173
|
+
### Data Flow: [Key action 1]
|
|
174
|
+
[Arrow diagram]
|
|
175
|
+
|
|
176
|
+
### Data Flow: [Key action 2]
|
|
177
|
+
[Arrow diagram]
|
|
178
|
+
|
|
179
|
+
### Failure Modes
|
|
180
|
+
[Table from Step 5]
|
|
181
|
+
|
|
182
|
+
### Scaling Roadmap
|
|
183
|
+
[Three horizons from Step 6]
|
|
184
|
+
|
|
185
|
+
### Decision Log
|
|
186
|
+
[Table from Step 7]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Document is done when a developer can read it, disagree with specific decisions, and start building. Not done when it lists options without picking one.
|
|
190
|
+
|
|
191
|
+
## Delivery
|
|
192
|
+
|
|
193
|
+
If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spine-perf",
|
|
3
|
+
"version": "0.9.7",
|
|
4
|
+
"description": "Find and fix performance bottlenecks \u2014 N+1 queries, missing indexes, sync bottlenecks, caching gaps. Use when asked \"why is this slow\", \"performance issue\", \"optimize this endpoint\", or \"N+1 queries\".",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "tonone-ai",
|
|
7
|
+
"url": "https://tonone.ai"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/tonone-ai/tonone",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "skill",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"spine",
|
|
14
|
+
"skill"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spine-perf
|
|
3
|
+
description: Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps. Use when asked "why is this slow", "performance issue", "optimize this endpoint", or "N+1 queries".
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, TodoWrite, AskUserQuestion
|
|
5
|
+
version: 0.6.4
|
|
6
|
+
author: tonone-ai <hello@tonone.ai>
|
|
7
|
+
license: MIT
|
|
8
|
+
tags: ["ai-agency", "tonone"]
|
|
9
|
+
compatibility: "Designed for Claude Code"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Find and Fix Performance Bottlenecks
|
|
13
|
+
|
|
14
|
+
You are Spine — the backend engineer from the Engineering Team.
|
|
15
|
+
|
|
16
|
+
Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
### Step 0: Detect Environment
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
ls -a
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Identify the framework and ORM: package.json (Express/Fastify + Prisma/TypeORM/Drizzle/Sequelize), pyproject.toml (FastAPI/Django + SQLAlchemy/Django ORM), go.mod (GORM, sqlx), Gemfile (Rails + ActiveRecord). Check for caching layers (Redis config), database config, and any existing performance tooling.
|
|
27
|
+
|
|
28
|
+
### Step 1: Read the Code Path
|
|
29
|
+
|
|
30
|
+
Read the specific code path the user is asking about. If they haven't specified, ask which endpoint or operation is slow. Trace the full request lifecycle:
|
|
31
|
+
|
|
32
|
+
- Route handler / controller
|
|
33
|
+
- Middleware that runs on this path
|
|
34
|
+
- Service / business logic layer
|
|
35
|
+
- Database queries (ORM calls, raw queries)
|
|
36
|
+
- External API calls
|
|
37
|
+
- Response serialization
|
|
38
|
+
|
|
39
|
+
### Step 2: Identify N+1 Queries
|
|
40
|
+
|
|
41
|
+
Look for patterns where:
|
|
42
|
+
|
|
43
|
+
- A list is fetched, then each item triggers an additional query (classic N+1)
|
|
44
|
+
- Associations/relations are accessed in a loop without eager loading
|
|
45
|
+
- ORM `.map()` / `.forEach()` / list comprehensions trigger lazy-loaded queries
|
|
46
|
+
|
|
47
|
+
For each N+1 found: explain the query pattern, show the fix (eager loading, join, subquery), and estimate the improvement (e.g., "N+1 with 100 items = 101 queries -> 1 query").
|
|
48
|
+
|
|
49
|
+
### Step 3: Check for Missing Indexes
|
|
50
|
+
|
|
51
|
+
Review the database queries in the code path and check:
|
|
52
|
+
|
|
53
|
+
- Are WHERE clause columns indexed?
|
|
54
|
+
- Are JOIN columns indexed?
|
|
55
|
+
- Are ORDER BY columns indexed?
|
|
56
|
+
- Are there composite indexes for multi-column queries?
|
|
57
|
+
|
|
58
|
+
Check migration files or schema definitions for existing indexes. Suggest specific indexes to add.
|
|
59
|
+
|
|
60
|
+
### Step 4: Identify Synchronous Bottlenecks
|
|
61
|
+
|
|
62
|
+
Flag operations that block the request unnecessarily:
|
|
63
|
+
|
|
64
|
+
- Synchronous external API calls that could be parallelized
|
|
65
|
+
- Sequential database queries that are independent and could run concurrently
|
|
66
|
+
- File I/O or computation on the request path that could be offloaded
|
|
67
|
+
- Missing connection pooling causing connection creation overhead
|
|
68
|
+
|
|
69
|
+
### Step 5: Check Caching Opportunities
|
|
70
|
+
|
|
71
|
+
Identify data that could be cached:
|
|
72
|
+
|
|
73
|
+
- Frequently read, rarely written data (user profiles, config, feature flags)
|
|
74
|
+
- Expensive computations or aggregations
|
|
75
|
+
- External API responses with acceptable staleness
|
|
76
|
+
- Database query results for hot paths
|
|
77
|
+
|
|
78
|
+
For each: suggest cache strategy (in-memory, Redis, HTTP cache headers), TTL, and invalidation approach.
|
|
79
|
+
|
|
80
|
+
### Step 6: Check Serialization Overhead
|
|
81
|
+
|
|
82
|
+
Flag:
|
|
83
|
+
|
|
84
|
+
- Over-fetching from database (SELECT \* when only 3 fields are needed)
|
|
85
|
+
- Serializing large nested objects when the client needs a subset
|
|
86
|
+
- Missing field selection or GraphQL-style projection
|
|
87
|
+
- Large payloads that could use pagination or streaming
|
|
88
|
+
|
|
89
|
+
### Step 7: Present the Report
|
|
90
|
+
|
|
91
|
+
Format as:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
## Performance Analysis: [endpoint/operation]
|
|
95
|
+
|
|
96
|
+
### Issues Found
|
|
97
|
+
|
|
98
|
+
#### 1. [Issue name] — Estimated improvement: [Xms -> Yms] or [X queries -> Y queries]
|
|
99
|
+
**Why it's slow:** [explanation]
|
|
100
|
+
**Fix:**
|
|
101
|
+
[code snippet with the fix]
|
|
102
|
+
|
|
103
|
+
#### 2. [Issue name] — Estimated improvement: [X%]
|
|
104
|
+
**Why it's slow:** [explanation]
|
|
105
|
+
**Fix:**
|
|
106
|
+
[code snippet with the fix]
|
|
107
|
+
|
|
108
|
+
### Summary
|
|
109
|
+
| Issue | Impact | Effort | Fix |
|
|
110
|
+
|-------------------|-----------|--------|-------------------|
|
|
111
|
+
| N+1 on /orders | High | Low | Add eager loading |
|
|
112
|
+
| Missing index | Medium | Low | Add index |
|
|
113
|
+
| No caching | High | Medium | Add Redis cache |
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Prioritize by impact-to-effort ratio. Fix high-impact, low-effort issues first.
|
|
117
|
+
|
|
118
|
+
## Delivery
|
|
119
|
+
|
|
120
|
+
If output exceeds the 40-line CLI budget, invoke `/atlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spine-recon",
|
|
3
|
+
"version": "0.9.7",
|
|
4
|
+
"description": "Backend reconnaissance \u2014 map all routes, middleware, models, dependencies, auth, and assess code quality for project takeover. Use when asked to \"understand this backend\", \"map the API\", or \"assess code quality\".",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "tonone-ai",
|
|
7
|
+
"url": "https://tonone.ai"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/tonone-ai/tonone",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "skill",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"spine",
|
|
14
|
+
"skill"
|
|
15
|
+
]
|
|
16
|
+
}
|