@codewizard-dt/bootstrap 2.10.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 (186) hide show
  1. package/.github/workflows/build.yml +88 -0
  2. package/.github/workflows/security.yml +24 -0
  3. package/.gitleaks.toml +15 -0
  4. package/README.md +472 -0
  5. package/bin/cli.js +47 -0
  6. package/lib/README.md +27 -0
  7. package/lib/hooks/README.md +316 -0
  8. package/lib/hooks/env-file-guard.js +45 -0
  9. package/lib/hooks/git-protected-ops-block.js +77 -0
  10. package/lib/hooks/lib/serena-languages.js +158 -0
  11. package/lib/hooks/lib/serena.js +787 -0
  12. package/lib/hooks/mv-absolute-path-block.js +53 -0
  13. package/lib/hooks/serena-bash-grep-block.js +501 -0
  14. package/lib/hooks/serena-edit-guard.js +74 -0
  15. package/lib/hooks/serena-first-glob-guard.js +94 -0
  16. package/lib/hooks/serena-first-guard.js +74 -0
  17. package/lib/hooks/serena-first-read-guard.js +167 -0
  18. package/lib/hooks/serena-pre-delegation.js +117 -0
  19. package/lib/hooks/serena-session-reset.js +45 -0
  20. package/lib/hooks/serena-usage-tracker.js +186 -0
  21. package/lib/hooks/serena-write-guard.js +58 -0
  22. package/lib/prompts/README.md +16 -0
  23. package/lib/prompts/migrate-wiki.md +111 -0
  24. package/lib/prompts/setup-deployment.md +322 -0
  25. package/lib/prompts/setup-design-system.md +162 -0
  26. package/lib/prompts/setup-strict-typechecks.md +139 -0
  27. package/lib/scripts/README.md +49 -0
  28. package/lib/scripts/bootstrap-serena.sh +145 -0
  29. package/lib/scripts/build-mcp-guide.sh +108 -0
  30. package/lib/scripts/install-global.sh +78 -0
  31. package/lib/scripts/install-mcps.sh +131 -0
  32. package/lib/scripts/lib.sh +154 -0
  33. package/lib/scripts/merge-gitignore.sh +65 -0
  34. package/lib/scripts/migrate-project.sh +273 -0
  35. package/lib/scripts/setup-deployment.sh +104 -0
  36. package/lib/scripts/setup-project.sh +55 -0
  37. package/lib/scripts/setup-runner.sh +99 -0
  38. package/lib/scripts/setup-strict-typechecks.sh +29 -0
  39. package/lib/scripts/startup.sh +42 -0
  40. package/lib/scripts/sync-wiki-scaffold.sh +104 -0
  41. package/lib/scripts/templates/CLAUDE-env-safety.md +3 -0
  42. package/lib/scripts/templates/CLAUDE-wiki.md +60 -0
  43. package/lib/scripts/templates/gitignore +136 -0
  44. package/lib/scripts/templates/guides/stubs/00-header.md +15 -0
  45. package/lib/scripts/templates/guides/stubs/brave-search.md +20 -0
  46. package/lib/scripts/templates/guides/stubs/context7.md +26 -0
  47. package/lib/scripts/templates/guides/stubs/playwright.md +26 -0
  48. package/lib/scripts/templates/guides/stubs/serena.md +219 -0
  49. package/lib/scripts/templates/wiki/conventions.md +100 -0
  50. package/lib/scripts/templates/wiki/dashboard.html +1733 -0
  51. package/lib/scripts/templates/wiki/hot.md +21 -0
  52. package/lib/scripts/templates/wiki/index.md +46 -0
  53. package/lib/scripts/templates/wiki/knowledge/concepts/.gitkeep +0 -0
  54. package/lib/scripts/templates/wiki/knowledge/entities/components/.gitkeep +0 -0
  55. package/lib/scripts/templates/wiki/knowledge/entities/organisations/.gitkeep +0 -0
  56. package/lib/scripts/templates/wiki/knowledge/entities/people/.gitkeep +0 -0
  57. package/lib/scripts/templates/wiki/knowledge/entities/tools/.gitkeep +0 -0
  58. package/lib/scripts/templates/wiki/knowledge/sources/.gitkeep +0 -0
  59. package/lib/scripts/templates/wiki/log.md +14 -0
  60. package/lib/scripts/templates/wiki/work/bugs/.gitkeep +0 -0
  61. package/lib/scripts/templates/wiki/work/bugs/archive/index.md +6 -0
  62. package/lib/scripts/templates/wiki/work/bugs/index.md +12 -0
  63. package/lib/scripts/templates/wiki/work/bugs/lifecycle.md +39 -0
  64. package/lib/scripts/templates/wiki/work/decisions/.gitkeep +0 -0
  65. package/lib/scripts/templates/wiki/work/decisions/archive/index.md +6 -0
  66. package/lib/scripts/templates/wiki/work/decisions/index.md +12 -0
  67. package/lib/scripts/templates/wiki/work/decisions/lifecycle.md +42 -0
  68. package/lib/scripts/templates/wiki/work/requirements/.gitkeep +0 -0
  69. package/lib/scripts/templates/wiki/work/requirements/archive/index.md +6 -0
  70. package/lib/scripts/templates/wiki/work/requirements/index.md +12 -0
  71. package/lib/scripts/templates/wiki/work/requirements/lifecycle.md +34 -0
  72. package/lib/scripts/templates/wiki/work/roadmaps/.gitkeep +0 -0
  73. package/lib/scripts/templates/wiki/work/roadmaps/archive/index.md +6 -0
  74. package/lib/scripts/templates/wiki/work/roadmaps/index.md +12 -0
  75. package/lib/scripts/templates/wiki/work/roadmaps/lifecycle.md +32 -0
  76. package/lib/scripts/templates/wiki/work/tasks/.gitkeep +0 -0
  77. package/lib/scripts/templates/wiki/work/tasks/archive/index.md +6 -0
  78. package/lib/scripts/templates/wiki/work/tasks/index.md +12 -0
  79. package/lib/scripts/templates/wiki/work/tasks/lifecycle.md +39 -0
  80. package/lib/scripts/templates/wiki/work/uat/.gitkeep +0 -0
  81. package/lib/scripts/templates/wiki/work/uat/archive/index.md +6 -0
  82. package/lib/scripts/templates/wiki/work/uat/index.md +12 -0
  83. package/lib/scripts/templates/wiki/work/uat/lifecycle.md +48 -0
  84. package/lib/scripts/templates/wiki/work/uat/screenshots/.gitkeep +0 -0
  85. package/lib/scripts/update-project.sh +75 -0
  86. package/lib/scripts/wiki-dashboard-server.js +146 -0
  87. package/lib/skills/README.md +146 -0
  88. package/lib/skills/anti-slop/SKILL.md +183 -0
  89. package/lib/skills/bug-close/SKILL.md +136 -0
  90. package/lib/skills/bug-file/SKILL.md +114 -0
  91. package/lib/skills/bug-triage/SKILL.md +140 -0
  92. package/lib/skills/company-align/SKILL.md +203 -0
  93. package/lib/skills/debug-logs/SKILL.md +129 -0
  94. package/lib/skills/decision-create/SKILL.md +220 -0
  95. package/lib/skills/decision-finalize/SKILL.md +181 -0
  96. package/lib/skills/decision-next/SKILL.md +129 -0
  97. package/lib/skills/decision-walkthrough/SKILL.md +169 -0
  98. package/lib/skills/demo/SKILL.md +183 -0
  99. package/lib/skills/elevator-pitch/SKILL.md +125 -0
  100. package/lib/skills/eval-create/SKILL.md +344 -0
  101. package/lib/skills/eval-gap/SKILL.md +150 -0
  102. package/lib/skills/eval-run/SKILL.md +214 -0
  103. package/lib/skills/extract-feature/SKILL.md +344 -0
  104. package/lib/skills/flashcard/SKILL.md +513 -0
  105. package/lib/skills/frontend-taste/SKILL.md +184 -0
  106. package/lib/skills/gap-assess/SKILL.md +97 -0
  107. package/lib/skills/git-commit/SKILL.md +164 -0
  108. package/lib/skills/lint/SKILL.md +99 -0
  109. package/lib/skills/marp-slideshow/SKILL.md +212 -0
  110. package/lib/skills/mermaid-flowchart/SKILL.md +194 -0
  111. package/lib/skills/now/SKILL.md +36 -0
  112. package/lib/skills/port-feature/SKILL.md +315 -0
  113. package/lib/skills/power-mode/SKILL.md +184 -0
  114. package/lib/skills/primer/SKILL.md +84 -0
  115. package/lib/skills/project-readme/SKILL.md +166 -0
  116. package/lib/skills/req-compile/SKILL.md +131 -0
  117. package/lib/skills/req-create/SKILL.md +124 -0
  118. package/lib/skills/req-extract-decisions/SKILL.md +241 -0
  119. package/lib/skills/req-finalize/SKILL.md +251 -0
  120. package/lib/skills/req-retire/SKILL.md +185 -0
  121. package/lib/skills/req-update/SKILL.md +265 -0
  122. package/lib/skills/research/SKILL.md +250 -0
  123. package/lib/skills/research-company/SKILL.md +345 -0
  124. package/lib/skills/roadmap-add/SKILL.md +238 -0
  125. package/lib/skills/roadmap-create/SKILL.md +223 -0
  126. package/lib/skills/roadmap-next/SKILL.md +132 -0
  127. package/lib/skills/security-audit/SKILL.md +246 -0
  128. package/lib/skills/serena-config/SKILL.md +92 -0
  129. package/lib/skills/simplify/SKILL.md +227 -0
  130. package/lib/skills/tackle/SKILL.md +156 -0
  131. package/lib/skills/task-add/SKILL.md +208 -0
  132. package/lib/skills/task-audit/SKILL.md +294 -0
  133. package/lib/skills/task-trash/SKILL.md +115 -0
  134. package/lib/skills/task-update/SKILL.md +136 -0
  135. package/lib/skills/uat-auto/SKILL.md +69 -0
  136. package/lib/skills/uat-auto-plus/SKILL.md +115 -0
  137. package/lib/skills/uat-generate/SKILL.md +289 -0
  138. package/lib/skills/uat-skip/SKILL.md +169 -0
  139. package/lib/skills/uat-walk/SKILL.md +164 -0
  140. package/lib/skills/uat-walk/UAT-CORE.md +140 -0
  141. package/lib/skills/update-docs/SKILL.md +75 -0
  142. package/lib/skills/wiki-archive/SKILL.md +96 -0
  143. package/lib/skills/wiki-ingest/SKILL.md +139 -0
  144. package/lib/skills/wiki-lint/SKILL.md +131 -0
  145. package/lib/skills/wiki-query/SKILL.md +71 -0
  146. package/lib/skills/wiki-rotate-log/SKILL.md +90 -0
  147. package/lib/skills/wiki-tidy/SKILL.md +107 -0
  148. package/package.json +32 -0
  149. package/raw/.gitkeep +0 -0
  150. package/raw/design-principles.md +65 -0
  151. package/raw/guides/command-anti-patterns.md +79 -0
  152. package/raw/guides/deployment-strategy.md +448 -0
  153. package/raw/guides/evals-framework.md +452 -0
  154. package/raw/guides/mcp-tools.md +335 -0
  155. package/raw/guides/task-spec.md +79 -0
  156. package/raw/guides/type-checking-templates/README.md +112 -0
  157. package/raw/guides/type-checking-templates/eslint/eslint.config.ts +105 -0
  158. package/raw/guides/type-checking-templates/python/mypy.ini +69 -0
  159. package/raw/guides/type-checking-templates/python/pyproject.toml +164 -0
  160. package/raw/guides/type-checking-templates/python/pyrightconfig.json +67 -0
  161. package/raw/guides/type-checking-templates/tsconfig/tsconfig.app.jsonc +45 -0
  162. package/raw/guides/type-checking-templates/tsconfig/tsconfig.lib.jsonc +44 -0
  163. package/raw/guides/type-checking-templates/tsconfig/tsconfig.node-esm.jsonc +40 -0
  164. package/raw/guides/type-checking-templates/tsconfig/tsconfig.node.jsonc +34 -0
  165. package/raw/guides/type-checking-templates/tsconfig/tsconfig.vite-root.json +8 -0
  166. package/raw/harness-notes.md +20 -0
  167. package/raw/house-style/components/Badge.tsx +16 -0
  168. package/raw/house-style/components/Button.tsx +32 -0
  169. package/raw/house-style/components/Card.tsx +26 -0
  170. package/raw/house-style/components/Chip.tsx +57 -0
  171. package/raw/house-style/components/IconButton.tsx +67 -0
  172. package/raw/house-style/components/Modal.tsx +18 -0
  173. package/raw/house-style/components/Stepper.tsx +141 -0
  174. package/raw/house-style/components/icons.tsx +128 -0
  175. package/raw/house-style/preview/src/index.css +46 -0
  176. package/raw/house-style/tokens/tailwind.preset.ts +49 -0
  177. package/raw/house-style/tokens/tokens.json +62 -0
  178. package/raw/llm-wiki-2.md +162 -0
  179. package/raw/llm-wiki.md +75 -0
  180. package/raw/research/dark-mode-theme/index.md +85 -0
  181. package/raw/research/dark-mode-theme/sources.md +49 -0
  182. package/raw/research/serena-mcp-disconnect/index.md +81 -0
  183. package/raw/research/serena-mcp-disconnect/sources.md +87 -0
  184. package/raw/research/wiki-tooling-improvements/index.md +126 -0
  185. package/raw/research/wiki-tooling-improvements/sources.md +73 -0
  186. package/raw/software-factory-case-study.pdf +0 -0
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: task-trash
3
+ description: Trash a task and its related UAT files — moves them to archive/ and removes all active-index references
4
+ category: planning
5
+ model: claude-haiku-4-5-20251001
6
+ argument-hint: <path/to/task-file.md>
7
+ disable-model-invocation: false
8
+ user-invocable: true
9
+ ---
10
+ **Prereqs:** obey `.docs/guides/mcp-tools.md` + `wiki/work/tasks/lifecycle.md`; run /primer if not done this session.
11
+
12
+ # Trash Task
13
+
14
+ Move a task file (and any related UAT files) to `archive/`, then remove all active-index references. No files are ever deleted — archiving is the terminal action.
15
+
16
+ ---
17
+
18
+ **Task File**: $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Instructions
23
+
24
+ ### Step 1: Resolve the Task File
25
+
26
+ Parse `$ARGUMENTS` to locate the task file:
27
+
28
+ 1. **If a file path is provided** (e.g., `wiki/work/tasks/3-user-auth.md`):
29
+ - Confirm the file exists (use Serena `find_file` or `list_dir`)
30
+ - If the file does not exist, STOP and report the error
31
+
32
+ 2. **If a number-slug is provided** (e.g., `3-user-auth`):
33
+ - Search `wiki/work/tasks/` for `<number-slug>.md`
34
+ - If not found, check `wiki/work/tasks/archive/`
35
+ - If still not found, STOP and report the error
36
+
37
+ 3. **If only a description or number is provided** (e.g., `user auth` or `3`):
38
+ - Search `wiki/work/tasks/` and `wiki/work/tasks/archive/` for a matching task file
39
+ - If ambiguous, list matches and ask the user to clarify
40
+ - If no match found, STOP and report the error
41
+
42
+ 4. Determine which directory the task currently lives in (`wiki/work/tasks/` or `wiki/work/tasks/archive/`)
43
+ 5. Extract the task's **number-slug identifier** (e.g., `3-user-auth` from `3-user-auth.md`)
44
+
45
+ ### Step 2: Find Related UAT Files
46
+
47
+ Using the task's number-slug identifier, search for matching UAT files:
48
+
49
+ 1. Check `wiki/work/uat/` for `<number>-<slug>.uat.md`
50
+ 2. Check `wiki/work/uat/archive/` for `<number>-<slug>.uat.md`
51
+ 3. Collect all matches — there may be zero, one, or multiple related UAT files
52
+
53
+ ### Step 3: Confirm with the User
54
+
55
+ Before moving anything, use `AskUserQuestion` to confirm. Show:
56
+
57
+ - **Task file** to be trashed: `$ARGUMENTS`
58
+ - **UAT file(s)** to be trashed (list each, or "None found")
59
+ - Ask: **"Archive these files as trashed? (Yes/No)"**
60
+
61
+ If the user says **No**, STOP.
62
+
63
+ ### Step 4: Set status and archive files
64
+
65
+ 1. **Update `status: <current>` → `status: trashed`** in the task file frontmatter using `Edit`.
66
+
67
+ 2. **Archive the task file** (Bash — `git mv` only):
68
+ ```
69
+ git mv wiki/work/tasks/<file>.md wiki/work/tasks/archive/<file>.md
70
+ ```
71
+ Then append to `wiki/work/tasks/archive/index.md`:
72
+ ```
73
+ | [[TASK-NNN]] | <Title> | trashed | YYYY-MM-DD |
74
+ ```
75
+
76
+ 3. **For each related UAT file** (if any):
77
+ - Update `status: <current>` → `status: trashed` in UAT frontmatter using `Edit`.
78
+ - Archive it (Bash — `git mv` only):
79
+ ```
80
+ git mv wiki/work/uat/<UAT-file>.md wiki/work/uat/archive/<UAT-file>.md
81
+ ```
82
+ - Append to `wiki/work/uat/archive/index.md`:
83
+ ```
84
+ | [[UAT-NNN]] | <Title> | trashed | YYYY-MM-DD |
85
+ ```
86
+
87
+ ### Step 5: Update Active Indexes
88
+
89
+ Remove the task's row from `wiki/work/tasks/index.md`. If there is a matching UAT row in `wiki/work/uat/index.md`, remove it too.
90
+
91
+ Use `Read` then `Edit` — never `echo >>` or `sed`. If a row is already absent, note it and continue.
92
+
93
+ **Do NOT remove references from roadmaps, decisions, or other files** — `[[TASK-NNN]]` and `[[UAT-NNN]]` IDs remain valid regardless of file location.
94
+
95
+ ### Step 6: Append to wiki/log.md
96
+
97
+ Append one entry to `wiki/log.md`:
98
+
99
+ ```
100
+ ## [YYYY-MM-DD] task-trashed | TASK-NNN <title> — archived to wiki/work/tasks/archive/
101
+ ```
102
+
103
+ Use `Read` then `Edit` — never `echo >>`.
104
+
105
+ ### Step 7: Report Completion
106
+
107
+ Report what was done:
108
+
109
+ | Field | Value |
110
+ |-------|-------|
111
+ | Task file | `wiki/work/tasks/<file>.md` → `wiki/work/tasks/archive/<file>.md` |
112
+ | UAT file(s) | `wiki/work/uat/<file>.md` → `wiki/work/uat/archive/<file>.md` (or "None") |
113
+ | Active index rows removed | task index, UAT index (as applicable) |
114
+ | Archive index rows added | task archive index, UAT archive index (as applicable) |
115
+ | wiki/log.md entry | yes |
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: task-update
3
+ description: Assess and modify an existing task's scope or steps
4
+ category: planning
5
+ model: claude-sonnet-4-6
6
+ argument-hint: <path/to/task.md, number-slug, or number> [optional instructions]
7
+ disable-model-invocation: false
8
+ user-invocable: true
9
+ ---
10
+ **Prereqs:** obey `.docs/guides/mcp-tools.md` + `wiki/work/tasks/lifecycle.md`; run /primer if not done this session.
11
+
12
+ # Update Task
13
+
14
+ Assess an existing task file against the task spec and update it until it is execution-ready for `/tackle`.
15
+
16
+ ---
17
+
18
+ **Input**: $ARGUMENTS
19
+
20
+ ---
21
+
22
+ ## Step 1: Resolve the Task File
23
+
24
+ Parse the first part of `$ARGUMENTS` to locate the task file. Any remaining text after the file reference is treated as **user instructions** for how to update the task.
25
+
26
+ 1. **If a file path is provided** (e.g., `wiki/work/tasks/3-user-auth.md`):
27
+ - Confirm the file exists (use Serena `find_file` or `list_dir`)
28
+ - If the file does not exist, STOP and report the error
29
+
30
+ 2. **If a number-slug is provided** (e.g., `3-user-auth`):
31
+ - Search `wiki/work/tasks/` for `<number-slug>.md`
32
+ - If not found, STOP and report the error
33
+
34
+ 3. **If only a number is provided** (e.g., `3`):
35
+ - Search `wiki/work/tasks/` for a file starting with that number
36
+ - If ambiguous, list matches and ask the user to clarify
37
+ - If no match found, STOP and report the error
38
+
39
+ ---
40
+
41
+ ## Step 2: Read the Task Spec, Add-Task Command, and Task File
42
+
43
+ Read all three files:
44
+ 1. `wiki/work/tasks/lifecycle.md` — the authoritative task file spec (frontmatter schema, ID/filename rules, status transitions)
45
+ 2. `lib/skills/task-add/SKILL.md` — the full overview of how to structure a task (research process, execution-readiness criteria, agent annotations, level of detail required)
46
+ 3. The resolved task file from Step 1
47
+
48
+ The `add-task` command defines what a well-structured task looks like. Use it as the lens for your assessment.
49
+
50
+ ---
51
+
52
+ ## Step 3: Assess Against the Spec
53
+
54
+ Evaluate the task file against every requirement in the spec. Check for:
55
+
56
+ ### Structure Compliance
57
+ - [ ] Has `# NNN — Task Title` heading
58
+ - [ ] Has dependency block immediately after the title and before `## Objective`:
59
+ ```markdown
60
+ > **Depends on**: [NNN-slug](NNN-slug.md) or `none`
61
+ > **Blocks**: [NNN-slug](NNN-slug.md) or `none`
62
+ > **Parallel-safe with**: [NNN-slug](NNN-slug.md) or `none`
63
+ ```
64
+ If the block is missing entirely, add it during Step 5 — consult the active task index and ask the user to confirm the relationships (same process as `/task-add` step 3.5) before writing.
65
+ - [ ] Has `## Objective` with one-sentence description
66
+ - [ ] Has `## Approach` with 1-3 sentence summary
67
+ - [ ] Has `## Prerequisites` section (can be empty if none)
68
+ - [ ] Has `---` separator between Prerequisites and Steps
69
+ - [ ] Has `## Steps` with numbered `### N.` sections
70
+ - [ ] Ends with a verification section
71
+
72
+ ### Execution Readiness (the critical part)
73
+ - [ ] **Every `### N.` section has `<!-- agent: TYPE -->` annotation** with a valid type (`general-purpose`, `Explore`, `Plan`)
74
+ - [ ] **Every actionable item uses `- [ ]` checkbox syntax**
75
+ - [ ] **Steps include specific file paths** to create or modify
76
+ - [ ] **Steps include function/component names** to implement
77
+ - [ ] **Steps have enough implementation detail** for an agent to execute without ambiguity or further research
78
+ - [ ] **Sub-details** as plain-text indented lines for acceptance criteria where needed
79
+ - [ ] Steps are grouped by logical area
80
+ - [ ] No vague steps like "implement feature X" without specifics
81
+
82
+ ### Codebase Alignment
83
+ - [ ] Referenced file paths actually exist (or are clearly marked as "create new")
84
+ - [ ] Referenced function/component names match the codebase
85
+ - [ ] Approach is consistent with existing project patterns and conventions
86
+
87
+ ---
88
+
89
+ ## Step 4: Report Findings
90
+
91
+ Present a clear assessment to the user:
92
+
93
+ 1. **Spec compliance**: List any structural issues (missing sections, wrong format)
94
+ 2. **Execution readiness gaps**: List steps that are too vague for `/tackle` to execute — these are the most important findings
95
+ 3. **Codebase misalignments**: Any references that don't match reality
96
+
97
+ If there are **user instructions** (text after the file reference in `$ARGUMENTS`), note how they relate to the findings.
98
+
99
+ ---
100
+
101
+ ## Step 5: Apply Updates
102
+
103
+ ### If user instructions were provided
104
+ Apply the user's specific changes first, then fix any spec compliance issues found in Step 3.
105
+
106
+ ### If no user instructions were provided
107
+ Fix all issues found in Step 3:
108
+ - Add missing structural sections
109
+ - Add `<!-- agent: TYPE -->` annotations to any sections missing them
110
+ - Flesh out vague steps with specific file paths, function names, and implementation detail
111
+ - Use Serena to explore the codebase and determine the correct paths, names, and patterns
112
+ - Use Context7 MCP for any library/framework documentation needed
113
+ - Convert plain list items to `- [ ]` checkbox syntax
114
+
115
+ ### Research for updates
116
+ When adding specificity to vague steps, follow the `/research` workflow (see `lib/skills/research/SKILL.md`):
117
+ - **Internal (Phase 2)**: Use Serena's `get_symbols_overview`, `find_symbol`, and `search_for_pattern` to understand the codebase
118
+ - **External (Phase 3)**: Use Context7 MCP for library docs and Brave Search MCP for best practices and package recommendations
119
+ - Ground every update in actual codebase state — don't guess at file paths or function names
120
+
121
+ ### Present changes before applying
122
+ Before writing the updated task file, present a summary of proposed changes and ask the user to confirm using `AskUserQuestion`.
123
+
124
+ After confirmation, update the task file using the **`Edit`** tool (or `Write` for a full rewrite). **Never** use `sed`, `awk`, `perl -i`, or `echo >>` — call `Edit` once per change, even if there are many. See `.docs/guides/mcp-tools.md` "Common anti-patterns".
125
+
126
+ ---
127
+
128
+ ## Step 6: Confirm Completion
129
+
130
+ Report:
131
+ - Number of issues found and fixed
132
+ - Any remaining concerns or trade-offs
133
+ - Suggest next steps:
134
+ ```
135
+ To execute this task: /tackle <resolved-path>
136
+ ```
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: uat-auto
3
+ description: Non-interactively run every test in a pending UAT file and auto-judge verdicts (headless, fail-closed)
4
+ category: executing
5
+ model: claude-sonnet-4-6
6
+ argument-hint: <path/to/uat-file.md, number-slug, or description>
7
+ disable-model-invocation: false
8
+ user-invocable: true
9
+ ---
10
+ **Prereqs:** obey `.docs/guides/mcp-tools.md` + `wiki/work/uat/lifecycle.md`; run /primer if not done this session.
11
+
12
+ Read `~/.claude/skills/uat-walk/UAT-CORE.md` now — it defines Steps 1–5 (resolution, prerequisites, classification, judging, closure). This file defines only what differs for **headless, fail-closed** mode.
13
+
14
+ # UAT Auto
15
+
16
+ **UAT File**: $ARGUMENTS
17
+
18
+ Headless variant of `/uat-walk`: run every eligible test, auto-judge from deterministic evidence, write results, and archive on all-pass — with **zero user prompts**. Same status-flip outcomes as `/uat-walk`; only the decision procedure differs.
19
+
20
+ **When to use:** no human at the keyboard — a tmux orchestrator, CI job, or scheduled run dispatches UAT work. Use `/uat-walk` for anything interactive; `/uat-auto-plus` when you also want autonomous fixes.
21
+
22
+ ---
23
+
24
+ ## Prime Directive: fail closed
25
+
26
+ **Never auto-pass a test you cannot verify with hard evidence.** Pass requires a machine-checkable match (UAT-CORE Step 4 "Auto-judge criteria"). On any doubt, uncertainty, or missing evidence → `[FAIL: auto-judge: <reason>]`. **Never** `[SKIP: ...]` (a human verdict). **Never** `[x] Pass` unless the criteria are met exactly. A false pass ships a broken feature; a false fail merely gets re-triaged in the next `/uat-walk` — so this is the single most important rule.
27
+
28
+ ---
29
+
30
+ ## Procedure
31
+
32
+ Run UAT-CORE as written, headless throughout:
33
+
34
+ 1. **Step 1** — resolve/parse (auto/plus resolution rules: never prompt; auto-pick lowest-numbered pending on empty/unresolved).
35
+ 2. **Step 2** — prerequisites as a **hard gate**: any failed or unverifiable prerequisite aborts → `[FAIL: auto-judge: prerequisite not satisfied — <which>]` on every untested test, then Closure. No repair attempt (that's `/uat-auto-plus`).
36
+ 3. **Step 3 + 3.5** — classify all eligible tests, then stub-detect (leave stubs `- [ ] Pass`, do not execute).
37
+ 4. **Step 4** — auto-judge each non-stub test in document order: API/CLI by the machine-checkable criteria; UI and Manual always `[FAIL: auto-judge: ... requires human verification]` (no browser automation, no heuristics). Eligibility = pending + previously-failed.
38
+ 5. **Step 5** — write each verdict **immediately** via `Edit` (no buffering/batching).
39
+ 6. **Closure** — archive on all-pass; on any fail leave the file in place and **exit 0** (the orchestrator treats exit as its task done; the pipeline decides what to do with fail markers). This mode keeps screenshots and uses log tag ` (auto)`.
40
+
41
+ There is **no fix workflow** — record evidence and exit; re-run `/uat-walk` (or `/uat-auto-plus`) to fix. `[FIXING: ...]` markers found in the input are reset to `- [ ] Pass` and re-evaluated (a walk may have been interrupted mid-fix).
42
+
43
+ ---
44
+
45
+ ## Summary format
46
+
47
+ ```
48
+ ━━━ UAT AUTO COMPLETE ━━━
49
+ File: wiki/work/uat/UAT-005-positions.md · Source: wiki/work/tasks/TASK-005-positions.md · Mode: headless
50
+ ✅ Passed 6 · ⚠️ Skipped 1 (pre-existing, untouched) · ❌ Failed 2 (auto-judge-uncertain: 1)
51
+ ❔ Pending 0 · 🔲 Stub-detected 0 (left untouched — implement first) · Total 9
52
+ Failed:
53
+ • UAT-API-003: Delete Position — "auto-judge: HTTP 500 expected 204"
54
+ • UAT-EDGE-001: Empty Positions — "auto-judge: manual test requires human verification"
55
+ Next action: /uat-walk wiki/work/uat/UAT-005-positions.md
56
+ ```
57
+
58
+ On all-pass, replace `Next action` with the task/UAT IDs and their new `done`/`passed` statuses.
59
+
60
+ ---
61
+
62
+ ## Rules
63
+
64
+ - **No user interaction, ever** — no `AskUserQuestion`, no inline prompts, no clarifying questions. Ambiguity → record fail / exit with a diagnostic summary.
65
+ - **Verdict discipline** — `[x] Pass` only on concrete machine-verified evidence; `[FAIL: auto-judge: <reason>]` for everything else (uncertainty, missing command, non-verifiable Expected, UI, manual); **never** `[SKIP]`.
66
+ - **No browser automation** — UI tests always fail-closed to human verification.
67
+ - **File integrity + Bash hygiene + MCP compliance** — per UAT-CORE Step 5 and "Bash hygiene". Serena for all listing/search; `Edit` for every status flip; no `sed`/`awk`/`ls`/`find`/`grep`/`cat`; never emit literal secrets (only `"$UAT_AUTH_TOKEN"` / `"$UAT_TEST_PASSWORD"`).
68
+
69
+ **Start now — read UAT-CORE.md, resolve the UAT file, and begin.**
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: uat-auto-plus
3
+ description: Autonomous-fix variant of /uat-auto — runs tests, diagnoses failures, fixes them itself, re-runs until green or attempts exhausted. For headless agents with --dangerously-skip-permissions.
4
+ category: executing
5
+ model: claude-sonnet-4-6
6
+ argument-hint: <path/to/uat-file.md, number-slug, or description>
7
+ disable-model-invocation: false
8
+ user-invocable: true
9
+ ---
10
+ **Prereqs:** obey `.docs/guides/mcp-tools.md` + `wiki/work/uat/lifecycle.md`; run /primer if not done this session.
11
+
12
+ Read `~/.claude/skills/uat-walk/UAT-CORE.md` now — it defines Steps 1–5 (resolution, prerequisites, classification, judging, closure). This file defines only what differs for **autonomous-fix** mode.
13
+
14
+ # UAT Auto Plus
15
+
16
+ **UAT File**: $ARGUMENTS
17
+
18
+ Autonomous variant of `/uat-auto`: run every eligible test, auto-judge from deterministic evidence, **diagnose and fix any API/CLI failure itself**, re-run the affected test, and only record `[FAIL: ...]` after fix attempts are exhausted. Same file-movement outcomes as the other variants; only failure-handling differs.
19
+
20
+ **Designed for unattended agents** — e.g. a Claude Code instance launched with `--dangerously-skip-permissions` from a tmux orchestrator, CI, or cron. No human in the loop, so the agent may apply correctness fixes on its own judgment.
21
+
22
+ | Command | Audience | On failure |
23
+ |---------|----------|------------|
24
+ | `/uat-walk` | Human | Prompt user, optionally delegate fix |
25
+ | `/uat-auto` | Headless, conservative | Record `[FAIL]`, exit; human triages |
26
+ | `/uat-auto-plus` | Headless, autonomous | Diagnose → fix → re-test → repeat (bounded) |
27
+
28
+ **Pick this only when:** (1) the session skips approvals (`--dangerously-skip-permissions` or equivalent); (2) the orchestrator wants the UAT to drive itself to green without escalation; (3) the fix scope is contained — if the likely fix is in shared infrastructure or cross-cutting code, prefer `/uat-auto` and let a human review.
29
+
30
+ ---
31
+
32
+ ## Prime Directive: truthful pass
33
+
34
+ **Never mark `[x] Pass` unless the test currently passes against unmodified test logic.** Fixes go into application code, build/config, infrastructure, or test-environment setup — **never** into the UAT file's Expected/Steps/Command, and never by weakening assertions. If a failure can't be fixed without changing what is being tested, record `[FAIL: auto-fix-declined: <reason>]` and leave the code unchanged. Related: **never delete or `[SKIP: ...]` a test to avoid fixing it** — skip is a human verdict. A false pass is the worst outcome — it ships a broken feature *and* erodes trust in every later run.
35
+
36
+ ---
37
+
38
+ ## Procedure
39
+
40
+ Run UAT-CORE headless throughout, adding the fix loop:
41
+
42
+ 1. **Step 1** — resolve/parse (auto/plus resolution: never prompt; auto-pick lowest-numbered pending on empty/unresolved).
43
+ 2. **Step 2** — prerequisites with **one autonomous repair attempt** each (start dev server in background + `Monitor` for ready; run migrate; run seed; obtain a documented env var), then re-verify. Still failing after one repair → hard gate (`[FAIL: auto-judge: prerequisite not satisfied — <which>]` on every untested test → Closure). Track every background process started — Closure terminates them.
44
+ 3. **Step 3 + 3.5** — classify, then stub-detect (leave stubs `- [ ] Pass`; **do not enter the fix loop** for them — implementing a feature from scratch is out of scope; surface in the summary).
45
+ 4. **Step 4** — auto-judge in document order: API/CLI by machine-checkable criteria → on `[FAIL]`, **enter the fix loop (below)**. UI and Manual are always `[FAIL: auto-judge: ... requires human verification]` and **never** enter the fix loop (no machine-checkable signal that a fix worked). Eligibility = pending + previously-failed; also reset `[FIXING: ...]` → `- [ ] Pass` before running.
46
+ 5. **Step 5** — write each verdict/`[FIXING: ...]` transition **immediately** via `Edit` (no buffering).
47
+ 6. **Closure** — archive on all-pass; on any fail leave in place and **exit 0**. This mode additionally deletes this task's screenshots, **terminates every background process** it started, and supports multi-task WIP tracking in decision annotation (all per UAT-CORE Closure "Mode differences: uat-auto-plus"). Log tag ` (auto-plus)`.
48
+
49
+ Status markers this mode writes (UAT-CORE Step 5 mechanics):
50
+ ```
51
+ Fixing: - [FIXING: attempt N/3 — <short reason>] <!-- YYYY-MM-DD -->
52
+ Fail: - [FAIL: auto-fix-exhausted: <last reason>] <!-- YYYY-MM-DD -->
53
+ Fail: - [FAIL: auto-fix-declined: <why refused>] <!-- YYYY-MM-DD -->
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Step 6: Autonomous fix loop
59
+
60
+ The defining feature. On an API/CLI `[FAIL]` in Step 4, do not move on — diagnose, fix, re-run.
61
+
62
+ **Bounds (hard):**
63
+ - **Max 3 fix attempts per test.** After the 3rd unsuccessful attempt → `[FAIL: auto-fix-exhausted: <last reason>]`, next test.
64
+ - **Max 3 concurrent fix sub-agents** across the run (most fixes are sequential; cap parallel batched investigations at 3).
65
+ - **30-minute total wall-clock cap** across all fix attempts. If exceeded → finalize remaining failures as `[FAIL: auto-fix-timeout: budget exhausted]` and go to Closure. The regression sweep shares this cap.
66
+
67
+ **Loop (per failing test, attempts 1–3):**
68
+ 1. Mark `[FIXING: attempt N/3 — <short reason>]` via `Edit`.
69
+ 2. **Diagnose** — read the test, the relevant app code, recent logs. Navigate with Serena (`find_symbol`, `find_referencing_symbols`, `get_symbols_overview`) — not Grep/Glob. For runtime failures, consider the `debug-logs` skill for a ranked hypothesis list.
70
+ 3. **Decide the smallest correct fix** that makes the test pass without weakening it. Acceptable targets: application code, build/config (missing env default, misrouted path, wrong port), test fixtures/seed data. **Never** the UAT file's Steps/Expected/Command; **never** test assertions in code.
71
+ 4. **Delegate to a sub-agent** (`Agent` tool, `subagent_type: general-purpose`, or `Plan` for design-heavy fixes). Prompt must include: the test ID + full body; the actual-vs-expected evidence from Step 4; the constraint "do not modify the UAT file or test assertions; fix only application code, build, config, or fixtures"; a request for a short report of files changed + rationale.
72
+ 5. **Re-run** the test with the same Step 4 procedure and the same Bash call — do not relax assertions.
73
+ 6. **Evaluate:** Pass → `[x] Pass`, delete this test's fail screenshots, exit loop, next test. Fail & attempt < 3 → next attempt with diagnosis refined by the prior report. Fail & attempt = 3 → `[FAIL: auto-fix-exhausted: <last reason>]`, exit loop.
74
+
75
+ **Fix-decline cases** — mark `[FAIL: auto-fix-declined: <why>]` immediately (declining is correct judgment, not failure) when:
76
+ - the fix would require changing the test's Expected/Steps/Command (test is wrong/out of date — a human call);
77
+ - the fix is in shared infrastructure outside this task's scope (could break other tests — surface for review);
78
+ - the failure is on a security-sensitive surface (auth, crypto, permissions) where a wrong fix is worse than a recorded failure;
79
+ - the failure is in third-party code or external services beyond the agent's control.
80
+
81
+ **Regression sweep** — after every successful fix, before moving on, re-run all previously-passing tests in the file with the same criteria. A newly-failing test is a new failure; the cause is most likely the just-applied fix — prefer reverting and re-diagnosing over piling on more changes. Bounded by the same 30-minute cap.
82
+
83
+ ---
84
+
85
+ ## Summary format
86
+
87
+ ```
88
+ ━━━ UAT AUTO-PLUS COMPLETE ━━━
89
+ File: wiki/work/uat/5-positions.uat.md · Source: wiki/work/tasks/5-positions.md · Mode: autonomous-fix
90
+ Budget: attempts 7/N · wall 12m22s/30m
91
+ ✅ Passed 7 (fixed during run: 4) · ⚠️ Skipped 1 (pre-existing) · ❌ Failed 1 (auto-fix-exhausted 1 · declined 0 · auto-judge-uncertain 0)
92
+ ❔ Pending 0 · 🔲 Stub-detected 0 (left untouched — implement first) · Total 9
93
+ Fixes Applied:
94
+ • UAT-API-001: added missing 422 handler in src/api/positions.ts
95
+ • UAT-API-002: corrected route prefix in src/router.ts
96
+ Failed:
97
+ • UAT-API-003: Delete Position — "auto-fix-exhausted: HTTP 500 expected 204 (last attempt)"
98
+ Next action: /uat-walk wiki/work/uat/5-positions.uat.md
99
+ ```
100
+
101
+ On all-pass, replace `Next action` with `Archived to archive/` and the new paths.
102
+
103
+ ---
104
+
105
+ ## Rules
106
+
107
+ **Autonomy boundaries** — the agent **may** modify application code, build/config, fixtures, and seed data. It **may not**: modify any UAT file's Steps/Expected/Command; modify test assertions in code (`expect(...)`); disable, comment out, `xfail`, or `[SKIP: ...]` a failing test; weaken type signatures, lower error-throwing branches, or remove validation to force a pass. When in doubt, decline and surface for review.
108
+
109
+ **Verdict discipline** — `[x] Pass` only on machine-verified evidence against unmodified logic; `[FAIL: auto-fix-exhausted: ...]` after 3 attempts; `[FAIL: auto-fix-declined: ...]` when out of scope/unsafe; `[FAIL: auto-judge: ...]` when unverifiable (UI/manual); **never** `[SKIP]`.
110
+
111
+ **Process hygiene** — every background process started must be terminated before exit, regardless of outcome (no orphaned dev servers, type checkers, watchers). Cap concurrent sub-agents and background processes at 3 each.
112
+
113
+ **File integrity + Bash hygiene + MCP compliance** — per UAT-CORE Step 5 and "Bash hygiene". App/config/fixture edits via `Edit` (or Serena `replace_symbol_body` / `replace_content` for code). Serena for all listing/search/symbol navigation, Grep/Glob only for non-symbol text; no `sed`/`awk`/`ls`/`find`/`grep`/`cat`; never emit literal secrets (only `"$UAT_AUTH_TOKEN"` / `"$UAT_TEST_PASSWORD"`).
114
+
115
+ **Start now — read UAT-CORE.md, resolve the UAT file, and begin.**