safeword 0.2.4 → 0.2.6

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 (235) hide show
  1. package/dist/check-3NGQ4NR5.js +129 -0
  2. package/dist/check-3NGQ4NR5.js.map +1 -0
  3. package/dist/chunk-2XWIUEQK.js +190 -0
  4. package/dist/chunk-2XWIUEQK.js.map +1 -0
  5. package/dist/chunk-GZRQL3SX.js +146 -0
  6. package/dist/chunk-GZRQL3SX.js.map +1 -0
  7. package/dist/chunk-ORQHKDT2.js +10 -0
  8. package/dist/chunk-ORQHKDT2.js.map +1 -0
  9. package/dist/chunk-W66Z3C5H.js +21 -0
  10. package/dist/chunk-W66Z3C5H.js.map +1 -0
  11. package/dist/cli.d.ts +1 -0
  12. package/dist/cli.js +34 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/diff-Y6QTAW4O.js +166 -0
  15. package/dist/diff-Y6QTAW4O.js.map +1 -0
  16. package/dist/index.d.ts +11 -0
  17. package/dist/index.js +7 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/reset-3ACTIYYE.js +143 -0
  20. package/dist/reset-3ACTIYYE.js.map +1 -0
  21. package/dist/setup-AIL5RL45.js +276 -0
  22. package/dist/setup-AIL5RL45.js.map +1 -0
  23. package/dist/upgrade-6AR3DHUV.js +134 -0
  24. package/dist/upgrade-6AR3DHUV.js.map +1 -0
  25. package/package.json +44 -19
  26. package/{.safeword → templates}/hooks/agents-md-check.sh +0 -0
  27. package/{.safeword → templates}/hooks/post-tool.sh +0 -0
  28. package/{.safeword → templates}/hooks/pre-commit.sh +0 -0
  29. package/.claude/commands/arch-review.md +0 -32
  30. package/.claude/commands/lint.md +0 -6
  31. package/.claude/commands/quality-review.md +0 -13
  32. package/.claude/commands/setup-linting.md +0 -6
  33. package/.claude/hooks/auto-lint.sh +0 -6
  34. package/.claude/hooks/auto-quality-review.sh +0 -170
  35. package/.claude/hooks/check-linting-sync.sh +0 -17
  36. package/.claude/hooks/inject-timestamp.sh +0 -6
  37. package/.claude/hooks/question-protocol.sh +0 -12
  38. package/.claude/hooks/run-linters.sh +0 -8
  39. package/.claude/hooks/run-quality-review.sh +0 -76
  40. package/.claude/hooks/version-check.sh +0 -10
  41. package/.claude/mcp/README.md +0 -96
  42. package/.claude/mcp/arcade.sample.json +0 -9
  43. package/.claude/mcp/context7.sample.json +0 -7
  44. package/.claude/mcp/playwright.sample.json +0 -7
  45. package/.claude/settings.json +0 -62
  46. package/.claude/skills/quality-reviewer/SKILL.md +0 -190
  47. package/.claude/skills/safeword-quality-reviewer/SKILL.md +0 -13
  48. package/.env.arcade.example +0 -4
  49. package/.env.example +0 -11
  50. package/.gitmodules +0 -4
  51. package/.safeword/SAFEWORD.md +0 -33
  52. package/.safeword/eslint/eslint-base.mjs +0 -101
  53. package/.safeword/guides/architecture-guide.md +0 -404
  54. package/.safeword/guides/code-philosophy.md +0 -174
  55. package/.safeword/guides/context-files-guide.md +0 -405
  56. package/.safeword/guides/data-architecture-guide.md +0 -183
  57. package/.safeword/guides/design-doc-guide.md +0 -165
  58. package/.safeword/guides/learning-extraction.md +0 -515
  59. package/.safeword/guides/llm-instruction-design.md +0 -239
  60. package/.safeword/guides/llm-prompting.md +0 -95
  61. package/.safeword/guides/tdd-best-practices.md +0 -570
  62. package/.safeword/guides/test-definitions-guide.md +0 -243
  63. package/.safeword/guides/testing-methodology.md +0 -573
  64. package/.safeword/guides/user-story-guide.md +0 -237
  65. package/.safeword/guides/zombie-process-cleanup.md +0 -214
  66. package/.safeword/planning/002-user-story-quality-evaluation.md +0 -1840
  67. package/.safeword/planning/003-langsmith-eval-setup-prompt.md +0 -363
  68. package/.safeword/planning/004-llm-eval-test-cases.md +0 -3226
  69. package/.safeword/planning/005-architecture-enforcement-system.md +0 -169
  70. package/.safeword/planning/006-reactive-fix-prevention-research.md +0 -135
  71. package/.safeword/planning/011-cli-ux-vision.md +0 -330
  72. package/.safeword/planning/012-project-structure-cleanup.md +0 -154
  73. package/.safeword/planning/README.md +0 -39
  74. package/.safeword/planning/automation-plan-v2.md +0 -1225
  75. package/.safeword/planning/automation-plan-v3.md +0 -1291
  76. package/.safeword/planning/automation-plan.md +0 -3058
  77. package/.safeword/planning/design/005-cli-implementation.md +0 -343
  78. package/.safeword/planning/design/013-cli-self-contained-templates.md +0 -596
  79. package/.safeword/planning/design/013a-eslint-plugin-suite.md +0 -256
  80. package/.safeword/planning/design/013b-implementation-snippets.md +0 -385
  81. package/.safeword/planning/design/013c-config-isolation-strategy.md +0 -242
  82. package/.safeword/planning/design/code-philosophy-improvements.md +0 -60
  83. package/.safeword/planning/mcp-analysis.md +0 -545
  84. package/.safeword/planning/phase2-subagents-vs-skills-analysis.md +0 -451
  85. package/.safeword/planning/settings-improvements.md +0 -970
  86. package/.safeword/planning/test-definitions/005-cli-implementation.md +0 -1301
  87. package/.safeword/planning/test-definitions/cli-self-contained-templates.md +0 -205
  88. package/.safeword/planning/user-stories/001-guides-review-user-stories.md +0 -1381
  89. package/.safeword/planning/user-stories/003-reactive-fix-prevention.md +0 -132
  90. package/.safeword/planning/user-stories/004-technical-constraints.md +0 -86
  91. package/.safeword/planning/user-stories/005-cli-implementation.md +0 -311
  92. package/.safeword/planning/user-stories/cli-self-contained-templates.md +0 -172
  93. package/.safeword/planning/versioned-distribution.md +0 -740
  94. package/.safeword/prompts/arch-review.md +0 -43
  95. package/.safeword/prompts/quality-review.md +0 -11
  96. package/.safeword/scripts/arch-review.sh +0 -235
  97. package/.safeword/scripts/check-linting-sync.sh +0 -58
  98. package/.safeword/scripts/setup-linting.sh +0 -559
  99. package/.safeword/templates/architecture-template.md +0 -136
  100. package/.safeword/templates/ci/architecture-check.yml +0 -79
  101. package/.safeword/templates/design-doc-template.md +0 -127
  102. package/.safeword/templates/test-definitions-feature.md +0 -100
  103. package/.safeword/templates/ticket-template.md +0 -74
  104. package/.safeword/templates/user-stories-template.md +0 -82
  105. package/.safeword/tickets/001-guides-review-user-stories.md +0 -83
  106. package/.safeword/tickets/002-architecture-enforcement.md +0 -211
  107. package/.safeword/tickets/003-reactive-fix-prevention.md +0 -57
  108. package/.safeword/tickets/004-technical-constraints-in-user-stories.md +0 -39
  109. package/.safeword/tickets/005-cli-implementation.md +0 -248
  110. package/.safeword/tickets/006-flesh-out-skills.md +0 -43
  111. package/.safeword/tickets/007-flesh-out-questioning.md +0 -44
  112. package/.safeword/tickets/008-upgrade-questioning.md +0 -58
  113. package/.safeword/tickets/009-naming-conventions.md +0 -41
  114. package/.safeword/tickets/010-safeword-md-cleanup.md +0 -34
  115. package/.safeword/tickets/011-cursor-setup.md +0 -86
  116. package/.safeword/tickets/README.md +0 -73
  117. package/.safeword/version +0 -1
  118. package/AGENTS.md +0 -59
  119. package/CLAUDE.md +0 -12
  120. package/README.md +0 -347
  121. package/docs/001-cli-implementation-plan.md +0 -856
  122. package/docs/elite-dx-implementation-plan.md +0 -1034
  123. package/framework/README.md +0 -131
  124. package/framework/mcp/README.md +0 -96
  125. package/framework/mcp/arcade.sample.json +0 -8
  126. package/framework/mcp/context7.sample.json +0 -6
  127. package/framework/mcp/playwright.sample.json +0 -6
  128. package/framework/scripts/arch-review.sh +0 -235
  129. package/framework/scripts/check-linting-sync.sh +0 -58
  130. package/framework/scripts/load-env.sh +0 -49
  131. package/framework/scripts/setup-claude.sh +0 -223
  132. package/framework/scripts/setup-linting.sh +0 -559
  133. package/framework/scripts/setup-quality.sh +0 -477
  134. package/framework/scripts/setup-safeword.sh +0 -550
  135. package/framework/templates/ci/architecture-check.yml +0 -78
  136. package/learnings/ai-sdk-v5-breaking-changes.md +0 -178
  137. package/learnings/e2e-test-zombie-processes.md +0 -231
  138. package/learnings/milkdown-crepe-editor-property.md +0 -96
  139. package/learnings/prosemirror-fragment-traversal.md +0 -119
  140. package/packages/cli/AGENTS.md +0 -1
  141. package/packages/cli/ARCHITECTURE.md +0 -279
  142. package/packages/cli/package.json +0 -51
  143. package/packages/cli/src/cli.ts +0 -63
  144. package/packages/cli/src/commands/check.ts +0 -166
  145. package/packages/cli/src/commands/diff.ts +0 -209
  146. package/packages/cli/src/commands/reset.ts +0 -190
  147. package/packages/cli/src/commands/setup.ts +0 -325
  148. package/packages/cli/src/commands/upgrade.ts +0 -163
  149. package/packages/cli/src/index.ts +0 -3
  150. package/packages/cli/src/templates/config.ts +0 -58
  151. package/packages/cli/src/templates/content.ts +0 -18
  152. package/packages/cli/src/templates/index.ts +0 -12
  153. package/packages/cli/src/utils/agents-md.ts +0 -66
  154. package/packages/cli/src/utils/fs.ts +0 -179
  155. package/packages/cli/src/utils/git.ts +0 -124
  156. package/packages/cli/src/utils/hooks.ts +0 -29
  157. package/packages/cli/src/utils/output.ts +0 -60
  158. package/packages/cli/src/utils/project-detector.test.ts +0 -185
  159. package/packages/cli/src/utils/project-detector.ts +0 -44
  160. package/packages/cli/src/utils/version.ts +0 -28
  161. package/packages/cli/src/version.ts +0 -6
  162. package/packages/cli/templates/SAFEWORD.md +0 -776
  163. package/packages/cli/templates/doc-templates/architecture-template.md +0 -136
  164. package/packages/cli/templates/doc-templates/design-doc-template.md +0 -134
  165. package/packages/cli/templates/doc-templates/test-definitions-feature.md +0 -131
  166. package/packages/cli/templates/doc-templates/ticket-template.md +0 -82
  167. package/packages/cli/templates/doc-templates/user-stories-template.md +0 -92
  168. package/packages/cli/templates/guides/architecture-guide.md +0 -423
  169. package/packages/cli/templates/guides/code-philosophy.md +0 -195
  170. package/packages/cli/templates/guides/context-files-guide.md +0 -457
  171. package/packages/cli/templates/guides/data-architecture-guide.md +0 -200
  172. package/packages/cli/templates/guides/design-doc-guide.md +0 -171
  173. package/packages/cli/templates/guides/learning-extraction.md +0 -552
  174. package/packages/cli/templates/guides/llm-instruction-design.md +0 -248
  175. package/packages/cli/templates/guides/llm-prompting.md +0 -102
  176. package/packages/cli/templates/guides/tdd-best-practices.md +0 -615
  177. package/packages/cli/templates/guides/test-definitions-guide.md +0 -334
  178. package/packages/cli/templates/guides/testing-methodology.md +0 -618
  179. package/packages/cli/templates/guides/user-story-guide.md +0 -256
  180. package/packages/cli/templates/guides/zombie-process-cleanup.md +0 -219
  181. package/packages/cli/templates/hooks/agents-md-check.sh +0 -27
  182. package/packages/cli/templates/hooks/post-tool.sh +0 -4
  183. package/packages/cli/templates/hooks/pre-commit.sh +0 -10
  184. package/packages/cli/templates/prompts/arch-review.md +0 -43
  185. package/packages/cli/templates/prompts/quality-review.md +0 -10
  186. package/packages/cli/templates/skills/safeword-quality-reviewer/SKILL.md +0 -207
  187. package/packages/cli/tests/commands/check.test.ts +0 -129
  188. package/packages/cli/tests/commands/cli.test.ts +0 -89
  189. package/packages/cli/tests/commands/diff.test.ts +0 -115
  190. package/packages/cli/tests/commands/reset.test.ts +0 -310
  191. package/packages/cli/tests/commands/self-healing.test.ts +0 -170
  192. package/packages/cli/tests/commands/setup-blocking.test.ts +0 -71
  193. package/packages/cli/tests/commands/setup-core.test.ts +0 -135
  194. package/packages/cli/tests/commands/setup-git.test.ts +0 -139
  195. package/packages/cli/tests/commands/setup-hooks.test.ts +0 -334
  196. package/packages/cli/tests/commands/setup-linting.test.ts +0 -189
  197. package/packages/cli/tests/commands/setup-noninteractive.test.ts +0 -80
  198. package/packages/cli/tests/commands/setup-templates.test.ts +0 -181
  199. package/packages/cli/tests/commands/upgrade.test.ts +0 -215
  200. package/packages/cli/tests/helpers.ts +0 -243
  201. package/packages/cli/tests/npm-package.test.ts +0 -83
  202. package/packages/cli/tests/technical-constraints.test.ts +0 -96
  203. package/packages/cli/tsconfig.json +0 -25
  204. package/packages/cli/tsup.config.ts +0 -11
  205. package/packages/cli/vitest.config.ts +0 -23
  206. package/promptfoo.yaml +0 -3270
  207. /package/{framework → templates}/SAFEWORD.md +0 -0
  208. /package/{packages/cli/templates → templates}/commands/arch-review.md +0 -0
  209. /package/{packages/cli/templates → templates}/commands/lint.md +0 -0
  210. /package/{packages/cli/templates → templates}/commands/quality-review.md +0 -0
  211. /package/{framework/templates → templates/doc-templates}/architecture-template.md +0 -0
  212. /package/{framework/templates → templates/doc-templates}/design-doc-template.md +0 -0
  213. /package/{framework/templates → templates/doc-templates}/test-definitions-feature.md +0 -0
  214. /package/{framework/templates → templates/doc-templates}/ticket-template.md +0 -0
  215. /package/{framework/templates → templates/doc-templates}/user-stories-template.md +0 -0
  216. /package/{framework → templates}/guides/architecture-guide.md +0 -0
  217. /package/{framework → templates}/guides/code-philosophy.md +0 -0
  218. /package/{framework → templates}/guides/context-files-guide.md +0 -0
  219. /package/{framework → templates}/guides/data-architecture-guide.md +0 -0
  220. /package/{framework → templates}/guides/design-doc-guide.md +0 -0
  221. /package/{framework → templates}/guides/learning-extraction.md +0 -0
  222. /package/{framework → templates}/guides/llm-instruction-design.md +0 -0
  223. /package/{framework → templates}/guides/llm-prompting.md +0 -0
  224. /package/{framework → templates}/guides/tdd-best-practices.md +0 -0
  225. /package/{framework → templates}/guides/test-definitions-guide.md +0 -0
  226. /package/{framework → templates}/guides/testing-methodology.md +0 -0
  227. /package/{framework → templates}/guides/user-story-guide.md +0 -0
  228. /package/{framework → templates}/guides/zombie-process-cleanup.md +0 -0
  229. /package/{packages/cli/templates → templates}/hooks/inject-timestamp.sh +0 -0
  230. /package/{packages/cli/templates → templates}/lib/common.sh +0 -0
  231. /package/{packages/cli/templates → templates}/lib/jq-fallback.sh +0 -0
  232. /package/{packages/cli/templates → templates}/markdownlint.jsonc +0 -0
  233. /package/{framework → templates}/prompts/arch-review.md +0 -0
  234. /package/{framework → templates}/prompts/quality-review.md +0 -0
  235. /package/{framework/skills/quality-reviewer → templates/skills/safeword-quality-reviewer}/SKILL.md +0 -0
@@ -1,96 +0,0 @@
1
- # MCP Server Configurations
2
-
3
- Sample configurations for Model Context Protocol (MCP) servers.
4
-
5
- ## Available Servers
6
-
7
- | Server | Package | API Key | Purpose |
8
- |--------|---------|---------|---------|
9
- | **Context7** | `@upstash/context7-mcp` | Required (free) | Library docs lookups |
10
- | **Playwright** | `@playwright/mcp` | None | Browser automation (Microsoft) |
11
- | **Arcade** | Arcade MCP Gateway | Required | Tool gateway |
12
-
13
- ## API Keys
14
-
15
- | Server | Get Key |
16
- |--------|---------|
17
- | Context7 | [context7.com/dashboard](https://context7.com/dashboard) (free tier) |
18
- | Arcade | [arcade.dev](https://arcade.dev) |
19
-
20
- ## Setup
21
-
22
- ### 1. Set Environment Variables
23
-
24
- Add to `~/.zshrc` (or `~/.bashrc`):
25
-
26
- ```bash
27
- export CONTEXT7_API_KEY="your-key-here"
28
- export ARCADE_API_KEY="your-key-here"
29
- ```
30
-
31
- Then reload: `source ~/.zshrc`
32
-
33
- ### 2. Add MCP Config
34
-
35
- **Claude Desktop** — Add to `~/.claude/claude_desktop_config.json`:
36
-
37
- ```json
38
- {
39
- "mcpServers": {
40
- "context7": {
41
- "command": "npx",
42
- "args": ["-y", "@upstash/context7-mcp@latest"]
43
- },
44
- "playwright": {
45
- "command": "npx",
46
- "args": ["@playwright/mcp@latest"]
47
- }
48
- }
49
- }
50
- ```
51
-
52
- **Cursor** — Add to `.cursor/mcp.json`:
53
-
54
- ```json
55
- {
56
- "mcpServers": {
57
- "context7": {
58
- "command": "npx",
59
- "args": ["-y", "@upstash/context7-mcp@latest"]
60
- },
61
- "playwright": {
62
- "command": "npx",
63
- "args": ["@playwright/mcp@latest"]
64
- }
65
- }
66
- }
67
- ```
68
-
69
- MCP servers inherit environment variables from your shell automatically.
70
-
71
- ## Playwright Options
72
-
73
- | Arg | Description |
74
- |-----|-------------|
75
- | `--browser chromium\|firefox\|webkit` | Browser type |
76
- | `--headless` | Run headless |
77
- | `--user-data-dir <path>` | Persist browser profile |
78
-
79
- Example:
80
-
81
- ```json
82
- {
83
- "command": "npx",
84
- "args": ["@playwright/mcp@latest", "--browser", "chromium", "--headless"]
85
- }
86
- ```
87
-
88
- ## Context7 Usage
89
-
90
- Once configured, use in prompts:
91
-
92
- ```
93
- use context7 to look up the latest React 19 useOptimistic hook documentation
94
- ```
95
-
96
- Context7 fetches current docs directly from source repositories.
@@ -1,9 +0,0 @@
1
- {
2
- "name": "arcade",
3
- "transport": "http",
4
- "url": "https://mcp.arcade.dev",
5
- "headers": {
6
- "Authorization": "Bearer YOUR_ARCADE_API_KEY"
7
- }
8
- }
9
-
@@ -1,7 +0,0 @@
1
- {
2
- "name": "context7",
3
- "transport": "stdio",
4
- "command": "npx",
5
- "args": ["-y", "@upstash/context7-mcp@latest"]
6
- }
7
-
@@ -1,7 +0,0 @@
1
- {
2
- "name": "playwright",
3
- "transport": "stdio",
4
- "command": "npx",
5
- "args": ["@playwright/mcp@latest"]
6
- }
7
-
@@ -1,62 +0,0 @@
1
- {
2
- "hooks": {
3
- "UserPromptSubmit": [
4
- {
5
- "matcher": ".{20,}",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/question-protocol.sh"
10
- }
11
- ]
12
- },
13
- {
14
- "hooks": [
15
- {
16
- "type": "command",
17
- "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/inject-timestamp.sh"
18
- }
19
- ]
20
- }
21
- ],
22
- "Stop": [
23
- {
24
- "hooks": [
25
- {
26
- "type": "command",
27
- "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/auto-quality-review.sh"
28
- }
29
- ]
30
- }
31
- ],
32
- "SessionStart": [
33
- {
34
- "hooks": [
35
- {
36
- "type": "command",
37
- "command": "$CLAUDE_PROJECT_DIR/.safeword/hooks/agents-md-check.sh"
38
- }
39
- ]
40
- },
41
- {
42
- "hooks": [
43
- {
44
- "type": "command",
45
- "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/version-check.sh"
46
- }
47
- ]
48
- }
49
- ],
50
- "PostToolUse": [
51
- {
52
- "matcher": "Write|Edit|MultiEdit|NotebookEdit",
53
- "hooks": [
54
- {
55
- "type": "command",
56
- "command": "$CLAUDE_PROJECT_DIR/.safeword/hooks/post-tool.sh"
57
- }
58
- ]
59
- }
60
- ]
61
- }
62
- }
@@ -1,190 +0,0 @@
1
- ---
2
- name: quality-reviewer
3
- description: Deep code quality review with web research. Use when user explicitly requests verification against latest docs ('double check against latest', 'verify versions', 'check security'), needs deeper analysis beyond automatic hook, or is working on projects without SAFEWORD.md/CLAUDE.md. Fetches current documentation (WebFetch), checks latest versions (WebSearch), and provides deep analysis (performance, security, alternatives).
4
- allowed-tools: "*"
5
- ---
6
-
7
- # Quality Reviewer
8
-
9
- Deep quality review with web research to verify code against the latest ecosystem state.
10
-
11
- **Primary differentiator**: Web research (WebSearch, WebFetch) to verify against current versions, documentation, and best practices.
12
-
13
- **Triggers**:
14
- - **Explicit web research request**: "double check against latest docs", "verify we're using latest version", "check for security issues"
15
- - **Deep dive needed**: User wants analysis beyond automatic hook (performance, architecture alternatives, trade-offs)
16
- - **No SAFEWORD.md/CLAUDE.md**: Projects without context files (automatic hook won't run, manual review needed)
17
- - **Pre-change review**: User wants review before making changes (automatic hook only triggers after changes)
18
- - **Model-invoked**: Claude determines web research would be valuable
19
-
20
- **Relationship to automatic quality hook**:
21
- - **Automatic hook**: Fast quality check using existing knowledge + project context (guaranteed, runs on every change)
22
- - **This skill**: Deep review with web research when verification against current ecosystem is needed (on-demand, 2-3 min)
23
-
24
- ## Review Protocol
25
-
26
- ### 1. Identify What Changed
27
-
28
- Understand context:
29
- - What files were just modified?
30
- - What problem is being solved?
31
- - What was the implementation approach?
32
-
33
- ### 2. Read Project Standards
34
-
35
- ```bash
36
- ls CLAUDE.md SAFEWORD.md ARCHITECTURE.md .claude/
37
- ```
38
-
39
- Read relevant standards:
40
- - `CLAUDE.md` or `SAFEWORD.md` - Project-specific guidelines
41
- - `ARCHITECTURE.md` - Architectural principles
42
- - `@./.safeword/guides/code-philosophy.md` - Core coding principles
43
-
44
- ### 3. Evaluate Correctness
45
-
46
- **Will it work?**
47
- - Does the logic make sense?
48
- - Are there obvious bugs?
49
-
50
- **Edge cases:**
51
- - Empty inputs, null/undefined, boundary conditions (0, -1, max)?
52
- - Concurrent access, network failures?
53
-
54
- **Error handling:**
55
- - Are errors caught appropriately?
56
- - Helpful error messages?
57
- - Cleanup handled (resources, connections)?
58
-
59
- **Logic errors:**
60
- - Off-by-one errors, race conditions, wrong assumptions?
61
-
62
- ### 4. Evaluate Anti-Bloat
63
-
64
- - Are all dependencies necessary? Could we use stdlib/built-ins?
65
- - Are abstractions solving real problems or imaginary ones?
66
- - YAGNI: Is this feature actually needed now?
67
-
68
- ### 5. Evaluate Elegance
69
-
70
- - Is the code easy to understand?
71
- - Are names clear and descriptive?
72
- - Is the intent obvious?
73
- - Will this be easy to change later?
74
-
75
- ### 6. Check Standards Compliance
76
-
77
- **Project standards** (from CLAUDE.md/SAFEWORD.md/ARCHITECTURE.md):
78
- - Does it follow established patterns?
79
- - Does it violate any documented principles?
80
-
81
- **Library best practices:**
82
- - Are we using libraries correctly?
83
- - Are we following official documentation?
84
-
85
- ### 7. Verify Latest Versions ⭐ **PRIMARY VALUE**
86
-
87
- **CRITICAL**: This is your main differentiator from automatic hook. ALWAYS check versions.
88
-
89
- ```
90
- WebSearch: "[library name] latest stable version 2025"
91
- WebSearch: "[library name] security vulnerabilities"
92
- ```
93
-
94
- **Flag if outdated:**
95
- - Major versions behind → WARN (e.g., React 17 when 19 is stable)
96
- - Minor versions behind → NOTE (e.g., React 19.0.0 when 19.1.0 is stable)
97
- - Security vulnerabilities → CRITICAL (must upgrade)
98
- - Using latest → Confirm
99
-
100
- **Common libraries**: React, TypeScript, Vite, Next.js, Node.js, Vitest, Playwright, Jest, esbuild
101
-
102
- **Check even if dependencies didn't change** - User might be using outdated patterns.
103
-
104
- ### 8. Verify Latest Documentation ⭐ **PRIMARY VALUE**
105
-
106
- **CRITICAL**: This is your main differentiator from automatic hook. ALWAYS verify against current docs.
107
-
108
- ```
109
- WebFetch: https://react.dev (for React)
110
- WebFetch: https://vitejs.dev (for Vite)
111
- WebFetch: https://www.electronjs.org/docs (for Electron)
112
- ```
113
-
114
- **Look for:**
115
- - Are we using deprecated APIs?
116
- - Are there newer, better patterns?
117
- - Did the library's recommendations change since training data?
118
-
119
- **Cache results**: If you checked docs recently in this session, don't re-fetch.
120
-
121
- ## Output Format
122
-
123
- **Simple question** ("is it correct?"):
124
- ```
125
- **Correctness:** ✓ Logic is sound, edge cases handled, no obvious errors.
126
- ```
127
-
128
- **Full review** ("double check and critique"):
129
- ```markdown
130
- ## Quality Review
131
-
132
- **Correctness:** [✓/⚠️/❌] [Brief assessment]
133
- **Anti-Bloat:** [✓/⚠️/❌] [Brief assessment]
134
- **Elegance:** [✓/⚠️/❌] [Brief assessment]
135
- **Standards:** [✓/⚠️/❌] [Brief assessment]
136
- **Versions:** [✓/⚠️/❌] [Latest version check with WebSearch]
137
- **Documentation:** [✓/⚠️/❌] [Current docs check with WebFetch]
138
-
139
- **Verdict:** [APPROVE / REQUEST CHANGES / NEEDS DISCUSSION]
140
-
141
- **Critical issues:** [List or "None"]
142
- **Suggested improvements:** [List or "None"]
143
- ```
144
-
145
- Use structured format for "double check"/"critique". Use brief format for specific questions.
146
-
147
- ## Example: Full Review
148
-
149
- ```markdown
150
- ## Quality Review
151
-
152
- **Correctness:** ✓ Logic sound, edge cases covered, error handling adequate
153
- **Anti-Bloat:** ✓ Minimal dependencies, appropriate abstractions
154
- **Elegance:** ✓ Clear code, good naming, well-structured
155
- **Standards:** ✓ Follows CLAUDE.md patterns
156
- **Versions:** ✓ React 19.0.0 (latest stable), TypeScript 5.7.2 (latest)
157
- **Documentation:** ✓ Using current React patterns per https://react.dev
158
-
159
- **Verdict:** APPROVE - Production ready
160
-
161
- **Critical issues:** None
162
- **Suggested improvements:** None
163
- ```
164
-
165
- ## Critical Reminders
166
-
167
- 1. **Primary value: Web research** - Use WebSearch/WebFetch to verify against current ecosystem (versions, docs, security)
168
- 2. **Complement automatic hook** - Hook does fast check with existing knowledge, you do deep dive with web research
169
- 3. **Explicit triggers matter** - "double check against latest docs", "verify versions", "check security" = invoke web research
170
- 4. **Projects without SAFEWORD.md** - Automatic hook won't run, you're the only quality check
171
- 5. **Always check latest docs** - Verify patterns are current, not outdated (WebFetch)
172
- 6. **Always verify versions** - Flag outdated dependencies (WebSearch)
173
- 7. **Be thorough but concise** - Cover all areas but keep explanations brief
174
- 8. **Provide actionable feedback** - Specific line numbers, concrete suggestions
175
- 9. **Clear verdict** - Always end with APPROVE/REQUEST CHANGES/NEEDS DISCUSSION
176
- 10. **Separate critical vs nice-to-have** - User needs to know what's blocking vs optional
177
-
178
- ## Non-Obvious Edge Cases
179
-
180
- **User requests review after automatic hook ran:**
181
- - Acknowledge hook ran: "The automatic quality hook already did a fast check. I'll now do deeper analysis with web research..."
182
- - Focus on what automatic hook doesn't do: fetch latest docs, verify versions, security checks, performance analysis
183
-
184
- **WebSearch/WebFetch fails:**
185
- - Continue review without version/docs checks
186
- - Note: "Couldn't verify latest versions/docs, skipping that check"
187
-
188
- **Project has no CLAUDE.md/SAFEWORD.md:**
189
- - Use `@./.safeword/guides/code-philosophy.md` as fallback
190
- - Note: "No project-specific standards found, using general best practices"
@@ -1,13 +0,0 @@
1
- # Quality Reviewer Skill
2
-
3
- This skill provides deep code quality review with web research capabilities.
4
-
5
- ## Usage
6
-
7
- Use when user explicitly requests verification against latest docs or needs deeper analysis.
8
-
9
- ## Capabilities
10
-
11
- - Fetches current documentation (WebFetch)
12
- - Checks latest versions (WebSearch)
13
- - Provides deep analysis (performance, security, alternatives)
@@ -1,4 +0,0 @@
1
- # Arcade MCP Gateway (HTTP)
2
- # Copy these into your shell profile or a local env file (do NOT commit secrets).
3
- ARCADE_MCP_GATEWAY_URL=https://your-gateway.example.com
4
- ARCADE_API_KEY=your-arcade-api-key
package/.env.example DELETED
@@ -1,11 +0,0 @@
1
- # API Keys for SAFEWORD
2
- # Copy to .env and fill in values
3
-
4
- # Anthropic (required for promptfoo evals)
5
- ANTHROPIC_API_KEY=
6
-
7
- # Context7 MCP (get free key at https://context7.com/dashboard)
8
- CONTEXT7_API_KEY=
9
-
10
- # Arcade MCP Gateway (https://arcade.dev)
11
- ARCADE_API_KEY=
package/.gitmodules DELETED
@@ -1,4 +0,0 @@
1
- [submodule "examples/superpowers"]
2
- path = examples/superpowers
3
- url = https://github.com/obra/superpowers
4
- branch = main
@@ -1,33 +0,0 @@
1
- # SAFEWORD Configuration
2
-
3
- This directory contains safeword configuration for AI coding agents.
4
-
5
- ## Structure
6
-
7
- - `SAFEWORD.md` - This file (main configuration)
8
- - `guides/` - Reference documentation
9
- - `templates/` - Document templates
10
- - `hooks/` - Claude Code hook scripts
11
- - `version` - Installed safeword version
12
-
13
- ## Usage
14
-
15
- The AGENTS.md file in your project root should reference this configuration:
16
-
17
- ```markdown
18
- **⚠️ ALWAYS READ FIRST: @./.safeword/SAFEWORD.md**
19
- ```
20
-
21
- This ensures AI agents read the safeword configuration before any other context.
22
-
23
- ## Customization
24
-
25
- You can customize the guides and templates, but note that running `safeword upgrade`
26
- will overwrite changes. Keep customizations in separate files if needed.
27
-
28
- ## Commands
29
-
30
- - `safeword check` - Verify configuration health
31
- - `safeword upgrade` - Update to latest templates
32
- - `safeword diff` - Preview upgrade changes
33
- - `safeword reset` - Remove safeword configuration
@@ -1,101 +0,0 @@
1
- ////////////////////////////////////////////////////////////////////////////////
2
- //
3
- // ██████╗ ██████╗ ███╗ ██╗ ██████╗ ████████╗ ███████╗██████╗ ██╗████████╗
4
- // ██╔══██╗██╔═══██╗ ████╗ ██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██║╚══██╔══╝
5
- // ██║ ██║██║ ██║ ██╔██╗ ██║██║ ██║ ██║ █████╗ ██║ ██║██║ ██║
6
- // ██║ ██║██║ ██║ ██║╚██╗██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║
7
- // ██████╔╝╚██████╔╝ ██║ ╚████║╚██████╔╝ ██║ ███████╗██████╔╝██║ ██║
8
- // ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝
9
- //
10
- // AUTO-GENERATED FILE - DO NOT EDIT
11
- //
12
- // This file is regenerated every time you run:
13
- // bash setup-linting.sh
14
- //
15
- // To customize ESLint rules, edit eslint.config.mjs instead.
16
- // Your customizations there are preserved across regenerations.
17
- //
18
- ////////////////////////////////////////////////////////////////////////////////
19
-
20
- import { globalIgnores } from 'eslint/config';
21
- import js from '@eslint/js';
22
- import sonarjs from 'eslint-plugin-sonarjs';
23
- import sdl from '@microsoft/eslint-plugin-sdl';
24
- import boundaries from 'eslint-plugin-boundaries';
25
- import prettier from 'eslint-config-prettier';
26
- import globals from 'globals';
27
-
28
- export default [
29
- globalIgnores([
30
- '**/node_modules/', '**/dist/', '**/build/', '**/.next/', '**/coverage/',
31
- '**/*.min.js', '**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml',
32
- ]),
33
-
34
- // Base JavaScript
35
- {
36
- name: 'safeword/base-js',
37
- files: ['**/*.{js,mjs,cjs}'],
38
- ...js.configs.recommended,
39
- languageOptions: {
40
- ecmaVersion: 'latest',
41
- sourceType: 'module',
42
- globals: { ...globals.browser, ...globals.node, ...globals.es2025 },
43
- },
44
- },
45
-
46
- // Code quality (SonarJS)
47
- {
48
- name: 'safeword/sonarjs',
49
- files: ['**/*.{js,mjs,cjs}'],
50
- plugins: { sonarjs },
51
- rules: sonarjs.configs.recommended.rules,
52
- },
53
-
54
- // Security (Microsoft SDL)
55
- {
56
- name: 'safeword/security',
57
- files: ['**/*.{js,mjs,cjs}'],
58
- plugins: { '@microsoft/sdl': sdl },
59
- rules: {
60
- '@microsoft/sdl/no-insecure-url': 'error',
61
- '@microsoft/sdl/no-inner-html': 'error',
62
- '@microsoft/sdl/no-document-write': 'error',
63
- '@microsoft/sdl/no-html-method': 'error',
64
- '@microsoft/sdl/no-insecure-random': 'error',
65
- '@microsoft/sdl/no-postmessage-star-origin': 'error',
66
- },
67
- },
68
-
69
- // Architecture boundaries (default layers - customize in eslint.config.mjs)
70
- {
71
- name: 'safeword/boundaries',
72
- files: ['src/**/*.{js,mjs,cjs,ts,tsx,jsx}'],
73
- plugins: { boundaries },
74
- settings: {
75
- 'boundaries/include': ['src/**/*'],
76
- 'boundaries/elements': [
77
- { type: 'app', pattern: 'src/app/**/*' },
78
- { type: 'domain', pattern: 'src/domain/**/*' },
79
- { type: 'infra', pattern: 'src/infra/**/*' },
80
- { type: 'shared', pattern: 'src/shared/**/*' },
81
- ],
82
- },
83
- rules: {
84
- 'boundaries/element-types': ['error', {
85
- default: 'disallow',
86
- rules: [
87
- { from: 'app', allow: ['domain', 'infra', 'shared'] },
88
- { from: 'domain', allow: ['shared'] },
89
- { from: 'infra', allow: ['domain', 'shared'] },
90
- { from: 'shared', allow: [] },
91
- ],
92
- }],
93
- },
94
- },
95
-
96
- // Prettier (must be last in base)
97
- {
98
- name: 'safeword/prettier',
99
- ...prettier,
100
- },
101
- ];