@ecology91/skills 0.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +179 -0
  3. package/bin/install.mjs +52 -0
  4. package/opencode.json +10 -0
  5. package/package.json +37 -0
  6. package/scripts/link-skills.sh +40 -0
  7. package/scripts/list-skills.sh +7 -0
  8. package/skills/engineering/README.md +16 -0
  9. package/skills/engineering/diagnose/SKILL.md +117 -0
  10. package/skills/engineering/diagnose/scripts/hitl-loop.template.sh +41 -0
  11. package/skills/engineering/grill-with-docs/ADR-FORMAT.md +47 -0
  12. package/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md +77 -0
  13. package/skills/engineering/grill-with-docs/SKILL.md +88 -0
  14. package/skills/engineering/improve-codebase-architecture/DEEPENING.md +37 -0
  15. package/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  16. package/skills/engineering/improve-codebase-architecture/LANGUAGE.md +53 -0
  17. package/skills/engineering/improve-codebase-architecture/SKILL.md +71 -0
  18. package/skills/engineering/prototype/LOGIC.md +79 -0
  19. package/skills/engineering/prototype/SKILL.md +30 -0
  20. package/skills/engineering/prototype/UI.md +112 -0
  21. package/skills/engineering/setup-agent-skills/SKILL.md +128 -0
  22. package/skills/engineering/setup-agent-skills/domain.md +51 -0
  23. package/skills/engineering/setup-agent-skills/issue-tracker-beads.md +54 -0
  24. package/skills/engineering/setup-agent-skills/issue-tracker-github.md +33 -0
  25. package/skills/engineering/setup-agent-skills/issue-tracker-gitlab.md +34 -0
  26. package/skills/engineering/setup-agent-skills/issue-tracker-local.md +27 -0
  27. package/skills/engineering/setup-agent-skills/triage-labels.md +15 -0
  28. package/skills/engineering/setup-coding-quality-checks/SKILL.md +84 -0
  29. package/skills/engineering/tdd/SKILL.md +109 -0
  30. package/skills/engineering/tdd/deep-modules.md +33 -0
  31. package/skills/engineering/tdd/interface-design.md +31 -0
  32. package/skills/engineering/tdd/mocking.md +59 -0
  33. package/skills/engineering/tdd/refactoring.md +10 -0
  34. package/skills/engineering/tdd/tests.md +61 -0
  35. package/skills/engineering/to-issues/SKILL.md +99 -0
  36. package/skills/engineering/to-prd/SKILL.md +76 -0
  37. package/skills/engineering/to-qa/SKILL.md +45 -0
  38. package/skills/engineering/triage/AGENT-BRIEF.md +186 -0
  39. package/skills/engineering/triage/OUT-OF-SCOPE.md +101 -0
  40. package/skills/engineering/triage/SKILL.md +107 -0
  41. package/skills/engineering/zoom-out/SKILL.md +7 -0
  42. package/skills/misc/README.md +8 -0
  43. package/skills/misc/git-guardrails-opencode/SKILL.md +57 -0
  44. package/skills/misc/migrate-to-shoehorn/SKILL.md +118 -0
  45. package/skills/misc/scaffold-exercises/SKILL.md +106 -0
  46. package/skills/misc/setup-pre-commit/SKILL.md +91 -0
  47. package/skills/productivity/README.md +8 -0
  48. package/skills/productivity/caveman/SKILL.md +49 -0
  49. package/skills/productivity/grill-me/SKILL.md +10 -0
  50. package/skills/productivity/handoff/SKILL.md +13 -0
  51. package/skills/productivity/write-a-skill/SKILL.md +117 -0
@@ -0,0 +1,59 @@
1
+ # When to Mock
2
+
3
+ Mock at **system boundaries** only:
4
+
5
+ - External APIs (payment, email, etc.)
6
+ - Databases (sometimes - prefer test DB)
7
+ - Time/randomness
8
+ - File system (sometimes)
9
+
10
+ Don't mock:
11
+
12
+ - Your own classes/modules
13
+ - Internal collaborators
14
+ - Anything you control
15
+
16
+ ## Designing for Mockability
17
+
18
+ At system boundaries, design interfaces that are easy to mock:
19
+
20
+ **1. Use dependency injection**
21
+
22
+ Pass external dependencies in rather than creating them internally:
23
+
24
+ ```typescript
25
+ // Easy to mock
26
+ function processPayment(order, paymentClient) {
27
+ return paymentClient.charge(order.total);
28
+ }
29
+
30
+ // Hard to mock
31
+ function processPayment(order) {
32
+ const client = new StripeClient(process.env.STRIPE_KEY);
33
+ return client.charge(order.total);
34
+ }
35
+ ```
36
+
37
+ **2. Prefer SDK-style interfaces over generic fetchers**
38
+
39
+ Create specific functions for each external operation instead of one generic function with conditional logic:
40
+
41
+ ```typescript
42
+ // GOOD: Each function is independently mockable
43
+ const api = {
44
+ getUser: (id) => fetch(`/users/${id}`),
45
+ getOrders: (userId) => fetch(`/users/${userId}/orders`),
46
+ createOrder: (data) => fetch('/orders', { method: 'POST', body: data }),
47
+ };
48
+
49
+ // BAD: Mocking requires conditional logic inside the mock
50
+ const api = {
51
+ fetch: (endpoint, options) => fetch(endpoint, options),
52
+ };
53
+ ```
54
+
55
+ The SDK approach means:
56
+ - Each mock returns one specific shape
57
+ - No conditional logic in test setup
58
+ - Easier to see which endpoints a test exercises
59
+ - Type safety per endpoint
@@ -0,0 +1,10 @@
1
+ # Refactor Candidates
2
+
3
+ After TDD cycle, look for:
4
+
5
+ - **Duplication** → Extract function/class
6
+ - **Long methods** → Break into private helpers (keep tests on public interface)
7
+ - **Shallow modules** → Combine or deepen
8
+ - **Feature envy** → Move logic to where data lives
9
+ - **Primitive obsession** → Introduce value objects
10
+ - **Existing code** the new code reveals as problematic
@@ -0,0 +1,61 @@
1
+ # Good and Bad Tests
2
+
3
+ ## Good Tests
4
+
5
+ **Integration-style**: Test through real interfaces, not mocks of internal parts.
6
+
7
+ ```typescript
8
+ // GOOD: Tests observable behavior
9
+ test("user can checkout with valid cart", async () => {
10
+ const cart = createCart();
11
+ cart.add(product);
12
+ const result = await checkout(cart, paymentMethod);
13
+ expect(result.status).toBe("confirmed");
14
+ });
15
+ ```
16
+
17
+ Characteristics:
18
+
19
+ - Tests behavior users/callers care about
20
+ - Uses public API only
21
+ - Survives internal refactors
22
+ - Describes WHAT, not HOW
23
+ - One logical assertion per test
24
+
25
+ ## Bad Tests
26
+
27
+ **Implementation-detail tests**: Coupled to internal structure.
28
+
29
+ ```typescript
30
+ // BAD: Tests implementation details
31
+ test("checkout calls paymentService.process", async () => {
32
+ const mockPayment = jest.mock(paymentService);
33
+ await checkout(cart, payment);
34
+ expect(mockPayment.process).toHaveBeenCalledWith(cart.total);
35
+ });
36
+ ```
37
+
38
+ Red flags:
39
+
40
+ - Mocking internal collaborators
41
+ - Testing private methods
42
+ - Asserting on call counts/order
43
+ - Test breaks when refactoring without behavior change
44
+ - Test name describes HOW not WHAT
45
+ - Verifying through external means instead of interface
46
+
47
+ ```typescript
48
+ // BAD: Bypasses interface to verify
49
+ test("createUser saves to database", async () => {
50
+ await createUser({ name: "Alice" });
51
+ const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]);
52
+ expect(row).toBeDefined();
53
+ });
54
+
55
+ // GOOD: Verifies through interface
56
+ test("createUser makes user retrievable", async () => {
57
+ const user = await createUser({ name: "Alice" });
58
+ const retrieved = await getUser(user.id);
59
+ expect(retrieved.name).toBe("Alice");
60
+ });
61
+ ```
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: to-issues
3
+ description: Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.
4
+ ---
5
+
6
+ # To Issues
7
+
8
+ Break a plan into independently-grabbable issues using vertical slices (tracer bullets).
9
+
10
+ The issue tracker and triage label vocabulary should have been provided to you — run `/setup-agent-skills` if not.
11
+
12
+ ## Process
13
+
14
+ ### 1. Gather context
15
+
16
+ Work from whatever is already in the conversation context. If the user passes an issue reference (issue number, URL, or path) as an argument, fetch it from the issue tracker and read its full body and comments.
17
+
18
+ ### 2. Explore the codebase (optional)
19
+
20
+ If you have not already explored the codebase, do so to understand the current state of the code. Issue titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.
21
+
22
+ ### 3. Draft vertical slices
23
+
24
+ Break the plan into **tracer bullet** issues. Each issue is a thin vertical slice that cuts through ALL integration layers end-to-end, NOT a horizontal slice of one layer.
25
+
26
+ Slices may be 'HITL' or 'AFK'. HITL slices require human interaction, such as an architectural decision or a design review. AFK slices can be implemented and merged without human interaction. Prefer AFK over HITL where possible.
27
+
28
+ <vertical-slice-rules>
29
+ - Each slice delivers a narrow but COMPLETE path through every layer (schema, API, UI, tests)
30
+ - A completed slice is demoable or verifiable on its own
31
+ - Prefer many thin slices over few thick ones
32
+ </vertical-slice-rules>
33
+
34
+ ### 4. Quiz the user
35
+
36
+ Present the proposed breakdown as a numbered list. For each slice, show:
37
+
38
+ - **Title**: short descriptive name
39
+ - **Type**: HITL / AFK
40
+ - **Blocked by**: which other slices (if any) must complete first
41
+ - **User stories covered**: which user stories this addresses (if the source material has them)
42
+
43
+ Ask the user:
44
+
45
+ - Does the granularity feel right? (too coarse / too fine)
46
+ - Are the dependency relationships correct?
47
+ - Should any slices be merged or split further?
48
+ - Are the correct slices marked as HITL and AFK?
49
+
50
+ Iterate until the user approves the breakdown.
51
+
52
+ ### 5. Publish the issues to the issue tracker
53
+
54
+ For each approved slice, publish a new issue to the issue tracker. Use the issue body template below.
55
+
56
+ AFK slices should receive the `ready-for-agent` triage label. HITL slices should receive `ready-for-human`. Blocked slices should have real tracker dependencies recorded, not only prose in the issue body.
57
+
58
+ Publish issues in dependency order (blockers first) so you can reference real issue identifiers in the "Blocked by" field.
59
+
60
+ When using Beads and the source is a parent issue, create each child with `--parent <parent-id>`. Do not rely only on a `## Parent` body section. Use `bd create "Title" --body-file - --parent <parent-id> -t task -p 2 -l ready-for-agent --json` for AFK slices, and the same command with `-l ready-for-human` for HITL slices. Record dependencies with `bd dep add <blocked-child-id> <blocking-child-id> --type blocks`.
61
+
62
+ <issue-template>
63
+ ## Parent
64
+
65
+ A reference to the parent issue on the issue tracker (if the source was an existing issue, otherwise omit this section).
66
+
67
+ ## What to build
68
+
69
+ A concise description of this vertical slice. Describe the end-to-end behavior, not layer-by-layer implementation.
70
+
71
+ Avoid specific file paths or code snippets — they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it here and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
72
+
73
+ ## Acceptance criteria
74
+
75
+ - [ ] Criterion 1
76
+ - [ ] Criterion 2
77
+ - [ ] Criterion 3
78
+
79
+ ## Verification
80
+
81
+ Commands or checks the agent should run. Prefer repo-standard commands.
82
+
83
+ ## QA notes
84
+
85
+ Human-visible behavior that should be verified after child issues are closed.
86
+
87
+ ## Out of scope
88
+
89
+ Adjacent behavior the agent must not change.
90
+
91
+ ## Blocked by
92
+
93
+ - A reference to the blocking ticket (if any)
94
+
95
+ Or "None - can start immediately" if no blockers.
96
+
97
+ </issue-template>
98
+
99
+ Do NOT close or modify any parent issue.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: to-prd
3
+ description: Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
4
+ ---
5
+
6
+ This skill takes the current conversation context and codebase understanding and produces a PRD. Do NOT interview the user — just synthesize what you already know.
7
+
8
+ The issue tracker and triage label vocabulary should have been provided to you — run `/setup-agent-skills` if not.
9
+
10
+ ## Process
11
+
12
+ 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the PRD, and respect any ADRs in the area you're touching.
13
+
14
+ 2. Sketch out the major modules you will need to build or modify to complete the implementation. Actively look for opportunities to extract deep modules that can be tested in isolation.
15
+
16
+ A deep module (as opposed to a shallow module) is one which encapsulates a lot of functionality in a simple, testable interface which rarely changes.
17
+
18
+ Check with the user that these modules match their expectations. Check with the user which modules they want tests written for.
19
+
20
+ 3. Write the PRD using the template below, then publish it to the project issue tracker. Do not mark parent PRDs `ready-for-agent`. Parent PRDs are planning containers, not RALPH work items. Use `needs-triage` or `ready-for-human`, then run `/to-issues` to create independently implementable child tasks. Only child implementation issues should receive `ready-for-agent`.
21
+
22
+ <prd-template>
23
+
24
+ ## Problem Statement
25
+
26
+ The problem that the user is facing, from the user's perspective.
27
+
28
+ ## Solution
29
+
30
+ The solution to the problem, from the user's perspective.
31
+
32
+ ## User Stories
33
+
34
+ A LONG, numbered list of user stories. Each user story should be in the format of:
35
+
36
+ 1. As an <actor>, I want a <feature>, so that <benefit>
37
+
38
+ <user-story-example>
39
+ 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
40
+ </user-story-example>
41
+
42
+ This list of user stories should be extremely extensive and cover all aspects of the feature.
43
+
44
+ ## Implementation Decisions
45
+
46
+ A list of implementation decisions that were made. This can include:
47
+
48
+ - The modules that will be built/modified
49
+ - The interfaces of those modules that will be modified
50
+ - Technical clarifications from the developer
51
+ - Architectural decisions
52
+ - Schema changes
53
+ - API contracts
54
+ - Specific interactions
55
+
56
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
57
+
58
+ Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
59
+
60
+ ## Testing Decisions
61
+
62
+ A list of testing decisions that were made. Include:
63
+
64
+ - A description of what makes a good test (only test external behavior, not implementation details)
65
+ - Which modules will be tested
66
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
67
+
68
+ ## Out of Scope
69
+
70
+ A description of the things that are out of scope for this PRD.
71
+
72
+ ## Further Notes
73
+
74
+ Any further notes about the feature.
75
+
76
+ </prd-template>
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: to-qa
3
+ description: Create a local QA To Do session from completed child work under an explicit parent issue. Use when user runs `/to-qa <parent issue>` or asks to turn completed issue work into QA checks.
4
+ compatibility: opencode
5
+ metadata:
6
+ workflow: sandcastle-ralph-qa
7
+ ---
8
+
9
+ # To QA
10
+
11
+ Use this skill when the user runs `/to-qa <parent issue>`.
12
+
13
+ The issue tracker workflow should have been provided to you — run `/setup-agent-skills` if `docs/agents/issue-tracker.md` is missing or if it does not explain how to fetch completed child work for a parent issue.
14
+
15
+ This skill reads from the configured issue tracker and writes to QA To Do. It does not mutate tracker issues.
16
+
17
+ ## Required Inputs
18
+
19
+ - An explicit parent issue reference from the user.
20
+ - A configured issue tracker workflow in `docs/agents/issue-tracker.md`.
21
+ - A parent/child issue relationship where completed child work can be identified.
22
+ - Completed implementation work only.
23
+ - `qa-to-do` MCP server access.
24
+
25
+ ## Workflow
26
+
27
+ 1. Inspect the explicit parent issue in the current repo.
28
+ 2. Using `docs/agents/issue-tracker.md`, find completed source work only: closed/completed/done Beads child issues, structured `.scratch` child files, GitHub/GitLab child issues if the repo documents that convention, or another repo-documented completed-child convention.
29
+ 3. Read commits, changed files, and implementation context only as needed to write concrete QA checks.
30
+ 4. Create human-verifiable QA checks with title, runnable steps, expected result, source issue ID, source evidence, stable ID, and fingerprint.
31
+ 5. Call the `qa-to-do` MCP server to create the QA session.
32
+ 6. Report the session title, source parent, item count, and warnings.
33
+
34
+ ## Rules
35
+
36
+ - Do not create checks from open/incomplete child work; warn about excluded children.
37
+ - If there is no completed source work, fail clearly and do not create a session.
38
+ - If `docs/agents/issue-tracker.md` does not define how to find completed children for the parent issue, ask the user for explicit child issue references; do not infer from unrelated closed work.
39
+ - For Beads, fetch children with `bd list --parent <parent-id> --status all --json --limit 0`, include only closed/completed/done children, read each child with `bd show <child-id> --json` and `bd comments <child-id> --json`, and look for related RALPH commits with `git log --grep="RALPH:.*<child-id>" --oneline`.
40
+ - Create QA checks from acceptance criteria and QA notes before changed files. Do not create QA checks for parent PRDs, open children, blocked children, or review-only refactor commits unless they changed user-visible behavior.
41
+ - Do not write vague checks like "verify implementation" or "works as expected".
42
+ - Do not mutate pass/fail/skip/edit/archive/delete state through MCP.
43
+ - Do not file, close, or update tracker issues during `/to-qa`.
44
+ - QA To Do owns checklist execution, evidence, pass/fail state, and archive.
45
+ - No app-managed secrets are stored by this setup.
@@ -0,0 +1,186 @@
1
+ # Writing Agent Briefs
2
+
3
+ An agent brief is a structured comment posted on an issue tracker issue when it moves to `ready-for-agent`. It is the authoritative specification that an AFK agent will work from. The original issue body and discussion are context — the agent brief is the contract.
4
+
5
+ ## Principles
6
+
7
+ ### Durability over precision
8
+
9
+ The issue may sit in `ready-for-agent` for days or weeks. The codebase will change in the meantime. Write the brief so it stays useful even as files are renamed, moved, or refactored.
10
+
11
+ - **Do** describe interfaces, types, and behavioral contracts
12
+ - **Do** name specific types, function signatures, or config shapes that the agent should look for or modify
13
+ - **Don't** reference file paths — they go stale
14
+ - **Don't** reference line numbers
15
+ - **Don't** assume the current implementation structure will remain the same
16
+
17
+ ### Behavioral, not procedural
18
+
19
+ Describe **what** the system should do, not **how** to implement it. The agent will explore the codebase fresh and make its own implementation decisions.
20
+
21
+ - **Good:** "The `SkillConfig` type should accept an optional `schedule` field of type `CronExpression`"
22
+ - **Bad:** "Open src/types/skill.ts and add a schedule field on line 42"
23
+ - **Good:** "When a user runs `/triage` with no arguments, they should see a summary of issues needing attention"
24
+ - **Bad:** "Add a switch statement in the main handler function"
25
+
26
+ ### Complete acceptance criteria
27
+
28
+ The agent needs to know when it's done. Every agent brief must have concrete, testable acceptance criteria. Each criterion should be independently verifiable.
29
+
30
+ - **Good:** "Running `gh issue list --label needs-triage` returns issues that have been through initial classification"
31
+ - **Bad:** "Triage should work correctly"
32
+
33
+ ### Explicit scope boundaries
34
+
35
+ State what is out of scope. This prevents the agent from gold-plating or making assumptions about adjacent features.
36
+
37
+ ### RALPH readiness
38
+
39
+ Before marking an issue `ready-for-agent`, verify:
40
+
41
+ - It is one independently implementable vertical slice.
42
+ - No unresolved human decision remains.
43
+ - Dependencies are recorded in the tracker, not only prose.
44
+ - Acceptance criteria are concrete.
45
+ - Runnable verification commands are named, or there is a clear reason none exists.
46
+ - Out-of-scope boundaries are explicit.
47
+ - QA notes describe human-visible behavior to verify after completion.
48
+
49
+ ## Template
50
+
51
+ ```markdown
52
+ ## Agent Brief
53
+
54
+ **Category:** bug / enhancement
55
+ **Summary:** one-line description of what needs to happen
56
+
57
+ **Current behavior:**
58
+ Describe what happens now. For bugs, this is the broken behavior.
59
+ For enhancements, this is the status quo the feature builds on.
60
+
61
+ **Desired behavior:**
62
+ Describe what should happen after the agent's work is complete.
63
+ Be specific about edge cases and error conditions.
64
+
65
+ **Key interfaces:**
66
+ - `TypeName` — what needs to change and why
67
+ - `functionName()` return type — what it currently returns vs what it should return
68
+ - Config shape — any new configuration options needed
69
+
70
+ **Acceptance criteria:**
71
+ - [ ] Specific, testable criterion 1
72
+ - [ ] Specific, testable criterion 2
73
+ - [ ] Specific, testable criterion 3
74
+
75
+ **Verification:**
76
+ - Command or check the agent should run
77
+
78
+ **QA notes:**
79
+ - Human-visible behavior to verify after the issue is closed
80
+
81
+ **Out of scope:**
82
+ - Thing that should NOT be changed or addressed in this issue
83
+ - Adjacent feature that might seem related but is separate
84
+ ```
85
+
86
+ ## Examples
87
+
88
+ ### Good agent brief (bug)
89
+
90
+ ```markdown
91
+ ## Agent Brief
92
+
93
+ **Category:** bug
94
+ **Summary:** Skill description truncation drops mid-word, producing broken output
95
+
96
+ **Current behavior:**
97
+ When a skill description exceeds 1024 characters, it is truncated at exactly
98
+ 1024 characters regardless of word boundaries. This produces descriptions
99
+ that end mid-word (e.g. "Use when the user wants to confi").
100
+
101
+ **Desired behavior:**
102
+ Truncation should break at the last word boundary before 1024 characters
103
+ and append "..." to indicate truncation.
104
+
105
+ **Key interfaces:**
106
+ - The `SkillMetadata` type's `description` field — no type change needed,
107
+ but the validation/processing logic that populates it needs to respect
108
+ word boundaries
109
+ - Any function that reads SKILL.md frontmatter and extracts the description
110
+
111
+ **Acceptance criteria:**
112
+ - [ ] Descriptions under 1024 chars are unchanged
113
+ - [ ] Descriptions over 1024 chars are truncated at the last word boundary
114
+ before 1024 chars
115
+ - [ ] Truncated descriptions end with "..."
116
+ - [ ] The total length including "..." does not exceed 1024 chars
117
+
118
+ **Out of scope:**
119
+ - Changing the 1024 char limit itself
120
+ - Multi-line description support
121
+ ```
122
+
123
+ ### Good agent brief (enhancement)
124
+
125
+ ```markdown
126
+ ## Agent Brief
127
+
128
+ **Category:** enhancement
129
+ **Summary:** Add `.out-of-scope/` directory support for tracking rejected feature requests
130
+
131
+ **Current behavior:**
132
+ When a feature request is rejected, the issue is closed with a `wontfix` label
133
+ and a comment. There is no persistent record of the decision or reasoning.
134
+ Future similar requests require the maintainer to recall or search for the
135
+ prior discussion.
136
+
137
+ **Desired behavior:**
138
+ Rejected feature requests should be documented in `.out-of-scope/<concept>.md`
139
+ files that capture the decision, reasoning, and links to all issues that
140
+ requested the feature. When triaging new issues, these files should be
141
+ checked for matches.
142
+
143
+ **Key interfaces:**
144
+ - Markdown file format in `.out-of-scope/` — each file should have a
145
+ `# Concept Name` heading, a `**Decision:**` line, a `**Reason:**` line,
146
+ and a `**Prior requests:**` list with issue links
147
+ - The triage workflow should read all `.out-of-scope/*.md` files early
148
+ and match incoming issues against them by concept similarity
149
+
150
+ **Acceptance criteria:**
151
+ - [ ] Closing a feature as wontfix creates/updates a file in `.out-of-scope/`
152
+ - [ ] The file includes the decision, reasoning, and link to the closed issue
153
+ - [ ] If a matching `.out-of-scope/` file already exists, the new issue is
154
+ appended to its "Prior requests" list rather than creating a duplicate
155
+ - [ ] During triage, existing `.out-of-scope/` files are checked and surfaced
156
+ when a new issue matches a prior rejection
157
+
158
+ **Out of scope:**
159
+ - Automated matching (human confirms the match)
160
+ - Reopening previously rejected features
161
+ - Bug reports (only enhancement rejections go to `.out-of-scope/`)
162
+ ```
163
+
164
+ ### Bad agent brief
165
+
166
+ ```markdown
167
+ ## Agent Brief
168
+
169
+ **Summary:** Fix the triage bug
170
+
171
+ **What to do:**
172
+ The triage thing is broken. Look at the main file and fix it.
173
+ The function around line 150 has the issue.
174
+
175
+ **Files to change:**
176
+ - src/triage/handler.ts (line 150)
177
+ - src/types.ts (line 42)
178
+ ```
179
+
180
+ This is bad because:
181
+ - No category
182
+ - Vague description ("the triage thing is broken")
183
+ - References file paths and line numbers that will go stale
184
+ - No acceptance criteria
185
+ - No scope boundaries
186
+ - No description of current vs desired behavior
@@ -0,0 +1,101 @@
1
+ # Out-of-Scope Knowledge Base
2
+
3
+ The `.out-of-scope/` directory in a repo stores persistent records of rejected feature requests. It serves two purposes:
4
+
5
+ 1. **Institutional memory** — why a feature was rejected, so the reasoning isn't lost when the issue is closed
6
+ 2. **Deduplication** — when a new issue comes in that matches a prior rejection, the skill can surface the previous decision instead of re-litigating it
7
+
8
+ ## Directory structure
9
+
10
+ ```
11
+ .out-of-scope/
12
+ ├── dark-mode.md
13
+ ├── plugin-system.md
14
+ └── graphql-api.md
15
+ ```
16
+
17
+ One file per **concept**, not per issue. Multiple issues requesting the same thing are grouped under one file.
18
+
19
+ ## File format
20
+
21
+ The file should be written in a relaxed, readable style — more like a short design document than a database entry. Use paragraphs, code samples, and examples to make the reasoning clear and useful to someone encountering it for the first time.
22
+
23
+ ```markdown
24
+ # Dark Mode
25
+
26
+ This project does not support dark mode or user-facing theming.
27
+
28
+ ## Why this is out of scope
29
+
30
+ The rendering pipeline assumes a single color palette defined in
31
+ `ThemeConfig`. Supporting multiple themes would require:
32
+
33
+ - A theme context provider wrapping the entire component tree
34
+ - Per-component theme-aware style resolution
35
+ - A persistence layer for user theme preferences
36
+
37
+ This is a significant architectural change that doesn't align with the
38
+ project's focus on content authoring. Theming is a concern for downstream
39
+ consumers who embed or redistribute the output.
40
+
41
+ ```ts
42
+ // The current ThemeConfig interface is not designed for runtime switching:
43
+ interface ThemeConfig {
44
+ colors: ColorPalette; // single palette, resolved at build time
45
+ fonts: FontStack;
46
+ }
47
+ ```
48
+
49
+ ## Prior requests
50
+
51
+ - #42 — "Add dark mode support"
52
+ - #87 — "Night theme for accessibility"
53
+ - #134 — "Dark theme option"
54
+ ```
55
+
56
+ ### Naming the file
57
+
58
+ Use a short, descriptive kebab-case name for the concept: `dark-mode.md`, `plugin-system.md`, `graphql-api.md`. The name should be recognizable enough that someone browsing the directory understands what was rejected without opening the file.
59
+
60
+ ### Writing the reason
61
+
62
+ The reason should be substantive — not "we don't want this" but why. Good reasons reference:
63
+
64
+ - Project scope or philosophy ("This project focuses on X; theming is a downstream concern")
65
+ - Technical constraints ("Supporting this would require Y, which conflicts with our Z architecture")
66
+ - Strategic decisions ("We chose to use A instead of B because...")
67
+
68
+ The reason should be durable. Avoid referencing temporary circumstances ("we're too busy right now") — those aren't real rejections, they're deferrals.
69
+
70
+ ## When to check `.out-of-scope/`
71
+
72
+ During triage (Step 1: Gather context), read all files in `.out-of-scope/`. When evaluating a new issue:
73
+
74
+ - Check if the request matches an existing out-of-scope concept
75
+ - Matching is by concept similarity, not keyword — "night theme" matches `dark-mode.md`
76
+ - If there's a match, surface it to the maintainer: "This is similar to `.out-of-scope/dark-mode.md` — we rejected this before because [reason]. Do you still feel the same way?"
77
+
78
+ The maintainer may:
79
+
80
+ - **Confirm** — the new issue gets added to the existing file's "Prior requests" list, then closed
81
+ - **Reconsider** — the out-of-scope file gets deleted or updated, and the issue proceeds through normal triage
82
+ - **Disagree** — the issues are related but distinct, proceed with normal triage
83
+
84
+ ## When to write to `.out-of-scope/`
85
+
86
+ Only when an **enhancement** (not a bug) is rejected as `wontfix`. The flow:
87
+
88
+ 1. Maintainer decides a feature request is out of scope
89
+ 2. Check if a matching `.out-of-scope/` file already exists
90
+ 3. If yes: append the new issue to the "Prior requests" list
91
+ 4. If no: create a new file with the concept name, decision, reason, and first prior request
92
+ 5. Post a comment on the issue explaining the decision and mentioning the `.out-of-scope/` file
93
+ 6. Close the issue with the `wontfix` label
94
+
95
+ ## Updating or removing out-of-scope files
96
+
97
+ If the maintainer changes their mind about a previously rejected concept:
98
+
99
+ - Delete the `.out-of-scope/` file
100
+ - The skill does not need to reopen old issues — they're historical records
101
+ - The new issue that triggered the reconsideration proceeds through normal triage