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,35 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""List comments on a Figma file.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
python list_comments.py <FILE_KEY_OR_URL>
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
from _figma_client import extract_file_key, get
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main(argv: list[str]) -> int:
|
|
16
|
+
if len(argv) != 1:
|
|
17
|
+
sys.stderr.write("usage: list_comments.py <FILE_KEY_OR_URL>\n")
|
|
18
|
+
return 2
|
|
19
|
+
file_key = extract_file_key(argv[0])
|
|
20
|
+
data = get(f"/v1/files/{file_key}/comments")
|
|
21
|
+
comments = data.get("comments", [])
|
|
22
|
+
if not comments:
|
|
23
|
+
print("(no comments)")
|
|
24
|
+
return 0
|
|
25
|
+
for c in comments:
|
|
26
|
+
author = c.get("user", {}).get("handle", "<unknown>")
|
|
27
|
+
ts = c.get("created_at", "")
|
|
28
|
+
msg = c.get("message", "").strip().replace("\n", " ")
|
|
29
|
+
resolved = " [resolved]" if c.get("resolved_at") else ""
|
|
30
|
+
print(f"- {ts} @{author}{resolved}: {msg}")
|
|
31
|
+
return 0
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
if __name__ == "__main__":
|
|
35
|
+
sys.exit(main(sys.argv[1:]))
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Post a comment on a Figma file.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
python post_comment.py <FILE_KEY_OR_URL> "<message>" [--node-id NODE_ID]
|
|
6
|
+
|
|
7
|
+
If --node-id is given, the comment is pinned to the centroid of that node.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
from _figma_client import extract_file_key, get, post
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def main(argv: list[str]) -> int:
|
|
19
|
+
ap = argparse.ArgumentParser(description=__doc__)
|
|
20
|
+
ap.add_argument("file", help="Figma file URL or bare file key")
|
|
21
|
+
ap.add_argument("message", help="Comment text")
|
|
22
|
+
ap.add_argument("--node-id", help="Node ID to pin the comment to (e.g. 1:23)")
|
|
23
|
+
args = ap.parse_args(argv)
|
|
24
|
+
|
|
25
|
+
file_key = extract_file_key(args.file)
|
|
26
|
+
|
|
27
|
+
body: dict = {"message": args.message}
|
|
28
|
+
|
|
29
|
+
if args.node_id:
|
|
30
|
+
nodes = get(f"/v1/files/{file_key}/nodes", params={"ids": args.node_id})
|
|
31
|
+
node = nodes.get("nodes", {}).get(args.node_id, {}).get("document", {})
|
|
32
|
+
box = node.get("absoluteBoundingBox")
|
|
33
|
+
if not box:
|
|
34
|
+
sys.stderr.write(
|
|
35
|
+
f"error: could not resolve node {args.node_id} in file {file_key}\n"
|
|
36
|
+
)
|
|
37
|
+
return 1
|
|
38
|
+
body["client_meta"] = {
|
|
39
|
+
"node_id": args.node_id,
|
|
40
|
+
"node_offset": {
|
|
41
|
+
"x": box["width"] / 2,
|
|
42
|
+
"y": box["height"] / 2,
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
resp = post(f"/v1/files/{file_key}/comments", body)
|
|
47
|
+
print(f"posted: comment_id={resp.get('id')}")
|
|
48
|
+
return 0
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
sys.exit(main(sys.argv[1:]))
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Example spec consumable by a FigJam plugin that turns it into shapes + connectors. Pair this with a tiny Figma plugin (or use a community plugin that accepts this shape) to materialize the diagram. Not a Figma REST API call — REST cannot create nodes.",
|
|
3
|
+
"title": "Three-tier web app on AWS",
|
|
4
|
+
"nodes": [
|
|
5
|
+
{ "id": "n_internet", "label": "Internet", "shape": "ELLIPSE", "x": 0, "y": 0 },
|
|
6
|
+
{ "id": "n_alb", "label": "ALB", "shape": "RECTANGLE", "x": 200, "y": 0 },
|
|
7
|
+
{ "id": "n_web", "label": "ECS web", "shape": "RECTANGLE", "x": 400, "y": -60 },
|
|
8
|
+
{ "id": "n_worker", "label": "ECS worker","shape": "RECTANGLE", "x": 400, "y": 60 },
|
|
9
|
+
{ "id": "n_rds", "label": "RDS", "shape": "CYLINDER", "x": 640, "y": 0 },
|
|
10
|
+
{ "id": "n_sqs", "label": "SQS", "shape": "PARALLELOGRAM", "x": 400, "y": 200 }
|
|
11
|
+
],
|
|
12
|
+
"edges": [
|
|
13
|
+
{ "from": "n_internet", "to": "n_alb", "label": "HTTPS" },
|
|
14
|
+
{ "from": "n_alb", "to": "n_web", "label": "HTTP" },
|
|
15
|
+
{ "from": "n_web", "to": "n_rds", "label": "SQL" },
|
|
16
|
+
{ "from": "n_web", "to": "n_sqs", "label": "enqueue" },
|
|
17
|
+
{ "from": "n_sqs", "to": "n_worker", "label": "dequeue" },
|
|
18
|
+
{ "from": "n_worker", "to": "n_rds", "label": "SQL" }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: guide-builder
|
|
3
|
+
description: Turn raw notes, specs, or design material into an easy-to-follow guide, auto-styled to the content — a setup/quickstart, a design walkthrough, or an API/event-schema reference. Use when the user wants setup or getting-started instructions, an onboarding walkthrough of how a system works, or developer reference docs for an API or event schema — and it is NOT an SRE operational runbook (use runbook-generator) or a design proposal for review (use design-doc).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# guide-builder
|
|
7
|
+
|
|
8
|
+
You help the user turn rough material — notes, a spec, an architecture description, an endpoint list — into a guide a reader can follow top-to-bottom without you in the room. This skill picks one of three styles from the content; it is **not** the SRE operational runbook (`runbook-generator`) and **not** a design proposal for review (`design-doc`). It explains and instructs; it does not propose or page.
|
|
9
|
+
|
|
10
|
+
## How to respond
|
|
11
|
+
|
|
12
|
+
1. **Detect the style first, and say which you picked.** Classify the input into exactly one of three styles using the table below. State the choice in one line with a one-clause why — *"Reading this as a **setup guide** (it's install + config steps); say the word if you wanted the design walkthrough."* — so the user can redirect before you draft.
|
|
13
|
+
|
|
14
|
+
| Style | Pick when the content is… | Signals in the input |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| **Setup guide** → [`templates/setup-guide.md`](templates/setup-guide.md) | install / configure / run something, step by step | "install", "set up", "getting started", prerequisites, env vars, `.env`, CLI commands, `docker`, "clone the repo" |
|
|
17
|
+
| **Design walkthrough** → [`templates/design-walkthrough.md`](templates/design-walkthrough.md) | explaining how an already-decided system works so someone can understand or build on it | components, data flow, "how X works", onboarding a new engineer, "why it's built this way" |
|
|
18
|
+
| **API reference** → [`templates/api-reference.md`](templates/api-reference.md) | contracts other developers code against | endpoints, request/response shapes, OpenAPI, event names, payload schemas, status codes, webhooks, Kafka/SNS topics, JSON Schema |
|
|
19
|
+
|
|
20
|
+
2. **Handle mixed content by picking the dominant style, not blending.** If the input spans two styles (e.g. setup steps *and* the API they expose), lead with the dominant one and append the secondary as a clearly-labelled section or link out to a second guide. Only ask the user which to lead with if it's a genuine 50/50.
|
|
21
|
+
|
|
22
|
+
3. **Gather only what the chosen style can't do without.** Don't run a generic intake. Cap at 2 questions, pick defaults for the rest:
|
|
23
|
+
- **Setup guide** needs the *target end state* ("running locally" vs "deployed to staging") and the *prerequisites baseline*. Without an end state, a setup guide has no finish line.
|
|
24
|
+
- **Design walkthrough** needs *who it's for* (new hire vs adjacent team) and *what they should be able to do after reading*.
|
|
25
|
+
- **API reference** needs the *transport + auth model* and *versioning scheme*. Without auth, the examples are unrunnable.
|
|
26
|
+
|
|
27
|
+
If the source is genuinely too thin, say so once and draft with gaps flagged as `> ⚠️ NEEDS INPUT: …` — don't invent.
|
|
28
|
+
|
|
29
|
+
4. **Fill the matching template.** Each template is ordered the way a reader actually consumes it. Don't reorder sections to match the input's order; reorder the input to match the reader's path.
|
|
30
|
+
|
|
31
|
+
5. **Apply the universal easy-to-follow rules** (these are the spine of every style):
|
|
32
|
+
- **One action per step.** Number them. No compound step hiding three commands behind one number.
|
|
33
|
+
- **Every step ends in a check.** "You should see `Listening on :3000`." A step with no success signal can't tell the reader whether to continue or stop.
|
|
34
|
+
- **Commands are complete and paste-able.** Real flags, not pseudocode. Placeholders are unmistakable (`<YOUR_API_KEY>`, never `your-key-here` buried mid-line) and listed once up front.
|
|
35
|
+
- **Lead each section with the outcome, not the backstory.** "By the end of this section the service answers on localhost." The "why" belongs in a walkthrough, not a quickstart.
|
|
36
|
+
- **Front-load the happy path.** Push edge cases, troubleshooting, and teardown to the end.
|
|
37
|
+
|
|
38
|
+
## Useful references in this skill
|
|
39
|
+
|
|
40
|
+
- [`templates/setup-guide.md`](templates/setup-guide.md) — install/configure/run, prerequisites → verify → troubleshooting.
|
|
41
|
+
- [`templates/design-walkthrough.md`](templates/design-walkthrough.md) — mental model → components → flow → key decisions → where the code lives.
|
|
42
|
+
- [`templates/api-reference.md`](templates/api-reference.md) — conventions → per-endpoint/event contracts → error catalog → changelog.
|
|
43
|
+
- [`examples/local-setup-guide.md`](examples/local-setup-guide.md) — raw notes → a finished setup guide, showing the detection call and the verify-after-every-step discipline.
|
|
44
|
+
|
|
45
|
+
## Quality bar
|
|
46
|
+
|
|
47
|
+
- **A reader who follows top-to-bottom reaches the stated end state without leaving the doc for missing info.** Unstated prerequisites are the #1 failure — hunt them down.
|
|
48
|
+
- **Every command block has an expected result or a verification step.** A command with no "how do I know it worked" is incomplete.
|
|
49
|
+
- **Placeholders are unmistakable and listed once up front.** `<YOUR_API_KEY>`, not a real-looking string the reader pastes verbatim and wonders why it fails.
|
|
50
|
+
- **No forward references that break linear reading.** "See step 7" before step 7 means the order is wrong, or it needs a link.
|
|
51
|
+
- **API reference: every field has type + required/optional + a one-line meaning; every endpoint has ≥1 full example request and response, including at least one error response.**
|
|
52
|
+
- **The detected style is stated up front with a one-line why,** so the user can redirect in one message instead of getting the wrong artifact.
|
|
53
|
+
|
|
54
|
+
## When to use this skill
|
|
55
|
+
|
|
56
|
+
- ✅ "Write setup instructions for getting our service running locally."
|
|
57
|
+
- ✅ "Turn this architecture description into an onboarding walkthrough for new engineers."
|
|
58
|
+
- ✅ "Document these endpoints / this event schema for the developers who'll consume them."
|
|
59
|
+
- ✅ Converting messy notes or a spec into a doc someone can follow without you present.
|
|
60
|
+
|
|
61
|
+
## When NOT to use this skill
|
|
62
|
+
|
|
63
|
+
- ❌ SRE operational runbook — incidents, on-call escalation, deploy/rollback, SLOs → `runbook-generator`.
|
|
64
|
+
- ❌ Proposing a design for review/approval — options, trade-offs, risks, rollout → `design-doc`.
|
|
65
|
+
- ❌ Compressing a long doc for an exec audience → `exec-summary`.
|
|
66
|
+
- ❌ Raw unstructured mess that isn't ready to shape (a transcript, a Slack thread) → run `brief-intake` first, then come back.
|
|
67
|
+
|
|
68
|
+
## Anti-patterns to avoid
|
|
69
|
+
|
|
70
|
+
- ❌ Compound steps. "Install deps, configure the DB, and run migrations" as one numbered step — split into three.
|
|
71
|
+
- ❌ Commands with no expected output. The reader can't tell success from a silent failure.
|
|
72
|
+
- ❌ Backstory before the first actionable step in a setup guide. Save the "why" for a walkthrough.
|
|
73
|
+
- ❌ Documenting an API in prose ("it returns the user object") instead of a typed schema + example payload.
|
|
74
|
+
- ❌ Blending two styles into one undifferentiated doc. Pick the dominant style; link or append the rest.
|
|
75
|
+
- ❌ Optimistic examples that omit the error/failure responses an API consumer is required to handle.
|
|
76
|
+
- ❌ Reinventing `runbook-generator` (incident playbooks, on-call) or `design-doc` (alternatives, approval) — stay in the explain-and-follow lane.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Example: raw notes → setup guide
|
|
2
|
+
|
|
3
|
+
Shows the two things that make this skill earn its keep: the **style-detection call up front**, and the **verify-after-every-step** discipline that turns notes into something a stranger can follow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Input (what the user pasted)
|
|
8
|
+
|
|
9
|
+
> need a getting-started doc for `widget-api`. it's a Go service, needs Postgres 15. clone, copy the env file (need a STRIPE_KEY from the dashboard), `make deps`, bring up postgres with docker, `make migrate`, then `make run`. it serves on 8080. there's a `/healthz`. people keep forgetting to start postgres first and then complain migrate hangs.
|
|
10
|
+
|
|
11
|
+
## The skill's first line back (style detection)
|
|
12
|
+
|
|
13
|
+
> Reading this as a **setup guide** — it's clone → configure → run with a defined finish line (`/healthz` answering). Two things I'm filling with defaults; correct me if wrong: end state is **running locally** (not deployed), and the prerequisite baseline assumes Go and Docker are already installed. Drafting now.
|
|
14
|
+
|
|
15
|
+
## Output
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# widget-api — Setup guide
|
|
20
|
+
|
|
21
|
+
**Goal:** Run `widget-api` locally against a Dockerized Postgres and get a healthy response from `/healthz`.
|
|
22
|
+
**Time:** ~10 minutes
|
|
23
|
+
**You'll have at the end:** the API serving on `localhost:8080` with migrations applied.
|
|
24
|
+
|
|
25
|
+
## Placeholders used in this guide
|
|
26
|
+
|
|
27
|
+
| Placeholder | What to put | Where to get it |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `<STRIPE_KEY>` | Stripe secret key for the test mode | Stripe Dashboard → Developers → API keys |
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
| Need | Version | Check it | If missing |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| Go | `>= 1.22` | `go version` | https://go.dev/dl |
|
|
36
|
+
| Docker | any recent | `docker --version` | https://docs.docker.com/get-docker |
|
|
37
|
+
| Postgres image | 15 | (pulled in step 3) | — |
|
|
38
|
+
|
|
39
|
+
## Steps
|
|
40
|
+
|
|
41
|
+
### 1. Clone the repo and enter it
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git clone git@github.com:example/widget-api.git && cd widget-api
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**You should see:** a `Makefile` in the directory — `ls Makefile`.
|
|
48
|
+
|
|
49
|
+
### 2. Configure environment
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
cp .env.example .env
|
|
53
|
+
# then set in .env:
|
|
54
|
+
# STRIPE_KEY=<STRIPE_KEY>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**You should see:** no placeholders left — `grep '<' .env` returns nothing.
|
|
58
|
+
|
|
59
|
+
### 3. Start Postgres (do this before migrating)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
docker compose up -d postgres
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**You should see:** `docker compose ps` lists `postgres` as `healthy`. Wait for `healthy` before the next step — migrating against a not-yet-ready Postgres is what makes `make migrate` appear to hang.
|
|
66
|
+
|
|
67
|
+
### 4. Install Go dependencies
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
make deps
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**You should see:** `go mod download` completes with no errors.
|
|
74
|
+
|
|
75
|
+
### 5. Run migrations
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
make migrate
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**You should see:** `migrations applied: N` and a return to the prompt within a few seconds.
|
|
82
|
+
|
|
83
|
+
### 6. Start the service
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
make run
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**You should see:** `widget-api listening on :8080`.
|
|
90
|
+
|
|
91
|
+
## Verify it works
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
curl -s localhost:8080/healthz
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Expected:** `{"status":"ok","db":"connected"}`
|
|
98
|
+
|
|
99
|
+
## Troubleshooting
|
|
100
|
+
|
|
101
|
+
| Symptom | Likely cause | Fix |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `make migrate` hangs | Postgres not `healthy` yet | Re-check step 3; wait for `healthy`, then retry |
|
|
104
|
+
| `connection refused :5432` | Postgres container not up | `docker compose up -d postgres` |
|
|
105
|
+
| `/healthz` returns `db:"down"` | migrations not applied | run step 5 |
|
|
106
|
+
|
|
107
|
+
## Teardown
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
docker compose down -v
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Removes the Postgres container and its volume. Your `.env` is left intact.
|
|
114
|
+
|
|
115
|
+
## Next steps
|
|
116
|
+
|
|
117
|
+
- Run the tests: `make test`
|
|
118
|
+
- Reference for the endpoints this service exposes: generate one with `/guide-builder` in **API reference** style.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### Why this passes the quality bar
|
|
123
|
+
|
|
124
|
+
- **Every step ends in a check** — the reader never guesses whether to continue.
|
|
125
|
+
- **The one gotcha from the notes** ("people forget to start postgres") became step 3's check *and* the first troubleshooting row, instead of buried prose.
|
|
126
|
+
- **The single placeholder is listed once up front**, not left as a surprise mid-command.
|
|
127
|
+
- **One end-to-end verify** (`/healthz`) proves the whole chain, not just the last command.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "guide-builder",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Turn raw notes, specs, or design material into an easy-to-follow guide, auto-styled to the content — a setup/quickstart, a design walkthrough, or an API/event-schema reference. Use when the user wants setup or getting-started instructions, an onboarding walkthrough of how a system works, or developer reference docs for an API or event schema — and it is NOT an SRE operational runbook (use runbook-generator) or a design proposal for review (use design-doc).",
|
|
5
|
+
"entrypoint": "SKILL.md",
|
|
6
|
+
"deps": { "npm": [], "pip": [] },
|
|
7
|
+
"env": { "required": [], "optional": [] },
|
|
8
|
+
"related": ["brief-intake", "design-doc", "exec-summary", "runbook-generator"],
|
|
9
|
+
"tags": ["guide", "setup", "documentation", "api-reference", "onboarding", "walkthrough"],
|
|
10
|
+
"model": { "tier": "standard", "rationale": "Shapes notes into a styled guide. Generation, not adversarial review." }
|
|
11
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# {API / event stream name} — Developer reference
|
|
2
|
+
|
|
3
|
+
**Base URL:** `{https://api.example.com/v1}`
|
|
4
|
+
**Auth:** {e.g. "Bearer token in `Authorization` header; obtain via …"}
|
|
5
|
+
**Versioning:** {e.g. "URL-path `/v1`; breaking changes ship a new path. See Changelog."}
|
|
6
|
+
**Content type:** `application/json` unless stated.
|
|
7
|
+
|
|
8
|
+
## Conventions
|
|
9
|
+
|
|
10
|
+
These apply to every endpoint/event below — read once, don't repeat per item.
|
|
11
|
+
|
|
12
|
+
- **Errors** return this shape:
|
|
13
|
+
```json
|
|
14
|
+
{ "error": { "code": "string", "message": "human-readable", "details": {} } }
|
|
15
|
+
```
|
|
16
|
+
- **Pagination:** {e.g. "cursor-based: pass `?cursor=`; response includes `next_cursor` (null on last page)"}
|
|
17
|
+
- **Idempotency:** {e.g. "mutating calls accept an `Idempotency-Key` header; replays within 24h return the original result"}
|
|
18
|
+
- **Rate limits:** {e.g. "600 req/min/token; `429` with `Retry-After` when exceeded"}
|
|
19
|
+
- **Timestamps:** ISO 8601 UTC (`2026-05-26T14:30:00Z`).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Endpoints
|
|
24
|
+
|
|
25
|
+
### `{METHOD} /{path}` — {one-line purpose}
|
|
26
|
+
|
|
27
|
+
{One sentence on when a consumer calls this.}
|
|
28
|
+
|
|
29
|
+
**Auth:** {required scope/role, or "none"}
|
|
30
|
+
|
|
31
|
+
**Path / query params**
|
|
32
|
+
|
|
33
|
+
| Param | In | Type | Required | Description |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
| `{id}` | path | string | yes | {…} |
|
|
36
|
+
| `{limit}` | query | integer | no | {default, max} |
|
|
37
|
+
|
|
38
|
+
**Request body**
|
|
39
|
+
|
|
40
|
+
| Field | Type | Required | Description |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| `{field}` | string | yes | {…} |
|
|
43
|
+
| `{field}` | integer | no | {default} |
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{ "field": "value", "field2": 42 }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Response `200`**
|
|
50
|
+
|
|
51
|
+
| Field | Type | Description |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `{id}` | string | {…} |
|
|
54
|
+
| `{status}` | enum(`a`,`b`) | {…} |
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{ "id": "abc_123", "status": "a", "created_at": "2026-05-26T14:30:00Z" }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Errors**
|
|
61
|
+
|
|
62
|
+
| Status | `error.code` | When |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `400` | `invalid_request` | {…} |
|
|
65
|
+
| `404` | `not_found` | {…} |
|
|
66
|
+
| `409` | `conflict` | {…} |
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{ "error": { "code": "not_found", "message": "No resource with id abc_123" } }
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Events / messages
|
|
75
|
+
|
|
76
|
+
For each event a consumer subscribes to.
|
|
77
|
+
|
|
78
|
+
### `{event.name}` — {one-line: what happened}
|
|
79
|
+
|
|
80
|
+
- **Emitted when:** {the trigger}
|
|
81
|
+
- **Transport:** {e.g. "Kafka topic `orders.v1`" / "webhook POST to your callback URL" / "SNS topic ARN …"}
|
|
82
|
+
- **Delivery:** {e.g. "at-least-once; consumers MUST be idempotent on `event_id`"}
|
|
83
|
+
- **Ordering:** {e.g. "ordered per `partition_key = order_id`; no global order"}
|
|
84
|
+
|
|
85
|
+
**Payload**
|
|
86
|
+
|
|
87
|
+
| Field | Type | Required | Description |
|
|
88
|
+
|---|---|---|---|
|
|
89
|
+
| `event_id` | string (uuid) | yes | dedup key |
|
|
90
|
+
| `occurred_at` | string (ISO 8601) | yes | when the fact happened (not when delivered) |
|
|
91
|
+
| `data.{field}` | string | yes | {…} |
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"event_id": "evt_01HX...",
|
|
96
|
+
"type": "{event.name}",
|
|
97
|
+
"occurred_at": "2026-05-26T14:30:00Z",
|
|
98
|
+
"data": { "order_id": "ord_123", "amount_cents": 4999 }
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Consumer notes:** {what a subscriber must handle — out-of-order arrival, schema evolution, poison messages}
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Error code catalog
|
|
107
|
+
|
|
108
|
+
| `error.code` | Meaning | Consumer action |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `invalid_request` | malformed input | fix and retry; don't blind-retry |
|
|
111
|
+
| `rate_limited` | over quota | back off per `Retry-After` |
|
|
112
|
+
| `conflict` | idempotency or state clash | inspect existing resource |
|
|
113
|
+
| {…} | … | … |
|
|
114
|
+
|
|
115
|
+
## Changelog
|
|
116
|
+
|
|
117
|
+
| Version / date | Change | Breaking? |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `v1` — {YYYY-MM-DD} | initial | — |
|
|
120
|
+
| {…} | … | yes/no |
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# {System / feature} — How it works
|
|
2
|
+
|
|
3
|
+
**Who this is for:** {e.g. "an engineer joining the payments team" / "an adjacent team integrating with us"}
|
|
4
|
+
**After reading, you'll be able to:** {concrete capability — "trace a checkout request end-to-end and know which service owns each step"}
|
|
5
|
+
**Status:** describes the system as built on {YYYY-MM-DD}. For *why we chose this design*, see {link to ADRs / design-doc}.
|
|
6
|
+
|
|
7
|
+
## The mental model
|
|
8
|
+
|
|
9
|
+
{One paragraph or one diagram. The single idea a reader must hold to understand everything below — e.g. "Every write goes through the command bus; reads come straight from a denormalized view. Nothing reads the write tables directly."}
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
{Optional ASCII or Mermaid sketch — or link to an architecture-diagrams output. Keep it to the load-bearing boxes and arrows, not every box.}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Components
|
|
16
|
+
|
|
17
|
+
What each piece does and why it exists — not how to deploy it.
|
|
18
|
+
|
|
19
|
+
| Component | Responsibility | Why it's separate |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| {name} | {one line — what it owns} | {what would break if it were merged into its neighbour} |
|
|
22
|
+
| {…} | … | … |
|
|
23
|
+
|
|
24
|
+
## How a {request / event / job} flows through
|
|
25
|
+
|
|
26
|
+
Trace one representative path step by step. This is the heart of the walkthrough.
|
|
27
|
+
|
|
28
|
+
1. **{Entry point}** — {what happens, which component, what data} → `{file or module:fn}`
|
|
29
|
+
2. **{Next hop}** — {…} → `{file:fn}`
|
|
30
|
+
3. **{…}** — {…}
|
|
31
|
+
4. **{Result}** — {what the caller gets back / what side effect lands}
|
|
32
|
+
|
|
33
|
+
> Trace it yourself: {how to watch this flow live — a log query, a trace ID, a debug endpoint}.
|
|
34
|
+
|
|
35
|
+
## Key design decisions (and why)
|
|
36
|
+
|
|
37
|
+
The non-obvious choices a reader will otherwise undo by accident.
|
|
38
|
+
|
|
39
|
+
- **{Decision}** — {why; what was rejected}. {Link to the ADR if one exists.}
|
|
40
|
+
- **{Decision}** — {…}
|
|
41
|
+
|
|
42
|
+
## Data & state
|
|
43
|
+
|
|
44
|
+
- **Source of truth:** {where the canonical data lives}
|
|
45
|
+
- **Derived / cached:** {what's a projection of it, and how it's kept in sync}
|
|
46
|
+
- **What's NOT persisted:** {e.g. "session state is in memory; a restart drops it — by design"}
|
|
47
|
+
|
|
48
|
+
## Where the code lives
|
|
49
|
+
|
|
50
|
+
| Concern | Path | Notes |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| {entry points / routes} | `{path}` | {…} |
|
|
53
|
+
| {core logic} | `{path}` | start here when reading |
|
|
54
|
+
| {data layer} | `{path}` | … |
|
|
55
|
+
| {tests worth reading first} | `{path}` | the integration tests document the contract |
|
|
56
|
+
|
|
57
|
+
## Making common changes
|
|
58
|
+
|
|
59
|
+
How to do the things a new contributor will need in week one.
|
|
60
|
+
|
|
61
|
+
- **Add a {new endpoint / event / field}:** {the 2–4 places to touch, in order}
|
|
62
|
+
- **Change {common thing}:** {…}
|
|
63
|
+
|
|
64
|
+
## Gotchas / sharp edges
|
|
65
|
+
|
|
66
|
+
- ⚠️ {Non-obvious constraint that will bite — "the queue is at-least-once; handlers must be idempotent"}
|
|
67
|
+
- ⚠️ {…}
|
|
68
|
+
|
|
69
|
+
## Glossary
|
|
70
|
+
|
|
71
|
+
- **{Term}** — {definition in this system's context, not the generic one}
|
|
72
|
+
- **{Term}** — {…}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# {Project / component} — Setup guide
|
|
2
|
+
|
|
3
|
+
**Goal:** {one sentence — the end state, e.g. "Run the API locally with a seeded database and answer a request on `localhost:3000`."}
|
|
4
|
+
**Time:** ~{N} minutes
|
|
5
|
+
**You'll have at the end:** {concrete artifact — "a running server, a seeded DB, and a passing health check"}
|
|
6
|
+
|
|
7
|
+
## Placeholders used in this guide
|
|
8
|
+
|
|
9
|
+
Replace these everywhere they appear. Nothing else is a placeholder.
|
|
10
|
+
|
|
11
|
+
| Placeholder | What to put | Where to get it |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| `<YOUR_API_KEY>` | {what it is} | {where to obtain it} |
|
|
14
|
+
| `<DB_PASSWORD>` | {what it is} | {…} |
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
Check each before starting — a failed setup is almost always a missing prerequisite.
|
|
19
|
+
|
|
20
|
+
| Need | Version | Check it | If missing |
|
|
21
|
+
|---|---|---|---|
|
|
22
|
+
| {Node / Python / Docker / …} | `>= {x.y}` | `node --version` | {install link / command} |
|
|
23
|
+
| {…} | … | `…` | … |
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
|
|
27
|
+
### 1. {Imperative — e.g. "Clone the repo and enter it"}
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git clone {repo-url} && cd {repo-dir}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**You should see:** {what success looks like — e.g. "a `package.json` in the directory: `ls package.json`"}
|
|
34
|
+
|
|
35
|
+
### 2. {Imperative — e.g. "Install dependencies"}
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
{exact command — e.g. `npm ci`}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**You should see:** {e.g. "`added 412 packages` with no errors"}
|
|
42
|
+
|
|
43
|
+
### 3. {Imperative — e.g. "Configure environment"}
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cp .env.example .env
|
|
47
|
+
# then set:
|
|
48
|
+
# API_KEY=<YOUR_API_KEY>
|
|
49
|
+
# DB_PASSWORD=<DB_PASSWORD>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**You should see:** {e.g. "`.env` exists and has no remaining `<…>` placeholders: `grep '<' .env` returns nothing"}
|
|
53
|
+
|
|
54
|
+
### 4. {Imperative — e.g. "Start dependencies"}
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
{e.g. `docker compose up -d postgres`}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**You should see:** {e.g. "`docker compose ps` shows postgres as `healthy`"}
|
|
61
|
+
|
|
62
|
+
### 5. {Imperative — e.g. "Run migrations and seed"}
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
{e.g. `npm run db:migrate && npm run db:seed`}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**You should see:** {e.g. "`Migrations complete (3 applied)` and `Seeded 12 rows`"}
|
|
69
|
+
|
|
70
|
+
### 6. {Imperative — e.g. "Start the service"}
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
{e.g. `npm run dev`}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**You should see:** {e.g. "`Listening on http://localhost:3000`"}
|
|
77
|
+
|
|
78
|
+
## Verify it works
|
|
79
|
+
|
|
80
|
+
One end-to-end check that proves the whole setup, not just the last step.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
{e.g. `curl -s localhost:3000/health`}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Expected:** {e.g. `{"status":"ok","db":"connected"}`}
|
|
87
|
+
|
|
88
|
+
If you get this, you're done.
|
|
89
|
+
|
|
90
|
+
## Troubleshooting
|
|
91
|
+
|
|
92
|
+
| Symptom | Likely cause | Fix |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| {exact error text} | {what's actually wrong} | {command or step to fix} |
|
|
95
|
+
| `ECONNREFUSED ...:5432` | Postgres not up yet | Re-run step 4; wait for `healthy` |
|
|
96
|
+
| {…} | … | … |
|
|
97
|
+
|
|
98
|
+
## Teardown
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
{e.g. `docker compose down -v`}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Removes {what — "containers and the local volume; your `.env` is left intact"}.
|
|
105
|
+
|
|
106
|
+
## Next steps
|
|
107
|
+
|
|
108
|
+
- {Where to go now — "Run the test suite: `npm test`"}
|
|
109
|
+
- {Link to the design walkthrough or API reference for this project, if one exists}
|