@infinitedusky/indusk-mcp 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.
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: verify
3
+ description: Gate work execution with automated checks (type check, lint, test, build). Shape impl documents to include progressive per-phase verification with specific runnable commands.
4
+ ---
5
+
6
+ You know how to verify that code changes actually work.
7
+
8
+ ## What Verify Does
9
+
10
+ Verify has two roles:
11
+
12
+ 1. **Shape how impls are written** — every impl phase must have a Verification section with specific, runnable commands that prove the phase works. Not "verify it works" — actual commands with expected output.
13
+ 2. **Gate work execution** — when the work skill executes an impl item, verify defines what checks run and in what order before the checkbox gets checked.
14
+
15
+ ## Role 1: Shaping Impl Documents
16
+
17
+ When writing an impl (via the plan skill), every phase should have a `#### Phase N Verification` section. The verification items must be:
18
+
19
+ - **Specific commands** — `pnpm turbo test --filter=mcp`, not "run the tests"
20
+ - **Expected output** — "1 test passing", "server returns 200 on /health", "tsc exits with 0"
21
+ - **Progressive** — each phase proves itself before the next begins. Phase 2's verification should confirm Phase 1 still works too (regression)
22
+
23
+ If a verification section says "verify it works" or "confirm everything is good" without a command, **the impl isn't ready**. Push back and ask: "what command proves this works?"
24
+
25
+ ### What checks does a phase need?
26
+
27
+ Evaluate based on what changed:
28
+
29
+ | Change type | Type check | Lint | Test | Build |
30
+ |---|---|---|---|---|
31
+ | TypeScript source | Yes | Yes | Yes (affected) | Only if shared package |
32
+ | CSS/styles | No | No | No | No |
33
+ | Test files | No | Yes | Yes (the test itself) | No |
34
+ | Config files | Depends | No | Yes (smoke) | Yes |
35
+ | Markdown/docs | No | No | No | No |
36
+ | Package.json / deps | Yes | No | Yes (smoke) | Yes |
37
+ | Build config | Yes | No | Yes (smoke) | Yes |
38
+
39
+ When unsure, run the check. False negatives (missing a real error) are worse than slow verification.
40
+
41
+ ## Role 2: Gating Work Execution
42
+
43
+ When the work skill is executing an impl and reaches verification items, run checks in this order (fastest first):
44
+
45
+ ### Check Order
46
+
47
+ 1. **Type check** — `tsc --noEmit` or `pnpm turbo typecheck --filter={app}` if wired
48
+ - Skip for: CSS changes, markdown changes, image changes
49
+ - Catches: structural errors, type mismatches, missing imports
50
+
51
+ 2. **Lint** — `biome check` (when code-quality-system is set up) or detected linter
52
+ - Skip for: test file changes, markdown changes, generated files
53
+ - Catches: style violations, common bug patterns, unused imports
54
+
55
+ 3. **Affected tests** — `pnpm turbo test --filter={app}`
56
+ - Skip for: markdown changes, config-only changes with no test files
57
+ - Catches: behavioral regressions, broken logic
58
+ - Run affected app's tests, not the full suite
59
+ - **Use the code graph to find affected tests** — query `analyze_code_relationships` for the changed file to discover which test files import or depend on it. Run those tests specifically rather than guessing.
60
+
61
+ 4. **Build** — `pnpm turbo build --filter={app}`
62
+ - Only for: shared package changes, build config changes
63
+ - Skip for: most application-level changes (dev server catches these)
64
+ - Catches: production build issues, missing exports
65
+
66
+ ### Verification Report
67
+
68
+ After running checks, summarize what happened:
69
+
70
+ ```
71
+ Verification Report:
72
+ Type check: passed (tsc --noEmit, 0 errors)
73
+ Lint: skipped (no linter configured yet)
74
+ Tests: passed (1 test in mcp)
75
+ Build: skipped (no shared package change)
76
+ Result: ALL PASSED — safe to check off
77
+ ```
78
+
79
+ Or on failure:
80
+
81
+ ```
82
+ Verification Report:
83
+ Type check: FAILED
84
+ src/index.ts:42 — Property 'foo' does not exist on type 'Bar'
85
+ Lint: passed
86
+ Tests: not run (type check failed first)
87
+ Build: not run
88
+ Result: BLOCKED — fix type error before proceeding
89
+ ```
90
+
91
+ ### Failure Loop
92
+
93
+ When a check fails during work execution:
94
+
95
+ ```
96
+ verify fails
97
+ → read the error output carefully
98
+ → fix the issue
99
+ → re-run ONLY the failing check (not all checks)
100
+ → if pass: continue to next check or check off the item
101
+ → if fail again: try a different fix
102
+ → max 3 attempts before flagging as blocker to the user
103
+ ```
104
+
105
+ Do not silently retry indefinitely. Three attempts, then escalate. When escalating, include:
106
+ - The error output from each attempt
107
+ - What you tried to fix it
108
+ - Why you think it's not a simple fix
109
+
110
+ ### Skip Logic
111
+
112
+ Not every change needs every check. Before running verification, evaluate what files changed and skip checks that can't possibly fail:
113
+
114
+ - **Only markdown changed** → skip everything
115
+ - **Only CSS/styles changed** → skip type check and tests
116
+ - **Only test files changed** → skip type check, run the tests
117
+ - **TypeScript source changed** → run type check + tests, skip build unless shared package
118
+
119
+ When skipping, note it in the verification report with the reason.
120
+
121
+ ## Commands Reference
122
+
123
+ | Check | Command | When to use |
124
+ |---|---|---|
125
+ | Type check | `tsc --noEmit` | Any TypeScript change |
126
+ | Lint | `pnpm check` | Any source file change |
127
+ | Test (scoped) | `pnpm turbo test --filter={app}` | Any logic change |
128
+ | Test (all) | `pnpm test` | Cross-package changes |
129
+ | Build (scoped) | `pnpm turbo build --filter={app}` | Shared package or build config changes |
130
+
131
+ ## Important
132
+
133
+ - **Watch file length and encapsulation.** If a file grows past ~200 lines, consider extracting functions or splitting into modules. Use `find_code` to check for duplicate logic before adding new functions. Code should be DRY — reuse existing utilities rather than reimplementing.
134
+ - Verification items in impls must be specific runnable commands, not vague assertions
135
+ - Progressive: each phase proves itself. Phase 2 shouldn't break Phase 1
136
+ - Run checks fastest-first. Stop on first failure — no point linting if types don't compile
137
+ - Three retries max on failure, then escalate to the user
138
+ - When in doubt, run the check. Slow verification beats missed bugs.
package/skills/work.md ADDED
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: work
3
+ description: Execute an implementation plan by working through its checklist. Reads the full plan context first, then works items in order, checking each off as it's completed.
4
+ argument-hint: "[plan name or keyword]"
5
+ ---
6
+
7
+ You know how to execute plans in this project.
8
+
9
+ ## How Work Works Here
10
+
11
+ Implementation plans live in `planning/{plan-name}/impl.md` as checklists. Your job is to work through them methodically — one item at a time, in order, checking each off immediately after completing it.
12
+
13
+ ## What to Do When Asked to Work
14
+
15
+ 1. **Find the right plan.** Look in `planning/` for the plan matching what the user asked for. If they didn't specify, list all plans that have an impl with status `approved` or `in-progress` and ask which one.
16
+
17
+ 2. **Check prerequisites.** Before starting work:
18
+ - If the plan has an ADR, verify its status is `accepted`. If it's still `proposed`, warn the user: "The ADR hasn't been accepted yet — want to review it first, or proceed anyway?"
19
+ - If the brief has a `## Depends On` section, check that blocking plans are completed or far enough along.
20
+
21
+ 3. **Read the full plan context first.** Before touching any code, read everything in the plan folder — research, brief, ADR, impl. These contain the decisions and reasoning that should guide implementation choices. Don't just read the checklist.
22
+
23
+ 4. **Update status.** If the impl status is `approved`, change it to `in-progress`.
24
+
25
+ 5. **Work through the checklist in order.**
26
+ - Start from the first unchecked item (`- [ ]`)
27
+ - For each item:
28
+ a. **Query the code graph first** — before modifying a file, use `analyze_code_relationships` or `find_code` to understand its dependents. If the file is widely imported, flag the blast radius before proceeding.
29
+ b. **Check for existing code** — before writing new functions, use `find_code` to search for functions that already do what you need. Reuse and extend existing code rather than duplicating. Stay DRY.
30
+ c. Read the relevant source files
31
+ d. Implement the change
32
+ d. Immediately edit impl.md to check the item off (`- [ ]` → `- [x]`)
33
+ e. Move to the next item
34
+ - Do NOT skip ahead or work out of order unless there's a dependency reason
35
+ - Do NOT batch checklist updates — check each off as soon as it's done
36
+
37
+ 6. **Handle blockers.** If you can't complete an item:
38
+ - Add a note to impl.md under the item explaining the blocker
39
+ - Move to the next item if possible
40
+ - Flag the blocker to the user
41
+
42
+ 7. **Add discovered work.** If you find something that needs doing that isn't in the checklist:
43
+ - Add it as a new item in the appropriate phase
44
+ - Then do it and check it off
45
+
46
+ 8. **Per-phase completion order.** Each phase has up to four types of items. Complete them in this order:
47
+
48
+ **Implementation items** → build the thing
49
+ **Verification items** → prove it works (tests, type checks, commands)
50
+ **Context items** → capture what changed (concrete CLAUDE.md edits)
51
+ **Document items** → write or update docs pages (see document skill)
52
+
53
+ A phase is not complete until all four are done. Do not advance to the next phase with unchecked verification, context, or document items.
54
+
55
+ 9. **Verification items.** The Verification section requires proof, not assumption. See the verify skill for full guidance.
56
+ - Run checks in order: type check → lint → affected tests → build. Skip checks that don't apply (see verify skill's skip logic table).
57
+ - Run commands and capture output — verification items must be specific runnable commands, not "verify it works"
58
+ - If a check fails: read the error, fix it, re-run only the failing check. Max 3 attempts before flagging as a blocker to the user.
59
+ - Check items off only when actually verified, not assumed
60
+
61
+ 10. **Context items.** The Context section specifies concrete CLAUDE.md edits:
62
+ - Each item is a specific edit: "Add to Architecture: ...", "Add to Conventions: ...", etc.
63
+ - Make the edit to CLAUDE.md, then check the item off
64
+ - If a phase has no context items, that's fine — not every phase changes project context
65
+
66
+ 11. **Document items.** The Document section specifies docs pages to write or update:
67
+ - Each item targets a specific page in `apps/indusk-docs/src/`
68
+ - See the document skill for guidance on what to document, where, and how to use Mermaid diagrams
69
+ - If a phase has no document items, that's fine — not every phase produces user-facing documentation
70
+
71
+ 12. **Phase transitions.** When all items in a phase (implementation + verification + context + document) are checked, note it and move to the next phase.
72
+
73
+ 13. **Completion.** When all phases are checked:
74
+ - Update impl status to `completed`
75
+ - Summarize what was done
76
+ - If this plan included an ADR, confirm CLAUDE.md's Key Decisions was updated
77
+ - Let the user know the plan is ready for a retrospective if they want one (`/plan {name}` will pick up at the retrospective stage)
78
+
79
+ ## Corrections and Context Learning
80
+
81
+ When you are corrected mid-work — the user says "no, not that way" or "don't do X, do Y" — suggest capturing it with `context learn`:
82
+
83
+ > "Should I capture this? `/context learn 'use pnpm ce, not npx — the skill doc specifies pnpm'`"
84
+
85
+ Don't wait to be told. Corrections are the most valuable source of project knowledge.
86
+
87
+ ## Commits
88
+
89
+ Commit at natural boundaries — typically at the end of a phase or when the context changes. Follow the monorepo rule: commits should be siloed between different contexts (what would be separate repos).
90
+
91
+ Don't commit after every single checklist item — that's too granular. Don't wait until the entire plan is done — that's too coarse. A phase is usually the right unit.
92
+
93
+ ## Cross-Plan Impact
94
+
95
+ If your work changes something referenced by another plan (e.g., a schema field, a function signature, a contract interface), update that plan's impl or notes to reflect the change. Plans should never reference stale information.
96
+
97
+ ## Important
98
+
99
+ - The impl doc is the source of truth for progress. Anyone should be able to read it and know exactly what's done and what's left.
100
+ - Always read the research, brief, and ADR before starting. They contain context that matters.
101
+ - Check items off one at a time, immediately. The checklist should always reflect reality.
102
+ - Explain what you're doing and why as you work through items.
103
+ - **Before touching shared code, query the graph to understand blast radius.** Use `analyze_code_relationships` to see what depends on a file before modifying it.
104
+ - The user's input is: $ARGUMENTS
@@ -0,0 +1,25 @@
1
+ # {Project Name} — Project Context
2
+
3
+ ## What This Is
4
+
5
+ {1-2 sentences: what the project is and who it's for}
6
+
7
+ ## Architecture
8
+
9
+ {Directory tree, key technologies, how things connect.}
10
+
11
+ ## Conventions
12
+
13
+ (None yet — will be populated as the project develops)
14
+
15
+ ## Key Decisions
16
+
17
+ (None yet — will be populated as ADRs are accepted)
18
+
19
+ ## Known Gotchas
20
+
21
+ (None yet — will be populated as the agent makes mistakes)
22
+
23
+ ## Current State
24
+
25
+ Project initialized with InDusk dev system.
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "formatter": {
9
+ "enabled": true,
10
+ "indentStyle": "tab",
11
+ "lineWidth": 100
12
+ },
13
+ "linter": {
14
+ "enabled": true,
15
+ "rules": {
16
+ "recommended": true,
17
+ "correctness": {
18
+ "noUnusedVariables": "error",
19
+ "noUnusedImports": "error"
20
+ },
21
+ "suspicious": {
22
+ "noExplicitAny": "error",
23
+ "noDebugger": "error",
24
+ "noConsole": {
25
+ "level": "warn",
26
+ "options": {
27
+ "allow": ["warn", "error", "info"]
28
+ }
29
+ }
30
+ },
31
+ "style": {
32
+ "useConst": "error"
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "editor.defaultFormatter": "biomejs.biome",
3
+ "editor.formatOnSave": true,
4
+ "eslint.enable": false,
5
+ "editor.codeActionsOnSave": {
6
+ "source.fixAll.biome": "explicit"
7
+ },
8
+ "[typescript]": {
9
+ "editor.defaultFormatter": "biomejs.biome"
10
+ },
11
+ "[typescriptreact]": {
12
+ "editor.defaultFormatter": "biomejs.biome"
13
+ },
14
+ "[javascript]": {
15
+ "editor.defaultFormatter": "biomejs.biome"
16
+ },
17
+ "[json]": {
18
+ "editor.defaultFormatter": "biomejs.biome"
19
+ },
20
+ "[css]": {
21
+ "editor.defaultFormatter": "biomejs.biome"
22
+ }
23
+ }