safeword 0.2.4 → 0.2.5
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.
- package/dist/check-3NGQ4NR5.js +129 -0
- package/dist/check-3NGQ4NR5.js.map +1 -0
- package/dist/chunk-2XWIUEQK.js +190 -0
- package/dist/chunk-2XWIUEQK.js.map +1 -0
- package/dist/chunk-GZRQL3SX.js +146 -0
- package/dist/chunk-GZRQL3SX.js.map +1 -0
- package/dist/chunk-ORQHKDT2.js +10 -0
- package/dist/chunk-ORQHKDT2.js.map +1 -0
- package/dist/chunk-W66Z3C5H.js +21 -0
- package/dist/chunk-W66Z3C5H.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +34 -0
- package/dist/cli.js.map +1 -0
- package/dist/diff-Y6QTAW4O.js +166 -0
- package/dist/diff-Y6QTAW4O.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/reset-3ACTIYYE.js +143 -0
- package/dist/reset-3ACTIYYE.js.map +1 -0
- package/dist/setup-RR4M334C.js +266 -0
- package/dist/setup-RR4M334C.js.map +1 -0
- package/dist/upgrade-6AR3DHUV.js +134 -0
- package/dist/upgrade-6AR3DHUV.js.map +1 -0
- package/package.json +44 -19
- package/{.safeword → templates}/hooks/agents-md-check.sh +0 -0
- package/{.safeword → templates}/hooks/post-tool.sh +0 -0
- package/{.safeword → templates}/hooks/pre-commit.sh +0 -0
- package/.claude/commands/arch-review.md +0 -32
- package/.claude/commands/lint.md +0 -6
- package/.claude/commands/quality-review.md +0 -13
- package/.claude/commands/setup-linting.md +0 -6
- package/.claude/hooks/auto-lint.sh +0 -6
- package/.claude/hooks/auto-quality-review.sh +0 -170
- package/.claude/hooks/check-linting-sync.sh +0 -17
- package/.claude/hooks/inject-timestamp.sh +0 -6
- package/.claude/hooks/question-protocol.sh +0 -12
- package/.claude/hooks/run-linters.sh +0 -8
- package/.claude/hooks/run-quality-review.sh +0 -76
- package/.claude/hooks/version-check.sh +0 -10
- package/.claude/mcp/README.md +0 -96
- package/.claude/mcp/arcade.sample.json +0 -9
- package/.claude/mcp/context7.sample.json +0 -7
- package/.claude/mcp/playwright.sample.json +0 -7
- package/.claude/settings.json +0 -62
- package/.claude/skills/quality-reviewer/SKILL.md +0 -190
- package/.claude/skills/safeword-quality-reviewer/SKILL.md +0 -13
- package/.env.arcade.example +0 -4
- package/.env.example +0 -11
- package/.gitmodules +0 -4
- package/.safeword/SAFEWORD.md +0 -33
- package/.safeword/eslint/eslint-base.mjs +0 -101
- package/.safeword/guides/architecture-guide.md +0 -404
- package/.safeword/guides/code-philosophy.md +0 -174
- package/.safeword/guides/context-files-guide.md +0 -405
- package/.safeword/guides/data-architecture-guide.md +0 -183
- package/.safeword/guides/design-doc-guide.md +0 -165
- package/.safeword/guides/learning-extraction.md +0 -515
- package/.safeword/guides/llm-instruction-design.md +0 -239
- package/.safeword/guides/llm-prompting.md +0 -95
- package/.safeword/guides/tdd-best-practices.md +0 -570
- package/.safeword/guides/test-definitions-guide.md +0 -243
- package/.safeword/guides/testing-methodology.md +0 -573
- package/.safeword/guides/user-story-guide.md +0 -237
- package/.safeword/guides/zombie-process-cleanup.md +0 -214
- package/.safeword/planning/002-user-story-quality-evaluation.md +0 -1840
- package/.safeword/planning/003-langsmith-eval-setup-prompt.md +0 -363
- package/.safeword/planning/004-llm-eval-test-cases.md +0 -3226
- package/.safeword/planning/005-architecture-enforcement-system.md +0 -169
- package/.safeword/planning/006-reactive-fix-prevention-research.md +0 -135
- package/.safeword/planning/011-cli-ux-vision.md +0 -330
- package/.safeword/planning/012-project-structure-cleanup.md +0 -154
- package/.safeword/planning/README.md +0 -39
- package/.safeword/planning/automation-plan-v2.md +0 -1225
- package/.safeword/planning/automation-plan-v3.md +0 -1291
- package/.safeword/planning/automation-plan.md +0 -3058
- package/.safeword/planning/design/005-cli-implementation.md +0 -343
- package/.safeword/planning/design/013-cli-self-contained-templates.md +0 -596
- package/.safeword/planning/design/013a-eslint-plugin-suite.md +0 -256
- package/.safeword/planning/design/013b-implementation-snippets.md +0 -385
- package/.safeword/planning/design/013c-config-isolation-strategy.md +0 -242
- package/.safeword/planning/design/code-philosophy-improvements.md +0 -60
- package/.safeword/planning/mcp-analysis.md +0 -545
- package/.safeword/planning/phase2-subagents-vs-skills-analysis.md +0 -451
- package/.safeword/planning/settings-improvements.md +0 -970
- package/.safeword/planning/test-definitions/005-cli-implementation.md +0 -1301
- package/.safeword/planning/test-definitions/cli-self-contained-templates.md +0 -205
- package/.safeword/planning/user-stories/001-guides-review-user-stories.md +0 -1381
- package/.safeword/planning/user-stories/003-reactive-fix-prevention.md +0 -132
- package/.safeword/planning/user-stories/004-technical-constraints.md +0 -86
- package/.safeword/planning/user-stories/005-cli-implementation.md +0 -311
- package/.safeword/planning/user-stories/cli-self-contained-templates.md +0 -172
- package/.safeword/planning/versioned-distribution.md +0 -740
- package/.safeword/prompts/arch-review.md +0 -43
- package/.safeword/prompts/quality-review.md +0 -11
- package/.safeword/scripts/arch-review.sh +0 -235
- package/.safeword/scripts/check-linting-sync.sh +0 -58
- package/.safeword/scripts/setup-linting.sh +0 -559
- package/.safeword/templates/architecture-template.md +0 -136
- package/.safeword/templates/ci/architecture-check.yml +0 -79
- package/.safeword/templates/design-doc-template.md +0 -127
- package/.safeword/templates/test-definitions-feature.md +0 -100
- package/.safeword/templates/ticket-template.md +0 -74
- package/.safeword/templates/user-stories-template.md +0 -82
- package/.safeword/tickets/001-guides-review-user-stories.md +0 -83
- package/.safeword/tickets/002-architecture-enforcement.md +0 -211
- package/.safeword/tickets/003-reactive-fix-prevention.md +0 -57
- package/.safeword/tickets/004-technical-constraints-in-user-stories.md +0 -39
- package/.safeword/tickets/005-cli-implementation.md +0 -248
- package/.safeword/tickets/006-flesh-out-skills.md +0 -43
- package/.safeword/tickets/007-flesh-out-questioning.md +0 -44
- package/.safeword/tickets/008-upgrade-questioning.md +0 -58
- package/.safeword/tickets/009-naming-conventions.md +0 -41
- package/.safeword/tickets/010-safeword-md-cleanup.md +0 -34
- package/.safeword/tickets/011-cursor-setup.md +0 -86
- package/.safeword/tickets/README.md +0 -73
- package/.safeword/version +0 -1
- package/AGENTS.md +0 -59
- package/CLAUDE.md +0 -12
- package/README.md +0 -347
- package/docs/001-cli-implementation-plan.md +0 -856
- package/docs/elite-dx-implementation-plan.md +0 -1034
- package/framework/README.md +0 -131
- package/framework/mcp/README.md +0 -96
- package/framework/mcp/arcade.sample.json +0 -8
- package/framework/mcp/context7.sample.json +0 -6
- package/framework/mcp/playwright.sample.json +0 -6
- package/framework/scripts/arch-review.sh +0 -235
- package/framework/scripts/check-linting-sync.sh +0 -58
- package/framework/scripts/load-env.sh +0 -49
- package/framework/scripts/setup-claude.sh +0 -223
- package/framework/scripts/setup-linting.sh +0 -559
- package/framework/scripts/setup-quality.sh +0 -477
- package/framework/scripts/setup-safeword.sh +0 -550
- package/framework/templates/ci/architecture-check.yml +0 -78
- package/learnings/ai-sdk-v5-breaking-changes.md +0 -178
- package/learnings/e2e-test-zombie-processes.md +0 -231
- package/learnings/milkdown-crepe-editor-property.md +0 -96
- package/learnings/prosemirror-fragment-traversal.md +0 -119
- package/packages/cli/AGENTS.md +0 -1
- package/packages/cli/ARCHITECTURE.md +0 -279
- package/packages/cli/package.json +0 -51
- package/packages/cli/src/cli.ts +0 -63
- package/packages/cli/src/commands/check.ts +0 -166
- package/packages/cli/src/commands/diff.ts +0 -209
- package/packages/cli/src/commands/reset.ts +0 -190
- package/packages/cli/src/commands/setup.ts +0 -325
- package/packages/cli/src/commands/upgrade.ts +0 -163
- package/packages/cli/src/index.ts +0 -3
- package/packages/cli/src/templates/config.ts +0 -58
- package/packages/cli/src/templates/content.ts +0 -18
- package/packages/cli/src/templates/index.ts +0 -12
- package/packages/cli/src/utils/agents-md.ts +0 -66
- package/packages/cli/src/utils/fs.ts +0 -179
- package/packages/cli/src/utils/git.ts +0 -124
- package/packages/cli/src/utils/hooks.ts +0 -29
- package/packages/cli/src/utils/output.ts +0 -60
- package/packages/cli/src/utils/project-detector.test.ts +0 -185
- package/packages/cli/src/utils/project-detector.ts +0 -44
- package/packages/cli/src/utils/version.ts +0 -28
- package/packages/cli/src/version.ts +0 -6
- package/packages/cli/templates/SAFEWORD.md +0 -776
- package/packages/cli/templates/doc-templates/architecture-template.md +0 -136
- package/packages/cli/templates/doc-templates/design-doc-template.md +0 -134
- package/packages/cli/templates/doc-templates/test-definitions-feature.md +0 -131
- package/packages/cli/templates/doc-templates/ticket-template.md +0 -82
- package/packages/cli/templates/doc-templates/user-stories-template.md +0 -92
- package/packages/cli/templates/guides/architecture-guide.md +0 -423
- package/packages/cli/templates/guides/code-philosophy.md +0 -195
- package/packages/cli/templates/guides/context-files-guide.md +0 -457
- package/packages/cli/templates/guides/data-architecture-guide.md +0 -200
- package/packages/cli/templates/guides/design-doc-guide.md +0 -171
- package/packages/cli/templates/guides/learning-extraction.md +0 -552
- package/packages/cli/templates/guides/llm-instruction-design.md +0 -248
- package/packages/cli/templates/guides/llm-prompting.md +0 -102
- package/packages/cli/templates/guides/tdd-best-practices.md +0 -615
- package/packages/cli/templates/guides/test-definitions-guide.md +0 -334
- package/packages/cli/templates/guides/testing-methodology.md +0 -618
- package/packages/cli/templates/guides/user-story-guide.md +0 -256
- package/packages/cli/templates/guides/zombie-process-cleanup.md +0 -219
- package/packages/cli/templates/hooks/agents-md-check.sh +0 -27
- package/packages/cli/templates/hooks/post-tool.sh +0 -4
- package/packages/cli/templates/hooks/pre-commit.sh +0 -10
- package/packages/cli/templates/prompts/arch-review.md +0 -43
- package/packages/cli/templates/prompts/quality-review.md +0 -10
- package/packages/cli/templates/skills/safeword-quality-reviewer/SKILL.md +0 -207
- package/packages/cli/tests/commands/check.test.ts +0 -129
- package/packages/cli/tests/commands/cli.test.ts +0 -89
- package/packages/cli/tests/commands/diff.test.ts +0 -115
- package/packages/cli/tests/commands/reset.test.ts +0 -310
- package/packages/cli/tests/commands/self-healing.test.ts +0 -170
- package/packages/cli/tests/commands/setup-blocking.test.ts +0 -71
- package/packages/cli/tests/commands/setup-core.test.ts +0 -135
- package/packages/cli/tests/commands/setup-git.test.ts +0 -139
- package/packages/cli/tests/commands/setup-hooks.test.ts +0 -334
- package/packages/cli/tests/commands/setup-linting.test.ts +0 -189
- package/packages/cli/tests/commands/setup-noninteractive.test.ts +0 -80
- package/packages/cli/tests/commands/setup-templates.test.ts +0 -181
- package/packages/cli/tests/commands/upgrade.test.ts +0 -215
- package/packages/cli/tests/helpers.ts +0 -243
- package/packages/cli/tests/npm-package.test.ts +0 -83
- package/packages/cli/tests/technical-constraints.test.ts +0 -96
- package/packages/cli/tsconfig.json +0 -25
- package/packages/cli/tsup.config.ts +0 -11
- package/packages/cli/vitest.config.ts +0 -23
- package/promptfoo.yaml +0 -3270
- /package/{framework → templates}/SAFEWORD.md +0 -0
- /package/{packages/cli/templates → templates}/commands/arch-review.md +0 -0
- /package/{packages/cli/templates → templates}/commands/lint.md +0 -0
- /package/{packages/cli/templates → templates}/commands/quality-review.md +0 -0
- /package/{framework/templates → templates/doc-templates}/architecture-template.md +0 -0
- /package/{framework/templates → templates/doc-templates}/design-doc-template.md +0 -0
- /package/{framework/templates → templates/doc-templates}/test-definitions-feature.md +0 -0
- /package/{framework/templates → templates/doc-templates}/ticket-template.md +0 -0
- /package/{framework/templates → templates/doc-templates}/user-stories-template.md +0 -0
- /package/{framework → templates}/guides/architecture-guide.md +0 -0
- /package/{framework → templates}/guides/code-philosophy.md +0 -0
- /package/{framework → templates}/guides/context-files-guide.md +0 -0
- /package/{framework → templates}/guides/data-architecture-guide.md +0 -0
- /package/{framework → templates}/guides/design-doc-guide.md +0 -0
- /package/{framework → templates}/guides/learning-extraction.md +0 -0
- /package/{framework → templates}/guides/llm-instruction-design.md +0 -0
- /package/{framework → templates}/guides/llm-prompting.md +0 -0
- /package/{framework → templates}/guides/tdd-best-practices.md +0 -0
- /package/{framework → templates}/guides/test-definitions-guide.md +0 -0
- /package/{framework → templates}/guides/testing-methodology.md +0 -0
- /package/{framework → templates}/guides/user-story-guide.md +0 -0
- /package/{framework → templates}/guides/zombie-process-cleanup.md +0 -0
- /package/{packages/cli/templates → templates}/hooks/inject-timestamp.sh +0 -0
- /package/{packages/cli/templates → templates}/lib/common.sh +0 -0
- /package/{packages/cli/templates → templates}/lib/jq-fallback.sh +0 -0
- /package/{packages/cli/templates → templates}/markdownlint.jsonc +0 -0
- /package/{framework → templates}/prompts/arch-review.md +0 -0
- /package/{framework → templates}/prompts/quality-review.md +0 -0
- /package/{framework/skills/quality-reviewer → templates/skills/safeword-quality-reviewer}/SKILL.md +0 -0
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
# Config Isolation Strategy
|
|
2
|
-
|
|
3
|
-
**Parent:** [013-cli-self-contained-templates.md](./013-cli-self-contained-templates.md)
|
|
4
|
-
**Date:** 2025-11-29
|
|
5
|
-
|
|
6
|
-
Safeword maximizes autonomy by keeping its configs separate from user customizations. This prevents merge conflicts on upgrades and gives users confidence to modify their own files.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Principle: Separate Ownership
|
|
11
|
-
|
|
12
|
-
| Config Type | User Owns | Safeword Owns | Strategy |
|
|
13
|
-
|-------------|-----------|---------------|----------|
|
|
14
|
-
| ESLint | `eslint.config.js` | `.safeword/eslint.config.js` | User imports safeword |
|
|
15
|
-
| Prettier | `prettier.config.js` | `.safeword/prettier.config.js` | User spreads safeword |
|
|
16
|
-
| Markdownlint | N/A | `.safeword/.markdownlint.jsonc` | Safeword owns entirely |
|
|
17
|
-
| Claude hooks | `.claude/settings.json` | Hooks marked `_safeword: true` | Marker-based merge |
|
|
18
|
-
| package.json | `scripts` section | N/A | Add if missing, never overwrite |
|
|
19
|
-
| Pre-commit | `.husky/pre-commit` | `.safeword/git/git-pre-commit.sh` | User calls safeword script |
|
|
20
|
-
| lint-staged | N/A | `.safeword/lint-staged.config.js` | Safeword owns entirely |
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## ESLint: `extends` Pattern (ESLint 9.x 2025)
|
|
25
|
-
|
|
26
|
-
Per [ESLint's defineConfig docs](https://eslint.org/blog/2025/03/flat-config-extends-define-config-global-ignores/), use the new `extends` key:
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
// eslint.config.js (USER OWNS - stable, minimal)
|
|
30
|
-
import { defineConfig } from 'eslint/config';
|
|
31
|
-
import safeword from './.safeword/eslint.config.js';
|
|
32
|
-
|
|
33
|
-
export default defineConfig([
|
|
34
|
-
{ extends: [safeword] },
|
|
35
|
-
// === YOUR CUSTOMIZATIONS BELOW ===
|
|
36
|
-
// { rules: { 'no-console': 'warn' } },
|
|
37
|
-
]);
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
```javascript
|
|
41
|
-
// .safeword/eslint.config.js (SAFEWORD OWNS - regenerated on upgrade)
|
|
42
|
-
// ⚠️ AUTO-GENERATED BY SAFEWORD - DO NOT EDIT
|
|
43
|
-
// Customize in your root eslint.config.js instead
|
|
44
|
-
|
|
45
|
-
import js from '@eslint/js';
|
|
46
|
-
import sonarjs from 'eslint-plugin-sonarjs';
|
|
47
|
-
import sdl from '@microsoft/eslint-plugin-sdl';
|
|
48
|
-
// ... auto-detected plugins
|
|
49
|
-
|
|
50
|
-
export default [
|
|
51
|
-
js.configs.recommended,
|
|
52
|
-
sonarjs.configs.recommended,
|
|
53
|
-
...sdl.configs.recommended,
|
|
54
|
-
// ... framework configs based on detection
|
|
55
|
-
];
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Prettier: Spread Pattern
|
|
61
|
-
|
|
62
|
-
Per [Prettier sharing docs](https://prettier.io/docs/sharing-configurations), use JS config with spread:
|
|
63
|
-
|
|
64
|
-
```javascript
|
|
65
|
-
// prettier.config.js (USER OWNS)
|
|
66
|
-
import safeword from './.safeword/prettier.config.js';
|
|
67
|
-
|
|
68
|
-
export default {
|
|
69
|
-
...safeword,
|
|
70
|
-
// Your overrides:
|
|
71
|
-
printWidth: 100,
|
|
72
|
-
};
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
```javascript
|
|
76
|
-
// .safeword/prettier.config.js (SAFEWORD OWNS)
|
|
77
|
-
// ⚠️ AUTO-GENERATED BY SAFEWORD - DO NOT EDIT
|
|
78
|
-
export default {
|
|
79
|
-
semi: true,
|
|
80
|
-
singleQuote: true,
|
|
81
|
-
tabWidth: 2,
|
|
82
|
-
trailingComma: 'es5',
|
|
83
|
-
};
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Claude Hooks: Marker-Based Merge
|
|
89
|
-
|
|
90
|
-
Safeword marks its hooks with `"_safeword": true` for clean upgrades:
|
|
91
|
-
|
|
92
|
-
```json
|
|
93
|
-
{
|
|
94
|
-
"hooks": {
|
|
95
|
-
"SessionStart": [
|
|
96
|
-
{ "_safeword": true, "hooks": [{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.safeword/hooks/session-verify-agents.sh" }] },
|
|
97
|
-
{ "_safeword": true, "hooks": [{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.safeword/hooks/session-version.sh" }] },
|
|
98
|
-
{ "hooks": [{ "type": "command", "command": "./my-custom-hook.sh" }] }
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**Upgrade logic:**
|
|
105
|
-
1. Find all hooks with `"_safeword": true`
|
|
106
|
-
2. Remove them
|
|
107
|
-
3. Insert new safeword hooks at start of each array
|
|
108
|
-
4. User hooks (without marker) are preserved
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Package.json Scripts: Add If Missing
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
function addScriptsIfMissing(pkg: PackageJson): PackageJson {
|
|
116
|
-
const scripts = pkg.scripts || {};
|
|
117
|
-
|
|
118
|
-
// Only add if not present - never overwrite
|
|
119
|
-
if (!scripts.lint) scripts.lint = 'eslint .';
|
|
120
|
-
if (!scripts.format) scripts.format = 'prettier --write .';
|
|
121
|
-
if (!scripts['format:check']) scripts['format:check'] = 'prettier --check .';
|
|
122
|
-
|
|
123
|
-
return { ...pkg, scripts };
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Pre-commit: Delegation Pattern
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
# .husky/pre-commit (USER OWNS)
|
|
133
|
-
#!/bin/sh
|
|
134
|
-
. "$(dirname "$0")/_/husky.sh"
|
|
135
|
-
|
|
136
|
-
# Safeword's pre-commit checks
|
|
137
|
-
./.safeword/git/git-pre-commit.sh
|
|
138
|
-
|
|
139
|
-
# Your additional hooks below:
|
|
140
|
-
# npm run my-custom-check
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
# .safeword/git/git-pre-commit.sh (SAFEWORD OWNS)
|
|
145
|
-
#!/bin/bash
|
|
146
|
-
npx lint-staged --config .safeword/lint-staged.config.js
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Plugin Ownership Matrix
|
|
152
|
-
|
|
153
|
-
Some plugins require user-specific config and belong in user's file:
|
|
154
|
-
|
|
155
|
-
| Plugin | In Safeword Config? | Reason |
|
|
156
|
-
|--------|---------------------|--------|
|
|
157
|
-
| sonarjs | Yes | Zero-config, works out of box |
|
|
158
|
-
| sdl | Yes | Zero-config, works out of box |
|
|
159
|
-
| react | Yes | Auto-detected, zero-config |
|
|
160
|
-
| react-hooks | Yes | Auto-detected, zero-config |
|
|
161
|
-
| next | Yes | Auto-detected, zero-config |
|
|
162
|
-
| vitest | Yes | Auto-detected, sensible file patterns |
|
|
163
|
-
| playwright | Yes | Auto-detected, sensible file patterns |
|
|
164
|
-
| drizzle | Yes | Auto-detected, zero-config |
|
|
165
|
-
| boundaries | Yes | Auto-detected (3+ dirs), `warn` severity, separate config file |
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Boundaries: Auto-Generated with Override Option
|
|
170
|
-
|
|
171
|
-
Boundaries config is auto-generated in `.safeword/eslint-boundaries.config.js` when 3+ architecture dirs are detected. Users can override in their `eslint.config.js`:
|
|
172
|
-
|
|
173
|
-
```javascript
|
|
174
|
-
// eslint.config.js (USER OWNS)
|
|
175
|
-
import { defineConfig } from 'eslint/config';
|
|
176
|
-
import safeword from './.safeword/eslint.config.js';
|
|
177
|
-
|
|
178
|
-
export default defineConfig([
|
|
179
|
-
{ extends: [safeword] },
|
|
180
|
-
|
|
181
|
-
// Override auto-generated boundaries with stricter rules
|
|
182
|
-
{
|
|
183
|
-
rules: {
|
|
184
|
-
'boundaries/element-types': ['error', { // Upgrade to error
|
|
185
|
-
default: 'disallow',
|
|
186
|
-
rules: [
|
|
187
|
-
// Custom architecture rules
|
|
188
|
-
],
|
|
189
|
-
}],
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
]);
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**To disable boundaries entirely:**
|
|
196
|
-
```javascript
|
|
197
|
-
export default defineConfig([
|
|
198
|
-
{ extends: [safeword] },
|
|
199
|
-
{ rules: { 'boundaries/element-types': 'off' } },
|
|
200
|
-
]);
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## First-Time Setup Templates
|
|
206
|
-
|
|
207
|
-
When user has no config, safeword creates minimal files:
|
|
208
|
-
|
|
209
|
-
**eslint.config.js:**
|
|
210
|
-
```javascript
|
|
211
|
-
// eslint.config.js - Created by safeword
|
|
212
|
-
import { defineConfig } from 'eslint/config';
|
|
213
|
-
import safeword from './.safeword/eslint.config.js';
|
|
214
|
-
|
|
215
|
-
export default defineConfig([
|
|
216
|
-
// Safeword's config (auto-maintained on upgrade)
|
|
217
|
-
{ extends: [safeword] },
|
|
218
|
-
|
|
219
|
-
// === YOUR CUSTOMIZATIONS BELOW ===
|
|
220
|
-
|
|
221
|
-
// Override rules:
|
|
222
|
-
// { rules: { 'no-console': 'warn' } },
|
|
223
|
-
|
|
224
|
-
// Override boundaries severity (auto-generated uses 'warn'):
|
|
225
|
-
// { rules: { 'boundaries/element-types': 'error' } },
|
|
226
|
-
|
|
227
|
-
// Disable boundaries entirely:
|
|
228
|
-
// { rules: { 'boundaries/element-types': 'off' } },
|
|
229
|
-
]);
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
**prettier.config.js:**
|
|
233
|
-
```javascript
|
|
234
|
-
// prettier.config.js - Created by safeword
|
|
235
|
-
import safeword from './.safeword/prettier.config.js';
|
|
236
|
-
|
|
237
|
-
export default {
|
|
238
|
-
...safeword,
|
|
239
|
-
// Your overrides:
|
|
240
|
-
// printWidth: 100,
|
|
241
|
-
};
|
|
242
|
-
```
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Code Philosophy Guide Improvements
|
|
2
|
-
|
|
3
|
-
**Target file:** `framework/guides/code-philosophy.md`
|
|
4
|
-
**Status:** v3 - No changes needed
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Final Assessment
|
|
9
|
-
|
|
10
|
-
After three rounds of critique, **the document is already good**. All proposed changes were either redundant or unnecessary.
|
|
11
|
-
|
|
12
|
-
| Original Proposal | Final Verdict | Why |
|
|
13
|
-
| ----------------------- | ----------------- | ------------------------------------------------------------ |
|
|
14
|
-
| 1. Bloat definition | ❌ NOT NEEDED | Lines 58-66 define via 5 examples (Principle 4: show > tell) |
|
|
15
|
-
| 2. Regex edge case | ❌ NOT NEEDED | Too specific for philosophy doc |
|
|
16
|
-
| 3. Tie-breaker | ❌ ALREADY EXISTS | Line 67: "Is this essential now, or can we add it later?" |
|
|
17
|
-
| 4. Self-test rule | ❌ ALREADY EXISTS | Line 89: "Run tests yourself before completion" |
|
|
18
|
-
| 5. Best Practices vague | ❌ NOT NEEDED | Line 121 IS concrete: "Use Context7 MCP or official docs" |
|
|
19
|
-
| 6. "If stuck" line | ❌ ALREADY EXISTS | Line 140: "What's your preference?" |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Principle Compliance Check
|
|
24
|
-
|
|
25
|
-
| Principle | Status | Evidence |
|
|
26
|
-
| ---------------------------- | ------- | ------------------------------------------ |
|
|
27
|
-
| 1. MECE | N/A | Philosophy doc, no decision trees needed |
|
|
28
|
-
| 2. Explicit definitions | ✅ | Examples define terms (lines 37-66) |
|
|
29
|
-
| 3. No contradictions | ✅ | Consistent throughout |
|
|
30
|
-
| 4. Concrete examples | ✅ | 20+ good/bad examples in tables |
|
|
31
|
-
| 5. Edge cases | Partial | Appropriate for philosophy doc scope |
|
|
32
|
-
| 6. Actionable | ✅ | Lines 75-78, 121, 140 |
|
|
33
|
-
| 7. Sequential decision trees | N/A | Not a decision doc |
|
|
34
|
-
| 8. Tie-breakers | ✅ | Line 67 |
|
|
35
|
-
| 9. Lookup tables | N/A | Not needed |
|
|
36
|
-
| 10. No caveats in tables | ✅ | Tables are clean |
|
|
37
|
-
| 11. Percentages | N/A | None used |
|
|
38
|
-
| 12. Specificity | ✅ | Specific tool names, concrete examples |
|
|
39
|
-
| 13. Re-evaluation paths | ✅ | Lines 131 (blockers) and 140 (preferences) |
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Conclusion
|
|
44
|
-
|
|
45
|
-
**No changes to apply.** The document already adheres to llm-instruction-design.md principles.
|
|
46
|
-
|
|
47
|
-
Looking for problems to fix when none exist = bloat.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Lesson Learned
|
|
52
|
-
|
|
53
|
-
I initially proposed 6 changes, then 2, now 0. Each review revealed existing content I'd missed:
|
|
54
|
-
|
|
55
|
-
- Line 67 has a tie-breaker
|
|
56
|
-
- Line 89 has self-test rule
|
|
57
|
-
- Line 121 has concrete research method
|
|
58
|
-
- Line 140 has re-evaluation path
|
|
59
|
-
|
|
60
|
-
The document is well-written. Don't add bloat.
|