skilldrop-cli 0.2.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/LICENSE +21 -0
- package/README.md +413 -0
- package/bin/skilldrop.js +338 -0
- package/model-routing.json +147 -0
- package/package.json +36 -0
- package/packs.json +90 -0
- package/skills/accessibility-audit/SKILL.md +74 -0
- package/skills/accessibility-audit/examples/login-form.md +76 -0
- package/skills/accessibility-audit/manifest.json +11 -0
- package/skills/accessibility-audit/reference.md +69 -0
- package/skills/adr-generator/SKILL.md +49 -0
- package/skills/adr-generator/manifest.json +11 -0
- package/skills/adr-generator/templates/madr.md +56 -0
- package/skills/adr-generator/templates/nygard.md +19 -0
- package/skills/ai-usage-report/SKILL.md +111 -0
- package/skills/ai-usage-report/examples/weekly-engineering-team.md +133 -0
- package/skills/ai-usage-report/manifest.json +11 -0
- package/skills/ai-usage-report/scripts/build_report.py +436 -0
- package/skills/ai-usage-report/templates/report-per-user.md +42 -0
- package/skills/ai-usage-report/templates/report-team-rollup.md +49 -0
- package/skills/ai-usage-report/templates/usage-event-schema.md +76 -0
- package/skills/api-contract-draft/SKILL.md +69 -0
- package/skills/api-contract-draft/manifest.json +11 -0
- package/skills/api-contract-draft/reference.md +73 -0
- package/skills/api-contract-draft/templates/openapi-skeleton.yaml +148 -0
- package/skills/architecture-diagrams/SKILL.md +66 -0
- package/skills/architecture-diagrams/examples/aws-three-tier.md +44 -0
- package/skills/architecture-diagrams/examples/c4-container-saas.md +51 -0
- package/skills/architecture-diagrams/examples/microservices-sequence.md +49 -0
- package/skills/architecture-diagrams/manifest.json +28 -0
- package/skills/architecture-diagrams/templates/c4-container.puml +31 -0
- package/skills/architecture-diagrams/templates/mermaid-aws.md +52 -0
- package/skills/architecture-diagrams/templates/mermaid-flowchart.md +37 -0
- package/skills/architecture-diagrams/templates/mermaid-sequence.md +39 -0
- package/skills/audience-profile/SKILL.md +73 -0
- package/skills/audience-profile/manifest.json +11 -0
- package/skills/audience-profile/reference.md +175 -0
- package/skills/brief-intake/SKILL.md +78 -0
- package/skills/brief-intake/manifest.json +11 -0
- package/skills/brief-intake/templates/brief-adr.md +41 -0
- package/skills/brief-intake/templates/brief-decision-log.md +35 -0
- package/skills/brief-intake/templates/brief-deck.md +43 -0
- package/skills/brief-intake/templates/brief-design-doc.md +48 -0
- package/skills/brief-intake/templates/brief-exec-summary.md +47 -0
- package/skills/brief-intake/templates/brief-generic.md +45 -0
- package/skills/brief-intake/templates/brief-runbook.md +44 -0
- package/skills/brief-intake/templates/brief-tech-comparison.md +38 -0
- package/skills/bug-triage/SKILL.md +67 -0
- package/skills/bug-triage/manifest.json +11 -0
- package/skills/bug-triage/templates/bug-ticket.md +86 -0
- package/skills/business-case/SKILL.md +64 -0
- package/skills/business-case/manifest.json +11 -0
- package/skills/business-case/templates/business-case.md +60 -0
- package/skills/capacity-cost-model/SKILL.md +64 -0
- package/skills/capacity-cost-model/manifest.json +11 -0
- package/skills/capacity-cost-model/reference.md +54 -0
- package/skills/capacity-cost-model/templates/cost-model.md +68 -0
- package/skills/council-review/SKILL.md +106 -0
- package/skills/council-review/examples/redis-cache-decision.md +75 -0
- package/skills/council-review/manifest.json +11 -0
- package/skills/council-review/reference.md +76 -0
- package/skills/council-review/seats/architect.md +29 -0
- package/skills/council-review/seats/bench.md +39 -0
- package/skills/council-review/seats/operator.md +27 -0
- package/skills/council-review/seats/pragmatist.md +29 -0
- package/skills/council-review/seats/security-engineer.md +29 -0
- package/skills/council-review/seats/user-advocate.md +27 -0
- package/skills/council-review/templates/council-review.md +59 -0
- package/skills/data-contract/SKILL.md +67 -0
- package/skills/data-contract/manifest.json +11 -0
- package/skills/data-contract/reference.md +46 -0
- package/skills/data-contract/templates/data-contract.md +69 -0
- package/skills/db-schema-design/SKILL.md +68 -0
- package/skills/db-schema-design/manifest.json +11 -0
- package/skills/db-schema-design/reference.md +56 -0
- package/skills/db-schema-design/templates/schema-design.md +75 -0
- package/skills/decision-log/SKILL.md +67 -0
- package/skills/decision-log/manifest.json +11 -0
- package/skills/deck-builder/SKILL.md +114 -0
- package/skills/deck-builder/examples/exec-board-update.md +108 -0
- package/skills/deck-builder/manifest.json +17 -0
- package/skills/deck-builder/reference.md +92 -0
- package/skills/deck-builder/requirements.txt +1 -0
- package/skills/deck-builder/scripts/build_deck.py +309 -0
- package/skills/deck-builder/templates/deck-spec.json +97 -0
- package/skills/deck-builder/templates/palettes.json +59 -0
- package/skills/design-doc/SKILL.md +49 -0
- package/skills/design-doc/manifest.json +11 -0
- package/skills/design-doc/templates/design-doc.md +98 -0
- package/skills/devils-advocate/SKILL.md +142 -0
- package/skills/devils-advocate/lenses/adversarial-review.md +88 -0
- package/skills/devils-advocate/lenses/edge-cases.md +95 -0
- package/skills/devils-advocate/lenses/future-proofing.md +75 -0
- package/skills/devils-advocate/lenses/test-coverage.md +90 -0
- package/skills/devils-advocate/manifest.json +11 -0
- package/skills/devils-advocate/templates/challenge.md +118 -0
- package/skills/doc-critique/SKILL.md +119 -0
- package/skills/doc-critique/manifest.json +11 -0
- package/skills/doc-critique/rubrics/adr.md +36 -0
- package/skills/doc-critique/rubrics/decision-log.md +39 -0
- package/skills/doc-critique/rubrics/deck.md +45 -0
- package/skills/doc-critique/rubrics/design-doc.md +42 -0
- package/skills/doc-critique/rubrics/exec-summary.md +41 -0
- package/skills/doc-critique/rubrics/generic.md +40 -0
- package/skills/doc-critique/rubrics/runbook.md +42 -0
- package/skills/doc-critique/rubrics/tech-comparison.md +40 -0
- package/skills/doc-critique/templates/critique.md +49 -0
- package/skills/exec-summary/SKILL.md +45 -0
- package/skills/exec-summary/manifest.json +11 -0
- package/skills/exec-summary/templates/exec-summary.md +48 -0
- package/skills/feature-implement-loop/SKILL.md +83 -0
- package/skills/feature-implement-loop/manifest.json +11 -0
- package/skills/figma-diagrams/SKILL.md +85 -0
- package/skills/figma-diagrams/manifest.json +35 -0
- package/skills/figma-diagrams/reference.md +91 -0
- package/skills/figma-diagrams/requirements.txt +1 -0
- package/skills/figma-diagrams/scripts/_figma_client.py +71 -0
- package/skills/figma-diagrams/scripts/frame_to_mermaid.py +102 -0
- package/skills/figma-diagrams/scripts/inspect_file.py +46 -0
- package/skills/figma-diagrams/scripts/list_comments.py +35 -0
- package/skills/figma-diagrams/scripts/post_comment.py +52 -0
- package/skills/figma-diagrams/templates/figjam-import.json +20 -0
- package/skills/guide-builder/SKILL.md +76 -0
- package/skills/guide-builder/examples/local-setup-guide.md +127 -0
- package/skills/guide-builder/manifest.json +11 -0
- package/skills/guide-builder/templates/api-reference.md +120 -0
- package/skills/guide-builder/templates/design-walkthrough.md +72 -0
- package/skills/guide-builder/templates/setup-guide.md +109 -0
- package/skills/incident-comms/SKILL.md +68 -0
- package/skills/incident-comms/manifest.json +11 -0
- package/skills/incident-comms/reference.md +43 -0
- package/skills/incident-comms/templates/messages.md +82 -0
- package/skills/llm-eval-harness/SKILL.md +73 -0
- package/skills/llm-eval-harness/manifest.json +11 -0
- package/skills/llm-eval-harness/reference.md +58 -0
- package/skills/llm-eval-harness/templates/eval-plan.md +63 -0
- package/skills/llm-eval-harness/templates/golden-case.jsonl +5 -0
- package/skills/migration-plan/SKILL.md +68 -0
- package/skills/migration-plan/manifest.json +11 -0
- package/skills/migration-plan/templates/migration-plan.md +68 -0
- package/skills/nfr-spec/SKILL.md +63 -0
- package/skills/nfr-spec/manifest.json +11 -0
- package/skills/nfr-spec/reference.md +74 -0
- package/skills/nfr-spec/templates/nfr-spec.md +56 -0
- package/skills/observability-plan/SKILL.md +70 -0
- package/skills/observability-plan/manifest.json +11 -0
- package/skills/observability-plan/reference.md +67 -0
- package/skills/observability-plan/templates/observability-plan.md +62 -0
- package/skills/okr-cascade/SKILL.md +59 -0
- package/skills/okr-cascade/evals/eval_queries.json +12 -0
- package/skills/okr-cascade/evals/evals.json +28 -0
- package/skills/okr-cascade/manifest.json +11 -0
- package/skills/okr-cascade/templates/okr-cascade.md +46 -0
- package/skills/postmortem-generator/SKILL.md +65 -0
- package/skills/postmortem-generator/manifest.json +11 -0
- package/skills/postmortem-generator/templates/postmortem.md +67 -0
- package/skills/prd-draft/SKILL.md +62 -0
- package/skills/prd-draft/manifest.json +11 -0
- package/skills/prd-draft/templates/prd.md +66 -0
- package/skills/prfaq/SKILL.md +75 -0
- package/skills/prfaq/evals/eval_queries.json +13 -0
- package/skills/prfaq/evals/evals.json +32 -0
- package/skills/prfaq/manifest.json +11 -0
- package/skills/prfaq/templates/prfaq.md +60 -0
- package/skills/release-notes/SKILL.md +61 -0
- package/skills/release-notes/manifest.json +11 -0
- package/skills/release-notes/templates/release-notes.md +83 -0
- package/skills/requirements-interview/SKILL.md +61 -0
- package/skills/requirements-interview/manifest.json +11 -0
- package/skills/requirements-interview/templates/interview-kit.md +63 -0
- package/skills/reverse-architecture/SKILL.md +103 -0
- package/skills/reverse-architecture/manifest.json +11 -0
- package/skills/reverse-architecture/reference.md +150 -0
- package/skills/reverse-architecture/templates/description.md +52 -0
- package/skills/reverse-architecture/templates/extraction.md +55 -0
- package/skills/runbook-generator/SKILL.md +42 -0
- package/skills/runbook-generator/manifest.json +11 -0
- package/skills/runbook-generator/templates/runbook.md +109 -0
- package/skills/slide-outliner/SKILL.md +58 -0
- package/skills/slide-outliner/manifest.json +11 -0
- package/skills/slide-outliner/templates/deck-outline.md +131 -0
- package/skills/sonar-onboard/SKILL.md +170 -0
- package/skills/sonar-onboard/manifest.json +11 -0
- package/skills/sonar-onboard/reference.md +151 -0
- package/skills/sonar-onboard/templates/github-actions-sonar-server.yml.tmpl +50 -0
- package/skills/sonar-onboard/templates/github-actions-sonarcloud.yml.tmpl +53 -0
- package/skills/sonar-onboard/templates/readme-snippet.md +38 -0
- package/skills/sonar-onboard/templates/sonar-project.properties.tmpl +31 -0
- package/skills/sonar-review/SKILL.md +220 -0
- package/skills/sonar-review/lenses/bugs.md +48 -0
- package/skills/sonar-review/lenses/code-smells.md +64 -0
- package/skills/sonar-review/lenses/coverage-and-duplication.md +74 -0
- package/skills/sonar-review/lenses/security-hotspots.md +56 -0
- package/skills/sonar-review/lenses/vulnerabilities.md +52 -0
- package/skills/sonar-review/manifest.json +37 -0
- package/skills/sonar-review/reference.md +167 -0
- package/skills/sonar-review/templates/report.md +84 -0
- package/skills/strategy-analysis/SKILL.md +63 -0
- package/skills/strategy-analysis/evals/eval_queries.json +13 -0
- package/skills/strategy-analysis/evals/evals.json +36 -0
- package/skills/strategy-analysis/manifest.json +11 -0
- package/skills/success-metrics/SKILL.md +63 -0
- package/skills/success-metrics/evals/eval_queries.json +11 -0
- package/skills/success-metrics/evals/evals.json +27 -0
- package/skills/success-metrics/manifest.json +11 -0
- package/skills/success-metrics/templates/metrics-plan.md +55 -0
- package/skills/tech-comparison-matrix/SKILL.md +56 -0
- package/skills/tech-comparison-matrix/manifest.json +11 -0
- package/skills/tech-comparison-matrix/templates/matrix.md +45 -0
- package/skills/test-plan-generator/SKILL.md +59 -0
- package/skills/test-plan-generator/manifest.json +11 -0
- package/skills/test-plan-generator/templates/test-plan.md +83 -0
- package/skills/threat-model/SKILL.md +65 -0
- package/skills/threat-model/examples/document-upload.md +56 -0
- package/skills/threat-model/manifest.json +11 -0
- package/skills/threat-model/reference.md +69 -0
- package/skills/user-journey-map/SKILL.md +64 -0
- package/skills/user-journey-map/evals/eval_queries.json +12 -0
- package/skills/user-journey-map/evals/evals.json +30 -0
- package/skills/user-journey-map/examples/b2b-saas-onboarding.md +69 -0
- package/skills/user-journey-map/manifest.json +11 -0
- package/skills/user-journey-map/templates/journey-map.md +47 -0
- package/skills/user-story-splitter/SKILL.md +88 -0
- package/skills/user-story-splitter/examples/notifications-epic.md +123 -0
- package/skills/user-story-splitter/manifest.json +11 -0
- package/skills/user-story-splitter/templates/story.md +40 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Release-notes templates
|
|
2
|
+
|
|
3
|
+
Two artifacts, two readers. Customer notes sell nothing and explain everything; the internal changelog trades polish for traceability.
|
|
4
|
+
|
|
5
|
+
## Artifact 1 — customer-facing release notes
|
|
6
|
+
|
|
7
|
+
> Note the deliberate rename for a non-technical reader: the Keep-a-Changelog categories **Added → New** and **Changed → Improved** here; Fixed/Security keep their names. The internal changelog (Artifact 2) uses the canonical Keep-a-Changelog headings.
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# {Product} {version} — {YYYY-MM-DD}
|
|
11
|
+
|
|
12
|
+
> Covers {ref}..{ref} · {N} changes
|
|
13
|
+
|
|
14
|
+
## ⚠ Breaking changes
|
|
15
|
+
|
|
16
|
+
- **{What broke, in reader terms.}**
|
|
17
|
+
Action required: {the exact step — config to change, endpoint to migrate, deadline}.
|
|
18
|
+
(flagged by: {signal — `!:` marker / removed API / migration file})
|
|
19
|
+
|
|
20
|
+
## New
|
|
21
|
+
|
|
22
|
+
- {What the reader can now do. One sentence, benefit first.}
|
|
23
|
+
|
|
24
|
+
## Improved
|
|
25
|
+
|
|
26
|
+
- {What got better, measurably where possible: "export is ~3× faster on reports over 10k rows".}
|
|
27
|
+
|
|
28
|
+
## Fixed
|
|
29
|
+
|
|
30
|
+
- {The symptom the reader no longer suffers: "Fixed a crash when …", "Dates no longer shift by one day when …".}
|
|
31
|
+
|
|
32
|
+
## Security
|
|
33
|
+
|
|
34
|
+
- {Reader-relevant statement; severity and affected versions; no exploit detail.}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Rules: no class/function/service names, no ticket IDs, no author names, no "various improvements". A section with nothing in it is deleted, not left empty — except Breaking changes, which when empty becomes the single line "No breaking changes."
|
|
38
|
+
|
|
39
|
+
## Artifact 2 — internal changelog (Keep a Changelog)
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
## [{version}] - {YYYY-MM-DD}
|
|
43
|
+
|
|
44
|
+
Range: `{ref}..{ref}` · {N} commits · {N} PRs
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
- {change} ({#PR}, `{hash}`)
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- **BREAKING:** {change + migration step} ({#PR}, `{hash}`)
|
|
51
|
+
- {change} ({#PR}, `{hash}`)
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
- {change} ({#PR}, `{hash}`)
|
|
55
|
+
|
|
56
|
+
### Deprecated / Removed / Security
|
|
57
|
+
- {change} ({#PR}, `{hash}`)
|
|
58
|
+
|
|
59
|
+
### Internal
|
|
60
|
+
- {refactor / CI / deps / tests — one line each} (`{hash}`)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Needs review (always emitted, both modes)
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
## Needs review — {N} commits not classified
|
|
67
|
+
|
|
68
|
+
| Hash | Subject | Why unclear |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `{hash}` | {verbatim subject} | {vague / contradicts diff / can't tell if user-visible} |
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Classification cheat-sheet
|
|
74
|
+
|
|
75
|
+
| Signal | Bucket |
|
|
76
|
+
|---|---|
|
|
77
|
+
| New endpoint, flag default-on, new UI surface | Added |
|
|
78
|
+
| Behavior or default changed for existing users | Changed (BREAKING if old behavior unobtainable) |
|
|
79
|
+
| `fix:`, bug ticket, regression revert | Fixed |
|
|
80
|
+
| `chore:`, `refactor:`, `test:`, `ci:`, deps, lockfiles | Internal |
|
|
81
|
+
| CVE, auth/authz, input validation, secrets | Security |
|
|
82
|
+
| `feat!:`, `BREAKING CHANGE:`, removed public API, schema migration, major version bump of a public SDK | Breaking — hoist to top |
|
|
83
|
+
| "wip", "fix stuff", "address comments", empty body + vague subject | Needs review |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: requirements-interview
|
|
3
|
+
description: Generate per-stakeholder interview kits for feature discovery — ≤7 questions per stakeholder ranked by how much the answer changes the design, each naming the decision it informs, with at least one disconfirming question per script and an assumptions-to-validate ledger. Use when the user is gathering business requirements, preparing stakeholder or user interviews, or asks "what should I ask the sponsor/users/ops before we build this".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# requirements-interview
|
|
7
|
+
|
|
8
|
+
Builds the elicitation kit for the conversations *before* the PRD — so the answers come back in a shape `brief-intake` and `prd-draft` can consume, instead of as ten pages of agreement with the roadmap. The discipline: every question names the decision it informs, problems are asked about instead of solutions, and every script tries at least once to kill the feature.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
1. **Pin the feature idea and identify the stakeholder cast.** From the idea, derive who holds which unknowns — typically: **sponsor** (success definition, constraints, appetite), **end users** (the actual workflow and workarounds — interview the people who do the work, not their manager), **ops/support** (failure modes, ticket reality, operational cost), **security/compliance/legal** (data constraints, regulatory floor), **finance/commercial** (pricing, cost ceiling) when money moves. Ask the user at most 2 questions — who's available, and what's already known — then build kits only for stakeholders who hold *open* unknowns. No interview exists to confirm what's already evidenced.
|
|
13
|
+
|
|
14
|
+
2. **Write ≤7 questions per stakeholder, ranked by design impact.** Rank 1 is the answer that most changes what gets built. Each question carries two annotations: **informs** (the decision) and **if-answer-is-X-then** (how the design moves). A question that wouldn't change anything regardless of answer doesn't make the seven. ✅ *"Walk me through the last time you handled a refund request — every tool you touched."* (informs: scope of integration; if 3+ tools → unified view is the core, not a nicety) — ❌ *"Would a refund dashboard be useful?"* (everyone says yes to free things).
|
|
15
|
+
|
|
16
|
+
3. **Ask about problems and the past, never solutions and the hypothetical.** People are reliable witnesses of what they *did* and unreliable predictors of what they'd *use*. ✅ *"What did you do the last time X failed?"* — ❌ *"Would you use a feature that prevents X?"*. Solutions offered by stakeholders get recorded as evidence of pain, then converted back into the underlying problem.
|
|
17
|
+
|
|
18
|
+
4. **Include at least one disconfirming question per script** — the question whose answer could kill or shrink the feature: ✅ *"If this never gets built, what would you do instead — and how bad is that, honestly?"* / *"Who would be annoyed if we built this?"*. A kit with no kill-question is a confirmation ritual with a calendar invite.
|
|
19
|
+
|
|
20
|
+
5. **Add the workflow-walkthrough opener for end users.** First substantive question is always a concrete recent episode ("the last time", "yesterday's"), not a generality ("typically", "usually") — generalities retrieve self-image; episodes retrieve facts. Instruct the interviewer to capture **verbatim quotes** — they become the evidence tags in `prd-draft`.
|
|
21
|
+
|
|
22
|
+
6. **Build the assumptions-to-validate ledger.** Every assumption the feature idea rests on, each mapped to: which stakeholder's which question validates it, and **what answer falsifies it**. An assumption no question can falsify gets flagged — it needs data or a prototype, not an interview.
|
|
23
|
+
|
|
24
|
+
7. **Emit with [`templates/interview-kit.md`](templates/interview-kit.md)**: one kit per stakeholder (30-minute shape: opener episode → ranked questions → kill-question → "who else should I talk to"), the assumptions ledger, and the synthesis instruction — notes go to `brief-intake` (one brief per interview, then merge) and decisions surface via `decision-log`.
|
|
25
|
+
|
|
26
|
+
## Useful references in this skill
|
|
27
|
+
|
|
28
|
+
- [`templates/interview-kit.md`](templates/interview-kit.md) — per-stakeholder kit skeleton + the assumptions ledger
|
|
29
|
+
|
|
30
|
+
## Quality bar
|
|
31
|
+
|
|
32
|
+
- **≤7 questions per stakeholder, ranked**, each annotated with the decision it informs and how the answer moves the design. Unannotated questions don't ship.
|
|
33
|
+
- **Zero leading questions in discovery position.** Anything shaped "wouldn't it be great if…" or answerable with a polite yes fails the kit.
|
|
34
|
+
- **Every script contains a kill-question** — and the kit says what a kill-answer looks like, so the interviewer recognizes it instead of softening it.
|
|
35
|
+
- **End-user scripts open with a concrete recent episode**, never "typically".
|
|
36
|
+
- **Every assumption in the ledger has a falsification condition.** "We'll validate adoption appetite" without what-would-disprove-it is theater.
|
|
37
|
+
- **The synthesis path is named.** Kits that don't say where the notes go produce interviews that end at the notes.
|
|
38
|
+
|
|
39
|
+
## When to use this skill
|
|
40
|
+
|
|
41
|
+
- ✅ Discovery phase before a PRD — deciding what to ask whom
|
|
42
|
+
- ✅ "What should I ask the sponsor / users / ops about this feature?"
|
|
43
|
+
- ✅ A feature idea built on untested assumptions that interviews could falsify
|
|
44
|
+
- ✅ Preparing a requirements workshop's pre-read questions
|
|
45
|
+
|
|
46
|
+
## When NOT to use this skill
|
|
47
|
+
|
|
48
|
+
- ❌ The answers already exist in tickets, analytics, or support logs — mine those first; interviews are for what data can't say
|
|
49
|
+
- ❌ Synthesizing notes after the interviews — that's `brief-intake` + `decision-log`
|
|
50
|
+
- ❌ Writing the requirements themselves — `prd-draft`, after the interviews
|
|
51
|
+
- ❌ Usability testing of an existing design — different method; this is problem discovery
|
|
52
|
+
|
|
53
|
+
## Anti-patterns to avoid
|
|
54
|
+
|
|
55
|
+
- ❌ **The 25-question interrogation.** Past seven, answers degrade into politeness; the ranking exists because time runs out before questions do.
|
|
56
|
+
- ❌ **Confirmation safari.** Every question shaped so yes means "build it" — discovery that can't disconfirm isn't discovery.
|
|
57
|
+
- ❌ **Asking for the solution.** "What should we build?" outsources design to whoever's loudest; ask what hurts, design later.
|
|
58
|
+
- ❌ **Interviewing the manager about the worker's workflow.** Managers describe the process diagram; workers describe the workarounds — the requirements live in the workarounds.
|
|
59
|
+
- ❌ **Skipping ops/support.** They hold the failure-mode requirements nobody else knows exist, and they're the cheapest interview on the list.
|
|
60
|
+
- ❌ **Hypothetical futures.** "Would you use…" — the answer is always yes and always worthless; ask about the last time, not the next time.
|
|
61
|
+
- ❌ **One loud stakeholder = the requirements.** The kit covers the cast precisely so one vivid interview doesn't become the spec.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "requirements-interview",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generate per-stakeholder interview kits for feature discovery — ≤7 questions per stakeholder ranked by how much the answer changes the design, each naming the decision it informs, with at least one disconfirming question per script and an assumptions-to-validate ledger. Use when the user is gathering business requirements, preparing stakeholder or user interviews, or asks \"what should I ask the sponsor/users/ops before we build this\".",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["brief-intake", "decision-log", "prd-draft"],
|
|
9
|
+
"tags": ["discovery", "interviews", "requirements", "elicitation", "stakeholders", "user-research"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Question banks are rubric-shaped, but ranking by design impact and deriving falsification conditions for the specific feature is synthesis — above light." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Interview-kit template
|
|
2
|
+
|
|
3
|
+
One kit per stakeholder. 30-minute shape: episode opener → ranked questions → kill-question → referral close. Capture verbatim quotes — they become `prd-draft` evidence tags.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# Interview kit: {feature idea}
|
|
7
|
+
|
|
8
|
+
**Stakeholders covered:** {list — only those holding open unknowns}
|
|
9
|
+
**Already known (don't re-ask):** {evidence that exists: analytics, tickets, prior research}
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Kit: {stakeholder role, e.g. "End user — support agent"}
|
|
14
|
+
|
|
15
|
+
**Holds the unknowns about:** {what only this person can answer}
|
|
16
|
+
**Time:** 30 min · **Record verbatim quotes**
|
|
17
|
+
|
|
18
|
+
### Opener (end users: concrete recent episode, never "typically")
|
|
19
|
+
|
|
20
|
+
1. "Walk me through the last time you {did the task}. Every tool you touched, start to finish."
|
|
21
|
+
- *informs:* {decision} · *if {answer-shape} then:* {how the design moves}
|
|
22
|
+
|
|
23
|
+
### Ranked questions (≤7 total including opener and kill-question)
|
|
24
|
+
|
|
25
|
+
2. "{question}"
|
|
26
|
+
- *informs:* {decision} · *if X then:* {design consequence}
|
|
27
|
+
3. …
|
|
28
|
+
|
|
29
|
+
### Kill-question (mandatory)
|
|
30
|
+
|
|
31
|
+
n. "If this never gets built, what would you do instead — honestly, how bad is that?"
|
|
32
|
+
- *a kill-answer looks like:* {e.g. "shrug + existing workaround under 2 min" → feature shrinks or dies; write it down, don't soften it}
|
|
33
|
+
|
|
34
|
+
### Close
|
|
35
|
+
|
|
36
|
+
- "Who else should I talk to who'd see this differently?"
|
|
37
|
+
- "What didn't I ask about that I should have?"
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Assumptions-to-validate ledger
|
|
42
|
+
|
|
43
|
+
| Assumption the idea rests on | Validated by (stakeholder · Q#) | Falsified if |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| {e.g. agents lose ≥15 min/ticket to tool-switching} | end user · Q1 | episode shows < 5 min or a fast workaround |
|
|
46
|
+
| {assumption no interview can falsify} | ⚠ not interview-validatable | needs {data pull / prototype} instead |
|
|
47
|
+
|
|
48
|
+
## Synthesis path (the kit isn't done until this runs)
|
|
49
|
+
|
|
50
|
+
1. Each interview's notes → `brief-intake` (one brief per interview; quotes verbatim).
|
|
51
|
+
2. Merge briefs; conflicts between stakeholders are surfaced as open questions, not averaged away.
|
|
52
|
+
3. Decisions and follow-ups → `decision-log`. Requirements → `prd-draft`.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Question-shape cheat-sheet
|
|
56
|
+
|
|
57
|
+
| ❌ Don't ask | ✅ Ask instead |
|
|
58
|
+
|---|---|
|
|
59
|
+
| "Would you use a dashboard that…?" | "What did you do the last time you needed {that info}?" |
|
|
60
|
+
| "Is X a problem for you?" | "Tell me about the most recent time X happened." |
|
|
61
|
+
| "What should we build?" | "What's the most annoying part of {task} today?" |
|
|
62
|
+
| "How often does X typically happen?" | "When did X last happen? And before that?" |
|
|
63
|
+
| "Do you agree this would save time?" | "What would have to be true for you to stop using {workaround}?" |
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reverse-architecture
|
|
3
|
+
description: Reverse-engineer a system's architecture from what already exists — a code repo, Terraform / CloudFormation / Pulumi / Bicep, Kubernetes manifests, docker-compose, a database schema, an OpenAPI spec, or a package manifest — and produce a renderable diagram (Mermaid / C4 / PlantUML) plus a written description suitable for handing to architecture-diagrams. Use when the user wants to draw the system that *exists*, not one they're proposing — for onboarding docs, audit reviews, migration planning, or filling in a missing "as-is" architecture diagram.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reverse-architecture
|
|
7
|
+
|
|
8
|
+
You help the user produce an accurate "as-is" architecture diagram by reading what's actually in the repo or infra files — not by asking them to describe the system from memory.
|
|
9
|
+
|
|
10
|
+
This skill pairs with two others:
|
|
11
|
+
- **[`architecture-diagrams`](../architecture-diagrams/SKILL.md)** — takes the *written description* this skill emits and renders the final notation. You can either hand off, or render inline using its templates.
|
|
12
|
+
- **[`design-doc`](../design-doc/SKILL.md)** — when the as-is diagram is going into a design doc's "Current state" section.
|
|
13
|
+
|
|
14
|
+
## How to respond
|
|
15
|
+
|
|
16
|
+
1. **Find the highest-signal source files first.** Most systems leak their architecture through 4–6 files. Read these in order, stopping when you have enough:
|
|
17
|
+
|
|
18
|
+
| Source | What you learn | Where to look |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **Infrastructure-as-code** | Cloud topology, account/region/VPC layout, managed services in use | `*.tf`, `*.tfvars`, `cdk/*`, `serverless.yml`, `template.yaml`, `*.bicep`, `pulumi/*`, `cloudformation/*.yaml` |
|
|
21
|
+
| **Kubernetes manifests / Helm** | Service-to-service topology, ingress, sidecars | `k8s/`, `manifests/`, `*.yaml` with `kind: Deployment\|Service\|Ingress`, `helm/*/templates/`, `kustomization.yaml` |
|
|
22
|
+
| **docker-compose** | Local/small-deploy service graph | `docker-compose.y*ml`, `compose.y*ml` |
|
|
23
|
+
| **Package manifest** | Stack, frameworks, key libraries (auth, ORM, queue clients) | `package.json`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`, `Gemfile`, `Cargo.toml` |
|
|
24
|
+
| **Top-level source structure** | Module / service boundaries, internal vs external API split | `src/`, `services/`, `apps/`, `cmd/`, `internal/` |
|
|
25
|
+
| **API surface** | External contracts, request flows | `openapi.y*ml`, `*.proto`, `*Controller.*`, `routes/`, `handlers/`, `gql/`, `*.graphql` |
|
|
26
|
+
| **Database schema** | Data model, key entities, FK relationships | `migrations/`, `schema.sql`, `prisma/schema.prisma`, `models/`, `*.entity.ts` |
|
|
27
|
+
| **Config / env** | External dependencies (queues, caches, third-party APIs) | `.env.example`, `config/*.y*ml`, `application*.properties`, `settings.py` |
|
|
28
|
+
| **CI / deploy** | Deploy targets, environments, build artifacts | `.github/workflows/*`, `.gitlab-ci.yml`, `Jenkinsfile`, `Dockerfile`, `buildspec.yml` |
|
|
29
|
+
| **README** | Author's intent (verify against the code, don't trust uncritically) | `README*`, `ARCHITECTURE*`, `docs/architecture*` |
|
|
30
|
+
|
|
31
|
+
See [`reference.md`](reference.md) for the patterns to grep when each signal isn't obvious.
|
|
32
|
+
|
|
33
|
+
2. **Confirm the level you're drawing.** Ask the user which C4 level they want (if they don't say) — answers below dictate which signals matter:
|
|
34
|
+
|
|
35
|
+
- **Context** — what external actors and systems talk to this thing. Inputs: README + IaC ingress + OpenAPI.
|
|
36
|
+
- **Container** (most common default) — each deployable + its datastore + how they talk. Inputs: IaC + k8s/compose + config.
|
|
37
|
+
- **Component** — internal modules inside one container. Inputs: source tree + key code files.
|
|
38
|
+
- **Deployment** — physical/cloud topology with regions, AZs, subnets. Inputs: IaC.
|
|
39
|
+
|
|
40
|
+
3. **Extract the topology as a structured list before drawing.** Use [`templates/extraction.md`](templates/extraction.md) — fill in:
|
|
41
|
+
|
|
42
|
+
- **Nodes** (services, datastores, queues, external systems) — each with type and source-of-truth file path
|
|
43
|
+
- **Edges** (who calls whom, sync vs async, protocol)
|
|
44
|
+
- **Zones / boundaries** (VPC, account, region, trust boundary)
|
|
45
|
+
- **External actors** (users, partner systems)
|
|
46
|
+
|
|
47
|
+
Tag each item with its evidence: `service: payments-api (k8s/payments/deployment.yaml:12)`. The path is the audit trail — if the user disputes a node, they can jump straight to where you saw it.
|
|
48
|
+
|
|
49
|
+
4. **Flag what you couldn't see.** Code/IaC tells you *what runs*, not always *how it's used*. Be explicit about gaps:
|
|
50
|
+
|
|
51
|
+
- Async vs sync — usually inferable from the client library (e.g. `kafka-go` ⇒ async; `axios` ⇒ sync) but verify.
|
|
52
|
+
- Authentication boundaries — sometimes obvious (Cognito, IAM auth on an API Gateway), sometimes implicit in middleware code.
|
|
53
|
+
- Caching layers — Redis sometimes appears only as an env var, not in IaC.
|
|
54
|
+
- Cross-account / cross-org calls — easy to miss if the only signal is an env var pointing at `https://….`
|
|
55
|
+
|
|
56
|
+
Put these in a `## Inferred / unverified` block in the extraction.
|
|
57
|
+
|
|
58
|
+
5. **Emit two artifacts:**
|
|
59
|
+
|
|
60
|
+
a. **Written description** in the shape `architecture-diagrams` expects — system purpose, actors, components, flows, zones. Use [`templates/description.md`](templates/description.md). The user can hand this directly to `/architecture-diagrams` if they want to switch notation later.
|
|
61
|
+
|
|
62
|
+
b. **A first-draft diagram** — Mermaid `flowchart` by default for container-level; C4-PlantUML for context or deployment level. Cap at ~15 nodes; if you'd exceed that, split into two diagrams (e.g. "Frontend stack" + "Backend stack") rather than producing an unreadable single diagram.
|
|
63
|
+
|
|
64
|
+
6. **Tell the user what to verify.** End with 3–5 bullets the user should sanity-check, prioritized by likelihood of being wrong:
|
|
65
|
+
|
|
66
|
+
- Asynchronous edges (often invisible in code)
|
|
67
|
+
- External dependencies behind env vars
|
|
68
|
+
- Anything in the `## Inferred / unverified` block
|
|
69
|
+
|
|
70
|
+
## Useful references
|
|
71
|
+
|
|
72
|
+
- [`reference.md`](reference.md) — File-to-signal mapping with concrete grep patterns and example extractions per stack (Terraform, k8s, docker-compose, Spring, Django, Next.js, etc.)
|
|
73
|
+
- [`templates/extraction.md`](templates/extraction.md) — Structured node/edge/zone extraction form
|
|
74
|
+
- [`templates/description.md`](templates/description.md) — Written description shaped for `architecture-diagrams`
|
|
75
|
+
|
|
76
|
+
## Quality bar
|
|
77
|
+
|
|
78
|
+
- **Every node has a source-of-truth file path.** No node may appear in the diagram without an evidence reference. "I think there's also a worker" is not a node.
|
|
79
|
+
- **Edges have direction *and* protocol** where the source reveals them. `payments-api --HTTPS--> stripe-api` beats `payments-api → stripe`.
|
|
80
|
+
- **Group by deployment boundary**, not by application-layer concern. Subgraphs are VPC / cluster / account, not "data layer" vs "service layer" — the latter is component-level, not container-level.
|
|
81
|
+
- **Don't pretend you saw what you didn't.** If config says `REDIS_URL=…` but no Redis is in IaC, mark it `external (unverified)` rather than silently drawing it as "managed Redis".
|
|
82
|
+
- **Cite the README's claims rather than parrot them.** "README claims X uses Kafka. Verified: kafka-go in go.mod and Confluent client config in `config/prod.yaml:14`." Or: "README claims X uses Kafka — *not verified*, no Kafka client found in dependencies."
|
|
83
|
+
|
|
84
|
+
## When to use this skill
|
|
85
|
+
|
|
86
|
+
- ✅ Onboarding doc / "how does this thing work" question for a system you didn't write.
|
|
87
|
+
- ✅ Filling in the "Current state" section of a `design-doc` before proposing a change.
|
|
88
|
+
- ✅ Pre-migration / pre-refactor — establishing the baseline before any "to-be" diagram is drawn.
|
|
89
|
+
- ✅ Audit / compliance review where the diagram has to match reality, not the slide deck from two years ago.
|
|
90
|
+
|
|
91
|
+
## When NOT to use this skill
|
|
92
|
+
|
|
93
|
+
- ❌ When the user is *proposing* something new — that's `architecture-diagrams` from a written description, not this.
|
|
94
|
+
- ❌ When the system is too small to need diagramming (one binary, one DB, no external deps). Tell the user a sentence is enough.
|
|
95
|
+
- ❌ When the only source is a deployed environment with no code/IaC access — this skill reads files; it doesn't introspect live AWS accounts.
|
|
96
|
+
|
|
97
|
+
## Anti-patterns to avoid
|
|
98
|
+
|
|
99
|
+
- ❌ Trusting the README without verifying against code. READMEs lie; code doesn't.
|
|
100
|
+
- ❌ Drawing every node in `package.json`. Most dependencies are libraries, not architectural elements. A node should be something that runs as its own process, holds state, or crosses a network boundary.
|
|
101
|
+
- ❌ Inventing service names not in the source. If a service is referenced only by env var URL, name it `external (<host>)`, not `MysteriousService`.
|
|
102
|
+
- ❌ One mega-diagram with 40 nodes. Split by level (context / container / deployment) or by domain.
|
|
103
|
+
- ❌ Skipping the "what I couldn't see" section because it looks negative. It's the most useful section for the reviewer who knows the system.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "reverse-architecture",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Reverse-engineer a system's architecture from what already exists — a code repo, Terraform / CloudFormation / Pulumi / Bicep, Kubernetes manifests, docker-compose, a database schema, an OpenAPI spec, or a package manifest — and produce a renderable diagram (Mermaid / C4 / PlantUML) plus a written description suitable for handing to architecture-diagrams. Use when the user wants to draw the system that *exists*, not one they're proposing — for onboarding docs, audit reviews, migration planning, or filling in a missing \"as-is\" architecture diagram.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["architecture-diagrams", "design-doc"],
|
|
9
|
+
"tags": ["diagrams", "reverse-engineering", "architecture", "as-is", "terraform", "kubernetes", "c4", "mermaid"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Extracts architecture from code/IaC. Escalates to opus on large codebases where cross-file inference is heavy." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# reverse-architecture — file-to-signal reference
|
|
2
|
+
|
|
3
|
+
A cheat sheet for what to read first when reverse-engineering an architecture. Use this when the obvious places (README, top-level dirs) aren't enough.
|
|
4
|
+
|
|
5
|
+
## Triage: 5-minute scan
|
|
6
|
+
|
|
7
|
+
Before reading anything deeply, run these in order:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 1. The tree (depth 2 — surface-level structure)
|
|
11
|
+
find . -maxdepth 2 -type d -not -path '*/.*'
|
|
12
|
+
|
|
13
|
+
# 2. Look for the architecture-revealing files
|
|
14
|
+
ls README* ARCHITECTURE* docs/architecture* 2>/dev/null
|
|
15
|
+
find . -maxdepth 3 -name 'docker-compose*.y*ml' -o -name 'serverless.yml' -o -name 'template.yaml' -o -name 'Dockerfile' 2>/dev/null
|
|
16
|
+
find . -maxdepth 4 -name '*.tf' -o -name '*.bicep' -o -name 'kustomization.yaml' 2>/dev/null | head -20
|
|
17
|
+
|
|
18
|
+
# 3. The stack
|
|
19
|
+
ls package.json pyproject.toml requirements.txt go.mod pom.xml Gemfile Cargo.toml 2>/dev/null
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
What you find dictates the next step. If `docker-compose.yml` exists at the root, that's the highest-signal file. If you have Terraform, start there.
|
|
23
|
+
|
|
24
|
+
## Per-source patterns
|
|
25
|
+
|
|
26
|
+
### Terraform / OpenTofu
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# What managed services are in use?
|
|
30
|
+
grep -rh '^resource "' --include='*.tf' | sort -u
|
|
31
|
+
|
|
32
|
+
# What's the data plane?
|
|
33
|
+
grep -rh 'aws_rds\|aws_dynamodb\|aws_elasticache\|aws_s3\|aws_sqs\|aws_sns\|aws_kinesis\|aws_msk' --include='*.tf'
|
|
34
|
+
|
|
35
|
+
# Ingress / public surface
|
|
36
|
+
grep -rh 'aws_lb\|aws_apigateway\|aws_cloudfront\|aws_route53_record' --include='*.tf'
|
|
37
|
+
|
|
38
|
+
# Networking
|
|
39
|
+
grep -rh 'aws_vpc\|aws_subnet\|aws_security_group\|aws_vpc_peering' --include='*.tf'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For Azure: `azurerm_*`. For GCP: `google_*`. For Pulumi/CDK: read the `*.ts` / `*.py` directly — the resource constructors are the architectural signal.
|
|
43
|
+
|
|
44
|
+
### Kubernetes / Helm
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# All services and deployments at a glance
|
|
48
|
+
grep -rE '^kind:\s+(Deployment|StatefulSet|Service|Ingress|CronJob|Job)\b' --include='*.yaml' --include='*.yml' .
|
|
49
|
+
|
|
50
|
+
# Sidecars (auth, mesh, log shipping)
|
|
51
|
+
grep -rB2 '- name:' --include='*.yaml' | grep -E 'istio-proxy|linkerd-proxy|envoy|fluent-bit|vector|otel-collector'
|
|
52
|
+
|
|
53
|
+
# Ingresses ⇒ external surface
|
|
54
|
+
grep -rB1 'host:' --include='*.yaml' | grep -A1 'kind: Ingress\|kind: VirtualService'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
In Helm charts, `values.yaml` often has more architecture signal than the templates — features get toggled on/off there.
|
|
58
|
+
|
|
59
|
+
### docker-compose
|
|
60
|
+
|
|
61
|
+
The service graph IS the file. Read top to bottom; pay attention to:
|
|
62
|
+
|
|
63
|
+
- `services:` — each is a node.
|
|
64
|
+
- `depends_on:` — directional edge (startup, not necessarily runtime).
|
|
65
|
+
- `networks:` — zones.
|
|
66
|
+
- `ports:` — `"x:y"` means external, no `ports:` means internal-only.
|
|
67
|
+
- `image:` — datastores (`postgres`, `redis`, `rabbitmq`) become cylinder nodes.
|
|
68
|
+
|
|
69
|
+
### Package manifests
|
|
70
|
+
|
|
71
|
+
These tell you the *stack*, not the topology. Use them to translate generic boxes into specific tech:
|
|
72
|
+
|
|
73
|
+
| Dep seen | What it means architecturally |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `axios`, `node-fetch`, `requests`, `httpx`, `reqwest` | Sync HTTP calls to external services |
|
|
76
|
+
| `kafkajs`, `confluent-kafka`, `kafka-go`, `sarama` | Kafka producer/consumer — async edge |
|
|
77
|
+
| `bullmq`, `celery`, `sidekiq`, `rq`, `dramatiq` | Job queue — worker pattern |
|
|
78
|
+
| `redis`, `ioredis`, `redis-py` | Redis cache / pub-sub |
|
|
79
|
+
| `pg`, `psycopg`, `pgx`, `gorm`, `sqlalchemy`, `prisma`, `typeorm` | Postgres |
|
|
80
|
+
| `mongodb`, `mongoose`, `pymongo` | MongoDB |
|
|
81
|
+
| `@aws-sdk/*`, `boto3`, `aws-sdk-go` | Look for which clients are imported — that's the AWS surface |
|
|
82
|
+
| `passport`, `next-auth`, `auth0`, `clerk`, `oidc-client` | Auth provider |
|
|
83
|
+
| `@grpc/grpc-js`, `grpcio`, `connect-go` | gRPC edges |
|
|
84
|
+
| `socket.io`, `ws`, `websockets` | WebSocket edges — long-lived connection |
|
|
85
|
+
| `stripe`, `twilio`, `sendgrid`, `posthog` | External SaaS dependency |
|
|
86
|
+
|
|
87
|
+
### Source tree
|
|
88
|
+
|
|
89
|
+
Look at the depth-1 and depth-2 directories. Common patterns:
|
|
90
|
+
|
|
91
|
+
- `services/<name>/` or `apps/<name>/` — monorepo with multiple deployables; each `<name>` is a container.
|
|
92
|
+
- `cmd/<binary>/` (Go) — each subdir is a separate binary, each is a container.
|
|
93
|
+
- `src/`, `lib/`, `internal/` — single deployable; you're looking at component-level structure.
|
|
94
|
+
- `packages/` (npm/pnpm/yarn workspaces) — libraries shared between containers, not containers themselves. Don't draw them at container level.
|
|
95
|
+
|
|
96
|
+
### OpenAPI / proto / GraphQL
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
find . -name 'openapi.y*ml' -o -name '*.proto' -o -name '*.graphql' -o -name 'schema.graphql' | head
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- OpenAPI `paths:` → public API surface — list 5–10 example operations to characterize the service in one line.
|
|
103
|
+
- `.proto` `service { rpc ... }` → gRPC service definition.
|
|
104
|
+
- GraphQL `type Query` / `type Mutation` → frontend → backend contract.
|
|
105
|
+
|
|
106
|
+
### Database schema
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
find . -name 'schema.prisma' -o -name 'schema.sql' -o -path '*/migrations/*.sql' -o -path '*/models/*' | head -20
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For the diagram, the key signals are:
|
|
113
|
+
|
|
114
|
+
- Which entities exist (top 10–15 tables).
|
|
115
|
+
- Which FK relationships span what would otherwise be two separate services — that's a sign of *coupling* worth showing on the diagram.
|
|
116
|
+
- Whether there are obvious tenancy columns (`tenant_id`, `org_id`) — single-tenant vs multi-tenant matters at container level.
|
|
117
|
+
|
|
118
|
+
### Config / env
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# External hostnames in env config
|
|
122
|
+
grep -rh 'https://\|http://' .env.example config/ application*.properties 2>/dev/null | grep -v localhost | sort -u
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
These are often the *only* signal that an external SaaS is in the loop.
|
|
126
|
+
|
|
127
|
+
### CI / deploy
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Where does this thing actually deploy to?
|
|
131
|
+
grep -rE 'aws-region|gcp-project|kubeconfig|cluster:|environment:' .github/workflows/ .gitlab-ci.yml 2>/dev/null
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Useful for the deployment-level diagram (regions, environments).
|
|
135
|
+
|
|
136
|
+
## Common gotchas
|
|
137
|
+
|
|
138
|
+
- **Mono-repos vs. multi-repo:** if you see `services/*` directories each with their own `package.json`, treat each as a separate container. Don't merge them.
|
|
139
|
+
- **Backwards Helm templates:** Helm `_helpers.tpl` and `values.yaml` are where the real config lives; the `.yaml` templates are just substrate.
|
|
140
|
+
- **CDK / Pulumi:** the constructor calls (`new lambda.Function(…)`, `new aws.s3.Bucket(…)`) ARE the IaC. Read them like resource blocks.
|
|
141
|
+
- **Service mesh sidecars:** if every pod has an `istio-proxy` container, don't draw it on every node — call it out once in the description and assume it.
|
|
142
|
+
- **Library vs service:** something with no `Dockerfile`, no `main` entrypoint, and no `package.json` `bin` field is probably a library, not a container.
|
|
143
|
+
|
|
144
|
+
## When the code is missing signal
|
|
145
|
+
|
|
146
|
+
Sometimes you just don't have enough. Be explicit:
|
|
147
|
+
|
|
148
|
+
> "I can see the API services and the Postgres, but no IaC is in the repo and there's no docker-compose, so I can't tell where this runs (Kubernetes? ECS? bare VMs?) or what the ingress / load balancer is. The diagram below shows containers only; deployment topology is `unknown` pending IaC or a screenshot of the cloud console."
|
|
149
|
+
|
|
150
|
+
The diagram with explicit gaps is more useful than a diagram that pretends.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Architecture Description
|
|
2
|
+
|
|
3
|
+
> Output shape: feeds directly into `/architecture-diagrams` if the user wants to switch notation.
|
|
4
|
+
> Source: reverse-engineered from `{repo / files}` on `{YYYY-MM-DD}`.
|
|
5
|
+
|
|
6
|
+
## What the system is
|
|
7
|
+
{One sentence.}
|
|
8
|
+
|
|
9
|
+
## Actors and external systems
|
|
10
|
+
- `{User type}` interacts via `{channel}` — e.g. browser, mobile app, partner API.
|
|
11
|
+
- `{External system}` — relationship: `{consumer / provider / both}`.
|
|
12
|
+
|
|
13
|
+
## Containers (the deployables)
|
|
14
|
+
For each, one line:
|
|
15
|
+
|
|
16
|
+
- **`{name}`** — `{language/runtime}` — purpose: `{one phrase}` — runs on: `{platform if known}`.
|
|
17
|
+
|
|
18
|
+
## Datastores and state
|
|
19
|
+
- **`{name}`** — `{engine}` — owned by: `{service name}` — purpose: `{e.g. "checkout transactional store"}`.
|
|
20
|
+
|
|
21
|
+
## Inbound surface
|
|
22
|
+
- Public ingress: `{HTTPS via {ALB | CloudFront | API Gateway | Ingress controller}}` — routes to: `{services}`.
|
|
23
|
+
- Authentication: `{mechanism, e.g. "Cognito JWT", "Auth0 OIDC", "internal session cookie"}`.
|
|
24
|
+
|
|
25
|
+
## Internal traffic
|
|
26
|
+
- `{service A} → {service B}` — `{protocol}` — purpose: `{what call is being made}`.
|
|
27
|
+
- `{service C} ⇢ {queue} ⇢ {worker}` — `{async, e.g. via Kafka topic "orders.created"}`.
|
|
28
|
+
|
|
29
|
+
## External dependencies (third-party SaaS)
|
|
30
|
+
- `{vendor}` — used for: `{purpose}` — called from: `{service}`.
|
|
31
|
+
|
|
32
|
+
## Deployment topology (if known)
|
|
33
|
+
- Cloud: `{AWS | Azure | GCP | on-prem | mixed}`.
|
|
34
|
+
- Regions: `{list}`.
|
|
35
|
+
- Compute: `{EKS cluster name / ECS service / Lambda functions / VMs}`.
|
|
36
|
+
- Network: `{VPC layout if discernible}`.
|
|
37
|
+
|
|
38
|
+
## Trust boundaries
|
|
39
|
+
- {Where does data cross a security/trust boundary — e.g. "client → API Gateway", "internal → vendor", "account A → account B"}.
|
|
40
|
+
|
|
41
|
+
## Known unknowns
|
|
42
|
+
- {Anything in the extraction's "What I couldn't see" — verbatim, so the next reader knows the diagram's limits.}
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Drawing hints for the diagram
|
|
47
|
+
|
|
48
|
+
- **Direction:** `LR` (request flow reads left-to-right) for container level, `TD` (deployment stack) for deployment level.
|
|
49
|
+
- **Group by:** {VPC | cluster | account | region — whichever boundary is most load-bearing in this system}.
|
|
50
|
+
- **Edge style:** solid for sync, dashed for async.
|
|
51
|
+
- **Label edges that cross a boundary** (trust, network, account) — that's where the value of the diagram concentrates.
|
|
52
|
+
- **Cap at ~15 nodes.** If this description has more, split — typically into `{Frontend stack}` and `{Backend stack}`, or by domain.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Architecture Extraction
|
|
2
|
+
|
|
3
|
+
> Reverse-engineered from: `{repo path or set of input files}`
|
|
4
|
+
> Level: `{context | container (default) | component | deployment}`
|
|
5
|
+
> Extracted: `{YYYY-MM-DD}`
|
|
6
|
+
|
|
7
|
+
## System purpose
|
|
8
|
+
{One sentence — what the system does. From README if available, verified against code.}
|
|
9
|
+
|
|
10
|
+
## External actors
|
|
11
|
+
- `{Actor name}` — {role, e.g. "end user", "partner system", "admin tool"} — _evidence: `{file path}`_
|
|
12
|
+
|
|
13
|
+
## Nodes
|
|
14
|
+
|
|
15
|
+
For each: name · type · stack/tech · evidence path.
|
|
16
|
+
|
|
17
|
+
| # | Name | Type | Stack | Evidence |
|
|
18
|
+
|---|---|---|---|---|
|
|
19
|
+
| 1 | `{name}` | service / job / queue / cache / db / external | {language/runtime} | `{path/to/file:line}` |
|
|
20
|
+
| 2 | | | | |
|
|
21
|
+
|
|
22
|
+
**Type vocabulary:**
|
|
23
|
+
- `service` — long-running process serving requests
|
|
24
|
+
- `job` — periodic / triggered batch
|
|
25
|
+
- `worker` — long-running consumer of a queue
|
|
26
|
+
- `queue` — Kafka topic, SQS queue, RabbitMQ exchange, etc.
|
|
27
|
+
- `db` — datastore (Postgres, Mongo, Dynamo, …)
|
|
28
|
+
- `cache` — Redis, Memcached, in-memory
|
|
29
|
+
- `object-store` — S3, GCS, blob storage
|
|
30
|
+
- `external` — third-party SaaS or system outside the codebase
|
|
31
|
+
|
|
32
|
+
## Edges
|
|
33
|
+
|
|
34
|
+
For each: source → target · protocol · sync/async · evidence.
|
|
35
|
+
|
|
36
|
+
| # | From | To | Protocol | Sync/Async | Evidence |
|
|
37
|
+
|---|---|---|---|---|---|
|
|
38
|
+
| 1 | `{node}` | `{node}` | HTTPS / gRPC / Kafka / SQS / SQL / Redis | sync / async | `{path}` |
|
|
39
|
+
| 2 | | | | | |
|
|
40
|
+
|
|
41
|
+
## Zones / boundaries
|
|
42
|
+
- **{Zone name}** ({type: VPC / account / region / cluster / trust boundary}) — contains: `{node, node, node}` — _evidence: `{path}`_
|
|
43
|
+
|
|
44
|
+
## Datastores (detail)
|
|
45
|
+
- `{db name}` — {engine + version} — owns: `{top 5 tables/entities}` — _evidence: `{schema file}`_
|
|
46
|
+
|
|
47
|
+
## Inferred / unverified
|
|
48
|
+
Things present in code/config but not fully confirmed. The diagram marks these with `?` or dashed edges.
|
|
49
|
+
|
|
50
|
+
- `{node or edge}` — _signal: `{what made you think it exists}`_ — _why unverified: `{what's missing}`_
|
|
51
|
+
|
|
52
|
+
## What I couldn't see
|
|
53
|
+
- {e.g. "No IaC in repo — deployment topology unknown"}
|
|
54
|
+
- {e.g. "No load-test artifacts — actual scale targets unknown"}
|
|
55
|
+
- {e.g. "Async paths suspected (kafka-go in go.mod) but no topic config found"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: runbook-generator
|
|
3
|
+
description: Generate an operational runbook for a service — covering deploy/rollback, common incidents, on-call escalation, SLOs, dashboards, and dependencies. Use when the user is launching a new service, onboarding to on-call, or being asked for "the runbook" by SRE or production-readiness review.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# runbook-generator
|
|
7
|
+
|
|
8
|
+
You help the user produce a runbook that a sleep-deprived on-caller at 3am can actually use.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
1. **Understand the service.** Before drafting, you need:
|
|
13
|
+
- **Service name + one-line purpose** ("`payments-api` — handles checkout and refund requests")
|
|
14
|
+
- **Owners** (team + escalation chain)
|
|
15
|
+
- **Tech stack** (language, runtime, storage, message brokers)
|
|
16
|
+
- **Deployment surface** (Kubernetes namespace, ECS cluster, Lambda, …)
|
|
17
|
+
|
|
18
|
+
If multiple of these are missing, ask. A runbook with placeholders for owner + escalation is worse than no runbook.
|
|
19
|
+
|
|
20
|
+
2. **Use [`templates/runbook.md`](templates/runbook.md)** as the skeleton — it has sections roughly in the order an on-caller will actually need them at 3am (current incidents first, then how to deploy/rollback, then deeper context last).
|
|
21
|
+
|
|
22
|
+
3. **Bias toward concrete commands over prose.** "Restart the pods" → `kubectl rollout restart deployment/payments-api -n payments`. The runbook should be paste-able.
|
|
23
|
+
|
|
24
|
+
4. **Cover the "common 5" incidents.** Every service has ~5 failure modes that account for 80% of pages. Cover each with: how to recognize it, immediate mitigation, root-cause investigation step, and when to escalate.
|
|
25
|
+
|
|
26
|
+
If the user can't list 5, ask: "what's caused the most pages over the last quarter?" The honest answer is the most valuable section of the runbook.
|
|
27
|
+
|
|
28
|
+
5. **Link, don't inline.** Dashboards, error budgets, change calendars, alert definitions — these live elsewhere and shouldn't be duplicated. Link with a one-line description so the on-caller knows what they'll find.
|
|
29
|
+
|
|
30
|
+
## Quality bar
|
|
31
|
+
|
|
32
|
+
- **Owner info is current.** Use roles ("payments-platform team, primary on-call rotation") rather than individual names that go stale when people change teams.
|
|
33
|
+
- **Every alert listed has a response.** A "what to do when this alert fires" section that doesn't cover all the alerts is worse than no section.
|
|
34
|
+
- **Rollback is one command, or three steps max.** If rollback is complicated, write a script and link to it.
|
|
35
|
+
- **No "TBD" left in the doc when it's published.** Move TBDs to a "known gaps" section so they're explicit, not hidden.
|
|
36
|
+
|
|
37
|
+
## Anti-patterns to avoid
|
|
38
|
+
|
|
39
|
+
- ❌ Architecture diagrams in the runbook. (Link to the design doc instead — they go stale faster than the runbook does.)
|
|
40
|
+
- ❌ Long backstory before the operational commands.
|
|
41
|
+
- ❌ "Page X if you're not sure" without saying *what X knows that you don't*.
|
|
42
|
+
- ❌ Listing every metric Prometheus has. Pick the 5–10 that actually predict outages.
|