@noir-ai/skills 1.9.3 → 1.9.4-beta.2

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 (57) hide show
  1. package/builtin/noir-backend/SKILL.md +32 -4
  2. package/builtin/noir-backend/references/backend-patterns.md +55 -0
  3. package/builtin/noir-brainstorming/SKILL.md +49 -0
  4. package/builtin/noir-checkpoint/SKILL.md +30 -12
  5. package/builtin/noir-context/SKILL.md +29 -10
  6. package/builtin/noir-doctor/SKILL.md +23 -4
  7. package/builtin/noir-executing-plans/SKILL.md +59 -0
  8. package/builtin/noir-exploring/SKILL.md +37 -0
  9. package/builtin/noir-frontend/SKILL.md +32 -4
  10. package/builtin/noir-frontend/references/ui-patterns.md +48 -0
  11. package/builtin/noir-parallel/SKILL.md +25 -35
  12. package/builtin/noir-planning/SKILL.md +46 -0
  13. package/builtin/noir-prd/SKILL.md +38 -27
  14. package/builtin/noir-readme/SKILL.md +25 -4
  15. package/builtin/noir-recall/SKILL.md +31 -12
  16. package/builtin/noir-remember/SKILL.md +31 -17
  17. package/builtin/noir-rules/SKILL.md +28 -27
  18. package/builtin/noir-security/SKILL.md +33 -4
  19. package/builtin/noir-security/references/security-checklist.md +49 -0
  20. package/builtin/noir-shipping/SKILL.md +34 -0
  21. package/builtin/noir-spec/SKILL.md +48 -14
  22. package/builtin/noir-spec/references/spec-template.md +43 -0
  23. package/builtin/noir-subagent/SKILL.md +29 -30
  24. package/builtin/noir-subagent/references/dispatch-guide.md +50 -0
  25. package/builtin/noir-sync/SKILL.md +39 -12
  26. package/builtin/noir-systematic-debugging/SKILL.md +71 -0
  27. package/builtin/noir-systematic-debugging/references/tracing.md +51 -0
  28. package/builtin/noir-test-driven-development/SKILL.md +73 -0
  29. package/builtin/noir-test-driven-development/references/tdd-worked-example.md +65 -0
  30. package/builtin/noir-verifying/SKILL.md +40 -0
  31. package/builtin/noir-verifying/references/verification-checklist.md +29 -0
  32. package/builtin/noir-worktree/SKILL.md +23 -4
  33. package/builtin/noir-wrap/SKILL.md +29 -13
  34. package/builtin/noir-writing-skills/SKILL.md +42 -0
  35. package/dist/index.d.ts +159 -9
  36. package/dist/index.js +240 -7
  37. package/dist/index.js.map +1 -1
  38. package/evals/noir-systematic-debugging/evals.json +25 -0
  39. package/evals/noir-test-driven-development/evals.json +25 -0
  40. package/integrations/noir-clickup/SKILL.md +319 -71
  41. package/package.json +3 -2
  42. package/builtin/noir-brainstorm/SKILL.md +0 -17
  43. package/builtin/noir-branch/SKILL.md +0 -12
  44. package/builtin/noir-clarify/SKILL.md +0 -17
  45. package/builtin/noir-commit/SKILL.md +0 -12
  46. package/builtin/noir-debug/SKILL.md +0 -38
  47. package/builtin/noir-document/SKILL.md +0 -17
  48. package/builtin/noir-execute/SKILL.md +0 -17
  49. package/builtin/noir-explore/SKILL.md +0 -16
  50. package/builtin/noir-intake/SKILL.md +0 -17
  51. package/builtin/noir-plan/SKILL.md +0 -20
  52. package/builtin/noir-pr/SKILL.md +0 -12
  53. package/builtin/noir-review/SKILL.md +0 -28
  54. package/builtin/noir-skill-author/SKILL.md +0 -12
  55. package/builtin/noir-tdd/SKILL.md +0 -49
  56. package/builtin/noir-test/SKILL.md +0 -12
  57. package/builtin/noir-verify/SKILL.md +0 -17
@@ -1,35 +1,46 @@
1
1
  ---
2
2
  name: noir-prd
3
- description: Use when drafting a Product Requirements Document (.noir/prd/<id>-<slug>.md) for a feature or epic, before writing the technical spec — captures the what/why/for-whom so the spec can focus on the how.
3
+ description: Use when drafting a Product Requirements Document — capturing what a feature does, why it matters, and who it serves before the technical spec. Do NOT use for the technical "how" — that's noir-spec.
4
+ metadata:
5
+ category: plan
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
4
9
  ---
5
10
 
6
- # noir-prd — Product Requirements Document authoring
11
+ # noir-prd
7
12
 
8
- A PRD is a **pre-SDD product artifact** at `.noir/prd/<taskId>-<slug>.md`. It captures the *what / why / for-whom* so the technical spec can focus on the *how*. The spec later `@import`s it (`prdRef: <id>@<hash>`). **No FSM change** — the PRD is optional by mode, not a new phase.
13
+ A PRD captures what and why before the spec captures how. It is the user-facing contract — who this feature is for, what problem it solves, and what success looks like. Shorter than a spec and never technical.
9
14
 
10
- ## When to draft
11
- - `taskClass ∈ {feature, epic}` — a PRD is expected before the spec phase.
12
- - Explicitly requested (`noir-prd`, or "write a PRD for this").
13
- - NOT for bugfix / spike / quick-task / refactor (skip — Quick mode flows straight to spec).
15
+ ## When to use
16
+
17
+ ## Procedure
18
+ 1. **Follow the guidance** in the notes and verification.
19
+
20
+ - A feature needs stakeholder-facing rationale before a technical spec.
21
+ - The user says "write a PRD", "why are we building this", "who is this for."
22
+ - After `noir-brainstorming` when the idea is clear but needs a formal "why."
23
+ - **Do NOT use:** for the technical implementation plan — that's `noir-planning`.
14
24
 
15
25
  ## Sections (Noir template)
16
- 1. **Problem** — what's broken / missing.
17
- 2. **Evidence** — proof it's real (data, tickets, user reports). Never fill without a source.
18
- 3. **Audience** — for whom.
19
- 4. **Success Criteria** — machine-verifiable (quantified thresholds, not "fast/intuitive").
20
- 5. **Appetite / Mode** — time-box; small batch or bet.
21
- 6. **Proposed Direction** — product-altitude solution sketch (not technical design).
22
- 7. **No-gos** — explicitly out of scope (highest-signal section).
23
- 8. **Rabbit holes** — known pitfalls to avoid.
24
- 9. **Open Questions** — unresolved; needs human input.
25
-
26
- ## Task → PRD field mapping (e.g. from a tracker issue)
27
- `name`→Title; `description`→Problem/Proposed Direction; custom fields (Goal/Metric/Impact)→Evidence/Success Criteria; `status`+`priority`→Appetite/Mode; `assignees`→Audience; `due_date`→time-box; `tags`→clustering; `comments`→Open Questions/Rabbit holes; subtasks→Proposed Direction skeleton. Typically MISSING → No-gos, hard Success-Criteria metrics, explicit Rabbit holes → ask clarifying questions.
28
-
29
- ## Drafting process
30
- 1. **Ground first** — search `.noir/` memory (+ the web if relevant); never fabricate Evidence.
31
- 2. **Ask clarifying questions** for missing sections (No-gos, metrics, rabbit holes).
32
- 3. **Write** to `.noir/prd/<id>-<slug>.md` via the workflow `writePrd` artifact helper.
33
- 4. The spec phase then `@import`s it.
34
-
35
- Offline (no model key): emit the section template above with placeholders — graceful degradation, never a hard failure.
26
+
27
+ 1. **Title & summary.** One sentence — what and why.
28
+ 2. **Problem.** What problem does this solve? For whom?
29
+ 3. **Proposed solution.** High-level, non-technical. How does it solve the problem?
30
+ 4. **Success metrics.** How do we know it worked? (adoption, performance, feedback — one number if possible).
31
+ 5. **Non-goals.** What are we deliberately not building in this version?
32
+ 6. **Open questions.** What's still unknown?
33
+
34
+ ## Drafting
35
+
36
+ 1. Gather from brainstorming output or the task brief.
37
+ 2. On Claude Code, use `AskUserQuestion` to fill gaps (who is the user, what metric). On other hosts, ask.
38
+ 3. Write to `.noir/prd/<id>-<slug>.md`.
39
+ 4. **Explicit opt-in.** Never auto-draft a PRD — ask first.
40
+
41
+ ## When done → next skill
42
+
43
+ → `noir-spec` to formalize the technical side. Or is there something else?
44
+
45
+ ## Notes
46
+ - This skill is a playbook — the host decides which tools to use.
@@ -1,12 +1,33 @@
1
1
  ---
2
2
  name: noir-readme
3
- description: Use when generating or updating a README or docs from the codebase.
3
+ description: Use when generating or updating a project README or documentation from the codebase — keeping docs accurate. Use when the user says "write a README" or "update the docs"; when a new feature ships.
4
+ metadata:
5
+ category: document
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
4
9
  ---
5
10
 
6
11
  # noir-readme
7
12
 
8
- > **Stub:** this skill ships as a valid, loadable placeholder in S5; its full playbook is deepened in a later slice.
13
+ Generate or update project documentation — README, docs index, package docs. The rule: docs reflect shipped reality, never a stale plan.
9
14
 
10
- **When to use:** the README is missing, stale, or out of sync with what the code actually does.
15
+ ## When to use
11
16
 
12
- **For now:** read the manifests, entry points, and existing docs, then write a README that reflects the real setup and usage — install, run, test, and the one or two commands that matter — without inventing features.
17
+ - A new project needs a README.
18
+ - A feature shipped and the docs must reflect it.
19
+ - The user says "write docs", "update README", "document this."
20
+
21
+ ## Procedure
22
+
23
+ 1. **Survey the codebase.** What does the project do? What's the entry point? What commands matter? Read the README and any existing docs.
24
+ 2. **Follow the project's doc convention.** If the project uses Diátaxis (tutorial/how-to/reference/explanation), follow it. If not, standard README sections: intro, install, usage, contributing, license.
25
+ 3. **Keep docs lean.** A 50-line README that's accurate beats a 200-line README that's outdated. Link to deeper docs — don't inline them.
26
+ 4. **Run `pnpm docs:validate`** if the project has doc validation — catch broken links and stale refs before committing.
27
+
28
+ ## When done → next skill
29
+
30
+ → `noir-shipping` to commit the doc update. Or continue.
31
+
32
+ ## Notes
33
+ - This skill is a playbook — the host decides which tools to use.
@@ -1,18 +1,37 @@
1
1
  ---
2
2
  name: noir-recall
3
- description: Use when starting a task, before re-deriving something that may already be known — to recall a prior decision, pattern, bug, or fact from Noir's cross-session memory.
3
+ description: Use when searching Noir's cross-session memory for past decisions, patterns, bugs, or facts — before re-deriving something already known. Use when starting a task; when the user says "recall", "what did we do", or "what did we decide about X". Do NOT use to save new information — use noir-remember.
4
+ metadata:
5
+ category: memory
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
4
9
  ---
5
10
 
6
- Recall what past sessions already learned before re-deriving it. Noir's memory is a local, project-scoped store of observations (pattern / preference / architecture / bug / workflow / fact / decision / lesson) you saved in earlier sessions. Querying it first avoids repeat work and keeps decisions stable across sessions.
11
+ # noir-recall
12
+
13
+ Query cross-session memory for what was already decided, discovered, or documented — before you re-derive it.
14
+
15
+ ## When to use
16
+
17
+ - Starting a task that may have prior context.
18
+ - The user says "recall", "what did we do about X", "do we have any memory of Y."
19
+ - There's a decision to make and prior sessions may have already made it.
20
+ - **Do NOT use:** to save — use `noir-remember`. To search code — use `noir-exploring`.
7
21
 
8
22
  ## Procedure
9
- 1. **Query with intent.** Call `memory_recall { query, limit }` with a natural-language or identifier query (e.g. `"auth token storage"`, `"why sqlite-vec over pgvector"`, `"ContextEngine embed"`). The hybrid path fuses BM25 + vector similarity via RRF and returns ranked observations scoped to memory only — context-index rows never leak in.
10
- 2. **Use the instant path for a quick check.** When you only need "does anything mention X" and want no embedding cost, call `memory_search { query }` — BM25-only, faster, still scoped to memory.
11
- 3. **Read the full content, not the snippet.** Every returned observation carries its complete `content` (never truncated). Reason over the full text plus its `concepts`, `files`, `type`, and `ts`; cite the observation rather than paraphrasing it loosely.
12
- 4. **Scope when useful.** Pass `type` to filter to one kind (e.g. `"decision"`) or `session_id` to limit to one session, when the query is broad.
13
- 5. **Act, then stop.** If recall surfaces a relevant decision or pattern, follow it; if it contradicts the current plan, surface the conflict before proceeding. If nothing relevant returns, say so plainly and proceed — absence is not a hidden result.
14
-
15
- ## Notes
16
- - **Degraded is honest, not broken.** With no embedder configured (or the local model failed to load), `memory_recall` still works in BM25-only mode. A read-only store (daemon down) still serves `memory_recall` and `memory_search`; only writes are fenced off.
17
- - **Hydrate, never truncate.** Recall hydrates each hit from the authoritative store row, so what you read is the full original text — the BM25 snippet is only the preview that ranked it.
18
- - **Tools absent?** The memory tools are registered only when the daemon was started with memory enabled (the `ctx.memory` service). If they are missing, run `noir init` and start the daemon. To forget something recalled here, see `noir-remember`'s forget path.
23
+
24
+ 1. **Form a specific query.** What decision, pattern, or fact are you looking for? A vague "anything relevant" produces noise.
25
+ 2. **Search memory.** On Noir projects, use `noir memory recall <query>` (or the `memory_recall` MCP tool). If no memory tool is available, check `.noir/` artifacts (specs, plans, tasks) as the durable fallback.
26
+ 3. **Surface 2-4 top matches.** State what was found and when it was recorded. If nothing found, say so — don't fabricate.
27
+ 4. **Apply to the current task.** If a prior decision is relevant, cite it; if it's stale, note that and ask the user.
28
+
29
+ ## Verification
30
+
31
+ - [ ] Memory was queried before making assumptions.
32
+ - [ ] Results are cited with source (date/session).
33
+ - [ ] No fabricated memories.
34
+
35
+ ## When done → next skill
36
+
37
+ → Route to the relevant noir skill based on what you recalled. Or is there something else?
@@ -1,23 +1,37 @@
1
1
  ---
2
2
  name: noir-remember
3
- description: Use when an insight, decision, pattern, or bug worth keeping surfaces, or the user says "remember this" / "save this" — to persist it to Noir's cross-session memory.
3
+ description: Use when persisting an insight, decision, pattern, or bug to Noir's cross-session memory. Use when the user says "remember this" or "save this"; when an insight surfaces during a session. Do NOT use for routine progress.
4
+ metadata:
5
+ category: memory
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
4
9
  ---
5
10
 
6
- Persist a durable observation to Noir's cross-session memory so a future session can recall it. Saving is always local and free — no network call, no LLM call. The observation is written to the local store and recalled later via `noir-recall`.
11
+ # noir-remember
12
+
13
+ Save durable insights so the next session doesn't start from zero.
14
+
15
+ ## When to use
16
+
17
+ - An important decision, pattern, or bug workaround surfaces.
18
+ - The user says "remember this", "save this", "don't forget this."
19
+ - A pattern repeats across sessions — it's worth formalizing.
20
+ - **Do NOT use:** for routine progress updates (those live in the task state).
7
21
 
8
22
  ## Procedure
9
- 1. **Decide it is worth keeping.** Save observations that will matter beyond this session: a decision and its rationale, a confirmed pattern or convention, a hard-won bug fix, a project architecture fact, a workflow that worked. Do not save transient status, scratch reasoning, or anything already obvious from the code.
10
- 2. **Call `memory_save`.** `memory_save { content, type?, concepts?, files?, importance?, session_id? }`. Only `content` is required; the rest sharpen recall:
11
- - `content` — the full insight in prose. Write it to be readable cold, with the why, not just the what. It is never truncated.
12
- - `type` — `pattern` | `preference` | `architecture` | `bug` | `workflow` | `fact` | `decision` (unknown values are accepted). Pick the closest fit; `lesson` is reserved for consolidation output.
13
- - `concepts` — short tags that a future query would use (e.g. `["auth", "sqlite-vec"]`).
14
- - `files` — repo-relative paths the insight concerns.
15
- - `importance` — 0..1 (default 0.5); raise it for load-bearing decisions.
16
- 3. **Confirm the round-trip.** After a non-trivial save, a quick `memory_recall { query }` with a phrase from the content confirms it landed and is retrievable.
17
- 4. **Forget when wrong.** If something saved is outdated or wrong, remove it with `memory_forget { ids: [...] }` using the id returned from `memory_save`. The row and its search indexes are purged.
18
-
19
- ## Notes
20
- - **Local + free, by design.** Saving performs only a local store write plus a local embedding (when an embedder is configured). It never makes a paid call; the only LLM surface in memory is consolidation, which is separately provider-gated and off by default.
21
- - **Append-only; edit by forgetting.** Memory does not mutate rows in place. To correct an observation, forget the old one and save the new one — the audit trail stays clean.
22
- - **Read-only store.** If the daemon is down the store opens read-only and `memory_save` refuses cleanly rather than failing mid-write; start the daemon (`noir daemon start`) and retry.
23
- - **Tools absent?** The memory tools register only when the daemon was started with memory enabled. If they are missing, run `noir init` and start the daemon.
23
+
24
+ 1. **Identify what's worth keeping.** A decision with a reason, a pattern that recurred, a bug with its root cause, a preference the user stated.
25
+ 2. **Write a short, searchable entry.** Key concepts + why it matters. Keep it focused — one fact per entry.
26
+ 3. **Persist it.** On Noir projects, use `noir memory save <content>` (or the `memory_save` / `noir.remember` MCP tool).
27
+ 4. **Confirm.** Say what was saved so the user knows it'll survive.
28
+
29
+ ## Verification
30
+
31
+ - [ ] The entry is one focused fact (not a grab-bag).
32
+ - [ ] Key concepts are named (searchable later).
33
+ - [ ] The entry has a "why" — not just "what."
34
+
35
+ ## When done → next skill
36
+
37
+ → `noir-wrap` if closing, or continue working.
@@ -1,34 +1,35 @@
1
1
  ---
2
2
  name: noir-rules
3
- description: Use when reviewing or editing the project's AI working-rules (.noir/rules/RULES.md), or when deciding whether a directive belongs in the always-on contract vs a skill, a memory, or an ADR.
3
+ description: Use when reviewing or editing the project's AI working-rules (.noir/rules/RULES.md) — decide whether a directive belongs in the always-on contract vs a skill, a memory, or an ADR. Use when the user says "update the rules" or "add a rule".
4
+ metadata:
5
+ category: meta
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
4
9
  ---
5
10
 
6
- # noir-rules — AI working-rules steward
11
+ # noir-rules
7
12
 
8
- The project's canonical AI working-contract lives at `.noir/rules/RULES.md`; the host context file (`CLAUDE.md`) `@import`s it so it is in context every session. Noir re-emits only the `@import` pointer on `noir init`/`noir sync` — the body is user-owned.
13
+ The project's AI working-rules at `.noir/rules/RULES.md` — the always-on contract. Every line costs context in every session, so a rule must earn its place.
9
14
 
10
15
  ## When to use
11
- - Editing or reviewing `.noir/rules/RULES.md`.
12
- - Deciding where a directive belongs:
13
- - **rules** — always-on contract (loaded every session);
14
- - **skill** — on-demand playbook (loaded when triggered);
15
- - **memory** — a learned fact/decision (recall on demand);
16
- - **ADR** — a locked architecture decision (`.noir/decisions/NNNN-*.md`).
17
-
18
- ## Keeping rules lean — the pruning rubric
19
- Every line pays rent in every session's context budget. Keep a line only if it is one of:
20
- - **failure-backed** — it prevented a real issue in the last 30 days; or
21
- - **tool-enforceable** — a command / hook / gate checks it; or
22
- - **decision-encoding** — records a locked architecture/workflow choice; or
23
- - **triggerable** — names a specific condition for action.
24
-
25
- Otherwise delete it. "Document failures, not aspirations."
26
-
27
- ## Recommended structure (section order)
28
- Identity & scope → Anti-assumption contract → SDD workflow gates → Verification commands → Coding standards (link ADRs, don't inline) → Docs & roadmap pointers → Conventions gotchas.
29
-
30
- ## Budget
31
- Target ≤ 150 lines / ≤ 6 KB. Effective attention degrades in the low-thousands of tokens regardless of window size — every line must earn its place.
32
-
33
- ## Multi-host (v1.x)
34
- `RULES.md` is AGENTS.md-compatible. For non-Claude hosts, `noir sync` emits a root `AGENTS.md` that imports it; Cursor additionally compiles to `.cursor/rules/*.mdc` with `description`/`globs`/`alwaysApply` frontmatter.
16
+
17
+ ## Procedure
18
+ 1. **Follow the guidance** in the notes and verification.
19
+
20
+ - The user says "add a rule", "update rules", "should this be a rule?"
21
+ - A convention is being repeated verbally every session — it's time to codify it.
22
+ - A rule is growing stale — it's time to prune or archive.
23
+
24
+ ## Keeping rules lean
25
+
26
+ 1. **One rule, one line.** If it needs a paragraph, it belongs in a skill, a memory, or an ADR.
27
+ 2. **Use the most specific mechanism.** A directive you want ALWAYS active → rule. A directive you want on-demand → skill. A decision worth recalling → memory. An architecture decision with rationale → ADR.
28
+ 3. **Prune stale rules.** `noir doctor rules` checks the budget.
29
+
30
+ ## When done → next skill
31
+
32
+ → The relevant noir skill for the change the rule governs. Or continue.
33
+
34
+ ## Notes
35
+ - This skill is a playbook — the host decides which tools to use. On Claude Code, prefer `AskUserQuestion` for choices; on other hosts, ask in text.
@@ -1,12 +1,41 @@
1
1
  ---
2
2
  name: noir-security
3
- description: Use when reviewing changes for security vulnerabilities — injection, auth, SSRF, data exposure.
3
+ description: Use when reviewing code for security vulnerabilities — injection, auth, SSRF, data exposure, and supply chain risks. Use when the user says "security review" or "audit this for security"; before shipping a feature that handles user input, auth, or sensitive data.
4
+ metadata:
5
+ category: verify
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
9
+ references:
10
+ - security-checklist.md
4
11
  ---
5
12
 
6
13
  # noir-security
7
14
 
8
- > **Stub:** this skill ships as a valid, loadable placeholder in S5; its full playbook is deepened in a later slice.
15
+ Review changes for vulnerabilities — not a pen-test, but the baseline every feature should pass before shipping.
9
16
 
10
- **When to use:** you are reviewing a change and want to check it for the common, exploitable classes before merging.
17
+ ## When to use
11
18
 
12
- **For now:** scan for injection (SQL/command/template), broken auth and authz, SSRF in any outbound call, and sensitive data in logs or responses — flag concretely, do not rubber-stamp.
19
+ - A feature handles user input, authentication, or sensitive data.
20
+ - The user says "security review", "check this for vulnerabilities", or "is this safe."
21
+ - Before `noir-shipping` for a security-sensitive change.
22
+
23
+ ## Procedure
24
+
25
+ 1. **Check surface area.** What data enters? What exits? Who can call it? What's authenticated?
26
+ 2. **Check injection.** SQL, shell, template injection paths — review every dynamic string used in a command or query.
27
+ 3. **Check auth.** Is every endpoint gated? Is the auth check before any data access? No "if admin → show data" then "else → also show data because we forgot a return."
28
+ 4. **Check secrets.** Any hard-coded keys, tokens, or passwords? (Check committed files, not env vars).
29
+ 5. **Check dependencies.** Any new packages? Known vulnerabilities? Pinned versions that are stale?
30
+ 6. **Report findings.** Severity (critical/high/medium/low) + location + fix. One finding per entry.
31
+
32
+ ## Reference
33
+
34
+ For the full injection/auth/exposure/dependency checklist, see [security-checklist.md](references/security-checklist.md).
35
+
36
+ ## When done → next skill
37
+
38
+ → `noir-shipping` if clean, or `noir-systematic-debugging` if a vulnerability needs fixing.
39
+
40
+ ## Notes
41
+ - This skill is a playbook — the host decides which tools to use. On Claude Code, prefer `AskUserQuestion` for choices; on other hosts, ask in text.
@@ -0,0 +1,49 @@
1
+ # Security review checklist — the baseline every feature should pass
2
+
3
+ Deep reference for `noir-security`. A methodical checklist for reviewing code for vulnerabilities before shipping.
4
+
5
+ ## Surface area first
6
+
7
+ Before looking at specific attacks, map the surface:
8
+
9
+ - What DATA enters the system? (user input, webhooks, files, network)
10
+ - What EXITS? (responses, logs, external calls, rendered pages)
11
+ - WHO can call each path? (unauthenticated? role-gated? internal-only?)
12
+ - What TRUST boundaries exist? (the point where untrusted data meets trusted code)
13
+
14
+ ## Injection (the classic)
15
+
16
+ - **SQL** — is any user input concatenated into a query string? Parameterized queries / prepared statements everywhere. No `eval`-style dynamic queries.
17
+ - **Shell** — is user input passed to a shell command? Use `execFile`/argument arrays, never string interpolation into `sh -c`.
18
+ - **Template/XSS** — is user input rendered into HTML/JS unescaped? Framework auto-escaping ON, no `dangerouslySetInnerHTML`-style bypass without a reason.
19
+ - **Path** — is user input used to build a filesystem path? Normalize + validate it stays inside the intended root (no `..` traversal).
20
+
21
+ ## Auth & authorization
22
+
23
+ - **Every data-touching endpoint is gated** — a missing `if (isAdmin) return;` before a `return data` leak is the classic bug (the "forgot the return" pattern).
24
+ - **Auth check happens BEFORE data access**, not after.
25
+ - **Failed auth doesn't reveal** whether the user or password was wrong (in login forms).
26
+ - **Tokens/secrets** — any hard-coded key, committed `.env`, or token in a log? Scan the diff, not just the code.
27
+
28
+ ## Data exposure
29
+
30
+ - **Over-fetching** — does an API return more fields than needed (password hashes, internal ids)?
31
+ - **Logging** — do logs contain tokens, PII, or full request bodies? Sanitize before logging.
32
+ - **Error messages** — do errors leak stack traces or internal paths to the client?
33
+
34
+ ## Dependencies
35
+
36
+ - **New packages** — any added this change? Check for known vulnerabilities and whether they're pinned to a safe version.
37
+ - **Supply chain** — is a package pulled from a trusted source? Any `curl | bash` installs?
38
+ - **Transitive** — a lockfile bump that pulls a vulnerable transitive dep?
39
+
40
+ ## How to report
41
+
42
+ One finding per entry, each with:
43
+
44
+ - **Severity** — critical / high / medium / low (impact × likelihood).
45
+ - **Location** — file:line.
46
+ - **The attack** — a concrete "an attacker could X by Y."
47
+ - **The fix** — a specific remediation.
48
+
49
+ **Rule:** never ship a critical/high finding unaddressed. If it must ship, the risk is explicitly accepted by the user with a tracking issue — never silently.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: noir-shipping
3
+ description: Use when shipping verified work — stage, commit with conventional-commit messages, decide integration (merge, PR, or keep local), and clean up. Use when the user says "commit this", "open a PR", or "ship it". Do NOT use when tests aren't green; verify first with noir-verifying.
4
+ metadata:
5
+ category: git
6
+ version: 1.0.0
7
+ license: MIT
8
+ compatibility: claude · agents-md · gemini · cursor · opencode
9
+ ---
10
+
11
+ # noir-shipping
12
+
13
+ Ship verified work. Absorbs `noir-commit`, `noir-pr`, and `noir-branch` into one surface: stage → commit → integrate → clean up.
14
+
15
+ ## When to use
16
+
17
+ - Implementation is verified and it's time to ship.
18
+ - The user says "commit", "push", "PR", "merge", "ship this."
19
+ - **Do NOT use:** when tests aren't green. Do NOT use as "save my work" — use `noir-checkpoint`.
20
+
21
+ ## Procedure
22
+
23
+ 1. **Stage logically.** One logical change = one commit. No grab-bags.
24
+ 2. **Write a conventional-commit message.** `type(scope): summary`. Body = why, not what.
25
+ 3. **Run the pre-commit gate.** Lint, build, typecheck, test — must be green before committing.
26
+ 4. **Decide integration.** On Claude Code, use `AskUserQuestion`: merge, PR, or keep local. On other hosts, ask plainly. Never push without asking.
27
+ 5. **Clean up.** Scratch files, merged branches, temp notes.
28
+
29
+ ## When done → next skill
30
+
31
+ → `noir-wrap` to close the session. Or is there more to ship?
32
+
33
+ ## Notes
34
+ - This skill is a playbook — the host decides which tools to use. On Claude Code, prefer `AskUserQuestion` for choices; on other hosts, ask in text.
@@ -1,22 +1,56 @@
1
1
  ---
2
2
  name: noir-spec
3
- description: Use when turning a brainstormed idea into a formal spec (what / why / acceptance / non-goals) — before planning or code.
3
+ description: Use when turning a brainstormed idea into a formal spec — capturing the what, why, acceptance criteria, and non-goals. Use when the user says "write a spec" or "spec this". Do NOT use for a single-line feature request that needs no formalization.
4
+ argument-hint: <the idea or feature to specify>
5
+ metadata:
6
+ category: spec
7
+ version: 1.0.0
8
+ license: MIT
9
+ compatibility: claude · agents-md · gemini · cursor · opencode
10
+ references:
11
+ - spec-template.md
4
12
  ---
5
13
 
6
- Turn the confirmed intake into a written spec that a planner (and later an implementer) can work against without re-litigating decisions. The spec is the contract for everything downstream.
14
+ # noir-spec
15
+
16
+ Turn a brainstormed idea into a formal specification — the contract the implementation plan builds against. The spec captures what to build and why, not how to build it. Keep it focused; a spec is a reference, not a novel.
17
+
18
+ **Invoked with:** `$ARGUMENTS` (optional). If present, treat it as the starting idea. If empty, ask what to specify.
19
+
20
+ ## When to use
21
+
22
+ - A brainstorm session has produced a clear direction and it's time to formalize.
23
+ - The user says "write a spec", "spec this", "formalize this", or "create a specification".
24
+ - A feature is large enough that the what/why/non-goals deserve a written reference before planning.
25
+ - **Do NOT use:** for a trivial single-file change that needs no contract.
7
26
 
8
27
  ## Procedure
9
- 1. **Read the resolved intake.** Pull the task stub and any clarification Q&A from `.noir/tasks/`. If anything is still ambiguous, route back to `noir-clarify` instead of guessing here.
10
- 2. **Draft the spec sections.** Write, one section each and no filler:
11
- - **Problem** — why this work exists, in user terms.
12
- - **Scope** — what is being built; the surface area.
13
- - **Acceptance criteria** — observable, each one a check an implementer can run.
14
- - **Non-goals** — what is explicitly out of scope, to protect the plan.
15
- - **Open questions** — anything genuinely unresolved, named not hidden.
16
- 3. **Where approaches are live, pick one.** Name the alternatives, state the trade-off in one line, and choose with a reason. Record the rejected options briefly — the planner needs to know the decision is settled.
17
- 4. **Self-review the draft.** Scan for placeholders (TBD, TODO, vague nouns), internal contradictions (does the scope match the acceptance criteria?), scope-fit (is this one plan, or should it decompose?), and ambiguity (could any line be read two ways?). Fix inline.
18
- 5. **Write and hand off.** Save to `.noir/specs/<topic>.md`. The SDD engine records the spec checkpoint observably via `noir.checkpoint`. Point to `noir-plan` for the implementation plan.
28
+
29
+ 1. **Restate the goal** (one sentence — what are we building and why).
30
+ 2. **Capture the scope.** What's in, what's explicitly out (non-goals), and who this is for (users / personas). On Claude Code, use `AskUserQuestion` for structured choices; on other hosts, ask in plain text.
31
+ 3. **Define acceptance criteria.** Concrete, verifiable "done when" statements. No vague acceptances.
32
+ 4. **Note constraints.** Technical, timeline, dependency, or architectural constraints that bind the implementation.
33
+ 5. **Write to `.noir/specs/<id>-<slug>.md`.** Use the spec template at `references/spec-template.md` if shipped. The file is the durable contract; the engine records the spec checkpoint.
34
+ 6. **Hand off.** Point to `noir-planning` to break this spec into an implementation plan.
35
+
36
+ ## Verification
37
+
38
+ - [ ] The goal is one clear sentence.
39
+ - [ ] Scope boundaries (in / out) are explicit — no "we'll figure it out later."
40
+ - [ ] Acceptance criteria are concrete and verifiable (numbers, behaviors, screens).
41
+ - [ ] Non-goals are listed (what we are deliberately NOT building).
42
+ - [ ] The spec stub is written to `.noir/specs/` (or surfaced to the user if not initialized).
19
43
 
20
44
  ## Notes
21
- - A spec is done when an implementer can plan against it without coming back for clarification. If you would need to ask, the spec is not done.
22
- - Rejected approaches are part of the spec — write them down so they do not come back as new ideas.
45
+
46
+ - A spec can be short. A 10-line spec with sharp boundaries beats a 200-line essay with fuzzy acceptances.
47
+ - Reference sibling specs when a feature builds on one — don't copy-paste.
48
+ - If the user already has a clear mental model, don't force a spec; ask whether they'd like one.
49
+
50
+ ## Reference
51
+
52
+ For a copyable spec skeleton (goal/scope/non-goals/acceptance/constraints), see [spec-template.md](references/spec-template.md).
53
+
54
+ ## When done → next skill
55
+
56
+ → `noir-planning` to break the spec into an implementation plan. Or is there something else you'd like to do?
@@ -0,0 +1,43 @@
1
+ # Spec template — the what/why/acceptance/non-goals skeleton
2
+
3
+ Deep reference for `noir-spec`. A copyable skeleton for a formal specification. Keep it short and sharp; a spec is a contract, not a novel.
4
+
5
+ ```markdown
6
+ # <Feature> — specification
7
+
8
+ ## Goal
9
+ One sentence: what are we building and why.
10
+
11
+ ## Scope (in)
12
+ - The concrete capabilities this build delivers.
13
+
14
+ ## Non-goals (out)
15
+ - What we are deliberately NOT building in this version.
16
+
17
+ ## Users / personas
18
+ - Who this is for.
19
+
20
+ ## Acceptance criteria
21
+ - [ ] Concrete, verifiable "done when" statements.
22
+ - [ ] Each one is testable (behavior, number, or screen).
23
+ - [ ] No vague acceptances like "works well" or "feels fast".
24
+
25
+ ## Constraints
26
+ - Technical, timeline, dependency, or architectural limits that bind the implementation.
27
+
28
+ ## Open questions
29
+ - Anything still unknown; resolved before planning if possible.
30
+ ```
31
+
32
+ ## Authoring rules
33
+
34
+ 1. **Goal first, one sentence.** If the goal needs two sentences, it's two features.
35
+ 2. **Acceptance criteria are the contract.** The implementation plan maps each criterion to a task; the verify gate checks each one. Write them so a reader can check them off without asking you.
36
+ 3. **Non-goals prevent scope creep.** "We are not doing X" is as important as "we are doing Y."
37
+ 4. **A short spec with sharp boundaries beats a long essay.** 10 crisp lines > 200 fuzzy ones.
38
+ 5. **Reference sibling specs** when this builds on another — don't copy-paste its content.
39
+
40
+ ## Good / bad
41
+
42
+ Good: "Acceptance — the CLI accepts `--json` and emits a versioned `{ok, data}` envelope to stdout, empty otherwise; exit 0 on success, non-zero on failure."
43
+ Bad: "Acceptance — it should work properly and be user friendly."