@igorlau/dotagents 1.0.14 → 1.0.15

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 (91) hide show
  1. package/README.md +129 -35
  2. package/THIRD_PARTY_NOTICES.md +76 -2
  3. package/dist/build-info.json +1 -1
  4. package/dist/catalog.js +3 -3
  5. package/dist/cli.js +8 -2
  6. package/dist/commands.js +60 -5
  7. package/dist/paths.js +1 -1
  8. package/dist/targets.js +3 -0
  9. package/package.json +2 -2
  10. package/plugin/.claude-plugin/plugin.json +10 -0
  11. package/plugin/agents/dot-implementer.md +38 -0
  12. package/plugin/agents/dot-reviewer.md +31 -0
  13. package/plugin/agents/dot-tester.md +33 -0
  14. package/plugin/hooks/check.mjs +92 -0
  15. package/plugin/hooks/hooks.json +24 -0
  16. package/plugin/rules/code-style.md +6 -0
  17. package/plugin/rules/comments.md +17 -0
  18. package/plugin/rules/comments.upstream.json +8 -0
  19. package/{content → plugin}/rules/ponytail.md +1 -1
  20. package/{content → plugin}/rules/ponytail.upstream.json +1 -1
  21. package/plugin/rules/writing.md +35 -0
  22. package/plugin/rules/writing.upstream.json +8 -0
  23. package/{content → plugin}/scaffold/AGENTS.md.tmpl +1 -0
  24. package/plugin/skills/dot-code-review/SKILL.md +71 -0
  25. package/plugin/skills/dot-code-review/UPSTREAM.json +8 -0
  26. package/plugin/skills/dot-code-review/references/maintainability.md +67 -0
  27. package/plugin/skills/dot-comments/SKILL.md +41 -0
  28. package/plugin/skills/dot-comments/UPSTREAM.json +8 -0
  29. package/{content → plugin}/skills/dot-commit/SKILL.md +7 -5
  30. package/plugin/skills/dot-correct/SKILL.md +43 -0
  31. package/plugin/skills/dot-correct/UPSTREAM.json +8 -0
  32. package/plugin/skills/dot-correct/agents/openai.yaml +5 -0
  33. package/plugin/skills/dot-debug/SKILL.md +125 -0
  34. package/plugin/skills/dot-debug/UPSTREAM.json +8 -0
  35. package/plugin/skills/dot-debug/references/loops.md +32 -0
  36. package/{content → plugin}/skills/dot-docs-writing/SKILL.md +15 -23
  37. package/{content → plugin}/skills/dot-docs-writing/references/formatting.md +26 -26
  38. package/{content → plugin}/skills/dot-docs-writing/references/global-and-accessible.md +9 -10
  39. package/{content → plugin}/skills/dot-docs-writing/references/word-list.md +4 -5
  40. package/plugin/skills/dot-flow/SKILL.md +75 -0
  41. package/plugin/skills/dot-flow/agents/openai.yaml +5 -0
  42. package/plugin/skills/dot-flow/references/inline.md +42 -0
  43. package/{content → plugin}/skills/dot-grill-me/SKILL.md +2 -2
  44. package/{content → plugin}/skills/dot-grill-me/UPSTREAM.json +1 -1
  45. package/plugin/skills/dot-grilling/SKILL.md +34 -0
  46. package/{content → plugin}/skills/dot-grilling/UPSTREAM.json +1 -1
  47. package/plugin/skills/dot-grilling/agents/openai.yaml +3 -0
  48. package/plugin/skills/dot-handoff/SKILL.md +20 -0
  49. package/{content → plugin}/skills/dot-handoff/UPSTREAM.json +1 -1
  50. package/plugin/skills/dot-implement/SKILL.md +65 -0
  51. package/plugin/skills/dot-implement/UPSTREAM.json +8 -0
  52. package/{content → plugin}/skills/dot-implement/references/typescript.md +29 -20
  53. package/{content → plugin}/skills/dot-plan/SKILL.md +15 -8
  54. package/plugin/skills/dot-plan/UPSTREAM.json +8 -0
  55. package/plugin/skills/dot-plan/references/entity-schemas.md +66 -0
  56. package/{content → plugin}/skills/dot-roadmap/SKILL.md +19 -12
  57. package/plugin/skills/dot-roadmap/UPSTREAM.json +8 -0
  58. package/plugin/skills/dot-roadmap/references/wide-refactor.md +3 -0
  59. package/plugin/skills/dot-testing/SKILL.md +48 -0
  60. package/plugin/skills/dot-testing/UPSTREAM.json +8 -0
  61. package/plugin/skills/dot-testing/references/http.md +15 -0
  62. package/plugin/skills/dot-testing/references/modes.md +32 -0
  63. package/plugin/skills/dot-testing/references/shared-state.md +3 -0
  64. package/{content → plugin}/skills/dot-testing/references/typescript.md +2 -2
  65. package/plugin/skills/dot-writing-for-agents/SKILL.md +54 -0
  66. package/plugin/skills/dot-writing-for-agents/UPSTREAM.json +8 -0
  67. package/plugin/skills/dot-writing-for-agents/references/pointers.md +27 -0
  68. package/plugin/skills/dot-writing-for-agents/references/skill-mechanics.md +22 -0
  69. package/plugin/skills/dot-writing-for-agents/references/steps.md +8 -0
  70. package/content/rules/comments.md +0 -15
  71. package/content/skills/dot-code-review/SKILL.md +0 -58
  72. package/content/skills/dot-debug/SKILL.md +0 -142
  73. package/content/skills/dot-debug/UPSTREAM.json +0 -8
  74. package/content/skills/dot-grilling/SKILL.md +0 -34
  75. package/content/skills/dot-grilling/agents/openai.yaml +0 -3
  76. package/content/skills/dot-handoff/SKILL.md +0 -20
  77. package/content/skills/dot-implement/SKILL.md +0 -52
  78. package/content/skills/dot-testing/SKILL.md +0 -44
  79. package/content/skills/dot-writing-for-agents/SKILL-MECHANICS.md +0 -22
  80. package/content/skills/dot-writing-for-agents/SKILL.md +0 -85
  81. package/content/skills/dot-writing-for-agents/UPSTREAM.json +0 -8
  82. /package/{content → plugin}/rules/core.md +0 -0
  83. /package/{content → plugin}/scaffold/.claude/settings.json.tmpl +0 -0
  84. /package/{content → plugin}/scaffold/.editorconfig.tmpl +0 -0
  85. /package/{content → plugin}/scaffold/.gitattributes.tmpl +0 -0
  86. /package/{content → plugin}/scaffold/CLAUDE.md.tmpl +0 -0
  87. /package/{content → plugin}/skills/dot-debug/agents/openai.yaml +0 -0
  88. /package/{content → plugin}/skills/dot-debug/scripts/hitl-loop.template.sh +0 -0
  89. /package/{content → plugin}/skills/dot-grill-me/agents/openai.yaml +0 -0
  90. /package/{content → plugin}/skills/dot-handoff/agents/openai.yaml +0 -0
  91. /package/{content → plugin}/skills/dot-writing-for-agents/agents/openai.yaml +0 -0
@@ -4,5 +4,5 @@
4
4
  "commit": "49dd158d1076134a641b33efb035946536778336",
5
5
  "license": "MIT",
6
6
  "modified": true,
7
- "notes": "Replaced the Claude-specific 'Call the Skill tool' instruction with an agent-neutral one. Added a 'Repository conventions first' section. Renamed with the dot- prefix."
7
+ "notes": "Replaced the Claude-specific 'Call the Skill tool' instruction with an agent-neutral one. Added a 'Repository conventions first' section. Renamed with the dot- prefix. Rewrote the text under plugin/rules/writing.md."
8
8
  }
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: dot-grilling
3
+ description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their ideas, or uses any 'grill' trigger phrases.
4
+ ---
5
+
6
+ Interview the user relentlessly until you reach a shared understanding. Map the interview as a **design tree**: every decision branches into the decisions that depend on it.
7
+
8
+ Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are settled: the questions that you can ask _now_, without a guess at answers that you have not heard yet. Ask the whole frontier in one round: number each question, and give your recommended answer. Then wait for the user's answers before the next round.
9
+
10
+ Use this format for a round:
11
+
12
+ ```
13
+ **Q1: <question title>**: <question body, one or more paragraphs, with choices if there are any>
14
+
15
+ Recommended: <your recommended answer>
16
+
17
+ ---
18
+
19
+ **Q2: <question title>**: <question body, one or more paragraphs, with choices if there are any>
20
+
21
+ Recommended: <your recommended answer>
22
+ ```
23
+
24
+ Word each question so that "yes" accepts your recommended answer.
25
+
26
+ Each round of answers changes the tree: settled decisions move the frontier out and unblock the questions that depend on them. Compute the frontier again and ask the next round. A question whose answer depends on another open question in this round belongs to a _later_ round.
27
+
28
+ Facts are your job, never the user's. When a frontier question needs a fact from the environment (the filesystem, tools, and so on), send a subagent to find it. Do not ask the user for anything that you can look up. Do not block on the search: a search that still runs is an unsettled prerequisite, so only the questions that depend on it wait for the subagent. Ask the rest of the frontier now. The _decisions_ belong to the user: ask the user each one, and wait.
29
+
30
+ The session is done when the frontier is empty: you visited every branch of the design tree, and you assumed nothing in silence. Do not act on the result until the user confirms that you reached a shared understanding.
31
+
32
+ ## Repository conventions first
33
+
34
+ Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the nearby code. They take precedence over this skill: where they differ, follow the repository, and point out the difference. Do not change the repository's standard. Base your recommended answers on those conventions.
@@ -4,5 +4,5 @@
4
4
  "commit": "49dd158d1076134a641b33efb035946536778336",
5
5
  "license": "MIT",
6
6
  "modified": true,
7
- "notes": "Added a 'Repository conventions first' section. Renamed with the dot- prefix."
7
+ "notes": "Added a 'Repository conventions first' section. Renamed with the dot- prefix. Rewrote the text under plugin/rules/writing.md, and replaced the emoji in the round format with text labels."
8
8
  }
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Grilling"
3
+ short_description: "Stress-test a plan, one round of questions at a time"
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: dot-handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up.
4
+ argument-hint: "What will the next session be used for?"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ Write a handoff document that summarizes the current conversation, so a fresh agent can continue the work. Save it to the temporary directory of the user's OS (`$TMPDIR`, else `/tmp`, or `%TEMP%` on Windows), not to the current workspace.
9
+
10
+ Include a "Suggested skills" section in the document, with the skills that the next agent must call the Skill tool for.
11
+
12
+ Do not repeat content that other artifacts already hold, such as specs, plans, ADRs, issues, commits, and diffs. Name them by path or URL instead.
13
+
14
+ Redact all sensitive information, such as API keys, passwords, and personally identifiable information.
15
+
16
+ If the user passed arguments, they describe the focus of the next session. Write the document for that focus.
17
+
18
+ ## Repository conventions first
19
+
20
+ Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the nearby code. They take precedence over this skill: where they differ, follow the repository, and point out the difference. Do not change the repository's standard. List the repository conventions that the next agent must follow, by path.
@@ -4,5 +4,5 @@
4
4
  "commit": "49dd158d1076134a641b33efb035946536778336",
5
5
  "license": "MIT",
6
6
  "modified": true,
7
- "notes": "Added a 'Repository conventions first' section. Renamed with the dot- prefix."
7
+ "notes": "Added a 'Repository conventions first' section. Renamed with the dot- prefix. Rewrote the text under plugin/rules/writing.md."
8
8
  }
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: dot-implement
3
+ description: Implement a feature, fix, refactor, or roadmap task to the repository's and the language's standards. Use when the user asks to build or change code, or to work a task from a dot-roadmap roadmap.
4
+ ---
5
+
6
+ # Implement
7
+
8
+ Turn a request, an approved plan, or a roadmap task into a production code change that ends **green**: the type checker and the linter pass, no current test fails by accident, and you have shown the output. Write no tests: a separate test step writes them.
9
+
10
+ ## Repository conventions first
11
+
12
+ Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the nearby code. They take precedence over this skill: where they differ, follow the repository, and point out the difference. Do not change the repository's standard. Write code that fits those conventions.
13
+
14
+ ## 1. Pin the work
15
+
16
+ Identify the source of the work:
17
+
18
+ - **Roadmap task**: a task file from `dot-roadmap`, or a roadmap directory. With only a directory, pick the lowest-id unticked task whose blockers are all ticked in its `README.md`. If a named task has an unticked blocker, stop and name it. Read the task file and the roadmap's decisions in full. The task's "Out of scope" is a hard boundary.
19
+ - **Approved plan**: the plan in this conversation, from `dot-plan` or the user.
20
+ - **Request**: anything else.
21
+
22
+ Done when you can state the goal, the scope boundary, and the check that proves the work is done.
23
+
24
+ ## 2. Plan when needed
25
+
26
+ A roadmap task or an approved plan is already the plan. For a request that touches more than one file, use the `dot-plan` skill and wait for the user's approval before you change any file. A single-file change goes straight to step 3.
27
+
28
+ ## 3. Build
29
+
30
+ For each language the change touches, read its reference if one exists:
31
+
32
+ - [`references/typescript.md`](references/typescript.md): TypeScript and TSX.
33
+
34
+ Work through the plan one step at a time, and run each step's check before you start the next one.
35
+
36
+ Done when every requirement of the task, plan, or request has code that meets it.
37
+
38
+ ## 4. Verify
39
+
40
+ Run the type checker and the linter. They are hard checks: fix each error that they report. Then run the current tests, the task's "Verify" section, or the plan's final check, and show the output. Classify each failed test:
41
+
42
+ - **Expected**: the test asserts behavior that the task changes on purpose. Keep it for the handoff, and continue.
43
+ - **Unexpected**: a regression. Fix the production code.
44
+
45
+ Check every acceptance criterion one by one. When only an expected failure or a test that does not exist yet blocks a criterion, leave the criterion open for the test step, and list it in the handoff.
46
+
47
+ When a hard check or an unexpected failure stays red, or the task or plan turns out wrong (a fact contradicts it, or it needs work outside its scope), stop. Report the check that failed or the fact that conflicts, and propose a change to the task or plan. Keep the task file, the roadmap's decisions, and the plan as they are until the user agrees, and keep the change inside its scope.
48
+
49
+ Do not tick the roadmap checkbox. The `dot-commit` skill ticks it after the review step.
50
+
51
+ Done when the hard checks pass and no unexpected failure remains.
52
+
53
+ ## 5. Hand off
54
+
55
+ End with the verification output, anything that you skipped or could not check, and these fields for the fill mode of the `dot-testing` skill:
56
+
57
+ ```markdown
58
+ **Expected failures:**
59
+ - `<test file>`: <test name>: <the new behavior that the test must assert>
60
+
61
+ **Behaviors that need tests:**
62
+ - `<module>`: <a behavior that the change adds or changes, and that no test case covers>
63
+ ```
64
+
65
+ Write "none" under a field that has no items. Suggest `dot-testing` in fill mode, then the `dot-code-review` skill, then the `dot-commit` skill. Leave the commit to the user.
@@ -0,0 +1,8 @@
1
+ {
2
+ "repository": "https://github.com/cursor/plugins",
3
+ "path": "pstack/skills/typescript-best-practices",
4
+ "commit": "a5539b15a3d56e04992565aafee2b37051329ce3",
5
+ "license": "MIT",
6
+ "modified": true,
7
+ "notes": "Merged selected rules into references/typescript.md: as only after validation, the schema library of the repository, branded primitives, kind unions, non-empty tuples, Pick/Omit/ReturnType instead of custom mapped types, object arguments for 3 or more parameters or 2 of the same type, a never variable named unhandled, and no console.log. Left out the Real tests rule, because unit tests stub collaborators (see dot-testing). Also condensed pstack/skills/principle-boundary-discipline and pstack/skills/principle-type-system-discipline at the same commit. The rest of the reference is based on the Google TypeScript style guide."
8
+ }
@@ -1,27 +1,32 @@
1
1
  # TypeScript reference
2
2
 
3
- TypeScript rules for the [`dot-implement`](../SKILL.md) skill, based on the Google TypeScript style guide. They cover correctness, type safety, and API shape; leave formatting to the repository's formatter.
3
+ TypeScript rules for the [`dot-implement`](../SKILL.md) skill, based on the Google TypeScript style guide and on pstack's `typescript-best-practices`. They cover correctness, type safety, and API shape; leave the format to the repository's formatter.
4
4
 
5
- The repository's conventions and its compiler and linter configuration come first, then the always-on rules, then this reference. In a file that already breaks a rule, match the file for small changes instead of rewriting it, and keep style fixes out of a behavior change.
5
+ The repository's conventions and its compiler and linter configuration come first, then the always-on rules, then this reference. In a file that already breaks a rule, match the file for small changes. Do not rewrite the file, and keep style fixes out of a behavior change.
6
6
 
7
7
  ## Types
8
8
 
9
- - Use `unknown` for values of unknown type, and narrow it with `typeof`, `instanceof`, `in`, or a type guard before use. Reach for `any` only where no type can express the value, such as a test mock, with a comment that says why.
10
- - Validate data that crosses a trust boundary at the boundary: `JSON.parse` output, request bodies, environment variables, and file contents. Parse it into a typed value once, instead of casting.
11
- - Prefer a runtime check to a type assertion (`as`) or a non-null assertion (`!`): both silence the compiler without checking anything. When an assertion is safe for a reason the code doesn't show, add a comment with the reason.
12
- - Write assertions with `as`, never `<T>value`. When a double assertion is unavoidable, go through `unknown`.
13
- - Annotate object literals with their type (`const foo: Foo = {...}`) or check them with `satisfies`, instead of asserting them with `as Foo`. An annotation catches misspelled and stale fields where the literal is declared.
14
- - Fix compiler errors at their cause. Leave out `@ts-ignore`, `@ts-expect-error`, and `@ts-nocheck`; in a test that must pass an unchecked value, cast that one expression and comment why.
9
+ - Use `unknown` for values of unknown type, and narrow it with `typeof`, `instanceof`, `in`, or a type guard before use. Reach for `any` only where no type can express the value, such as a test mock, and keep it inside a typed test factory so `any` stays out of the tests.
10
+ - Validate data that crosses a trust boundary at the boundary: `JSON.parse` output, request bodies, environment variables, and file contents. Parse it into a typed value once, and trust the type inside the system without a second check.
11
+ - Use the schema library of the repository for that parse, and infer the type from the schema, such as `z.infer`. When the repository has no schema library, write a parse function. Do not add a schema library.
12
+ - In production code, use a type assertion (`as`) only after a validation that proves the type. Prefer a runtime check to a non-null assertion (`!`). When an assertion is safe for a reason that the code does not show, move it into a type guard that checks the claim, or a helper whose name states that reason.
13
+ - Write assertions with `as`, never `<T>value`.
14
+ - Brand the primitives that mean different things, such as IDs and domain values: `type UserId = string & { readonly __brand: "UserId" }`. Create a branded value only in a parse function or a type guard that checks it.
15
+ - Model variants as a union with a `kind` field, not as one object with optional fields and booleans, so that the type cannot hold an illegal state.
16
+ - Type a list that must have an item as a non-empty tuple, `[T, ...T[]]`, when a plain `T[]` would force a `!` or a check at each use.
17
+ - Annotate object literals with their type (`const foo: Foo = {...}`) or check them with `satisfies`, instead of an assertion with `as Foo`. An annotation catches misspelled and stale fields where the literal is declared.
18
+ - Fix compiler errors at their cause. Leave out `@ts-ignore`, `@ts-expect-error`, and `@ts-nocheck`; in a test that must pass an unchecked value, cast it once inside a typed test factory whose name states the invalid value, such as `makeUserWithoutEmail`.
15
19
  - Leave out annotations the compiler infers trivially, such as `const x = 5`. Annotate when inference would produce `unknown` or a wider type than intended, or when a complex return type is hard to read.
16
20
  - Use interfaces for object types, and type aliases for unions, tuples, functions, and other non-object types.
21
+ - Sort the properties of interfaces and object types alphabetically.
17
22
  - Declare a structural implementation's type where you create it (`const horse: Animal = {...}`), so a mismatch fails there instead of at a distant call site.
18
23
  - Keep `| null` and `| undefined` out of type aliases. Add them where a value can actually be absent, and handle absence close to where it arises.
19
24
  - Use optional fields and parameters (`name?: string`) instead of `name: string | undefined`.
20
25
  - Use the lowercase primitive types: `string`, `number`, `boolean`, `object`. Use `unknown`, `object`, or `Record<string, T>` instead of `{}`.
21
26
  - Write `T[]` and `readonly T[]` for simple element types, and `Array<T>` for complex ones.
22
27
  - Use `Map` and `Set` for dictionaries with keys known only at runtime, and `Record<K, V>` for a fixed set of keys.
23
- - Choose the simplest type that expresses the code. A few repeated properties or an interface that extends another beat a mapped or conditional type that readers must evaluate in their heads.
24
- - Avoid generics that appear only in the return type. When an existing API has one, specify the type argument explicitly.
28
+ - Derive a type with `Pick`, `Omit`, or `ReturnType` when it mirrors a source of truth, such as a schema type or the return value of a function. Do not write custom mapped or conditional types.
29
+ - Avoid generics that appear only in the return type. When a current API has one, specify the type argument explicitly.
25
30
  - Treat an indexed read from an array or a record as possibly `undefined`, and check it before use, even when `noUncheckedIndexedAccess` is off.
26
31
 
27
32
  ## Modules
@@ -37,10 +42,12 @@ The repository's conventions and its compiler and linter configuration come firs
37
42
 
38
43
  - Declare with `const` by default and `let` when you reassign. Never use `var`. Declare one variable per statement, before its first use.
39
44
  - Create arrays and objects with literals, not the `Array` or `Object` constructors.
40
- - Spread only matching values: iterables into arrays, plain objects into objects. Never spread `null`, `undefined`, or primitives.
45
+ - Spread only values that match the target: iterables into arrays, plain objects into objects. Never spread `null`, `undefined`, or primitives.
41
46
  - Iterate arrays with `for...of`. Iterate objects with `Object.keys`, `Object.values`, or `Object.entries`; a `for...in` loop also visits inherited properties.
42
47
  - Keep parameter destructuring to one level of shorthand properties, with defaults on the left side.
43
- - Parse numbers with `Number()` and check the result for `NaN`. Use `parseInt` only for a radix other than 10, after checking the digits. Never coerce with unary `+`.
48
+ - Pass one options object when a function has 3 or more parameters, or 2 parameters of the same type. Otherwise use positional parameters, in order of relevance.
49
+ - Sort the properties of an options object parameter alphabetically, in its type and its destructuring.
50
+ - Parse numbers with `Number()` and check the result for `NaN`. Use `parseInt` only for a radix other than 10, after you check the digits. Never coerce with unary `+`.
44
51
  - Coerce with `String()`, `Boolean()`, or a template literal, never with the wrapper constructors (`new String()`).
45
52
  - Compare enum values explicitly, never by truthiness: the first member is `0`, which is falsy.
46
53
  - Use `===` and `!==`. The one exception is `== null`, which matches both `null` and `undefined`.
@@ -53,8 +60,8 @@ The repository's conventions and its compiler and linter configuration come firs
53
60
  - Use `this` only in constructors, methods, and arrow functions inside them. Never use it in a static context.
54
61
  - Use rest parameters and spread instead of `arguments` and `Function.prototype.apply`.
55
62
  - Keep default parameter values free of side effects.
56
- - Mark properties that are never reassigned after the constructor `readonly`. Use parameter properties instead of copying constructor arguments by hand.
57
- - Initialize every class property in its declaration or the constructor, including optional ones as `undefined`, so the object's shape never changes.
63
+ - Mark properties that are never reassigned after the constructor `readonly`. Use parameter properties instead of code that copies constructor arguments by hand.
64
+ - Initialize every class property in its declaration or the constructor, and set optional ones to `undefined`, so the object's shape never changes.
58
65
  - Keep visibility as narrow as possible. Prefer a module-level function to a private method. Leave out the `public` modifier except on a mutable parameter property, and never use `obj['name']` to get around `private`.
59
66
  - Keep getters free of side effects, and skip accessors that only pass a property through.
60
67
  - Leave prototypes and built-in objects unmodified.
@@ -62,16 +69,18 @@ The repository's conventions and its compiler and linter configuration come firs
62
69
  ## Control flow and errors
63
70
 
64
71
  - Wrap every `if`, `for`, and `while` body in braces; only an `if` that fits on one line may skip them. Keep assignments out of conditions.
65
- - Give every `switch` a final `default` group, and end every non-empty `case` with `break`, `return`, or `throw`. When a `switch` covers every member of a union or an enum, make `default` assign the value to a `never` variable, so adding a member fails the type check.
66
- - Throw only `Error` objects or subclasses, created with `new`, and reject promises only with `Error`s. Prefer throwing to returning error objects.
67
- - Treat a caught value as an `Error`, and skip defensive handling of non-`Error` throws unless a dependency actually throws them.
68
- - Handle a caught error or comment why ignoring it is correct; never leave a `catch` block empty and silent.
72
+ - When early returns cover every member of a union or an enum, end the function with `const unhandled: never = value;` and `return unhandled;`, so a new member fails the type check.
73
+ - In a `switch` you keep, give it a final `default` group, and end every non-empty `case` with `break`, `return`, or `throw`.
74
+ - Throw only `Error` objects or subclasses, created with `new`, and reject promises only with `Error`s. Prefer a throw to a returned error object.
75
+ - Treat a caught value as an `Error`, and add no defensive code for non-`Error` throws unless a dependency actually throws them.
76
+ - Handle a caught error, or ignore it through a helper whose name states the case, such as `ignoreMissingFile`; never leave a `catch` block empty and silent.
69
77
  - Keep a `try` block to the statements that can throw.
70
78
  - Await every promise, return it, or handle its rejection. A promise left floating loses its errors; when fire-and-forget is intended, mark it with `void` and attach a `.catch`.
71
79
 
72
80
  ## Language features to avoid
73
81
 
74
82
  - `const enum` (use a plain `enum` or a union of literals), `with`, `eval`, the `Function(string)` constructor, and `debugger` in committed code.
83
+ - `console.log` for diagnostics in shipped code. Use the structured logger of the repository.
75
84
  - Semicolon-free code that relies on automatic semicolon insertion.
76
85
  - Non-standard and proposal-stage JavaScript features, unless the project targets a runtime that ships them.
77
86
  - New decorators. Use the decorators a framework defines, placed directly before the symbol they decorate.
@@ -79,5 +88,5 @@ The repository's conventions and its compiler and linter configuration come firs
79
88
  ## Naming
80
89
 
81
90
  - Use `UpperCamelCase` for classes, interfaces, types, enums, and type parameters; `lowerCamelCase` for variables, functions, methods, and properties; and `CONSTANT_CASE` for module-level constants and enum members.
82
- - Write descriptive names without abbreviations a new reader wouldn't know. Leave type information out of names: no `I` prefix on interfaces, no Hungarian notation, and no `_` prefix or suffix for private members.
83
- - Mark deprecated APIs with `@deprecated` and directions for migrating call sites.
91
+ - Write descriptive names without abbreviations that a new reader would not know. Leave type information out of names: no `I` prefix on interfaces, no Hungarian notation, and no `_` prefix or suffix for private members.
92
+ - Mark deprecated APIs with `@deprecated` and directions to migrate call sites.
@@ -5,15 +5,15 @@ description: Plan a change as small, verifiable steps before writing code. Use w
5
5
 
6
6
  # Plan
7
7
 
8
- A plan turns a request into a sequence of **vertical slices**: each slice is a small change that leaves the system working and ends on a check you can run.
8
+ A plan turns a request into a sequence of **vertical slices**: each slice is a small change that leaves the system in a state that works and ends on a check you can run.
9
9
 
10
10
  ## Repository conventions first
11
11
 
12
- Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the surrounding code. They take precedence over this skill: where they differ, follow the repository, and point out the difference instead of changing the repository's standard. Plan changes that fit those conventions.
12
+ Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the nearby code. They take precedence over this skill: where they differ, follow the repository, and point out the difference. Do not change the repository's standard. Plan changes that fit those conventions.
13
13
 
14
14
  ## 1. Pin the goal
15
15
 
16
- Restate the goal in one or two sentences, and name the **done criterion**: the observable result that tells the user the work is finished (a passing test, a command's output, a behavior in the UI).
16
+ Restate the goal in one or two sentences, and name the **done criterion**: the observable result that tells the user the work is finished (a test that passes, a command's output, a behavior in the UI).
17
17
 
18
18
  Done when the goal and the done criterion fit in three sentences and contain no "and also".
19
19
 
@@ -21,32 +21,39 @@ Done when the goal and the done criterion fit in three sentences and contain no
21
21
 
22
22
  Read the code, tests, configuration, and docs that the change touches. Trace each entry point to the code it reaches. Note the conventions you must follow and the tests that already cover the area.
23
23
 
24
- Facts are your job: look them up instead of asking. Done when you can name every file you expect to change and why.
24
+ Facts are your job: look them up. Do not ask the user. Done when you can name every file you expect to change and why.
25
25
 
26
26
  ## 3. Surface decisions
27
27
 
28
- List the choices that the facts don't settle: behavior in edge cases, trade-offs, naming that users see, anything hard to reverse. Give your recommendation for each one.
28
+ List the choices that the facts do not settle: behavior in edge cases, trade-offs, names that users see, anything hard to reverse. Give your recommendation for each one.
29
29
 
30
30
  If the list is long or the decisions depend on each other, use the `dot-grilling` skill to resolve them with the user. Done when every decision has an answer or is marked as an open question in the plan.
31
31
 
32
- ## 4. Slice the work
32
+ ## 4. Show entity schemas
33
+
34
+ When the change adds or changes a domain entity, read [`references/entity-schemas.md`](references/entity-schemas.md). Show a full JSON Schema for each new entity, and a before and after diff for each changed entity. Wait for the user to approve the schemas before you slice the work.
35
+
36
+ Done when the user approves each schema, or the change touches no domain entity.
37
+
38
+ ## 5. Slice the work
33
39
 
34
40
  Write the steps. For each step, include:
35
41
 
36
42
  - **Change**: what you modify, by file or module.
37
43
  - **Check**: the command or observation that proves the step works.
38
44
 
39
- Order the steps so that the riskiest unknown comes first, as a **tracer bullet**: the thinnest path through the whole system that proves the approach. Keep refactors in their own steps, separate from behavior changes.
45
+ Put the removal steps first: delete the dead code, redundant checks, and stubs that the change makes unnecessary, so the later steps build on less code. Then order the steps so that the riskiest unknown comes first, as a **tracer bullet**: the thinnest path through the whole system that proves the approach. Keep refactors in their own steps, separate from behavior changes.
40
46
 
41
47
  Done when every step has a check that can fail, and the last check matches the done criterion.
42
48
 
43
- ## 5. Present and wait
49
+ ## 6. Present and wait
44
50
 
45
51
  Show the plan in this shape:
46
52
 
47
53
  ```markdown
48
54
  **Goal:** <one sentence>
49
55
  **Done when:** <done criterion>
56
+ **Schemas:** <the approved entity schemas, or none>
50
57
 
51
58
  1. <change> → check: <command or observation>
52
59
  2. ...
@@ -0,0 +1,8 @@
1
+ {
2
+ "repository": "https://github.com/cursor/plugins",
3
+ "path": "pstack/skills/principle-subtract-before-you-add/SKILL.md",
4
+ "commit": "a5539b15a3d56e04992565aafee2b37051329ce3",
5
+ "license": "MIT",
6
+ "modified": true,
7
+ "notes": "Condensed the principle into the removal-first sentence in Slice the work. The Model the domain section of references/entity-schemas.md condenses pstack/skills/principle-model-the-domain/SKILL.md at the same commit. The rest of the skill is original and is not from pstack."
8
+ }
@@ -0,0 +1,66 @@
1
+ # Entity schemas
2
+
3
+ Schema details for the [`dot-plan`](../SKILL.md) skill. A domain entity is a thing that the domain names and that the code stores or sends, such as an order, a user, or an invoice.
4
+
5
+ ## Format
6
+
7
+ Write each schema in JSON Schema draft 2020-12, in a `json` block. Give it `$schema`, `$id`, `title`, `type`, `required`, and `properties`.
8
+
9
+ - For a new entity, show the full schema.
10
+ - For a changed entity, show a `diff` block of the schema before and after the change.
11
+
12
+ Put the schemas in the plan. Do not commit schema files to the target repository.
13
+
14
+ ## Model the domain
15
+
16
+ Make the illegal states impossible to write in the schema:
17
+
18
+ - Model a lifecycle as one `status` field with an `enum`, not as booleans that must agree, such as `isPaid` and `isShipped`.
19
+ - Model variants with a `kind` field and `oneOf`, not as one object with optional fields for each variant.
20
+ - Use `minItems: 1` for a list that must have an item.
21
+
22
+ ## Example: a new entity
23
+
24
+ ```json
25
+ {
26
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
27
+ "$id": "urn:example:order",
28
+ "title": "Order",
29
+ "type": "object",
30
+ "required": ["id", "customerId", "status", "items"],
31
+ "properties": {
32
+ "id": { "type": "string", "format": "uuid" },
33
+ "customerId": { "type": "string", "format": "uuid" },
34
+ "status": { "enum": ["pending", "paid", "shipped"] },
35
+ "items": {
36
+ "type": "array",
37
+ "minItems": 1,
38
+ "items": {
39
+ "type": "object",
40
+ "required": ["sku", "quantity"],
41
+ "properties": {
42
+ "sku": { "type": "string" },
43
+ "quantity": { "type": "integer", "minimum": 1 }
44
+ },
45
+ "additionalProperties": false
46
+ }
47
+ }
48
+ },
49
+ "additionalProperties": false
50
+ }
51
+ ```
52
+
53
+ ## Example: a changed entity
54
+
55
+ The change replaces two booleans with a `status` field:
56
+
57
+ ```diff
58
+ - "required": ["id", "customerId", "paid", "shipped"],
59
+ + "required": ["id", "customerId", "status"],
60
+ "properties": {
61
+ "id": { "type": "string", "format": "uuid" },
62
+ "customerId": { "type": "string", "format": "uuid" },
63
+ - "paid": { "type": "boolean" },
64
+ - "shipped": { "type": "boolean" }
65
+ + "status": { "enum": ["pending", "paid", "shipped"] }
66
+ },
@@ -1,23 +1,23 @@
1
1
  ---
2
2
  name: dot-roadmap
3
3
  description: Turn a grilled plan into a roadmap of phases, each split into self-contained tasks.
4
- argument-hint: "Path to the plan, if it isn't in this conversation"
4
+ argument-hint: "Path to the plan, if it is not in this conversation"
5
5
  disable-model-invocation: true
6
6
  ---
7
7
 
8
8
  # Roadmap
9
9
 
10
- A roadmap splits a plan into **phases**, and each phase into **tasks**. A phase ends on a **milestone**: an observable state where the system works and could ship. A task is **self-contained**: a fresh agent session can build it from its file alone, and a reviewer can judge its diff in one sitting.
10
+ A roadmap splits a plan into **phases**, and each phase into **tasks**. A phase ends on a **milestone**: an observable state where the system works and could ship. A task is **self-contained**: a fresh agent session can build it from its file alone, and a reviewer can judge its diff in one session.
11
11
 
12
12
  ## Repository conventions first
13
13
 
14
- Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the surrounding code. They take precedence over this skill: where they differ, follow the repository, and point out the difference instead of changing the repository's standard. Write tasks whose changes fit those conventions.
14
+ Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the nearby code. They take precedence over this skill: where they differ, follow the repository, and point out the difference. Do not change the repository's standard. Write tasks whose changes fit those conventions.
15
15
 
16
16
  ## 1. Load the plan
17
17
 
18
18
  Work from the plan in this conversation, usually the shared understanding a `dot-grill-me` session reached. If the user passed a path or URL, read it in full.
19
19
 
20
- Synthesize; don't interview. If the plan still has unsettled decisions, list them and suggest `dot-grill-me` before you go on. Done when you can state the **destination** (what is true when the whole roadmap is done) and every decision the plan made.
20
+ Synthesize the plan. Do not interview the user. If the plan still has unsettled decisions, list them and suggest `dot-grill-me` before you go on. Done when you can state the **destination** (what is true when the whole roadmap is done) and every decision the plan made.
21
21
 
22
22
  ## 2. Gather facts
23
23
 
@@ -28,10 +28,11 @@ Read the code, tests, and configuration the plan touches. Note the modules each
28
28
  Group the work into phases, ordered so that:
29
29
 
30
30
  - The first phase is a **tracer bullet**: the thinnest path through the whole system that proves the approach, so the riskiest unknown fails first.
31
+ - Removals (dead code, redundant checks, stubs) come before the work that builds on them.
31
32
  - Prefactors come before the behavior that needs them.
32
33
  - Each later phase builds on a milestone that already works.
33
34
 
34
- Done when every phase has a milestone you can observe (a command's output, a passing test, a behavior in the UI), and the last milestone matches the destination.
35
+ Done when every phase has a milestone you can observe (a command's output, a test that passes, a behavior in the UI), and the last milestone matches the destination.
35
36
 
36
37
  ## 4. Split phases into tasks
37
38
 
@@ -40,25 +41,26 @@ Split each phase into tasks. Each task:
40
41
  - Is a **vertical slice**: a narrow but complete path through every layer it needs, verifiable on its own.
41
42
  - Keeps a refactor separate from a behavior change.
42
43
  - Fits one fresh agent session and one reviewable diff, roughly a few hundred changed lines.
44
+ - Lists its **test cases**: the test names, each with the test file where it belongs, in the order and with the names that the `dot-testing` skill gives. For controller, integration, and end-to-end tests, use the HTTP reference of `dot-testing`. `dot-testing` writes them as pending tests before the code. Write "none" when the task changes no tested behavior.
43
45
  - Declares its **blockers**: the tasks that must be done first, by id (`2.3` is phase 2, task 3). A task without blockers can start now.
44
46
 
45
- A **wide refactor**, one mechanical change that breaks many call sites at once, can't land as one green slice. Sequence it as **expand–contract**: add the new form beside the old, migrate callers in batches (one task each, blocked by the expand), then delete the old form in a task blocked by every batch.
47
+ When one mechanical change breaks many call sites at once, read [`references/wide-refactor.md`](references/wide-refactor.md).
46
48
 
47
49
  Done when every requirement and decision from the plan belongs to exactly one task or to the roadmap's out-of-scope list, and every task has acceptance criteria that can fail.
48
50
 
49
51
  ## 5. Review with the user
50
52
 
51
- Show the breakdown compactly: each phase with its milestone, then its tasks as `id: title (blocked by: …) — goal`. Ask:
53
+ Show the breakdown compactly: each phase with its milestone, then its tasks as `id: title (blocked by: …): goal`. Ask:
52
54
 
53
55
  - Is the granularity right, or should some tasks merge or split?
54
56
  - Does each blocker genuinely gate its task?
55
- - Is anything in the plan missing, or in the wrong phase?
57
+ - Does the roadmap leave out a part of the plan, or put a part in the wrong phase?
56
58
 
57
59
  Iterate until the user approves. Write no files before approval.
58
60
 
59
61
  ## 6. Write the roadmap
60
62
 
61
- Write to `.tmp/roadmaps/<roadmap-slug>/` at the repository root. First run `git check-ignore -q .tmp`: if `.tmp` isn't ignored, stop and tell the user rather than editing `.gitignore`.
63
+ Write to `.tmp/roadmaps/<roadmap-slug>/` at the repository root. First run `git check-ignore -q .tmp`: if Git does not ignore `.tmp`, stop and tell the user. Do not edit `.gitignore`.
62
64
 
63
65
  ```
64
66
  .tmp/roadmaps/<roadmap-slug>/
@@ -70,7 +72,7 @@ Write to `.tmp/roadmaps/<roadmap-slug>/` at the repository root. First run `git
70
72
  └── 01-<task-slug>.md
71
73
  ```
72
74
 
73
- `README.md` is the index and the single source of truth for decisions; task files link to it instead of restating them:
75
+ `README.md` is the index and the single source of truth for decisions; task files link to it and do not restate them. Put the entity schemas that the user approved in `dot-plan` in the decisions:
74
76
 
75
77
  ```markdown
76
78
  # <Roadmap title>
@@ -79,7 +81,8 @@ Write to `.tmp/roadmaps/<roadmap-slug>/` at the repository root. First run `git
79
81
 
80
82
  ## Decisions
81
83
 
82
- - <decision from the plan, one line each, with the reason when it isn't obvious>
84
+ - <decision from the plan, one line each, with the reason when it is not obvious>
85
+ - <approved entity schema, as a JSON Schema block, when the plan has one>
83
86
 
84
87
  ## Out of scope
85
88
 
@@ -117,9 +120,13 @@ Each task file:
117
120
 
118
121
  - [ ] <checkable condition>
119
122
 
123
+ ## Test cases
124
+
125
+ - `<test file>`: <test name>, or none
126
+
120
127
  ## Verify
121
128
 
122
129
  <the command or observation that proves the acceptance criteria>
123
130
  ```
124
131
 
125
- Done when every task file exists, `README.md` links each one, and each task reads complete without this conversation. End by telling the user the roadmap's path and the tasks they can start now.
132
+ Done when every task file exists, `README.md` links each one, and each task reads complete without this conversation. At the end, tell the user the roadmap's path and the tasks they can start now.
@@ -0,0 +1,8 @@
1
+ {
2
+ "repository": "https://github.com/cursor/plugins",
3
+ "path": "pstack/skills/principle-subtract-before-you-add/SKILL.md",
4
+ "commit": "a5539b15a3d56e04992565aafee2b37051329ce3",
5
+ "license": "MIT",
6
+ "modified": true,
7
+ "notes": "Condensed the principle into the removals bullet in Cut phases. The rest of the skill is original and is not from pstack."
8
+ }
@@ -0,0 +1,3 @@
1
+ # Wide refactors
2
+
3
+ A **wide refactor**, one mechanical change that breaks many call sites at once, cannot land as one green slice. Order it as **expand and contract**: add the new form beside the old, migrate callers in batches (one task each, blocked by the expand), then delete the old form in a task blocked by every batch.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: dot-testing
3
+ description: Write and change tests with a makeSut factory per suite. Use when you add, fix, or restructure tests, unit or integration.
4
+ ---
5
+
6
+ # Testing
7
+
8
+ Write tests that build the **system under test** (`sut`) in one factory, share it across the suite, and stay isolated: reset the test doubles between tests.
9
+
10
+ ## Repository conventions first
11
+
12
+ Before you start, read what the repository defines: agent instructions (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.github/instructions/`, `.cursor/rules/`), project skills, `CONTRIBUTING.md`, style guides, linter and formatter configuration, and the patterns in the nearby code. They take precedence over this skill: where they differ, follow the repository, and point out the difference. Do not change the repository's standard. When the repository already sets up tests another way, such as pytest fixtures or its own setup helper, use that and leave out `makeSut`.
13
+
14
+ ## The makeSut factory
15
+
16
+ Use `makeSut` when the subject needs setup: construction, configuration, dependencies, or a resource such as a database or a server. Call a subject without setup directly in its own `describe`: pure functions, utilities, and constants. The test is "does it need setup?", not "is it a utility?"; a utility that takes an injected clock gets a `makeSut`.
17
+
18
+ - Name it in the case style of the language (`makeSut`, `make_sut`), and always call the tested object `sut`.
19
+ - Give it no parameters. It returns an object with `sut`, every test double by name, and `cleanup` when a resource needs a release: `{ sut, repositoryStub, cleanup }`. When setup fails partway, it releases what it already opened, then throws the error again.
20
+ - Build each test double in its own factory (`makeRepositoryStub()`) whose methods return the happy path, so a test spells out only what differs.
21
+ - Place `makeSut` and the double factories in the test file, after the imports. Move them to a shared helper once a second test file needs them.
22
+
23
+ ## Suite lifecycle
24
+
25
+ 1. Call `makeSut` once per top-level `describe`, in the hook that runs before all tests, and call `cleanup` in the hook that runs after all of them.
26
+ 2. In a test, change a dependency's behavior with a spy or a stub on the double that `makeSut` returned, for that test only.
27
+ 3. Restore every spy and stub in the hook that runs after each test, so the next test sees the happy-path doubles again.
28
+
29
+
30
+ ## Test principles
31
+
32
+ - Arrange, act, assert: one block each, in that order.
33
+ - Test one behavior per test, and name the test after that behavior ("returns null when the user does not exist").
34
+ - Assert on outputs and on calls that cross the `sut`'s boundary, so the test fails when the behavior breaks and passes when only the internals change.
35
+ - Put a test in the test file of the module whose behavior it asserts: the tests for `concepts.ts` go in `concepts.test.ts`. Create that file if it does not exist. Do not add the test to another module's test file because that file already runs the code.
36
+ - In a unit test, stub the collaborators from other units through the doubles that `makeSut` returns. Do not spy on the `sut`, and assert only the behavior of the `sut`. Test a helper method of the same class through the outputs of the public method that calls it, and do not repeat the cases of the helper there.
37
+ - Prefer stubs and fakes that return data to mocks that assert the call sequence.
38
+
39
+ ## References
40
+
41
+ Read each reference that applies to the tests:
42
+
43
+ - [`references/typescript.md`](references/typescript.md): read when the tests use TypeScript with Vitest, Jest, or `node:test`.
44
+ - [`references/http.md`](references/http.md): read when you write controller, integration, or end-to-end tests.
45
+ - [`references/shared-state.md`](references/shared-state.md): read when the `sut` keeps mutable state between calls, or when the tests run concurrently.
46
+ - [`references/modes.md`](references/modes.md): read when you work a roadmap task, before `dot-implement` (stub mode) or after it (fill mode).
47
+
48
+ Done when every test you wrote or changed passes with the repository's test command, and you have shown the output.
@@ -0,0 +1,8 @@
1
+ {
2
+ "repository": "https://github.com/cursor/plugins",
3
+ "path": "pstack/skills/principle-test-behavior-not-implementation/SKILL.md",
4
+ "commit": "a5539b15a3d56e04992565aafee2b37051329ce3",
5
+ "license": "MIT",
6
+ "modified": true,
7
+ "notes": "Condensed the principle into one clause of the assertion bullet in Test principles. The rest of the skill is original and is not from pstack."
8
+ }
@@ -0,0 +1,15 @@
1
+ # HTTP reference
2
+
3
+ HTTP test details for the [`dot-testing`](../SKILL.md) skill. Use them for controller, integration, and end-to-end tests.
4
+
5
+ ## Order
6
+
7
+ Order the tests of each endpoint by the status code that they expect, from low to high: 200, 201, 400, 401, 403, 404, 409, 422, 500. When two tests expect the same status code, put the happy path first.
8
+
9
+ ## Names
10
+
11
+ When the repository has no convention for test names, name each test `should return {statusCode} when {conditions}`, such as `should return 404 when the user does not exist`.
12
+
13
+ ## Dependencies
14
+
15
+ Integration and end-to-end tests run the real dependencies, such as the database and the HTTP server. Unit tests stub them through the doubles that `makeSut` returns.