@devenius/junamis-skills 0.0.0-stage → 1.1.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.
Files changed (311) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/LICENSE +21 -0
  3. package/README.md +231 -2
  4. package/SECURITY.md +81 -0
  5. package/bin/junamis-skills.js +7 -0
  6. package/dist/cli.d.ts +59 -0
  7. package/dist/cli.d.ts.map +1 -0
  8. package/dist/cli.js +564 -0
  9. package/dist/cli.js.map +1 -0
  10. package/dist/color.d.ts +40 -0
  11. package/dist/color.d.ts.map +1 -0
  12. package/dist/color.js +55 -0
  13. package/dist/color.js.map +1 -0
  14. package/dist/design/atomic.d.ts +4 -0
  15. package/dist/design/atomic.d.ts.map +1 -0
  16. package/dist/design/atomic.js +14 -0
  17. package/dist/design/atomic.js.map +1 -0
  18. package/dist/design/bootstrap.d.ts +23 -0
  19. package/dist/design/bootstrap.d.ts.map +1 -0
  20. package/dist/design/bootstrap.js +411 -0
  21. package/dist/design/bootstrap.js.map +1 -0
  22. package/dist/design/cli.d.ts +86 -0
  23. package/dist/design/cli.d.ts.map +1 -0
  24. package/dist/design/cli.js +425 -0
  25. package/dist/design/cli.js.map +1 -0
  26. package/dist/design/delta.d.ts +45 -0
  27. package/dist/design/delta.d.ts.map +1 -0
  28. package/dist/design/delta.js +557 -0
  29. package/dist/design/delta.js.map +1 -0
  30. package/dist/design/drift.d.ts +26 -0
  31. package/dist/design/drift.d.ts.map +1 -0
  32. package/dist/design/drift.js +341 -0
  33. package/dist/design/drift.js.map +1 -0
  34. package/dist/design/errors.d.ts +25 -0
  35. package/dist/design/errors.d.ts.map +1 -0
  36. package/dist/design/errors.js +30 -0
  37. package/dist/design/errors.js.map +1 -0
  38. package/dist/design/events.d.ts +18 -0
  39. package/dist/design/events.d.ts.map +1 -0
  40. package/dist/design/events.js +44 -0
  41. package/dist/design/events.js.map +1 -0
  42. package/dist/design/fingerprint.d.ts +10 -0
  43. package/dist/design/fingerprint.d.ts.map +1 -0
  44. package/dist/design/fingerprint.js +66 -0
  45. package/dist/design/fingerprint.js.map +1 -0
  46. package/dist/design/index-gen.d.ts +16 -0
  47. package/dist/design/index-gen.d.ts.map +1 -0
  48. package/dist/design/index-gen.js +94 -0
  49. package/dist/design/index-gen.js.map +1 -0
  50. package/dist/design/schema.d.ts +54 -0
  51. package/dist/design/schema.d.ts.map +1 -0
  52. package/dist/design/schema.js +408 -0
  53. package/dist/design/schema.js.map +1 -0
  54. package/dist/design/yaml.d.ts +12 -0
  55. package/dist/design/yaml.d.ts.map +1 -0
  56. package/dist/design/yaml.js +264 -0
  57. package/dist/design/yaml.js.map +1 -0
  58. package/dist/external.d.ts +61 -0
  59. package/dist/external.d.ts.map +1 -0
  60. package/dist/external.js +426 -0
  61. package/dist/external.js.map +1 -0
  62. package/dist/guide.d.ts +17 -0
  63. package/dist/guide.d.ts.map +1 -0
  64. package/dist/guide.js +219 -0
  65. package/dist/guide.js.map +1 -0
  66. package/dist/index.d.ts +2 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.js +7 -0
  69. package/dist/index.js.map +1 -0
  70. package/dist/install-external.d.ts +3 -0
  71. package/dist/install-external.d.ts.map +1 -0
  72. package/dist/install-external.js +37 -0
  73. package/dist/install-external.js.map +1 -0
  74. package/dist/library-install.d.ts +39 -0
  75. package/dist/library-install.d.ts.map +1 -0
  76. package/dist/library-install.js +663 -0
  77. package/dist/library-install.js.map +1 -0
  78. package/dist/orchestrator/boot.d.ts +3 -0
  79. package/dist/orchestrator/boot.d.ts.map +1 -0
  80. package/dist/orchestrator/boot.js +515 -0
  81. package/dist/orchestrator/boot.js.map +1 -0
  82. package/dist/orchestrator/cli.d.ts +37 -0
  83. package/dist/orchestrator/cli.d.ts.map +1 -0
  84. package/dist/orchestrator/cli.js +563 -0
  85. package/dist/orchestrator/cli.js.map +1 -0
  86. package/dist/orchestrator/commands.d.ts +46 -0
  87. package/dist/orchestrator/commands.d.ts.map +1 -0
  88. package/dist/orchestrator/commands.js +752 -0
  89. package/dist/orchestrator/commands.js.map +1 -0
  90. package/dist/orchestrator/compaction.d.ts +21 -0
  91. package/dist/orchestrator/compaction.d.ts.map +1 -0
  92. package/dist/orchestrator/compaction.js +93 -0
  93. package/dist/orchestrator/compaction.js.map +1 -0
  94. package/dist/orchestrator/drift.d.ts +11 -0
  95. package/dist/orchestrator/drift.d.ts.map +1 -0
  96. package/dist/orchestrator/drift.js +181 -0
  97. package/dist/orchestrator/drift.js.map +1 -0
  98. package/dist/orchestrator/errors.d.ts +52 -0
  99. package/dist/orchestrator/errors.d.ts.map +1 -0
  100. package/dist/orchestrator/errors.js +96 -0
  101. package/dist/orchestrator/errors.js.map +1 -0
  102. package/dist/orchestrator/frontmatter.d.ts +6 -0
  103. package/dist/orchestrator/frontmatter.d.ts.map +1 -0
  104. package/dist/orchestrator/frontmatter.js +50 -0
  105. package/dist/orchestrator/frontmatter.js.map +1 -0
  106. package/dist/orchestrator/fsx.d.ts +45 -0
  107. package/dist/orchestrator/fsx.d.ts.map +1 -0
  108. package/dist/orchestrator/fsx.js +295 -0
  109. package/dist/orchestrator/fsx.js.map +1 -0
  110. package/dist/orchestrator/handoff.d.ts +8 -0
  111. package/dist/orchestrator/handoff.d.ts.map +1 -0
  112. package/dist/orchestrator/handoff.js +246 -0
  113. package/dist/orchestrator/handoff.js.map +1 -0
  114. package/dist/orchestrator/hash.d.ts +10 -0
  115. package/dist/orchestrator/hash.d.ts.map +1 -0
  116. package/dist/orchestrator/hash.js +65 -0
  117. package/dist/orchestrator/hash.js.map +1 -0
  118. package/dist/orchestrator/journal.d.ts +35 -0
  119. package/dist/orchestrator/journal.d.ts.map +1 -0
  120. package/dist/orchestrator/journal.js +163 -0
  121. package/dist/orchestrator/journal.js.map +1 -0
  122. package/dist/orchestrator/lease.d.ts +31 -0
  123. package/dist/orchestrator/lease.d.ts.map +1 -0
  124. package/dist/orchestrator/lease.js +175 -0
  125. package/dist/orchestrator/lease.js.map +1 -0
  126. package/dist/orchestrator/plan.d.ts +27 -0
  127. package/dist/orchestrator/plan.d.ts.map +1 -0
  128. package/dist/orchestrator/plan.js +240 -0
  129. package/dist/orchestrator/plan.js.map +1 -0
  130. package/dist/orchestrator/report.d.ts +49 -0
  131. package/dist/orchestrator/report.d.ts.map +1 -0
  132. package/dist/orchestrator/report.js +244 -0
  133. package/dist/orchestrator/report.js.map +1 -0
  134. package/dist/orchestrator/state.d.ts +43 -0
  135. package/dist/orchestrator/state.d.ts.map +1 -0
  136. package/dist/orchestrator/state.js +369 -0
  137. package/dist/orchestrator/state.js.map +1 -0
  138. package/dist/orchestrator/store.d.ts +42 -0
  139. package/dist/orchestrator/store.d.ts.map +1 -0
  140. package/dist/orchestrator/store.js +202 -0
  141. package/dist/orchestrator/store.js.map +1 -0
  142. package/dist/orchestrator/test-hooks.d.ts +5 -0
  143. package/dist/orchestrator/test-hooks.d.ts.map +1 -0
  144. package/dist/orchestrator/test-hooks.js +31 -0
  145. package/dist/orchestrator/test-hooks.js.map +1 -0
  146. package/dist/orchestrator/time.d.ts +11 -0
  147. package/dist/orchestrator/time.d.ts.map +1 -0
  148. package/dist/orchestrator/time.js +38 -0
  149. package/dist/orchestrator/time.js.map +1 -0
  150. package/dist/paths.d.ts +9 -0
  151. package/dist/paths.d.ts.map +1 -0
  152. package/dist/paths.js +42 -0
  153. package/dist/paths.js.map +1 -0
  154. package/dist/pinned-source.d.ts +13 -0
  155. package/dist/pinned-source.d.ts.map +1 -0
  156. package/dist/pinned-source.js +238 -0
  157. package/dist/pinned-source.js.map +1 -0
  158. package/dist/reconcile/cli.d.ts +17 -0
  159. package/dist/reconcile/cli.d.ts.map +1 -0
  160. package/dist/reconcile/cli.js +171 -0
  161. package/dist/reconcile/cli.js.map +1 -0
  162. package/dist/reconcile/detectors.d.ts +29 -0
  163. package/dist/reconcile/detectors.d.ts.map +1 -0
  164. package/dist/reconcile/detectors.js +294 -0
  165. package/dist/reconcile/detectors.js.map +1 -0
  166. package/dist/reconcile/manifest.d.ts +11 -0
  167. package/dist/reconcile/manifest.d.ts.map +1 -0
  168. package/dist/reconcile/manifest.js +118 -0
  169. package/dist/reconcile/manifest.js.map +1 -0
  170. package/dist/reconcile/queue.d.ts +3 -0
  171. package/dist/reconcile/queue.d.ts.map +1 -0
  172. package/dist/reconcile/queue.js +723 -0
  173. package/dist/reconcile/queue.js.map +1 -0
  174. package/dist/reconcile/score.d.ts +19 -0
  175. package/dist/reconcile/score.d.ts.map +1 -0
  176. package/dist/reconcile/score.js +58 -0
  177. package/dist/reconcile/score.js.map +1 -0
  178. package/dist/scripts/check-opencode-config.d.ts +12 -0
  179. package/dist/scripts/check-opencode-config.d.ts.map +1 -0
  180. package/dist/scripts/check-opencode-config.js +216 -0
  181. package/dist/scripts/check-opencode-config.js.map +1 -0
  182. package/dist/scripts/check-pack.d.ts +3 -0
  183. package/dist/scripts/check-pack.d.ts.map +1 -0
  184. package/dist/scripts/check-pack.js +74 -0
  185. package/dist/scripts/check-pack.js.map +1 -0
  186. package/dist/scripts/check-pins.d.ts +9 -0
  187. package/dist/scripts/check-pins.d.ts.map +1 -0
  188. package/dist/scripts/check-pins.js +65 -0
  189. package/dist/scripts/check-pins.js.map +1 -0
  190. package/dist/scripts/check-security.d.ts +3 -0
  191. package/dist/scripts/check-security.d.ts.map +1 -0
  192. package/dist/scripts/check-security.js +47 -0
  193. package/dist/scripts/check-security.js.map +1 -0
  194. package/dist/scripts/check-skills-lock.d.ts +7 -0
  195. package/dist/scripts/check-skills-lock.d.ts.map +1 -0
  196. package/dist/scripts/check-skills-lock.js +36 -0
  197. package/dist/scripts/check-skills-lock.js.map +1 -0
  198. package/dist/scripts/check-skills-sync.d.ts +7 -0
  199. package/dist/scripts/check-skills-sync.d.ts.map +1 -0
  200. package/dist/scripts/check-skills-sync.js +146 -0
  201. package/dist/scripts/check-skills-sync.js.map +1 -0
  202. package/dist/scripts/check-yaml.d.ts +3 -0
  203. package/dist/scripts/check-yaml.d.ts.map +1 -0
  204. package/dist/scripts/check-yaml.js +41 -0
  205. package/dist/scripts/check-yaml.js.map +1 -0
  206. package/dist/scripts/publish-npm.d.ts +3 -0
  207. package/dist/scripts/publish-npm.d.ts.map +1 -0
  208. package/dist/scripts/publish-npm.js +67 -0
  209. package/dist/scripts/publish-npm.js.map +1 -0
  210. package/dist/scripts/release-check.d.ts +3 -0
  211. package/dist/scripts/release-check.d.ts.map +1 -0
  212. package/dist/scripts/release-check.js +97 -0
  213. package/dist/scripts/release-check.js.map +1 -0
  214. package/dist/scripts/support.d.ts +41 -0
  215. package/dist/scripts/support.d.ts.map +1 -0
  216. package/dist/scripts/support.js +78 -0
  217. package/dist/scripts/support.js.map +1 -0
  218. package/dist/targets/claude.d.ts +4 -0
  219. package/dist/targets/claude.d.ts.map +1 -0
  220. package/dist/targets/claude.js +42 -0
  221. package/dist/targets/claude.js.map +1 -0
  222. package/dist/targets/cline.d.ts +4 -0
  223. package/dist/targets/cline.d.ts.map +1 -0
  224. package/dist/targets/cline.js +39 -0
  225. package/dist/targets/cline.js.map +1 -0
  226. package/dist/targets/cursor.d.ts +4 -0
  227. package/dist/targets/cursor.d.ts.map +1 -0
  228. package/dist/targets/cursor.js +40 -0
  229. package/dist/targets/cursor.js.map +1 -0
  230. package/dist/targets/index.d.ts +4 -0
  231. package/dist/targets/index.d.ts.map +1 -0
  232. package/dist/targets/index.js +11 -0
  233. package/dist/targets/index.js.map +1 -0
  234. package/dist/targets/opencode.d.ts +4 -0
  235. package/dist/targets/opencode.d.ts.map +1 -0
  236. package/dist/targets/opencode.js +48 -0
  237. package/dist/targets/opencode.js.map +1 -0
  238. package/dist/targets/windsurf.d.ts +4 -0
  239. package/dist/targets/windsurf.d.ts.map +1 -0
  240. package/dist/targets/windsurf.js +41 -0
  241. package/dist/targets/windsurf.js.map +1 -0
  242. package/dist/types/common.d.ts +193 -0
  243. package/dist/types/common.d.ts.map +1 -0
  244. package/dist/types/common.js +6 -0
  245. package/dist/types/common.js.map +1 -0
  246. package/dist/types/design.d.ts +185 -0
  247. package/dist/types/design.d.ts.map +1 -0
  248. package/dist/types/design.js +3 -0
  249. package/dist/types/design.js.map +1 -0
  250. package/dist/types/guards.d.ts +13 -0
  251. package/dist/types/guards.d.ts.map +1 -0
  252. package/dist/types/guards.js +64 -0
  253. package/dist/types/guards.js.map +1 -0
  254. package/dist/types/handoff.d.ts +29 -0
  255. package/dist/types/handoff.d.ts.map +1 -0
  256. package/dist/types/handoff.js +3 -0
  257. package/dist/types/handoff.js.map +1 -0
  258. package/dist/types/index.d.ts +7 -0
  259. package/dist/types/index.d.ts.map +1 -0
  260. package/dist/types/index.js +11 -0
  261. package/dist/types/index.js.map +1 -0
  262. package/dist/types/orchestrator.d.ts +414 -0
  263. package/dist/types/orchestrator.d.ts.map +1 -0
  264. package/dist/types/orchestrator.js +4 -0
  265. package/dist/types/orchestrator.js.map +1 -0
  266. package/dist/types/reconcile.d.ts +160 -0
  267. package/dist/types/reconcile.d.ts.map +1 -0
  268. package/dist/types/reconcile.js +3 -0
  269. package/dist/types/reconcile.js.map +1 -0
  270. package/docs/RECONCILE.md +505 -0
  271. package/docs/design/_schema.md +506 -0
  272. package/junamis-skills.yml +328 -0
  273. package/library/EXTERNAL.md +35 -0
  274. package/library/HANDOFF.md +93 -0
  275. package/library/RESUME.md +429 -0
  276. package/library/SAFETY.md +83 -0
  277. package/library/agents/context-keeper.md +41 -0
  278. package/library/agents/frontend.md +43 -0
  279. package/library/agents/maintainer.md +44 -0
  280. package/library/agents/nestjs.md +40 -0
  281. package/library/agents/nextjs.md +40 -0
  282. package/library/agents/operator.md +42 -0
  283. package/library/agents/orchestrator.md +313 -0
  284. package/library/agents/researcher.md +40 -0
  285. package/library/agents/reviewer.md +40 -0
  286. package/library/skills/db-migrate/SKILL.md +50 -0
  287. package/library/skills/decision-record/SKILL.md +74 -0
  288. package/library/skills/dependency-upgrade/SKILL.md +57 -0
  289. package/library/skills/deploy-verify/SKILL.md +51 -0
  290. package/library/skills/document/SKILL.md +51 -0
  291. package/library/skills/env-doctor/SKILL.md +65 -0
  292. package/library/skills/frontend/SKILL.md +63 -0
  293. package/library/skills/handoff/SKILL.md +79 -0
  294. package/library/skills/incident-response/SKILL.md +69 -0
  295. package/library/skills/nestjs/SKILL.md +49 -0
  296. package/library/skills/nextjs/SKILL.md +48 -0
  297. package/library/skills/perf-budget/SKILL.md +62 -0
  298. package/library/skills/refactor-safely/SKILL.md +48 -0
  299. package/library/skills/release-prep/SKILL.md +75 -0
  300. package/library/skills/research/SKILL.md +66 -0
  301. package/library/skills/rollback/SKILL.md +49 -0
  302. package/library/skills/route/SKILL.md +107 -0
  303. package/library/skills/route-external/SKILL.md +67 -0
  304. package/library/skills/security-audit/SKILL.md +64 -0
  305. package/library/skills/skill-author/SKILL.md +49 -0
  306. package/opencode.json +5906 -0
  307. package/package.json +88 -4
  308. package/scripts/design-registry.mjs +7 -0
  309. package/scripts/orchestrator-state.mjs +7 -0
  310. package/scripts/reconcile.mjs +7 -0
  311. package/skills-lock.json +197 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: decision-record
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ description: Use when the user makes a decision that should bind future work ("we're using X", "never do Y here", "going with Z"), or before acting on a request that may conflict with an earlier decision. Writes ADR-style records to docs/decisions/ and flags conflicts instead of silently overriding them. Do not use for open questions or for suggestions the user has not accepted.
6
+ ---
7
+
8
+ # decision-record
9
+
10
+ Turn a user's decision into a durable record, and check new requests against the records that already exist.
11
+
12
+ ## Mode A: record a decision
13
+
14
+ Use when the user states a decision.
15
+
16
+ 1. Confirm the decision in one sentence and ask nothing else unless the wording is ambiguous.
17
+ 2. Find the next number: highest `NNNN` in `docs/decisions/` plus one, starting at `0001`.
18
+ 3. Write `docs/decisions/NNNN-slug.md`:
19
+
20
+ ```markdown
21
+ # NNNN. <Title in imperative form>
22
+
23
+ Status: Accepted
24
+ Date: <YYYY-MM-DD>
25
+ Supersedes: none
26
+
27
+ ## Context
28
+ Why this came up. Two to four sentences.
29
+
30
+ ## Decision
31
+ The decision, in one or two sentences, stated plainly.
32
+
33
+ ## Consequences
34
+ What this makes easier, what it makes harder, what it rules out.
35
+ ```
36
+
37
+ 4. Report the file path and the one-line decision.
38
+
39
+ ## Mode B: check a request against decisions
40
+
41
+ Use before any skill that changes code or config.
42
+
43
+ 1. List titles in `docs/decisions/` with `Status: Accepted`.
44
+ 2. If a request contradicts one, stop. Report the record number, the conflict, and the two options: follow the record, or record a superseding decision.
45
+ 3. If the user chooses to supersede, write a new record with `Supersedes: NNNN`. Change the old record's status to `Superseded by NNNN`. Do not edit its body.
46
+ 4. If the request is merely different and does not contradict, proceed and mention the related record.
47
+
48
+ ## Gotchas
49
+
50
+ - Record only decisions the user made. A suggestion from an agent is `Status: Proposed` until the user accepts it, and it does not bind work.
51
+ - Never rewrite a decision's body. History is the point.
52
+ - One decision per file. If a message holds three decisions, write three files.
53
+ - If `docs/decisions/` does not exist, create it. Do not ask.
54
+
55
+ ## Finish
56
+
57
+ ```yaml
58
+ agent: decision-record
59
+ job: record or check decision
60
+ status: complete | needs-decision
61
+ artifacts:
62
+ - path: docs/decisions/NNNN-slug.md
63
+ kind: created
64
+ findings:
65
+ - id: F1
66
+ severity: high
67
+ summary: request conflicts with decision NNNN
68
+ evidence: docs/decisions/NNNN-slug.md
69
+ decisions_owed:
70
+ - follow NNNN, or supersede it?
71
+ next: user
72
+ ```
73
+
74
+ Omit `findings` and set `next` to the calling skill when there is no conflict.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: dependency-upgrade
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ description: Use to upgrade one dependency to a named version, or to resolve a security advisory for one package. Reads the upstream changelog, lists breaking changes, applies the bump in isolation, and runs the project's tests. Do not use to upgrade several packages at once, to change the package manager, or for transitive pins nobody asked about.
6
+ ---
7
+
8
+ # dependency-upgrade
9
+
10
+ Upgrade exactly one package, prove nothing else changed, and hand the proof to the tests.
11
+
12
+ ## Inputs
13
+
14
+ - Package name and target version (or "latest stable").
15
+ - Reason: feature need, advisory ID, or routine maintenance.
16
+
17
+ If the target is missing, ask for it. Do not pick "latest" silently for a major version.
18
+
19
+ ## Steps
20
+
21
+ 1. **Baseline.** Run the project's test command and record the result. If it fails before any change, stop with `status: blocked`.
22
+ 2. **Read the upstream.** Fetch the package's changelog or release notes for every version between current and target. Record breaking changes. Note the source URL.
23
+ 3. **Check peers.** Read `peerDependencies` of the new version. Report any conflict with installed packages.
24
+ 4. **Apply.** Change only that package's version constraint. Install with the project's package manager so the lockfile updates.
25
+ 5. **Diff the lockfile.** Confirm the changed entries are the target package and its own dependencies. Anything else is a finding.
26
+ 6. **Verify.** Run the test command, then the build command if one exists. Compare with the baseline.
27
+ 7. **Code impact.** Search the repo for imports and API names listed as breaking. Fix only call sites that the breaking changes require.
28
+
29
+ ## Gotchas
30
+
31
+ - A major version bump is a decision. If the changelog lists breaking changes, set `status: needs-decision` unless the user already asked for that version.
32
+ - Lockfile churn across unrelated packages means the install did more than asked. Revert and report.
33
+ - Do not add `overrides` or `resolutions` to force a version unless the user approves. They hide conflicts.
34
+ - An advisory fix needs the fixed version confirmed in the advisory, not guessed from the package name.
35
+
36
+ ## Finish
37
+
38
+ ```yaml
39
+ agent: dependency-upgrade
40
+ job: upgrade <package> to <version>
41
+ status: complete | blocked | needs-decision | failed
42
+ artifacts:
43
+ - path: package.json
44
+ kind: updated
45
+ - path: <lockfile>
46
+ kind: updated
47
+ findings:
48
+ - id: F1
49
+ severity: high
50
+ summary: breaking change <what> affects <file>
51
+ evidence: <changelog url>, <file:line>
52
+ decisions_owed:
53
+ - approve major version bump to <version>?
54
+ next: test
55
+ ```
56
+
57
+ Set `next: test` when the verification passed. Use `next: user` when blocked or when the decision is owed.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: deploy-verify
3
+ version: "1.0.0"
4
+ idempotent: true
5
+ description: Use after the user has deployed, to confirm the live or staging environment is healthy. Probes health and readiness endpoints with GET requests only, runs the smoke checks listed in the release notes, and reports pass or fail with evidence. Do not use to deploy, to send write requests, or to log in with real user credentials.
6
+ ---
7
+
8
+ # deploy-verify
9
+
10
+ Confirm the deploy is alive and the critical paths respond. Read only.
11
+
12
+ ## Inputs
13
+
14
+ - Base URL of the environment (ask if not given).
15
+ - The release notes file, `docs/releases/<version>.md`, for the version being verified.
16
+
17
+ ## Steps
18
+
19
+ 1. **Health.** `GET <base>/health` (or the endpoint the project documents). Expect 200 within 2 seconds.
20
+ 2. **Readiness.** `GET <base>/ready` if it exists. Expect 200. A 200 on health with a failing ready means the dependencies are down: report it as a finding.
21
+ 3. **Version.** If the health response includes a version or commit, compare with the release. A mismatch means the old version is still serving: fail.
22
+ 4. **Smoke.** Read the smoke list from the release notes. For each path, send a GET and record the status code. Do not send POST, PUT, PATCH, or DELETE.
23
+ 5. **Errors.** Sample the error rate from logs or the platform if the user has given access. Otherwise say it was not checked.
24
+ 6. **Decide.** All checks pass: `complete`. Any critical path fails: `failed`, and set `next: rollback`.
25
+
26
+ ## Gotchas
27
+
28
+ - Health returning 200 does not prove the app works. Check at least one real path.
29
+ - Do not follow redirects into a login page and call that a pass. Report the redirect.
30
+ - A preview URL is not production. Name which environment was checked.
31
+ - Do not retry a failing POST to "see if it works now". This skill never writes.
32
+
33
+ ## Finish
34
+
35
+ ```yaml
36
+ agent: deploy-verify
37
+ job: verify <version> at <base>
38
+ status: complete | failed
39
+ artifacts:
40
+ - path: docs/releases/<version>.md
41
+ kind: read-only
42
+ findings:
43
+ - id: F1
44
+ severity: critical
45
+ summary: GET /checkout returns 500
46
+ evidence: "<timestamp> GET /checkout -> 500"
47
+ decisions_owed: []
48
+ next: rollback
49
+ ```
50
+
51
+ Set `next: none` on success. Set `next: rollback` only on a critical failure, and the orchestrator will still ask the user before rolling back.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: document
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ janitor_only: true
6
+ description: Use when the design registry prose, Known gaps, or coverage needs a janitor pass. Reorganizes and reconciles what deltas and code already produced; never introduces new facts, promotes drafts, or edits external skills.
7
+ ---
8
+
9
+ # document
10
+
11
+ You are the design registry janitor. You may reorganize, normalize, and reconcile the registry so a fresh reader can answer "what is here" and "what needs adjusting". You do not invent the answer.
12
+
13
+ ## Rules
14
+
15
+ - **No new facts.** Every sentence you keep or move must already be in a design delta, the current design file, or the code it points at. If a fact is missing, record it in `## Known gaps` as a question, do not write it as truth.
16
+ - **No promotion.** Never change `status: draft` to `active`, and never resolve a `needs_review` surface. Only a delta or an operator may do that.
17
+ - **No checksum edits by hand.** Run `junamis-design-registry validate` after a prose pass. If a body changed, apply the change through a design delta so `design_checksum`, `version`, and the change log stay correct.
18
+ - **No external edits.** The external `document` skill is not yours to change. This internal skill is the janitor override.
19
+ - **No scope changes.** You do not add a surface, remove a surface, or change `code_paths`. Add a gap instead.
20
+
21
+ ## Steps
22
+
23
+ 1. **Read the registry.** Run `junamis-design-registry validate`. Stop on any error and report the exact file and line.
24
+ 2. **Load the target surfaces.** Use `junamis-design-registry load --surface <surface_id>` for each surface in the request. Read the body; the frontmatter is metadata, not prose.
25
+ 3. **Normalize prose.** Fix duplicated sentences, stale tense, and accidental aspiration in `## Current state`. Keep every fact. Do not add a fact to make a paragraph read better.
26
+ 4. **Reconcile Known gaps against code.** A gap that the code already satisfies becomes a delta that removes the line. A gap the code does not satisfy stays. A new observation becomes a new gap bullet, phrased as a question.
27
+ 5. **Audit coverage.** Run `junamis-design-registry drift`. Report overlaps always. Report unclaimed code files. When `bootstrap_complete` is false, say that enforcement is off; do not flip the flag yourself.
28
+ 6. **Regenerate.** If you changed a surface through a delta, run `junamis-design-registry index --write` and `junamis-design-registry validate`. Then confirm the index is byte-stable by generating it twice.
29
+ 7. **Report.** Name every surface you touched, every gap you kept, and every gap you removed with the delta that removed it.
30
+
31
+ ## Gotchas
32
+
33
+ - A prose edit that changes the body without a delta breaks the checksum guard. Use a delta.
34
+ - `## Known gaps` must be explicit. `- None` is valid; an empty section is not.
35
+ - A surface with `status: deprecated` or `needs_review` does not accept a delta. Report it, do not force it.
36
+ - Coverage overlaps are always worth reporting, even when enforcement is off.
37
+ - `INDEX.md` is derived. Never edit it by hand.
38
+
39
+ ## Finish
40
+
41
+ ```yaml
42
+ agent: document
43
+ job: <one line>
44
+ status: complete | blocked | needs-decision | failed
45
+ artifacts:
46
+ - path: <repo-relative path>
47
+ kind: created | updated | read-only
48
+ findings: []
49
+ decisions_owed: []
50
+ next: orchestrator
51
+ ```
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: env-doctor
3
+ version: "1.0.0"
4
+ idempotent: true
5
+ description: Use when the project will not install, build, or run locally, or before starting work on an unfamiliar machine. Checks runtime and package-manager versions against the project's declared requirements, lockfile presence, and which environment variable names the code needs. Writes docs/env-report.md. Do not use to install software or to set secret values.
6
+ ---
7
+
8
+ # env-doctor
9
+
10
+ Diagnose the local environment and report what is wrong, with the exact fix command. Change nothing.
11
+
12
+ ## Checks
13
+
14
+ Run each check. Record pass, fail, or unknown with evidence.
15
+
16
+ 1. **Runtime.** Read `engines` in `package.json` (or `.nvmrc`, `.tool-versions`). Compare with `node --version`. Fail if the installed major is below the minimum.
17
+ 2. **Package manager.** Read `packageManager` in `package.json`. Compare with the tool actually on PATH. Fail on mismatch.
18
+ 3. **Lockfile.** Exactly one lockfile should exist for the declared manager. Fail if zero, or if more than one.
19
+ 4. **Env names.** Find env var names the code reads (`process.env.NAME`, `import.meta.env.NAME`, or the project's config loader). Compare with `.env.example`. Report names missing from the example. Never print values, and never open `.env` for reading values.
20
+ 5. **Services.** Only check services the user has named or the project config declares. Report reachability as pass or fail. Do not start services.
21
+ 6. **Scripts.** Confirm the scripts the project's docs name (`dev`, `build`, `test`) exist in `package.json`.
22
+
23
+ ## Output
24
+
25
+ Write `docs/env-report.md`:
26
+
27
+ ```markdown
28
+ # Environment report
29
+
30
+ Checked: <YYYY-MM-DD HH:MM>
31
+
32
+ | Check | Result | Evidence |
33
+ |---|---|---|
34
+ | Runtime | pass | node 26.0.0 >= 26 |
35
+
36
+ ## Fixes
37
+ - <exact command for each failure>
38
+ ```
39
+
40
+ ## Gotchas
41
+
42
+ - Read `engines` before you decide a version is wrong. Projects pin different minimums.
43
+ - `.env` contains secrets. Compare names only, using `grep -o` on keys or the example file.
44
+ - Do not install, upgrade, or switch versions. Print the command and let the user run it.
45
+ - A missing `.env.example` is a finding. A missing `.env` is not, unless the code requires it at startup.
46
+
47
+ ## Finish
48
+
49
+ ```yaml
50
+ agent: env-doctor
51
+ job: environment check
52
+ status: complete | failed
53
+ artifacts:
54
+ - path: docs/env-report.md
55
+ kind: created
56
+ findings:
57
+ - id: F1
58
+ severity: high
59
+ summary: <failing check>
60
+ evidence: <command and output>
61
+ decisions_owed: []
62
+ next: user
63
+ ```
64
+
65
+ Use `status: failed` when a check that blocks running fails. Set `next` to the originating skill when every check passes.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: frontend
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ description: Use when building or reviewing frontend UI in a SaaS app. Detects the workspace stack (React, Next.js, Vue, Svelte) and component library (shadcn/ui, Radix, MUI, Chakra). Uses shadcn components and design tokens. Use when the task involves UI components, layouts, forms, tables, modals, or styling. Do not use for backend or API work.
6
+ ---
7
+
8
+ # frontend
9
+
10
+ Build frontend UI that matches the project's stack and component conventions. Detect first, then build.
11
+
12
+ ## Inputs
13
+
14
+ - The project root. Read `package.json` for framework and UI library.
15
+ - If the project uses Next.js, coordinate with the `nextjs` agent for routing, data fetching, and Server/Client boundaries.
16
+ - `components.json` if it exists (shadcn configuration).
17
+ - `tailwind.config.*` or CSS variables for design tokens.
18
+
19
+ ## Stack detection
20
+
21
+ 1. **Framework.** Check `package.json` dependencies: `next` (Next.js), `react` (React), `vue` (Vue), `svelte` (SvelteKit). If multiple, note the primary.
22
+ 2. **UI library.** Check for `@radix-ui/*`, `@mui/*`, `@chakra-ui/*`, or `shadcn` in dependencies. Check for `components.json` (shadcn).
23
+ 3. **Styling.** Tailwind (`tailwindcss`), CSS modules, or styled-components.
24
+ 4. **State.** Check for `zustand`, `redux`, `jotai`, `pinia`, or React Context usage.
25
+
26
+ ## When shadcn/ui is present
27
+
28
+ - Use `npx shadcn@latest add <component>` to add components. Do not hand-write what shadcn provides.
29
+ - Compose with `cva` variants and `cn()` for conditional classes.
30
+ - Use semantic design tokens (`bg-background`, `text-foreground`), never hardcoded colors.
31
+ - Check `components.json` for the `style` (default, new-york) and `iconLibrary`.
32
+
33
+ ## When shadcn is not present
34
+
35
+ - Use the project's existing component library. Do not introduce shadcn without asking.
36
+ - Follow the existing patterns for variants, spacing, and theming.
37
+
38
+ ## General rules
39
+
40
+ 1. **Accessible by default.** Labels, focus states, keyboard navigation, ARIA where needed.
41
+ 2. **Responsive.** Mobile-first with Tailwind breakpoints. Test at 375px, 768px, 1024px, 1440px.
42
+ 3. **Loading and empty states.** Every data-driven component needs skeleton, empty, and error states.
43
+ 4. **Forms.** Use react-hook-form + zod with shadcn Form components. Inline errors, accessible fields.
44
+ 5. **Tables.** TanStack Table + shadcn Table. Sorting, filtering, pagination, selection.
45
+
46
+ ## Gotchas
47
+
48
+ - Do not mix component libraries. If the project uses shadcn, do not add MUI components.
49
+ - shadcn components are copied into the project, not imported from a package. Edit them in place.
50
+ - `components.json` must exist before running `shadcn add`. If it doesn't, run `shadcn init` first.
51
+ - Dark mode requires CSS variables for both light and dark themes. Check `globals.css`.
52
+
53
+ ## Finish
54
+
55
+ ```yaml
56
+ agent: frontend
57
+ job: frontend UI for <scope>
58
+ status: complete
59
+ artifacts: []
60
+ findings: []
61
+ decisions_owed: []
62
+ next: none
63
+ ```
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: handoff
3
+ version: "1.1.0"
4
+ idempotent: true
5
+ description: Use to save the current session state to .junamis/handoff.md at the end of work, or to read it at the start of a session so work resumes without re-explaining. Use when the user says "save where we are", "pick up", "continue", or when a session is ending. Do not use for per-step status; that is the HANDOFF block every skill ends with.
6
+ ---
7
+
8
+ # handoff
9
+
10
+ Keep one short file that lets a fresh agent continue. The file is the memory. The chat is not.
11
+
12
+ ## Write (end of session)
13
+
14
+ Overwrite `.junamis/handoff.md` with exactly these sections, in this order:
15
+
16
+ Only the orchestrator fills `## Suggested commit`. A specialist must not run this skill or write that section.
17
+
18
+ ```markdown
19
+ # Handoff
20
+
21
+ Updated: <YYYY-MM-DD HH:MM>
22
+
23
+ ## Goal
24
+ One sentence.
25
+
26
+ ## Current state
27
+ What is done, in three bullets at most. Name the files that changed.
28
+
29
+ ## Decisions in force
30
+ Links to docs/decisions/ entries that govern this work. "None" if none.
31
+
32
+ ## Open questions
33
+ Questions only the user can answer. "None" if none.
34
+
35
+ ## Next step
36
+ One concrete action, with the skill that does it.
37
+
38
+ ## Suggested commit
39
+ Orchestrator only. Leave this section untouched if you are not the orchestrator.
40
+ Message: `<type(scope): summary>`
41
+ Files:
42
+ - `<repo-relative path>`
43
+ Rationale: <one line>
44
+ State: proposed | committed <sha> | none
45
+
46
+ ## Do not
47
+ Things a fresh agent would otherwise repeat or break. "Nothing recorded" if none.
48
+ ```
49
+
50
+ ## Read (start of session)
51
+
52
+ 1. Read `.junamis/handoff.md`. If it is missing, say so and run `route` on the user's request.
53
+ 2. Reply with at most five lines: goal, state, next step, open questions.
54
+ 3. Check each path named in "Current state" still exists. Report any that do not.
55
+ 4. Continue from "Next step" only after the user confirms, or when the user's request matches it.
56
+ 5. If you are the orchestrator, read `## Suggested commit` and reuse it when the user says "commit". If you are not the orchestrator, ignore it.
57
+
58
+ ## Gotchas
59
+
60
+ - Keep it under 60 lines. A handoff that needs scrolling is a transcript, not a handoff.
61
+ - Never paste secrets, tokens, or env values. Name the variable, not the value.
62
+ - Do not record what was tried and failed unless it will stop the next agent. Put that under "Do not".
63
+ - Overwrite, do not append. Old state is in git and in the decision records.
64
+ - The `## Suggested commit` section is orchestrator-only. Never write or change it from any other agent. The orchestrator fills it at the end of every task with a Conventional Commits message, the exact files, a one-line rationale, and a state.
65
+ - `State: proposed` is not approval. The orchestrator commits only after the user asks.
66
+
67
+ ## Finish
68
+
69
+ ```yaml
70
+ agent: handoff
71
+ job: save or load session state
72
+ status: complete
73
+ artifacts:
74
+ - path: .junamis/handoff.md
75
+ kind: created | updated | read-only
76
+ findings: []
77
+ decisions_owed: []
78
+ next: none
79
+ ```
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: incident-response
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ description: Use when production is failing right now: outage, error spike, users reporting breakage, data looks wrong in live. Orders the work as stabilize first, then gather evidence read-only, then hypothesize, then record the incident. Do not use for a bug in development or staging; that is debug. Do not change production data from this skill.
6
+ ---
7
+
8
+ # incident-response
9
+
10
+ Stop the bleeding first. Understand it second. Write it down throughout.
11
+
12
+ ## Order (do not reorder)
13
+
14
+ 1. **Stabilize.** Ask what mitigations exist: feature flag, rollback, traffic shift, disabling a job. Recommend the smallest one that stops user harm. Do not execute it yourself. Routing to `rollback` requires user confirmation.
15
+ 2. **Timeline.** Establish when it started, what changed just before (deploys, config, migrations, dependency bumps), and the first symptom. Use `git log` and the release notes.
16
+ 3. **Evidence.** Read logs, error reports, and metrics the user provides. Read-only. Quote the lines you rely on with timestamps.
17
+ 4. **Hypotheses.** List at most three causes, each with the evidence for and against. Rank them.
18
+ 5. **Confirm.** Pick the top hypothesis only if evidence confirms it. Otherwise state what data would confirm it and ask for it.
19
+ 6. **Record.** Write `docs/incidents/<YYYY-MM-DD>-<slug>.md`:
20
+
21
+ ```markdown
22
+ # <Title>
23
+
24
+ Status: open | mitigated | resolved
25
+ Started: <time> Detected: <time> Mitigated: <time or pending>
26
+
27
+ ## Impact
28
+ Who was affected and how.
29
+
30
+ ## Timeline
31
+ - <time>: <event, with source>
32
+
33
+ ## Evidence
34
+ - <quoted line, source, time>
35
+
36
+ ## Hypotheses
37
+ 1. <cause>: for <...>, against <...>
38
+
39
+ ## Mitigation and next steps
40
+ ```
41
+
42
+ ## Gotchas
43
+
44
+ - Do not guess a root cause in the first reply. Ask for the logs.
45
+ - Do not run a fix against production without the user's explicit go-ahead in this session.
46
+ - Do not edit or delete production records to "clean up" a symptom. Record it.
47
+ - A rollback that does not fix the symptom means the cause is not the release. Say so.
48
+ - Keep secrets, tokens, and customer data out of the incident record. Redact.
49
+
50
+ ## Finish
51
+
52
+ ```yaml
53
+ agent: incident-response
54
+ job: triage <incident>
55
+ status: complete | needs-decision | blocked
56
+ artifacts:
57
+ - path: docs/incidents/<YYYY-MM-DD>-<slug>.md
58
+ kind: created
59
+ findings:
60
+ - id: F1
61
+ severity: critical
62
+ summary: <most likely cause, with confidence>
63
+ evidence: <log line, timestamp>
64
+ decisions_owed:
65
+ - approve mitigation: <action>?
66
+ next: user
67
+ ```
68
+
69
+ Use `next: debug` only when the evidence points to a code defect and the user has approved a fix path. Otherwise `next: user`.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: nestjs
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ description: Use when building or reviewing a NestJS application. Covers module structure, dependency injection, guards, pipes, interceptors, exception filters, and database integration. Use when the project has a nest-cli.json or @nestjs/core dependency. Delegates deep NestJS patterns to the external nestjs-best-practices skill. Do not use for non-NestJS backends.
6
+ ---
7
+
8
+ # nestjs
9
+
10
+ Build NestJS applications with clean module boundaries and proper dependency injection. Deep patterns come from the external `nestjs-best-practices` skill.
11
+
12
+ ## Inputs
13
+
14
+ - The project root. Confirm `@nestjs/core` is in `package.json` dependencies.
15
+ - `nest-cli.json` and `src/` directory.
16
+
17
+ ## Rules
18
+
19
+ 1. **One module per feature.** Each feature has its own module with controller, service, and DTOs. No god modules.
20
+ 2. **Dependency injection.** Use constructor injection. Never instantiate services with `new` outside of factories.
21
+ 3. **Guards for auth.** Use `@UseGuards()` for authentication and authorization. Never check auth inside a service.
22
+ 4. **Pipes for validation.** Use `ValidationPipe` with DTOs. Never validate manually in controllers.
23
+ 5. **Interceptors for cross-cutting.** Logging, caching, and transformation go in interceptors, not services.
24
+ 6. **Exception filters.** Use global exception filters for consistent error responses. Never catch and rethrow in controllers.
25
+ 7. **Repository pattern.** Services depend on repository interfaces, not ORM directly. Use TypeORM or Prisma through a repository.
26
+ 8. **Testing.** Unit test services with mocked repositories. E2E test controllers with a test module.
27
+
28
+ ## Delegation
29
+
30
+ For deep NestJS patterns (CQRS, microservices, WebSockets, GraphQL, advanced DI), load the external `nestjs-best-practices` skill. It covers 40+ rules with code examples.
31
+
32
+ ## Gotchas
33
+
34
+ - Circular dependencies between modules: use `forwardRef()` sparingly. Better to restructure.
35
+ - `@Global()` modules are for truly cross-cutting concerns (config, database). Do not overuse.
36
+ - DTOs must use `class-validator` decorators. Plain interfaces won't trigger validation.
37
+ - E2E tests need a separate test database. Never run E2E against production.
38
+
39
+ ## Finish
40
+
41
+ ```yaml
42
+ agent: nestjs
43
+ job: nestjs guidance for <scope>
44
+ status: complete
45
+ artifacts: []
46
+ findings: []
47
+ decisions_owed: []
48
+ next: none
49
+ ```
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: nextjs
3
+ version: "1.0.0"
4
+ idempotent: false
5
+ description: Use when building or reviewing a Next.js application with the App Router. Covers Server Components, Server Actions, routing, layouts, data fetching, caching, middleware, and deployment. Use when the project has a next.config or app/ directory. Do not use for Pages Router or non-Next.js React apps.
6
+ ---
7
+
8
+ # nextjs
9
+
10
+ Build Next.js App Router applications correctly. Server Components by default, client boundaries only where needed.
11
+
12
+ ## Inputs
13
+
14
+ - The project root. Confirm `next` is in `package.json` dependencies.
15
+ - `next.config.*` and `app/` directory.
16
+
17
+ ## Rules
18
+
19
+ 1. **Server Components by default.** Add `"use client"` only for interactivity, browser APIs, or hooks. Never add it to a component that only renders data.
20
+ 2. **Server Actions for mutations.** Use `"use server"` functions called from forms or event handlers. Validate input with zod. Never trust client-sent data.
21
+ 3. **Async params.** In Next.js 15+, `params` and `searchParams` are Promises. Await them. Type them as `Promise<{...}>`.
22
+ 4. **Data fetching in Server Components.** Fetch directly; no useEffect. Use `cache()` or the fetch cache. Revalidate with `revalidatePath` or `revalidateTag`.
23
+ 5. **Route handlers** (`route.ts`) for webhooks and external API proxies. Return `NextResponse.json()`.
24
+ 6. **Middleware** (`middleware.ts`) for auth redirects and locale detection. Keep it fast: no database calls.
25
+ 7. **Images and fonts.** Use `next/image` and `next/font`. Set `sizes` and `priority` for LCP images.
26
+ 8. **Error boundaries.** `error.tsx` per route segment. `not-found.tsx` for 404s. `loading.tsx` for Suspense.
27
+ 9. **Metadata.** Export `metadata` or `generateMetadata` from page/layout files. Never set `<title>` manually.
28
+ 10. **Deployment.** Default to Vercel. Set `output: "standalone"` for Docker. Environment variables must be prefixed `NEXT_PUBLIC_` to reach the client.
29
+
30
+ ## Gotchas
31
+
32
+ - `"use client"` on a parent makes all children client components. Push the boundary as deep as possible.
33
+ - Server Actions must be in a file with `"use server"` at the top, or be async functions in a Server Component.
34
+ - `cookies()` and `headers()` are async in Next.js 15. Await them.
35
+ - `revalidateTag` requires the fetch to use `{ next: { tags: [...] } }`.
36
+ - Dynamic routes need `generateStaticParams` for static generation, or they render on demand.
37
+
38
+ ## Finish
39
+
40
+ ```yaml
41
+ agent: nextjs
42
+ job: next.js guidance for <scope>
43
+ status: complete
44
+ artifacts: []
45
+ findings: []
46
+ decisions_owed: []
47
+ next: none
48
+ ```
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: perf-budget
3
+ version: "1.0.0"
4
+ idempotent: true
5
+ description: Use to measure performance against budgets the user has set: JavaScript bundle size, API latency, and Core Web Vitals on a named URL. Records measurements over repeated runs and compares them to docs/perf/budgets.md. Read-only on code. Do not use to optimize code; that is a follow-up task. Do not use for Vercel billing or function-cost analysis.
6
+ ---
7
+
8
+ # perf-budget
9
+
10
+ Measure, compare to a budget, and report. Never guess a number.
11
+
12
+ ## Budgets
13
+
14
+ Read `docs/perf/budgets.md`. If it does not exist, create it with empty budgets and ask the user to set values. Do not invent budgets.
15
+
16
+ ```markdown
17
+ # Performance budgets
18
+
19
+ | Metric | Budget | Scope |
20
+ |---|---|---|
21
+ | Initial JS (gzip) | 170 KB | / |
22
+ | API p95 latency | 300 ms | GET /api/items |
23
+ | LCP | 2.5 s | https://<url> |
24
+ ```
25
+
26
+ ## Steps
27
+
28
+ 1. **Bundle.** Run the project's build. Measure gzip size of the entry chunks from the build output. Record the build command and tool version.
29
+ 2. **API latency.** For each endpoint in the budget, send 20 GET requests sequentially. Record p50 and p95. Read-only endpoints only.
30
+ 3. **Web Vitals.** If a URL is given, run a Lighthouse or Playwright trace with the tool already in the project, three runs. Record the median.
31
+ 4. **Compare.** For each metric: within budget, over budget, or not measured. Over budget is a finding, with the amount over.
32
+ 5. **Write.** `docs/reviews/perf-<YYYY-MM-DD>.md` with a table of metric, budget, measured, status, method.
33
+
34
+ ## Gotchas
35
+
36
+ - One run is noise. Use the runs listed above and report the spread.
37
+ - Measure on the same machine and conditions every time, and say which.
38
+ - Do not compare a dev build to a production budget. Build for production first.
39
+ - Latency from a laptop is not latency from the region users are in. Name the location.
40
+
41
+ ## Finish
42
+
43
+ ```yaml
44
+ agent: perf-budget
45
+ job: measure performance against budgets
46
+ status: complete | blocked | failed
47
+ artifacts:
48
+ - path: docs/reviews/perf-<YYYY-MM-DD>.md
49
+ kind: created
50
+ - path: docs/perf/budgets.md
51
+ kind: read-only
52
+ findings:
53
+ - id: F1
54
+ severity: high
55
+ summary: initial JS 240 KB gzip over 170 KB budget
56
+ evidence: <build output file and size>
57
+ decisions_owed:
58
+ - set budget values for <metric>?
59
+ next: user
60
+ ```
61
+
62
+ Use `status: blocked` when no budgets are set and the user has not answered. Use `next: maintainer` only if the user asks for optimization work.