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,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nfr-spec
|
|
3
|
+
description: Sweep a feature or system through the full non-functional requirements catalog — performance, throughput, availability, durability, privacy/retention, accessibility, i18n, observability, operability, compatibility, cost — forcing every category to a measurable target, an explicit n/a, or a tagged default. Use when the user needs NFRs, quality attributes, "how fast/reliable does it need to be", SLO targets for a feature, or the requirements everyone forgets until they're incidents.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# nfr-spec
|
|
7
|
+
|
|
8
|
+
Gathers the requirements nobody volunteers: the business says what the feature does, this skill pins down **how well** — with numbers. Every category in the catalog ends in exactly one of three states: a **measurable target with a verification method**, an explicit **n/a with a reason**, or an **accepted default tagged `[assumption]`**. Silence is the one forbidden state. Downstream of `prd-draft`; feeds `design-doc` (targets shape the architecture), `test-plan-generator` (verification methods become test cases), and `threat-model` (security depth lives there, not here).
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
1. **Classify the system first** — the archetype sets the defaults: customer-facing SaaS, internal tool, public API, batch/pipeline, mobile/edge. Ask at most 2 questions, spent on the two answers that move the most targets: **user-facing or internal**, and **what happens when it's down for an hour** (the honest availability requirement hides in that answer). Everything else: archetype default + `[assumption]`.
|
|
13
|
+
|
|
14
|
+
2. **Sweep every category in [`reference.md`](reference.md)** — performance/latency, throughput/capacity, availability/SLO, durability/backup/DR, privacy/retention/residency, accessibility, i18n/l10n, observability, operability, compatibility, cost. For each: target, verification, or n/a-with-reason. The output includes the **full ledger** so a reviewer sees the sweep happened — a skipped category is indistinguishable from a forgotten one otherwise.
|
|
15
|
+
|
|
16
|
+
3. **Force numbers tied to business reality, not aspiration.** ✅ *"p95 search < 800ms at 2× current peak (peak = 120 rps `[data: April dashboard]`)"* — ❌ *"sub-second response times"* (which percentile? at what load?) — ❌ *"99.999% availability"* for an internal tool whose users sleep at night (five nines costs 100× three nines; the archetype default exists to stop this).
|
|
17
|
+
|
|
18
|
+
4. **Attach a verification method to every target** — the method that would prove it before launch, not after: load test at stated volume, chaos drill, restore-from-backup rehearsal, axe-core scan + screen-reader pass, locale pseudo-translation run, cost projection at target volume. An NFR without a verification is a hope with units. These methods hand straight to `test-plan-generator`.
|
|
19
|
+
|
|
20
|
+
5. **Make retention and deletion first-class.** For every data class the feature touches: what's stored, how long, where (residency), and **how deletion actually happens** (user-triggered, TTL, legal hold override). "We keep it forever" is a decision with legal weight — make it visible, never implicit.
|
|
21
|
+
|
|
22
|
+
6. **State observability as requirements, not tooling.** What must be answerable at 3am: ✅ *"On-call can see per-tenant error rate and the last deploy time within 2 minutes of an alert"* — ❌ *"Use Datadog"*. The instrument choice is `design-doc`'s; the questions-it-must-answer are NFRs.
|
|
23
|
+
|
|
24
|
+
7. **Point, don't duplicate, for security.** One line stating the auth/data-classification posture, then hand depth to `threat-model`. An NFR doc with a 3-page security section has stolen another skill's job and done it worse.
|
|
25
|
+
|
|
26
|
+
8. **Emit with [`templates/nfr-spec.md`](templates/nfr-spec.md)**: summary table (category / target / verification / state), per-category detail, the n/a ledger, assumptions log, and the handoff map.
|
|
27
|
+
|
|
28
|
+
## Useful references in this skill
|
|
29
|
+
|
|
30
|
+
- [`reference.md`](reference.md) — the category catalog with per-archetype defaults and the verification menu
|
|
31
|
+
- [`templates/nfr-spec.md`](templates/nfr-spec.md) — the ledger-style output skeleton
|
|
32
|
+
|
|
33
|
+
## Quality bar
|
|
34
|
+
|
|
35
|
+
- **Every category lands in one of three states** — target, n/a-with-reason, or tagged default. The ledger shows all of them; silence fails the doc.
|
|
36
|
+
- **Every target has a percentile, a load condition, and a verification.** A latency number without load is a screenshot of a quiet day.
|
|
37
|
+
- **Availability matches the down-for-an-hour answer**, not the marketing instinct. The cost of each extra nine is named when the target exceeds the archetype default.
|
|
38
|
+
- **Every data class has a retention period and a deletion mechanism.** "Indefinite" is written as the decision it is.
|
|
39
|
+
- **Accessibility names level and scope** — "WCAG 2.2 AA on all agent-facing screens, axe + manual screen-reader pass" — not "accessible".
|
|
40
|
+
- **Cost has a number at target volume**, or a tagged `[assumption]` placeholder that explicitly hands the sizing to `capacity-cost-model`. Either way the line is present — an NFR spec that's silent on cost has delegated it to the first invoice.
|
|
41
|
+
|
|
42
|
+
## When to use this skill
|
|
43
|
+
|
|
44
|
+
- ✅ A PRD is done and the quality targets need pinning before design
|
|
45
|
+
- ✅ "How fast / how reliable / how much does this need to be?"
|
|
46
|
+
- ✅ Defining SLOs for a new service or feature
|
|
47
|
+
- ✅ A legacy system getting its implicit NFRs written down for the first time
|
|
48
|
+
|
|
49
|
+
## When NOT to use this skill
|
|
50
|
+
|
|
51
|
+
- ❌ Functional requirements — that's `prd-draft`
|
|
52
|
+
- ❌ Security threat depth — one posture line here, the analysis is `threat-model`
|
|
53
|
+
- ❌ Designing the architecture that meets the targets — `design-doc`
|
|
54
|
+
- ❌ Writing the verification tests themselves — hand the methods to `test-plan-generator`
|
|
55
|
+
|
|
56
|
+
## Anti-patterns to avoid
|
|
57
|
+
|
|
58
|
+
- ❌ **"As fast as possible."** That's a budget of infinity. Every performance target gets a percentile, a number, and a load.
|
|
59
|
+
- ❌ **Five-nines cargo cult.** Availability copied from a FAANG blog onto an internal CRUD tool — each nine multiplies cost; the down-for-an-hour question calibrates honestly.
|
|
60
|
+
- ❌ **Uniform targets.** The same p95 for search, checkout, and a monthly export means nobody thought about any of them.
|
|
61
|
+
- ❌ **"GDPR compliant" as the entire privacy section.** Which data, retained how long, deleted how, stored where — compliance is the output of those answers, not a substitute for them.
|
|
62
|
+
- ❌ **Tool names as observability requirements.** "Use Prometheus" survives a migration to nothing; "alert fires within 2 min of error-rate breach" survives any tool.
|
|
63
|
+
- ❌ **Untestable NFRs.** "The system shall be maintainable" — if no verification method exists, it's culture, not a requirement; cut it or make it measurable.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nfr-spec",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Sweep a feature or system through the full non-functional requirements catalog — performance, throughput, availability, durability, privacy/retention, accessibility, i18n, observability, operability, compatibility, cost — forcing every category to a measurable target, an explicit n/a, or a tagged default. Use when the user needs NFRs, quality attributes, \"how fast/reliable does it need to be\", SLO targets for a feature, or the requirements everyone forgets until they're incidents.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["capacity-cost-model", "design-doc", "prd-draft", "test-plan-generator", "threat-model"],
|
|
9
|
+
"tags": ["nfr", "requirements", "slo", "performance", "availability", "quality-attributes"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Rubric-driven sweep with archetype defaults; the judgment is calibrating targets to business reality. Bounded by the catalog; escalate via ambiguous-input on contested SLOs." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# nfr-spec reference — category catalog, archetype defaults, verification menu
|
|
2
|
+
|
|
3
|
+
Defaults are starting points, always tagged `[assumption]` in the output. The archetype row is chosen once in step 1 and reused everywhere.
|
|
4
|
+
|
|
5
|
+
## Archetypes
|
|
6
|
+
|
|
7
|
+
| Archetype | Examples | Posture |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| customer-facing SaaS | checkout, dashboards | user-perceived latency and availability dominate |
|
|
10
|
+
| internal tool | admin panels, back-office | availability honesty — business hours usually suffice |
|
|
11
|
+
| public API | partner integrations | contract stability, rate limits, versioning weight |
|
|
12
|
+
| batch / pipeline | ETL, reports, billing runs | completion deadlines and replayability, not latency |
|
|
13
|
+
| mobile / edge | apps, POS | offline behavior, payload size, OS-version spread |
|
|
14
|
+
|
|
15
|
+
## Category catalog (sweep all 11 — every one lands in target / n/a+reason / default+tag)
|
|
16
|
+
|
|
17
|
+
### 1. Performance / latency
|
|
18
|
+
Target shape: `p50/p95 < N ms for {operation} at {load}`. Per key operation, not uniform.
|
|
19
|
+
Defaults: SaaS interactive p95 < 500ms; internal tool p95 < 2s; API p95 < 300ms; batch n/a → see deadline; mobile interaction < 100ms perceived.
|
|
20
|
+
|
|
21
|
+
### 2. Throughput / capacity
|
|
22
|
+
Target shape: `sustains N rps / M jobs/hr at target latency; designed headroom ×K`.
|
|
23
|
+
Defaults: 2× current peak headroom; batch: completes within window at 3× current data volume.
|
|
24
|
+
|
|
25
|
+
### 3. Availability / SLO
|
|
26
|
+
Target shape: `N% monthly, measured at {user-visible boundary}; error budget stated`.
|
|
27
|
+
Defaults: SaaS 99.9%; internal tool 99.5% business-hours; public API 99.95%; batch: deadline-based ("billing run completes by 06:00, 99% of months").
|
|
28
|
+
Calibrate with the down-for-an-hour answer; name the cost when exceeding the default — each nine roughly 10×es the engineering.
|
|
29
|
+
|
|
30
|
+
### 4. Durability / backup / DR
|
|
31
|
+
Target shape: `RPO ≤ N min, RTO ≤ M min; backup restore rehearsed {cadence}`.
|
|
32
|
+
Defaults: transactional data RPO ≤ 5 min / RTO ≤ 1h; derived/rebuildable data RPO n/a with reason "recomputable from source in N h".
|
|
33
|
+
|
|
34
|
+
### 5. Privacy / retention / residency
|
|
35
|
+
Per data class: what's stored · classification (PII? payment? health?) · retention period · deletion mechanism (user-triggered / TTL / legal hold) · residency constraint.
|
|
36
|
+
Default: no new PII without a named retention period; "indefinite" written explicitly as a decision.
|
|
37
|
+
|
|
38
|
+
### 6. Accessibility
|
|
39
|
+
Target shape: `WCAG {version} {level} on {scope}; verified by {automated + manual}`.
|
|
40
|
+
Defaults: customer-facing WCAG 2.2 AA; internal tools AA for core flows `[assumption — confirm with HR/legal jurisdiction]`.
|
|
41
|
+
|
|
42
|
+
### 7. Internationalization / localization
|
|
43
|
+
Target shape: locales supported at launch; text expansion tolerance; date/number/currency handling; RTL yes/no.
|
|
44
|
+
Default: single-locale launch is fine **if stated**; unicode-correct storage is non-negotiable either way.
|
|
45
|
+
|
|
46
|
+
### 8. Observability
|
|
47
|
+
Requirement shape: the 3am questions — `on-call can answer {question} within {time}` — plus alert conditions with thresholds and a paging severity. Tool names excluded.
|
|
48
|
+
Default minimum: error rate, latency, and saturation per surface; alert before users notice (burn-rate, not static threshold, for SLO'd surfaces); every alert maps to a runbook entry (→ `runbook-generator`).
|
|
49
|
+
|
|
50
|
+
### 9. Operability
|
|
51
|
+
Deploy/rollback time targets, config-change blast radius, feature-flag kill switch, dependency-down behavior (degrade vs fail closed — chosen per dependency).
|
|
52
|
+
Default: rollback ≤ 15 min; every new external dependency gets an explicit down-behavior.
|
|
53
|
+
|
|
54
|
+
### 10. Compatibility
|
|
55
|
+
Browsers/devices/OS floor; API consumer versions honored; data-format backward compatibility window.
|
|
56
|
+
Default: SaaS = last 2 major browser versions; API = no breaking change without version bump (→ `api-contract-draft` policy).
|
|
57
|
+
|
|
58
|
+
### 11. Cost
|
|
59
|
+
Target shape: `≤ $N/month at target volume; alert at 80%`. Include the per-unit driver (per-tenant, per-GB, per-1k-requests).
|
|
60
|
+
Default: projection required before launch; "we'll see" fails the ledger.
|
|
61
|
+
|
|
62
|
+
## Verification menu (every target picks at least one)
|
|
63
|
+
|
|
64
|
+
| Method | Proves |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Load test at stated volume + headroom | latency, throughput |
|
|
67
|
+
| Chaos / dependency-kill drill | availability, dependency-down behavior |
|
|
68
|
+
| Backup-restore rehearsal (timed) | RPO/RTO are real, not configured |
|
|
69
|
+
| Deletion end-to-end test (incl. backups/replicas) | retention/deletion actually deletes |
|
|
70
|
+
| axe-core + manual screen-reader pass | accessibility level on scope |
|
|
71
|
+
| Pseudo-locale build (text expansion, RTL) | i18n readiness |
|
|
72
|
+
| Game-day: answer the 3am questions on a stage incident | observability requirements |
|
|
73
|
+
| Timed rollback drill | operability targets |
|
|
74
|
+
| Cost projection reviewed against first month's bill | cost model honesty |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# NFR-spec template
|
|
2
|
+
|
|
3
|
+
The ledger is the contract: all 11 categories appear, each in exactly one state — **target** / **n/a (reason)** / **default `[assumption]`**.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# NFR spec: {feature / system}
|
|
7
|
+
|
|
8
|
+
**Archetype:** {customer-facing SaaS | internal tool | public API | batch | mobile/edge}
|
|
9
|
+
**Down-for-an-hour answer:** {verbatim from stakeholder — calibrates availability} `[reported]`
|
|
10
|
+
**Date:** {YYYY-MM-DD} · **Feeds:** design-doc, test-plan-generator, threat-model
|
|
11
|
+
|
|
12
|
+
## Ledger (all 11 — no silent rows)
|
|
13
|
+
|
|
14
|
+
| # | Category | State | Target / reason | Verification |
|
|
15
|
+
|---|---|---|---|---|
|
|
16
|
+
| 1 | Performance | target | p95 < 800ms search @ 2× peak (120 rps) | load test |
|
|
17
|
+
| 2 | Throughput | default `[assumption]` | 2× peak headroom | load test |
|
|
18
|
+
| 3 | Availability | target | 99.9% monthly, user-visible boundary | chaos drill + SLO dashboard |
|
|
19
|
+
| 4 | Durability/DR | target | RPO ≤ 5min, RTO ≤ 1h | timed restore rehearsal |
|
|
20
|
+
| 5 | Privacy/retention | target | see data-class table | deletion end-to-end test |
|
|
21
|
+
| 6 | Accessibility | target | WCAG 2.2 AA, all customer screens | axe + screen-reader pass |
|
|
22
|
+
| 7 | i18n | n/a | single-locale launch, stated in PRD non-goals | — |
|
|
23
|
+
| 8 | Observability | target | 3am questions below | game-day |
|
|
24
|
+
| 9 | Operability | default `[assumption]` | rollback ≤ 15 min; per-dep down-behavior | rollback drill |
|
|
25
|
+
| 10 | Compatibility | default `[assumption]` | last 2 major browsers | CI matrix |
|
|
26
|
+
| 11 | Cost | target | ≤ $N/mo @ target volume, alert at 80% | projection vs first bill |
|
|
27
|
+
|
|
28
|
+
## Per-category detail
|
|
29
|
+
|
|
30
|
+
{One block per non-n/a row: the target restated with its load condition and
|
|
31
|
+
source of the numbers, the verification method, and who owns it.}
|
|
32
|
+
|
|
33
|
+
## Data classes (category 5 expanded)
|
|
34
|
+
|
|
35
|
+
| Data | Classification | Retention | Deletion mechanism | Residency |
|
|
36
|
+
|---|---|---|---|---|
|
|
37
|
+
| {what} | {PII/payment/none} | {period or "indefinite — explicit decision"} | {TTL / user-triggered / legal-hold-aware} | {constraint or none} |
|
|
38
|
+
|
|
39
|
+
## 3am questions (category 8 expanded)
|
|
40
|
+
|
|
41
|
+
- On-call can answer "{question}" within {time}, from {alert/dashboard}.
|
|
42
|
+
- Alert: {condition + threshold + paging severity} → runbook entry: {ref}.
|
|
43
|
+
|
|
44
|
+
## Security posture (one line — depth lives in threat-model)
|
|
45
|
+
|
|
46
|
+
{e.g. "Authn via platform SSO; tenant-scoped authz; PII per table above. Full analysis: threat-model."}
|
|
47
|
+
|
|
48
|
+
## Assumptions log
|
|
49
|
+
|
|
50
|
+
- [assumption] {default taken} — confirm with {role} by {date}
|
|
51
|
+
|
|
52
|
+
## Exceeding-default justifications
|
|
53
|
+
|
|
54
|
+
{Required whenever a target beats the archetype default: "99.95% chosen over 99.9%
|
|
55
|
+
because {contractual SLA}; accepted cost: {on-call rotation, multi-AZ spend}."}
|
|
56
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: observability-plan
|
|
3
|
+
description: Design an observability plan for a service — user-journey SLIs, SLOs with error budgets, symptom-based burn-rate alerting (page vs ticket, every page actionable and runbook-linked), and a deliberate metrics/logs/traces split with a cardinality and cost budget. Use when the user needs SLOs, alerting design, a monitoring/observability strategy, dashboards, or wants to fix alert fatigue and know what to measure.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# observability-plan
|
|
7
|
+
|
|
8
|
+
Designs the telemetry that makes a service *debuggable at 3am and detectable before users complain* — SLOs measured from the user's experience, alerts that fire only when a human must act, and the three pillars each used for what they're good at. Expands the one-line observability requirement from `nfr-spec` into a full operating plan; upstream of `incident-comms` and `postmortem-generator` (you can't communicate or analyze an incident you couldn't detect). Distinct from `success-metrics` (business outcomes) — this is operational health.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
1. **Start from user journeys, not from the resource dashboard.** The first artifact is the list of critical journeys ("log in", "place order", "load feed") — because an SLI measures *what the user experiences*, and CPU graphs measure what's easy. Ask at most 2 questions, spent on the most critical journey and what "down" means to a user there. Resource metrics (the golden signals) still get covered — but as saturation/cause signals, never as the SLO.
|
|
13
|
+
|
|
14
|
+
2. **Define SLIs as good-events / valid-events from the user's side** (catalog in [`reference.md`](reference.md)) — availability (success rate), latency (a threshold, measured at a percentile: "% of requests < 300ms"), and where relevant freshness, correctness, throughput. ✅ *"SLI: proportion of checkout requests returning 2xx within 1s, measured at the load balancer"* — ❌ *"SLI: average CPU"* (the user never feels your CPU). Latency SLIs are a *threshold count*, not an average — averages hide the tail that hurts.
|
|
15
|
+
|
|
16
|
+
3. **Set SLOs with an explicit error budget and window.** Each SLI gets a target over a rolling window: "99.9% over 28 days." That target *is* the error budget (0.1% = ~40 min/28d) — the quantity that governs both alerting and how aggressively you ship. State the budget in human terms (minutes/month) and name the **error-budget policy**: what happens when it's spent (freeze risky releases, redirect to reliability) — an SLO with no policy is a number nobody defends. Pick targets honestly (99.9% is not free; see `nfr-spec`'s down-for-an-hour calibration) — more nines is exponentially more cost.
|
|
17
|
+
|
|
18
|
+
4. **Alert on symptoms, page only on what's actionable now.** The hard rule that kills alert fatigue: **a page means a human must act immediately; everything else is a ticket or a dashboard.** Alert on SLO burn (the user is being hurt), not on every cause (a single CPU spike that auto-recovered). Cause-based signals inform diagnosis once you're paged — they don't page. Use **multi-window, multi-burn-rate alerts** ([`reference.md`](reference.md)): a fast burn (budget being consumed quickly) pages; a slow burn opens a ticket. Every page is actionable, deduplicated, severity-tiered, and **maps to a runbook entry** (→ `runbook-generator`) — a page with no runbook is a 3am puzzle, not an alert.
|
|
19
|
+
|
|
20
|
+
5. **Split the three pillars deliberately — each for what it's good at:**
|
|
21
|
+
- **Metrics** — cheap, aggregatable, the basis of SLOs and alerts. Low-cardinality. Answer "is it broken and how much?"
|
|
22
|
+
- **Logs** — expensive, high-detail, for debugging the specific failure. **Structured** (not string soup), sampled on the hot path, with a retention/cost budget. Answer "what exactly happened to this request?"
|
|
23
|
+
- **Traces** — request flow across services, for "where in the chain did the latency/error come from?" Sample intelligently (tail-based on errors/slow); propagate context across every hop.
|
|
24
|
+
Don't put in logs what should be a metric (cardinality and cost explode), and don't try to metric what needs a trace (you'll never reconstruct the path from counters).
|
|
25
|
+
|
|
26
|
+
6. **Set a cardinality and cost budget.** High-cardinality labels (user_id, request_id, full URL) on metrics multiply time series and the bill without bound — name which labels are allowed on metrics (bounded sets: region, status_class, endpoint-template) and push the high-cardinality identifiers to logs/traces where they belong. State the log-volume and metric-series budget (ties to `capacity-cost-model`); observability is routinely a top-3 cloud line item.
|
|
27
|
+
|
|
28
|
+
7. **Specify dashboards by the question each answers**, not by graph count. A service dashboard shows the golden signals + SLO/budget status at a glance (the at-a-glance health check); a debugging dashboard supports drill-down. The 3am questions from `nfr-spec` become concrete panels. A wall of 100 graphs is where signal goes to hide.
|
|
29
|
+
|
|
30
|
+
8. **Emit with [`templates/observability-plan.md`](templates/observability-plan.md)** in one message: critical journeys, SLI/SLO table with error budgets, the error-budget policy, the alert table (condition / window / burn-rate / page-or-ticket / runbook link), the metrics-logs-traces split, the cardinality+cost budget, and dashboards-by-question. Instrumentation naming conventions and trace-context propagation noted.
|
|
31
|
+
|
|
32
|
+
## Useful references in this skill
|
|
33
|
+
|
|
34
|
+
- [`reference.md`](reference.md) — golden signals, SLI types by component, SLO/error-budget math, the multi-window burn-rate alert table, the metrics-vs-logs-vs-traces decision guide, and alert-quality rules
|
|
35
|
+
- [`templates/observability-plan.md`](templates/observability-plan.md) — the plan skeleton with SLO, alert, and pillar tables
|
|
36
|
+
|
|
37
|
+
## Quality bar
|
|
38
|
+
|
|
39
|
+
- **SLIs measure user experience** (good/valid events), not resource utilization. Latency SLIs are threshold counts at a percentile, never averages.
|
|
40
|
+
- **Every SLO has an error budget in human terms and a policy** for when it's spent. A target with no budget consequence is decoration.
|
|
41
|
+
- **Pages are actionable, symptom-based, and runbook-linked.** If a page doesn't require an immediate human action, it's a ticket — the plan re-tiers it.
|
|
42
|
+
- **Burn-rate alerting is used**, not static "CPU > 80%" thresholds, for SLO-backed surfaces.
|
|
43
|
+
- **The three pillars are split by purpose**, with high-cardinality identifiers kept off metrics. Logs are structured and budgeted.
|
|
44
|
+
- **A cardinality/cost budget exists.** Observability without a cost ceiling becomes the surprise invoice.
|
|
45
|
+
- **Dashboards are defined by the question they answer**, not by quantity.
|
|
46
|
+
|
|
47
|
+
## When to use this skill
|
|
48
|
+
|
|
49
|
+
- ✅ Standing up monitoring/SLOs for a new or existing service
|
|
50
|
+
- ✅ "What should we measure / alert on?" / designing an alerting strategy
|
|
51
|
+
- ✅ Fixing alert fatigue — too many pages, most non-actionable
|
|
52
|
+
- ✅ Turning `nfr-spec`'s observability requirement into an implementable plan
|
|
53
|
+
|
|
54
|
+
## When NOT to use this skill
|
|
55
|
+
|
|
56
|
+
- ❌ Business/product success metrics — that's `success-metrics`
|
|
57
|
+
- ❌ Customer/stakeholder comms during an outage — that's `incident-comms`
|
|
58
|
+
- ❌ The post-incident analysis — that's `postmortem-generator`
|
|
59
|
+
- ❌ The one-line observability *requirement* in a spec — that's `nfr-spec`; this is the full design beneath it
|
|
60
|
+
|
|
61
|
+
## Anti-patterns to avoid
|
|
62
|
+
|
|
63
|
+
- ❌ **Resource metrics as SLOs.** Alerting on CPU/memory/disk as if they were user pain — they auto-recover, they spike harmlessly, and they page you at 3am for nothing while the actual user-facing error goes unnoticed.
|
|
64
|
+
- ❌ **Averages for latency.** "Average response 120ms" with a p99 of 4s means a lot of users are suffering invisibly. Measure the percentile and the threshold.
|
|
65
|
+
- ❌ **Cause-based paging.** A page for every component hiccup. Page on the symptom (users hurt / budget burning fast); let causes inform diagnosis, not wake people.
|
|
66
|
+
- ❌ **The alert with no runbook.** Firing a page that says "high error rate" with no "here's what to check" — that's a puzzle handed to someone half-asleep.
|
|
67
|
+
- ❌ **Unbounded metric cardinality.** `user_id` or `request_id` as a metric label — millions of time series, a five-figure bill, and a dashboard that times out. Those belong in logs/traces.
|
|
68
|
+
- ❌ **String-soup logs.** Unstructured `printf` logs you can't query or aggregate, retained forever at full volume. Structure them, sample the hot path, budget the retention.
|
|
69
|
+
- ❌ **The 100-graph dashboard.** Built to look thorough, used by no one, because no panel answers a question anyone asks under pressure.
|
|
70
|
+
- ❌ **99.99% by reflex.** Copying a target off a blog instead of from the down-for-an-hour cost calibration; every nine multiplies the engineering and on-call burden.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "observability-plan",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Design an observability plan for a service — user-journey SLIs, SLOs with error budgets, symptom-based burn-rate alerting (page vs ticket, every page actionable and runbook-linked), and a deliberate metrics/logs/traces split with a cardinality and cost budget. Use when the user needs SLOs, alerting design, a monitoring/observability strategy, dashboards, or wants to fix alert fatigue and know what to measure.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["capacity-cost-model", "incident-comms", "nfr-spec", "postmortem-generator", "runbook-generator", "success-metrics"],
|
|
9
|
+
"tags": ["observability", "slo", "sli", "alerting", "monitoring", "sre"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Methodology synthesis against fixed SRE practices (golden signals, burn-rate alerting, pillar split). SLO calibration needs judgment but is bounded; escalate via ambiguous-input on contested reliability targets." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# observability-plan reference — signals, SLO math, burn-rate alerts, pillar split
|
|
2
|
+
|
|
3
|
+
## The golden signals (cover all four; they're cause/saturation signals, not SLOs by default)
|
|
4
|
+
|
|
5
|
+
| Signal | Question | Typical measure |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| **Latency** | how slow? (split success vs error latency) | p50/p95/p99 against a threshold |
|
|
8
|
+
| **Traffic** | how much demand? | rps, requests/min, active connections |
|
|
9
|
+
| **Errors** | how often failing? | error rate, by class (5xx vs 4xx) |
|
|
10
|
+
| **Saturation** | how full? | CPU/mem/queue depth/connection-pool % — the leading indicator of trouble |
|
|
11
|
+
|
|
12
|
+
User-facing **latency + errors** usually become SLIs; **saturation** is the early-warning/cause signal that informs diagnosis, not the page.
|
|
13
|
+
|
|
14
|
+
## SLI types (good events / valid events, from the user's side)
|
|
15
|
+
|
|
16
|
+
| SLI | Definition | Measured where |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| Availability | successful responses / valid requests | LB / gateway / client |
|
|
19
|
+
| Latency | requests faster than threshold / valid requests | same vantage as the user |
|
|
20
|
+
| Freshness | data served within max staleness / reads | for caches, pipelines, replicas |
|
|
21
|
+
| Correctness | correct outputs / total (where checkable) | post-processing validation |
|
|
22
|
+
| Throughput | jobs completed within deadline / scheduled | batch/streaming |
|
|
23
|
+
|
|
24
|
+
Measure as close to the user as practical. An SLI measured server-side misses the failures that never reached the server.
|
|
25
|
+
|
|
26
|
+
## SLO targets, windows, error budgets
|
|
27
|
+
|
|
28
|
+
- Target over a **rolling window** (28 or 30 days is common). 99.9%/28d ≈ **40 min** of budget; 99.95% ≈ 20 min; 99.99% ≈ 4 min.
|
|
29
|
+
- The **error budget** = (1 − SLO) × window. It is the allowed unreliability — spend it on releases and risk.
|
|
30
|
+
- **Error-budget policy** (write it): e.g. "budget >50% remaining → ship freely; <25% → freeze risky changes, prioritize reliability; exhausted → release freeze until recovered." Without a policy, the SLO doesn't change any behavior.
|
|
31
|
+
- Calibrate targets to cost (see `nfr-spec` down-for-an-hour). Internal tools rarely need >99.5%; payment paths may justify 99.95%+. Each nine is ~10× the effort.
|
|
32
|
+
|
|
33
|
+
## Multi-window, multi-burn-rate alerting (page on fast burn, ticket on slow)
|
|
34
|
+
|
|
35
|
+
"Burn rate" = how fast you're consuming the error budget relative to even consumption (1× burn would exactly exhaust it at window end). Alert on high burn over a short window AND confirm over a longer one to avoid flapping.
|
|
36
|
+
|
|
37
|
+
| Burn rate | Budget consumed | Long/short windows | Severity |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| 14.4× | 2% in 1h | 1h and 5m both breaching | 🔴 page — fast burn, acute |
|
|
40
|
+
| 6× | 5% in 6h | 6h and 30m | 🟠 page — sustained |
|
|
41
|
+
| 3× | 10% in 1d | 1d and 2h | 🟡 ticket — slow burn |
|
|
42
|
+
| 1× | tracking only | — | dashboard, no alert |
|
|
43
|
+
|
|
44
|
+
Require both the long and short window to breach before firing — the short window confirms it's still happening, the long window confirms it's significant. This is what replaces brittle "errors > N" static thresholds.
|
|
45
|
+
|
|
46
|
+
## Alert-quality rules
|
|
47
|
+
|
|
48
|
+
1. **Every page is actionable now** — there is a thing a human does on receipt. If not, it's a ticket.
|
|
49
|
+
2. **Every page maps to a runbook entry** (→ `runbook-generator`). No runbook = not ready to page.
|
|
50
|
+
3. **Page on symptoms** (SLO burn, user-facing errors), not causes (a pod restarted). Causes are diagnostic context.
|
|
51
|
+
4. **Deduplicate and group** — one incident, one page, not 200 per-host alerts.
|
|
52
|
+
5. **Tier severity:** page (wake someone) / ticket (next business day) / log (queryable, no notification). Most "alerts" should be tickets or logs.
|
|
53
|
+
6. **Review noisy/non-actionable pages** monthly; a page that's been ignored 5× is either re-tiered or fixed. Alert fatigue is a reliability risk in itself.
|
|
54
|
+
|
|
55
|
+
## Metrics vs logs vs traces (use each for its strength)
|
|
56
|
+
|
|
57
|
+
| | Metrics | Logs | Traces |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| Good at | aggregate state, alerting, SLOs | per-event detail, debugging one request | request flow across services |
|
|
60
|
+
| Cost driver | **cardinality** (label combinations) | **volume** (GB ingested) | sampling rate × span count |
|
|
61
|
+
| Cardinality | keep LOW — bounded labels only | high-cardinality lives here | high-cardinality lives here |
|
|
62
|
+
| Retention | long (cheap, downsampled) | short, sampled on hot path | short, tail-sampled on errors/slow |
|
|
63
|
+
| Don't | put user_id/request_id as a label | use as a metric (count via logs = $$$) | sample blindly and miss the error traces |
|
|
64
|
+
|
|
65
|
+
**Cardinality budget:** allowed metric labels are bounded sets — `region`, `status_class`, `endpoint_template`, `tenant_tier`. Forbidden as metric labels — `user_id`, `request_id`, raw `url`, `email`. Those identifiers belong in logs/traces, linked from metrics via **exemplars**. One unbounded label can create millions of series and a five-figure monthly bill.
|
|
66
|
+
|
|
67
|
+
**Structured logs:** key-value/JSON, consistent field names, a trace/correlation ID on every line so logs join to traces. Sample the hot path (keep all errors, sample successes). Set a retention budget (ties to `capacity-cost-model`).
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Observability-plan template
|
|
2
|
+
|
|
3
|
+
SLIs from the user's side, SLOs with budgets and a policy, pages that are actionable and runbook-linked, pillars split by purpose with a cost ceiling.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# Observability plan: {service}
|
|
7
|
+
|
|
8
|
+
**Date:** {YYYY-MM-DD} · **On-call team:** {role}
|
|
9
|
+
|
|
10
|
+
## Critical user journeys (SLIs measure these)
|
|
11
|
+
|
|
12
|
+
| Journey | "Down" means to a user | SLI |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| {log in} | {can't authenticate} | success rate of auth requests |
|
|
15
|
+
| {place order} | {checkout errors / hangs} | % checkout req 2xx within 1s |
|
|
16
|
+
|
|
17
|
+
## SLIs / SLOs / error budgets
|
|
18
|
+
|
|
19
|
+
| SLI | Definition (good/valid) | SLO (target / window) | Error budget | Measured at |
|
|
20
|
+
|---|---|---|---|---|
|
|
21
|
+
| checkout availability | 2xx / valid checkout req | 99.9% / 28d | ~40 min/28d | load balancer |
|
|
22
|
+
| checkout latency | < 1s / valid checkout req | 99% < 1s / 28d | 1% of checkout req/28d may exceed 1s | load balancer |
|
|
23
|
+
|
|
24
|
+
**Error-budget policy:** {>50% remaining → ship freely; <25% → freeze risky releases; exhausted → release freeze + reliability focus until recovered}.
|
|
25
|
+
|
|
26
|
+
## Alerts (symptom-based, burn-rate, every page runbook-linked)
|
|
27
|
+
|
|
28
|
+
| Alert | Condition | Windows | Burn | Page / Ticket | Runbook |
|
|
29
|
+
|---|---|---|---|---|---|
|
|
30
|
+
| checkout fast burn | budget burn ≥ 14.4× | 1h & 5m | acute | 🔴 page | runbook#checkout-errors |
|
|
31
|
+
| checkout slow burn | budget burn ≥ 3× | 1d & 2h | slow | 🟡 ticket | runbook#checkout-degraded |
|
|
32
|
+
| saturation early-warn | pool util > 85% | 15m | — | 🟡 ticket | runbook#scale-checkout |
|
|
33
|
+
|
|
34
|
+
{No page without a runbook link. Cause/resource signals are tickets or dashboards, not pages.}
|
|
35
|
+
|
|
36
|
+
## Three-pillar strategy
|
|
37
|
+
|
|
38
|
+
| Pillar | Used for | Key rules |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| Metrics | SLOs, alerts, golden signals | bounded labels only (region, status_class, endpoint_template) |
|
|
41
|
+
| Logs | per-request debugging | structured JSON, trace-id on every line, sample successes, keep errors, retention {N}d |
|
|
42
|
+
| Traces | cross-service latency/error attribution | propagate context all hops, tail-sample errors/slow, {x}% baseline |
|
|
43
|
+
|
|
44
|
+
## Cardinality & cost budget
|
|
45
|
+
|
|
46
|
+
- **Allowed metric labels:** {region, status_class, endpoint_template, tenant_tier}
|
|
47
|
+
- **Forbidden as metric labels (→ logs/traces):** user_id, request_id, raw url, email
|
|
48
|
+
- **Budgets:** metric series ≤ {N}; log ingest ≤ {GB/day}; trace sampling {x}%. Alert at 80% of each. (→ `capacity-cost-model`)
|
|
49
|
+
|
|
50
|
+
## Dashboards (by the question each answers)
|
|
51
|
+
|
|
52
|
+
| Dashboard | Question it answers | Panels |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| Service health | "is checkout healthy right now?" | golden signals + SLO/budget status |
|
|
55
|
+
| Checkout drill-down | "where is the latency/error coming from?" | per-dependency latency, error breakdown, trace exemplars |
|
|
56
|
+
|
|
57
|
+
## Instrumentation conventions
|
|
58
|
+
|
|
59
|
+
- Metric naming: {namespace.subsystem.unit} (e.g. `checkout.request.duration_ms`)
|
|
60
|
+
- Trace context propagated on every hop ({W3C traceparent}); exemplars link metrics → traces.
|
|
61
|
+
- Every new feature ships its SLI instrumentation with it (not as a fast-follow).
|
|
62
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: okr-cascade
|
|
3
|
+
description: Cascade company OKRs to team-level OKRs — with a gap registry for objectives no team credibly owns, and a causal metric tree connecting each team KR to the north-star it's supposed to move. Use when the user wants to set or cascade OKRs, align team goals to company goals, "turn strategy into quarterly objectives", or audit existing OKRs for gaps and vanity metrics.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# okr-cascade
|
|
7
|
+
|
|
8
|
+
Turns company objectives into team OKRs that actually roll up — and surfaces what a cascade usually hides: the objectives nobody credibly owns (the **gap registry**) and the KRs that count activity instead of causing outcomes (the **causal metric tree**). Org-level counterpart to `success-metrics`, which owns feature-level measurement — this skill decides *what the teams aim at*; `success-metrics` designs how one feature proves it moved a KR.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
1. **Get the company OKRs and the cycle.** From the input or by asking (at most 2 questions, spent on: *"what are the company's top 3–5 objectives this cycle, verbatim?"* and *"which teams are in scope?"*). Record company OKRs **verbatim** — rewriting the company's words without saying so corrupts the roll-up. No company objectives exist at all → stop; that's a strategy conversation (`strategy-analysis`), not a cascade. Non-interactive run (no user to ask): an unstated cycle or team list gets assumed and tagged `[assumption]`; absent company OKRs are never invented — emit `BLOCKED: need the company OKRs, verbatim — rerun with the top 3–5 objectives, their KRs, and the teams in scope` instead.
|
|
13
|
+
|
|
14
|
+
2. **Grade the company KRs before cascading them.** Each company KR is either an **outcome** (a customer or business result: retention, revenue, time-to-value) or an **output** (a thing shipped: "launch v2", "migrate to k8s"). Outputs at company level get flagged with the outcome they presumably serve — ✅ *"'Launch self-serve onboarding' → presumably serves activation rate; recommend restating as the activation target"*. Cascading an output produces teams that hit every KR while the business stands still.
|
|
15
|
+
|
|
16
|
+
3. **Derive team OKRs per company objective.** For each in-scope team: an objective (qualitative, motivating, this-cycle) and 2–4 KRs that are (a) **measurable at the team's scope** — the team's work moves the number without needing three other teams to also succeed; (b) **causally upstream** of a company KR, with the causal sentence written out: ✅ *"Cut p95 checkout latency to 800ms — slow checkout is the top named cause of cart abandonment `[data: support tags]`, which feeds company KR 'checkout conversion +2pp'"*; (c) **scored 0.0–1.0 at cycle end** — a KR that can only be "done/not done" is a task wearing a KR's clothes. Not every team maps to every objective — forcing it manufactures alignment theater; a team with no credible contribution to an objective simply doesn't appear under it.
|
|
17
|
+
|
|
18
|
+
4. **Build the gap registry.** A gap is a company objective or KR with **no team-level expression** after step 3 — no owner, no credible path, or a current-vs-target delta no in-scope team can close. Name each gap (kebab-case slug), state which company KR it starves, and rank gaps by the weight of the objective they block. The registry is a first-class output: a cascade with zero gaps on the first pass usually means step 3 was generous, not that the org is perfectly shaped — say so if it happens.
|
|
19
|
+
|
|
20
|
+
5. **Draw the causal metric tree.** North-star (the one user-behavioral outcome metric capturing this cycle's most strategic objective — never "features shipped") at the root; each team KR attached at its causal position as a leading indicator; each edge carrying its causal sentence. A KR that can't be attached to the tree is either a guardrail (label it) or measurement theater (cut it, and say which). No credible north-star derivable → report that as the cascade's top finding and recommend naming one before committing OKRs.
|
|
21
|
+
|
|
22
|
+
6. **Emit with [`templates/okr-cascade.md`](templates/okr-cascade.md)** in one message: company OKRs (verbatim, with output-KR flags), team OKRs with causal sentences, ranked gap registry, metric tree (Mermaid `flowchart` — north-star at root, KRs as leaves), and next steps: each team KR needing full measurement design → `success-metrics`; each gap needing a decision → the owner who must staff or explicitly drop it.
|
|
23
|
+
|
|
24
|
+
## Useful references in this skill
|
|
25
|
+
|
|
26
|
+
- [`templates/okr-cascade.md`](templates/okr-cascade.md) — cascade tables, gap registry, and metric-tree skeleton
|
|
27
|
+
|
|
28
|
+
## Quality bar
|
|
29
|
+
|
|
30
|
+
- **Company OKRs appear verbatim**, and every restated one is marked as restated with the reason.
|
|
31
|
+
- **Every team KR has its causal sentence** naming the company KR it feeds and the mechanism. "Aligns with company goals" is not a mechanism.
|
|
32
|
+
- **Every team KR is scorable 0.0–1.0** and measurable at the team's own scope. Binary deliverables are tasks — they can live under a KR, not as one.
|
|
33
|
+
- **Output KRs are flagged** at every level, each with the outcome it presumably serves.
|
|
34
|
+
- **The gap registry is present and ranked** — even when its honest content is "none found; here's why that's suspicious".
|
|
35
|
+
- **The metric tree has one north-star**, and every KR is attached, labeled guardrail, or explicitly cut.
|
|
36
|
+
|
|
37
|
+
## When to use this skill
|
|
38
|
+
|
|
39
|
+
- ✅ "Cascade our company OKRs to the platform/growth/mobile teams"
|
|
40
|
+
- ✅ Quarterly planning: turning strategy into team objectives
|
|
41
|
+
- ✅ Auditing existing OKRs — which are vanity, which roll up nowhere
|
|
42
|
+
- ✅ "Leadership set five objectives; which have no owner?"
|
|
43
|
+
|
|
44
|
+
## When NOT to use this skill
|
|
45
|
+
|
|
46
|
+
- ❌ Measuring one feature's success — `success-metrics` (it declares org OKRs out of scope; this skill returns the favor)
|
|
47
|
+
- ❌ No strategy exists to cascade — `strategy-analysis` or `prfaq` first
|
|
48
|
+
- ❌ Sprint/backlog prioritization — OKRs are aims, not a work queue
|
|
49
|
+
- ❌ Individual performance goals — cascading OKRs to persons turns a steering tool into a rating tool, and both break
|
|
50
|
+
|
|
51
|
+
## Anti-patterns to avoid
|
|
52
|
+
|
|
53
|
+
- ❌ **Cascading outputs.** "Company: launch v2 → Team: ship 12 features" — everyone hits 100% while retention falls. Flag outputs at intake or inherit the disease.
|
|
54
|
+
- ❌ **Alignment theater.** Every team forced under every objective, with prose doing the aligning that causality can't. Empty cells are information.
|
|
55
|
+
- ❌ **Vanity KRs.** Page views, sign-ups, story points. If the number can improve while the business doesn't, it can't be a KR.
|
|
56
|
+
- ❌ **A gapless first pass.** The registry exists because real orgs have orphaned objectives — a clean sheet means the bar in step 3 slipped.
|
|
57
|
+
- ❌ **KR-as-task-list.** "Complete the migration" scores 0 or 1 and measures effort. What outcome does the migration purchase? That's the KR.
|
|
58
|
+
- ❌ **Metric list instead of metric tree.** "DAU, NPS, churn, revenue" with no causal positions is a dashboard inventory, not a tree — every node needs its edge.
|
|
59
|
+
- ❌ **Silent rewording of company OKRs.** Improving leadership's phrasing without marking it breaks the roll-up contract and hides a real disagreement worth surfacing.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "query": "Cascade our company OKRs down to team level", "should_trigger": true },
|
|
3
|
+
{ "query": "Help me set quarterly OKRs for the platform team that align to company goals", "should_trigger": true },
|
|
4
|
+
{ "query": "Audit our existing OKRs — which ones are vanity metrics?", "should_trigger": true },
|
|
5
|
+
{ "query": "Leadership set five objectives; which have no team owner?", "should_trigger": true },
|
|
6
|
+
{ "query": "Turn our strategy into Q4 objectives for the org", "should_trigger": true },
|
|
7
|
+
|
|
8
|
+
{ "query": "How do we know this feature worked? Define its success metrics", "should_trigger": false },
|
|
9
|
+
{ "query": "Prioritize our sprint backlog for next iteration", "should_trigger": false },
|
|
10
|
+
{ "query": "Run a SWOT on our market position", "should_trigger": false },
|
|
11
|
+
{ "query": "Set performance goals for my direct reports", "should_trigger": false }
|
|
12
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "okr-cascade",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"prompt": "Cascade these company OKRs to our three teams (platform, growth, mobile). O1: Become the default choice for mid-market DevOps teams — KR1: net revenue retention 115%, KR2: launch the v2 platform. O2: Operational excellence — KR1: 99.95% availability. Cycle: Q4.",
|
|
7
|
+
"assertions": [
|
|
8
|
+
"Company OKRs appear verbatim; 'launch the v2 platform' is flagged as an output KR with the outcome it presumably serves",
|
|
9
|
+
"Each team KR has a written causal sentence naming the company KR it feeds and the mechanism",
|
|
10
|
+
"Each team KR has baseline → target and is scorable 0.0–1.0 — no binary 'complete the migration' KRs",
|
|
11
|
+
"Not every team is forced under every objective — teams with no credible contribution are omitted from that objective",
|
|
12
|
+
"A ranked gap registry is present (or explicitly states none found and why that is suspicious)",
|
|
13
|
+
"A causal metric tree with exactly one north-star is emitted; every team KR is attached, labeled guardrail, or explicitly cut",
|
|
14
|
+
"The north-star is user-behavioral, not 'features shipped' or another output",
|
|
15
|
+
"Next steps route team KRs to success-metrics for measurement design and gaps to a named decision owner"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": 2,
|
|
20
|
+
"prompt": "[Non-interactive run — no user available to answer questions] Cascade our OKRs to the teams.",
|
|
21
|
+
"assertions": [
|
|
22
|
+
"No company OKRs are invented — the output is BLOCKED: need the company OKRs, verbatim",
|
|
23
|
+
"The BLOCKED output states what to rerun with (the top 3-5 objectives and their KRs, plus teams in scope)",
|
|
24
|
+
"No cascade tables, gap registry, or metric tree appear"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "okr-cascade",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Cascade company OKRs to team-level OKRs — with a gap registry for objectives no team credibly owns, and a causal metric tree connecting each team KR to the north-star it's supposed to move. Use when the user wants to set or cascade OKRs, align team goals to company goals, \"turn strategy into quarterly objectives\", or audit existing OKRs for gaps and vanity metrics.",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["prfaq", "strategy-analysis", "success-metrics"],
|
|
9
|
+
"tags": ["okr", "goals", "alignment", "north-star", "metric-tree", "quarterly-planning"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Structured derivation against a fixed roll-up discipline; the causal-sentence and gap judgments need care but the template bounds them. Escalate via ambiguous-input when the company objectives themselves are contested." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# OKR Cascade — {cycle, e.g. 2026 Q4}
|
|
2
|
+
|
|
3
|
+
> Teams in scope: {list} · Source of company OKRs: {doc/person} · Status: DRAFT
|
|
4
|
+
|
|
5
|
+
## Company OKRs (verbatim)
|
|
6
|
+
|
|
7
|
+
### O1: {objective, verbatim}
|
|
8
|
+
| KR | Type | Note |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| {KR verbatim} | outcome / **output ⚠** | {if output: the outcome it presumably serves} |
|
|
11
|
+
|
|
12
|
+
## Team OKRs
|
|
13
|
+
|
|
14
|
+
### Team: {name}
|
|
15
|
+
|
|
16
|
+
**O: {team objective — qualitative, motivating, this cycle}** _(feeds company O1)_
|
|
17
|
+
|
|
18
|
+
| KR | Baseline → Target | Causal sentence (mechanism → company KR) | Scoring |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| {KR} | {x → y} | {why moving this moves company KR n} | {how 0.0–1.0 is graded, e.g. linear on pp gained} |
|
|
21
|
+
|
|
22
|
+
<!-- A team with no credible contribution to an objective doesn't appear under it. -->
|
|
23
|
+
|
|
24
|
+
## Gap registry (ranked)
|
|
25
|
+
|
|
26
|
+
| # | Gap slug | Company KR or objective it starves | Why no team covers it | Decision needed from |
|
|
27
|
+
|---|---|---|---|---|
|
|
28
|
+
| 1 | {kebab-slug} | {KR, or "On (objective-level)"} | {no owner / no credible path / delta too large} | {role} |
|
|
29
|
+
|
|
30
|
+
## Causal metric tree
|
|
31
|
+
|
|
32
|
+
North-star: **{one user-behavioral outcome metric}**
|
|
33
|
+
|
|
34
|
+
```mermaid
|
|
35
|
+
flowchart BT
|
|
36
|
+
KR1["{team KR}"] -->|{causal sentence, short}| NS["{north-star}"]
|
|
37
|
+
KR2["{team KR}"] -->|{…}| NS
|
|
38
|
+
G1["{guardrail KR}"] -.->|guardrail| NS
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Cut from the tree: {KRs that attached nowhere, and why} — or "none".
|
|
42
|
+
|
|
43
|
+
## Next steps
|
|
44
|
+
|
|
45
|
+
- {team KR} → run `success-metrics` for full measurement design (baseline, counter-metric, instrumentation)
|
|
46
|
+
- {gap slug} → {owner role} staffs it or explicitly drops it by {date}
|