logicstamp-context 0.2.6 → 0.2.7

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 (40) hide show
  1. package/LLM_CONTEXT.md +2 -2
  2. package/README.md +28 -13
  3. package/dist/cli/commands/context.d.ts.map +1 -1
  4. package/dist/cli/commands/context.js +11 -1
  5. package/dist/cli/commands/context.js.map +1 -1
  6. package/dist/cli/commands/init.d.ts +4 -0
  7. package/dist/cli/commands/init.d.ts.map +1 -1
  8. package/dist/cli/commands/init.js +84 -9
  9. package/dist/cli/commands/init.js.map +1 -1
  10. package/dist/cli/commands/security.d.ts +38 -0
  11. package/dist/cli/commands/security.d.ts.map +1 -0
  12. package/dist/cli/commands/security.js +343 -0
  13. package/dist/cli/commands/security.js.map +1 -0
  14. package/dist/cli/handlers/securityHandler.d.ts +5 -0
  15. package/dist/cli/handlers/securityHandler.d.ts.map +1 -0
  16. package/dist/cli/handlers/securityHandler.js +45 -0
  17. package/dist/cli/handlers/securityHandler.js.map +1 -0
  18. package/dist/cli/parser/argumentParser.d.ts.map +1 -1
  19. package/dist/cli/parser/argumentParser.js +23 -0
  20. package/dist/cli/parser/argumentParser.js.map +1 -1
  21. package/dist/cli/parser/helpText.d.ts +2 -0
  22. package/dist/cli/parser/helpText.d.ts.map +1 -1
  23. package/dist/cli/parser/helpText.js +453 -348
  24. package/dist/cli/parser/helpText.js.map +1 -1
  25. package/dist/cli/stamp.js +55 -1
  26. package/dist/cli/stamp.js.map +1 -1
  27. package/dist/utils/gitignore.d.ts +30 -2
  28. package/dist/utils/gitignore.d.ts.map +1 -1
  29. package/dist/utils/gitignore.js +132 -20
  30. package/dist/utils/gitignore.js.map +1 -1
  31. package/dist/utils/secretDetector.d.ts +21 -0
  32. package/dist/utils/secretDetector.d.ts.map +1 -0
  33. package/dist/utils/secretDetector.js +145 -0
  34. package/dist/utils/secretDetector.js.map +1 -0
  35. package/dist/utils/stampignore.d.ts +49 -0
  36. package/dist/utils/stampignore.d.ts.map +1 -0
  37. package/dist/utils/stampignore.js +189 -0
  38. package/dist/utils/stampignore.js.map +1 -0
  39. package/package.json +1 -1
  40. package/schema/logicstamp.context.schema.json +1 -1
@@ -2,372 +2,477 @@
2
2
  * Help text for CLI commands
3
3
  */
4
4
  export function getMainHelp() {
5
- return `
6
- ╭─────────────────────────────────────────────────╮
7
- │ Stamp - LogicStamp Context CLI │
8
- │ AI-ready context generation for React/TS │
9
- ╰─────────────────────────────────────────────────╯
10
-
11
- USAGE:
12
- stamp init [path] Initialize LogicStamp in a project
13
- stamp context [path] [options] Generate context
14
- stamp context style [path] [options] Generate context with style metadata
15
- stamp context validate [file] Validate context file
16
- stamp context compare [options] Detect drift (auto-generates fresh context)
17
- stamp context clean [path] [options] Remove all generated context artifacts
18
-
19
- OPTIONS:
20
- -v, --version Show version number
21
- -h, --help Show this help
22
-
23
- EXAMPLES:
24
- stamp init
25
- Set up LogicStamp in current directory (creates/updates .gitignore)
26
-
27
- stamp context
28
- Generate context.json for current directory
29
-
30
- stamp context style
31
- Generate context with style metadata (Tailwind, SCSS, animations, layout)
32
-
33
- stamp context --include-style
34
- Same as 'stamp context style' (alternative syntax)
35
-
36
- stamp context validate
37
- Validate context.json in current directory
38
-
39
- stamp context compare
40
- Auto-detect drift by comparing with fresh context
41
-
42
- stamp context clean
43
- Show what would be removed (dry run)
44
-
45
- stamp context clean --all --yes
46
- Actually delete all context artifacts
47
-
48
- For detailed help on a specific command, run:
49
- stamp init --help
50
- stamp context --help
51
- stamp context style --help
52
- stamp context validate --help
53
- stamp context compare --help
54
- stamp context clean --help
5
+ return `
6
+ ╭─────────────────────────────────────────────────╮
7
+ │ Stamp - LogicStamp Context CLI │
8
+ │ AI-ready context generation for React/TS │
9
+ ╰─────────────────────────────────────────────────╯
10
+
11
+ USAGE:
12
+ stamp init [path] Initialize LogicStamp in a project
13
+ stamp context [path] [options] Generate context
14
+ stamp context style [path] [options] Generate context with style metadata
15
+ stamp context validate [file] Validate context file
16
+ stamp context compare [options] Detect drift (auto-generates fresh context)
17
+ stamp context clean [path] [options] Remove all generated context artifacts
18
+ stamp security scan [path] [options] Scan for secrets and generate report
19
+ stamp security --hard-reset [options] Delete .stampignore and security report
20
+
21
+ OPTIONS:
22
+ -v, --version Show version number
23
+ -h, --help Show this help
24
+
25
+ EXAMPLES:
26
+ stamp init
27
+ Set up LogicStamp in current directory (creates/updates .gitignore)
28
+
29
+ stamp context
30
+ Generate context.json for current directory
31
+
32
+ stamp context style
33
+ Generate context with style metadata (Tailwind, SCSS, animations, layout)
34
+
35
+ stamp context --include-style
36
+ Same as 'stamp context style' (alternative syntax)
37
+
38
+ stamp context validate
39
+ Validate context.json in current directory
40
+
41
+ stamp context compare
42
+ Auto-detect drift by comparing with fresh context
43
+
44
+ stamp context clean
45
+ Show what would be removed (dry run)
46
+
47
+ stamp context clean --all --yes
48
+ Actually delete all context artifacts
49
+
50
+ For detailed help on a specific command, run:
51
+ stamp init --help
52
+ stamp context --help
53
+ stamp context style --help
54
+ stamp context validate --help
55
+ stamp context compare --help
56
+ stamp context clean --help
57
+ stamp security scan --help
58
+ stamp security --help
59
+ `;
60
+ }
61
+ export function getSecurityHelp() {
62
+ return `
63
+ ╭─────────────────────────────────────────────────╮
64
+ │ Stamp Security - Security Management │
65
+ │ Manage security scans and configuration │
66
+ ╰─────────────────────────────────────────────────╯
67
+
68
+ USAGE:
69
+ stamp security scan [path] [options] Scan for secrets and generate report
70
+ stamp security --hard-reset [path] [options] Delete .stampignore and security report
71
+
72
+ COMMANDS:
73
+ scan Scan codebase for exposed secrets
74
+ --hard-reset Delete .stampignore and report file
75
+ --hard-reset --force Delete files without prompting
76
+
77
+ OPTIONS:
78
+ --out, -o <file> Output file for scan (default: stamp_security_report.json)
79
+ --force Skip confirmation prompt (use with --hard-reset)
80
+ --quiet, -q Suppress verbose output
81
+ -h, --help Show this help
82
+
83
+ EXAMPLES:
84
+ stamp security scan
85
+ Scan current directory for secrets
86
+
87
+ stamp security scan --apply
88
+ Scan and automatically add files with secrets to .stampignore
89
+
90
+ stamp security --hard-reset
91
+ Delete .stampignore and security report (with confirmation)
92
+
93
+ stamp security --hard-reset --force
94
+ Delete .stampignore and security report (no confirmation)
95
+
96
+ stamp security --hard-reset --out custom-report.json
97
+ Delete .stampignore and custom report file
98
+
99
+ For detailed help on scan command:
100
+ stamp security scan --help
55
101
  `;
56
102
  }
57
103
  export function getStyleHelp() {
58
- return `
59
- ╭─────────────────────────────────────────────────╮
60
- │ Stamp Context Style - Generate with Style │
61
- │ Extract Tailwind, SCSS, animations & layout │
62
- ╰─────────────────────────────────────────────────╯
63
-
64
- USAGE:
65
- stamp context style [path] [options]
66
-
67
- ARGUMENTS:
68
- [path] Directory to scan (default: current)
69
-
70
- OPTIONS:
71
- --depth, -d <n> Dependency depth (default: 1)
72
- --include-code, -c <mode> Code inclusion: none|header|full (default: header)
73
- --format, -f <format> Output format: json|pretty|ndjson (default: json)
74
- --out, -o <file> Output file (default: context.json)
75
- --max-nodes, -m <n> Max nodes per bundle (default: 100)
76
- --profile <profile> Preset profile: llm-safe|llm-chat|ci-strict
77
- --strict, -s Fail on missing dependencies
78
- --strict-missing Exit with error if any missing dependencies
79
- --predict-behavior Include behavior predictions
80
- --dry-run Skip writing output
81
- --stats Emit JSON stats
82
- --skip-gitignore Skip .gitignore setup (never prompt or modify)
83
- --quiet, -q Suppress verbose output (show only errors)
84
- -h, --help Show this help
85
-
86
- STYLE METADATA EXTRACTED:
87
- • Styling Sources: Tailwind, SCSS modules, CSS modules, inline styles, styled-components
88
- • Layout: Flex/grid patterns, hero sections, feature cards
89
- • Visual: Colors, spacing, typography, border radius
90
- • Animation: Framer Motion, CSS animations, scroll triggers
91
-
92
- EXAMPLES:
93
- stamp context style
94
- Generate context with style metadata for current directory
95
-
96
- stamp context style ./src
97
- Generate with style metadata for src directory
98
-
99
- stamp context style --profile llm-safe
100
- Use conservative profile with style metadata
101
-
102
- NOTES:
103
- • This is equivalent to: stamp context --include-style
104
- • Style extraction is optional and won't fail the build if errors occur
105
- • Style metadata is added to the 'style' field in UIFContract
104
+ return `
105
+ ╭─────────────────────────────────────────────────╮
106
+ │ Stamp Context Style - Generate with Style │
107
+ │ Extract Tailwind, SCSS, animations & layout │
108
+ ╰─────────────────────────────────────────────────╯
109
+
110
+ USAGE:
111
+ stamp context style [path] [options]
112
+
113
+ ARGUMENTS:
114
+ [path] Directory to scan (default: current)
115
+
116
+ OPTIONS:
117
+ --depth, -d <n> Dependency depth (default: 1)
118
+ --include-code, -c <mode> Code inclusion: none|header|full (default: header)
119
+ --format, -f <format> Output format: json|pretty|ndjson (default: json)
120
+ --out, -o <file> Output file (default: context.json)
121
+ --max-nodes, -m <n> Max nodes per bundle (default: 100)
122
+ --profile <profile> Preset profile: llm-safe|llm-chat|ci-strict
123
+ --strict, -s Fail on missing dependencies
124
+ --strict-missing Exit with error if any missing dependencies
125
+ --predict-behavior Include behavior predictions
126
+ --dry-run Skip writing output
127
+ --stats Emit JSON stats
128
+ --skip-gitignore Skip .gitignore setup (never prompt or modify)
129
+ --quiet, -q Suppress verbose output (show only errors)
130
+ -h, --help Show this help
131
+
132
+ STYLE METADATA EXTRACTED:
133
+ • Styling Sources: Tailwind, SCSS modules, CSS modules, inline styles, styled-components
134
+ • Layout: Flex/grid patterns, hero sections, feature cards
135
+ • Visual: Colors, spacing, typography, border radius
136
+ • Animation: Framer Motion, CSS animations, scroll triggers
137
+
138
+ EXAMPLES:
139
+ stamp context style
140
+ Generate context with style metadata for current directory
141
+
142
+ stamp context style ./src
143
+ Generate with style metadata for src directory
144
+
145
+ stamp context style --profile llm-safe
146
+ Use conservative profile with style metadata
147
+
148
+ NOTES:
149
+ • This is equivalent to: stamp context --include-style
150
+ • Style extraction is optional and won't fail the build if errors occur
151
+ • Style metadata is added to the 'style' field in UIFContract
106
152
  `;
107
153
  }
108
154
  export function getGenerateHelp() {
109
- return `
110
- ╭─────────────────────────────────────────────────╮
111
- │ Stamp Context - Generate AI Context │
112
- │ Scan and analyze React/TS codebase │
113
- ╰─────────────────────────────────────────────────╯
114
-
115
- USAGE:
116
- stamp context [path] [options]
117
-
118
- ARGUMENTS:
119
- [path] Directory to scan (default: current)
120
-
121
- OPTIONS:
122
- --depth, -d <n> Dependency depth (default: 1)
123
- --include-code, -c <mode> Code inclusion: none|header|full (default: header)
124
- --include-style Extract style metadata (Tailwind, SCSS, animations, layout)
125
- --format, -f <format> Output format: json|pretty|ndjson (default: json)
126
- --out, -o <file> Output file (default: context.json)
127
- --max-nodes, -m <n> Max nodes per bundle (default: 100)
128
- --profile <profile> Preset profile: llm-safe|llm-chat|ci-strict
129
- --strict, -s Fail on missing dependencies
130
- --strict-missing Exit with error if any missing dependencies
131
- --predict-behavior Include behavior predictions
132
- --dry-run Skip writing output
133
- --stats Emit JSON stats
134
- --compare-modes Show detailed mode comparison table
135
- --skip-gitignore Skip .gitignore setup (never prompt or modify)
136
- --quiet, -q Suppress verbose output (show only errors)
137
- -h, --help Show this help
138
-
139
- EXAMPLES:
140
- stamp context
141
- Generate context for current directory
142
-
143
- stamp context style
144
- Generate context with style metadata (Tailwind, SCSS, animations, layout)
145
-
146
- stamp context --include-style
147
- Alternative syntax for including style metadata
148
-
149
- stamp context ./src --depth 2
150
- Deep scan of src directory
151
-
152
- stamp context --include-code none --out api.json
153
- Generate API documentation only
154
-
155
- stamp context --compare-modes
156
- Show token cost comparison across modes
157
-
158
- stamp context --quiet
159
- Suppress verbose output (show only errors)
155
+ return `
156
+ ╭─────────────────────────────────────────────────╮
157
+ │ Stamp Context - Generate AI Context │
158
+ │ Scan and analyze React/TS codebase │
159
+ ╰─────────────────────────────────────────────────╯
160
+
161
+ USAGE:
162
+ stamp context [path] [options]
163
+
164
+ ARGUMENTS:
165
+ [path] Directory to scan (default: current)
166
+
167
+ OPTIONS:
168
+ --depth, -d <n> Dependency depth (default: 1)
169
+ --include-code, -c <mode> Code inclusion: none|header|full (default: header)
170
+ --include-style Extract style metadata (Tailwind, SCSS, animations, layout)
171
+ --format, -f <format> Output format: json|pretty|ndjson (default: json)
172
+ --out, -o <file> Output file (default: context.json)
173
+ --max-nodes, -m <n> Max nodes per bundle (default: 100)
174
+ --profile <profile> Preset profile: llm-safe|llm-chat|ci-strict
175
+ --strict, -s Fail on missing dependencies
176
+ --strict-missing Exit with error if any missing dependencies
177
+ --predict-behavior Include behavior predictions
178
+ --dry-run Skip writing output
179
+ --stats Emit JSON stats
180
+ --compare-modes Show detailed mode comparison table
181
+ --skip-gitignore Skip .gitignore setup (never prompt or modify)
182
+ --quiet, -q Suppress verbose output (show only errors)
183
+ -h, --help Show this help
184
+
185
+ EXAMPLES:
186
+ stamp context
187
+ Generate context for current directory
188
+
189
+ stamp context style
190
+ Generate context with style metadata (Tailwind, SCSS, animations, layout)
191
+
192
+ stamp context --include-style
193
+ Alternative syntax for including style metadata
194
+
195
+ stamp context ./src --depth 2
196
+ Deep scan of src directory
197
+
198
+ stamp context --include-code none --out api.json
199
+ Generate API documentation only
200
+
201
+ stamp context --compare-modes
202
+ Show token cost comparison across modes
203
+
204
+ stamp context --quiet
205
+ Suppress verbose output (show only errors)
160
206
  `;
161
207
  }
162
208
  export function getValidateHelp() {
163
- return `
164
- ╭─────────────────────────────────────────────────╮
165
- │ Stamp Context Validate - Bundle Validator │
166
- │ Validate context.json structure and schema │
167
- ╰─────────────────────────────────────────────────╯
168
-
169
- USAGE:
170
- stamp context validate [file]
171
-
172
- ARGUMENTS:
173
- [file] Path to context.json (default: context.json)
174
-
175
- OPTIONS:
176
- --quiet Show only errors (suppress summaries and valid folders)
177
- -h, --help Show this help
178
-
179
- EXAMPLES:
180
- stamp context validate
181
- Validate context.json in current directory
182
-
183
- stamp context validate docs/api-context.json
184
- Validate a specific context file
185
-
186
- stamp context validate --quiet
187
- Show only validation errors
188
-
189
- NOTES:
190
- • Validates bundle structure and schema compliance
191
- • Checks for required fields and hash formats
192
- • Exits with code 0 on success, 1 on failure
209
+ return `
210
+ ╭─────────────────────────────────────────────────╮
211
+ │ Stamp Context Validate - Bundle Validator │
212
+ │ Validate context.json structure and schema │
213
+ ╰─────────────────────────────────────────────────╯
214
+
215
+ USAGE:
216
+ stamp context validate [file]
217
+
218
+ ARGUMENTS:
219
+ [file] Path to context.json (default: context.json)
220
+
221
+ OPTIONS:
222
+ --quiet Show only errors (suppress summaries and valid folders)
223
+ -h, --help Show this help
224
+
225
+ EXAMPLES:
226
+ stamp context validate
227
+ Validate context.json in current directory
228
+
229
+ stamp context validate docs/api-context.json
230
+ Validate a specific context file
231
+
232
+ stamp context validate --quiet
233
+ Show only validation errors
234
+
235
+ NOTES:
236
+ • Validates bundle structure and schema compliance
237
+ • Checks for required fields and hash formats
238
+ • Exits with code 0 on success, 1 on failure
193
239
  `;
194
240
  }
195
241
  export function getCompareHelp() {
196
- return `
197
- ╭─────────────────────────────────────────────────╮
198
- │ Stamp Context Compare - Drift Detection │
199
- │ Compare context files for changes │
200
- ╰─────────────────────────────────────────────────╯
201
-
202
- USAGE:
203
- stamp context compare [options] Auto-compare all context files
204
- stamp context compare <old.json> <new.json> Compare two specific files
205
- stamp context compare <old_main.json> <new_main.json> Compare multi-file indices
206
-
207
- ARGUMENTS:
208
- <old.json> Path to old context file or context_main.json
209
- <new.json> Path to new context file or context_main.json
210
-
211
- OPTIONS:
212
- --approve Auto-approve updates (non-interactive, CI-safe)
213
- --clean-orphaned Auto-delete orphaned files with --approve
214
- --quiet Show only diffs (suppress summaries, PASS folders, and token analysis)
215
- -h, --help Show this help
216
-
217
- COMPARISON MODES:
218
- Auto-Mode (Multi-File):
219
- Compares ALL context files using context_main.json as index
220
- → Detects ADDED, ORPHANED, DRIFT, and PASS status per folder
221
- → Shows three-tier output: folder summary, component summary, details
222
-
223
- Single-File Mode:
224
- Compares two individual context.json files
225
- → Detects added/removed/changed components
226
-
227
- Multi-File Manual Mode:
228
- Auto-detects when comparing context_main.json files
229
- → Compares all referenced context files
230
-
231
- EXAMPLES:
232
- stamp context compare
233
- Auto-mode: generate fresh context, compare ALL files
234
- → Shows folder-level and component-level changes
235
- → Interactive: prompts Y/N to update if drift detected
236
- → CI: exits with code 1 if drift detected (no prompt)
237
-
238
- stamp context compare --approve
239
- Auto-approve and update ALL context files if drift (like jest -u)
240
-
241
- stamp context compare --approve --clean-orphaned
242
- Auto-approve updates and delete orphaned context files
243
-
244
- stamp context compare --stats
245
- Show per-folder token count deltas
246
-
247
- stamp context compare --quiet
248
- Show only diffs (suppress summaries, PASS folders, and status headers)
249
-
250
- stamp context compare old.json new.json
251
- Compare two specific context files
252
-
253
- stamp context compare old/context_main.json new/context_main.json
254
- Compare all context files between two directories
255
-
256
- stamp context compare || exit 1
257
- CI validation: fail build if drift detected
258
-
259
- EXIT CODES:
260
- 0 PASS - No drift OR drift approved and updated
261
- 1 DRIFT - Changes detected but not approved
262
-
263
- BEHAVIOR:
264
- • --approve: Non-interactive, deterministic, updates immediately if drift
265
- • Interactive (TTY): Prompts "Update all context files? (y/N)" if drift
266
- • CI (non-TTY): Never prompts, exits 1 if drift detected
267
- • --clean-orphaned: Requires --approve, deletes orphaned files automatically
268
- • --quiet: Shows only diffs - suppresses status headers (PASS), summaries, PASS folders, and token analysis
269
-
270
- DRIFT INDICATORS:
271
- ➕ ADDED FILE New folder with context file
272
- 🗑️ ORPHANED FILE Folder removed (context file still exists)
273
- ⚠️ DRIFT Folder has component changes
274
- ✅ PASS Folder unchanged
275
-
276
- NOTES:
277
- This matches Jest snapshot workflow:
278
- jest → prompts to update snapshots locally
279
- jest -u → updates snapshots without prompt
280
- CI → fails if snapshots don't match
242
+ return `
243
+ ╭─────────────────────────────────────────────────╮
244
+ │ Stamp Context Compare - Drift Detection │
245
+ │ Compare context files for changes │
246
+ ╰─────────────────────────────────────────────────╯
247
+
248
+ USAGE:
249
+ stamp context compare [options] Auto-compare all context files
250
+ stamp context compare <old.json> <new.json> Compare two specific files
251
+ stamp context compare <old_main.json> <new_main.json> Compare multi-file indices
252
+
253
+ ARGUMENTS:
254
+ <old.json> Path to old context file or context_main.json
255
+ <new.json> Path to new context file or context_main.json
256
+
257
+ OPTIONS:
258
+ --approve Auto-approve updates (non-interactive, CI-safe)
259
+ --clean-orphaned Auto-delete orphaned files with --approve
260
+ --quiet Show only diffs (suppress summaries, PASS folders, and token analysis)
261
+ -h, --help Show this help
262
+
263
+ COMPARISON MODES:
264
+ Auto-Mode (Multi-File):
265
+ Compares ALL context files using context_main.json as index
266
+ → Detects ADDED, ORPHANED, DRIFT, and PASS status per folder
267
+ → Shows three-tier output: folder summary, component summary, details
268
+
269
+ Single-File Mode:
270
+ Compares two individual context.json files
271
+ → Detects added/removed/changed components
272
+
273
+ Multi-File Manual Mode:
274
+ Auto-detects when comparing context_main.json files
275
+ → Compares all referenced context files
276
+
277
+ EXAMPLES:
278
+ stamp context compare
279
+ Auto-mode: generate fresh context, compare ALL files
280
+ → Shows folder-level and component-level changes
281
+ → Interactive: prompts Y/N to update if drift detected
282
+ → CI: exits with code 1 if drift detected (no prompt)
283
+
284
+ stamp context compare --approve
285
+ Auto-approve and update ALL context files if drift (like jest -u)
286
+
287
+ stamp context compare --approve --clean-orphaned
288
+ Auto-approve updates and delete orphaned context files
289
+
290
+ stamp context compare --stats
291
+ Show per-folder token count deltas
292
+
293
+ stamp context compare --quiet
294
+ Show only diffs (suppress summaries, PASS folders, and status headers)
295
+
296
+ stamp context compare old.json new.json
297
+ Compare two specific context files
298
+
299
+ stamp context compare old/context_main.json new/context_main.json
300
+ Compare all context files between two directories
301
+
302
+ stamp context compare || exit 1
303
+ CI validation: fail build if drift detected
304
+
305
+ EXIT CODES:
306
+ 0 PASS - No drift OR drift approved and updated
307
+ 1 DRIFT - Changes detected but not approved
308
+
309
+ BEHAVIOR:
310
+ • --approve: Non-interactive, deterministic, updates immediately if drift
311
+ • Interactive (TTY): Prompts "Update all context files? (y/N)" if drift
312
+ • CI (non-TTY): Never prompts, exits 1 if drift detected
313
+ • --clean-orphaned: Requires --approve, deletes orphaned files automatically
314
+ • --quiet: Shows only diffs - suppresses status headers (PASS), summaries, PASS folders, and token analysis
315
+
316
+ DRIFT INDICATORS:
317
+ ➕ ADDED FILE New folder with context file
318
+ 🗑️ ORPHANED FILE Folder removed (context file still exists)
319
+ ⚠️ DRIFT Folder has component changes
320
+ ✅ PASS Folder unchanged
321
+
322
+ NOTES:
323
+ This matches Jest snapshot workflow:
324
+ jest → prompts to update snapshots locally
325
+ jest -u → updates snapshots without prompt
326
+ CI → fails if snapshots don't match
281
327
  `;
282
328
  }
283
329
  export function getCleanHelp() {
284
- return `
285
- ╭─────────────────────────────────────────────────╮
286
- │ Stamp Context Clean - Remove Artifacts │
287
- │ Delete all generated context files │
288
- ╰─────────────────────────────────────────────────╯
289
-
290
- USAGE:
291
- stamp context clean [path] [options]
292
-
293
- ARGUMENTS:
294
- [path] Directory to clean (default: current)
295
-
296
- OPTIONS:
297
- --all Include all context files
298
- --yes Confirm deletion (required with --all)
299
- --quiet, -q Suppress verbose output (show only errors)
300
- -h, --help Show this help
301
-
302
- BEHAVIOR:
303
- • Default (dry run): Shows what would be removed
304
- • --all --yes: Actually deletes the files
305
- • Automatically includes .logicstamp/ directory if it exists
306
- • --quiet: Shows only ✓ on success, errors otherwise
307
-
308
- FILES REMOVED:
309
- • context_main.json Main index file
310
- • **/context.json All folder context files
311
- • .logicstamp/ Cache directory (if present)
312
-
313
- EXAMPLES:
314
- stamp context clean
315
- Show what would be removed (dry run)
316
-
317
- stamp context clean --all --yes
318
- Actually delete all context artifacts (includes .logicstamp/ if present)
319
-
320
- stamp context clean --all --yes --quiet
321
- Delete files silently (show only ✓)
322
-
323
- stamp context clean ./src --all --yes
324
- Clean context files in specific directory
325
-
326
- NOTES:
327
- • Safe by default - requires --all --yes to actually delete
328
- • Ignores node_modules, dist, build, .next directories
329
- • Exits with code 0 on success
330
+ return `
331
+ ╭─────────────────────────────────────────────────╮
332
+ │ Stamp Context Clean - Remove Artifacts │
333
+ │ Delete all generated context files │
334
+ ╰─────────────────────────────────────────────────╯
335
+
336
+ USAGE:
337
+ stamp context clean [path] [options]
338
+
339
+ ARGUMENTS:
340
+ [path] Directory to clean (default: current)
341
+
342
+ OPTIONS:
343
+ --all Include all context files
344
+ --yes Confirm deletion (required with --all)
345
+ --quiet, -q Suppress verbose output (show only errors)
346
+ -h, --help Show this help
347
+
348
+ BEHAVIOR:
349
+ • Default (dry run): Shows what would be removed
350
+ • --all --yes: Actually deletes the files
351
+ • Automatically includes .logicstamp/ directory if it exists
352
+ • --quiet: Shows only ✓ on success, errors otherwise
353
+
354
+ FILES REMOVED:
355
+ • context_main.json Main index file
356
+ • **/context.json All folder context files
357
+ • .logicstamp/ Cache directory (if present)
358
+
359
+ EXAMPLES:
360
+ stamp context clean
361
+ Show what would be removed (dry run)
362
+
363
+ stamp context clean --all --yes
364
+ Actually delete all context artifacts (includes .logicstamp/ if present)
365
+
366
+ stamp context clean --all --yes --quiet
367
+ Delete files silently (show only ✓)
368
+
369
+ stamp context clean ./src --all --yes
370
+ Clean context files in specific directory
371
+
372
+ NOTES:
373
+ • Safe by default - requires --all --yes to actually delete
374
+ • Ignores node_modules, dist, build, .next directories
375
+ • Exits with code 0 on success
330
376
  `;
331
377
  }
332
378
  export function getInitHelp() {
333
- return `
334
- ╭─────────────────────────────────────────────────╮
335
- │ Stamp Init - Initialize LogicStamp │
336
- │ Set up LogicStamp in your project │
337
- ╰─────────────────────────────────────────────────╯
338
-
339
- USAGE:
340
- stamp init [path] [options]
341
-
342
- ARGUMENTS:
343
- [path] Target directory (default: current)
344
-
345
- OPTIONS:
346
- --skip-gitignore Skip .gitignore setup
347
- -h, --help Show this help
348
-
349
- EXAMPLES:
350
- stamp init
351
- Set up LogicStamp in current directory
352
-
353
- stamp init ./my-project
354
- Set up LogicStamp in a specific directory
355
-
356
- stamp init --skip-gitignore
357
- Initialize without modifying .gitignore
358
-
359
- WHAT IT DOES:
360
- • Creates or updates .gitignore with LogicStamp patterns:
361
- - context.json
362
- - context_*.json
363
- - *.uif.json
364
- - logicstamp.manifest.json
365
- - .logicstamp/
366
-
367
- NOTES:
368
- Safe to run multiple times (idempotent)
369
- Won't duplicate patterns if they already exist
370
- Creates .gitignore if it doesn't exist
379
+ return `
380
+ ╭─────────────────────────────────────────────────╮
381
+ │ Stamp Init - Initialize LogicStamp │
382
+ │ Set up LogicStamp in your project │
383
+ ╰─────────────────────────────────────────────────╯
384
+
385
+ USAGE:
386
+ stamp init [path] [options]
387
+
388
+ ARGUMENTS:
389
+ [path] Target directory (default: current)
390
+
391
+ OPTIONS:
392
+ --skip-gitignore Skip .gitignore setup
393
+ --yes, -y Skip all prompts (non-interactive mode)
394
+ --secure Initialize with auto-yes and run security scan
395
+ -h, --help Show this help
396
+
397
+ EXAMPLES:
398
+ stamp init
399
+ Set up LogicStamp in current directory
400
+
401
+ stamp init ./my-project
402
+ Set up LogicStamp in a specific directory
403
+
404
+ stamp init --skip-gitignore
405
+ Initialize without modifying .gitignore
406
+
407
+ stamp init --yes
408
+ Initialize without any prompts (CI-friendly)
409
+
410
+ stamp init --secure
411
+ Initialize with auto-yes and run security scan with --apply
412
+
413
+ WHAT IT DOES:
414
+ Creates or updates .gitignore with LogicStamp patterns:
415
+ - context.json
416
+ - context_*.json
417
+ - *.uif.json
418
+ - logicstamp.manifest.json
419
+ - .logicstamp/
420
+
421
+ NOTES:
422
+ • Safe to run multiple times (idempotent)
423
+ • Won't duplicate patterns if they already exist
424
+ • Creates .gitignore if it doesn't exist
425
+ `;
426
+ }
427
+ export function getSecurityScanHelp() {
428
+ return `
429
+ ╭─────────────────────────────────────────────────╮
430
+ │ Stamp Security Scan - Detect Secrets │
431
+ │ Scan codebase for exposed secrets │
432
+ ╰─────────────────────────────────────────────────╯
433
+
434
+ USAGE:
435
+ stamp security scan [path] [options]
436
+
437
+ ARGUMENTS:
438
+ [path] Directory to scan (default: current)
439
+
440
+ OPTIONS:
441
+ --out, -o <file> Output file (default: stamp_security_report.json)
442
+ --apply Automatically add files with secrets to .stampignore
443
+ --quiet, -q Suppress verbose output (show only JSON stats)
444
+ -h, --help Show this help
445
+
446
+ EXAMPLES:
447
+ stamp security scan
448
+ Scan current directory for secrets
449
+
450
+ stamp security scan ./src
451
+ Scan specific directory
452
+
453
+ stamp security scan --apply
454
+ Scan and automatically add files with secrets to .stampignore
455
+
456
+ stamp security scan --out report.json
457
+ Write report to custom file
458
+
459
+ WHAT IT DOES:
460
+ • Scans TypeScript/JavaScript/JSON files for common secret patterns:
461
+ - API keys, tokens, passwords
462
+ - AWS access keys, private keys
463
+ - OAuth secrets, JWT secrets
464
+ - Database URLs with credentials
465
+ • Generates stamp_security_report.json with findings
466
+ • Optionally adds files to .stampignore (via --apply or interactive prompt)
467
+
468
+ OUTPUT:
469
+ • stamp_security_report.json Detailed report with all findings
470
+ • Exits with code 1 if secrets found, 0 if clean
471
+
472
+ NOTES:
473
+ • Files listed in .stampignore are automatically excluded from context generation
474
+ • Use --apply to automatically add files with secrets to .stampignore
475
+ • Report includes file paths, line numbers, and severity levels
371
476
  `;
372
477
  }
373
478
  //# sourceMappingURL=helpText.js.map