logicstamp-context 0.2.2 → 0.2.4
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/LLM_CONTEXT.md +2 -2
- package/README.md +116 -923
- package/dist/cli/commands/context/statsCalculator.d.ts.map +1 -1
- package/dist/cli/commands/context/statsCalculator.js +29 -10
- package/dist/cli/commands/context/statsCalculator.js.map +1 -1
- package/dist/cli/commands/context/tokenEstimator.d.ts +1 -1
- package/dist/cli/commands/context/tokenEstimator.d.ts.map +1 -1
- package/dist/cli/commands/context/tokenEstimator.js +38 -5
- package/dist/cli/commands/context/tokenEstimator.js.map +1 -1
- package/dist/cli/commands/context.js +1 -1
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/parser/helpText.js +348 -348
- package/dist/core/styleExtractor/index.d.ts +1 -0
- package/dist/core/styleExtractor/index.d.ts.map +1 -1
- package/dist/core/styleExtractor/index.js +1 -0
- package/dist/core/styleExtractor/index.js.map +1 -1
- package/dist/core/styleExtractor/material.d.ts +19 -0
- package/dist/core/styleExtractor/material.d.ts.map +1 -0
- package/dist/core/styleExtractor/material.js +103 -0
- package/dist/core/styleExtractor/material.js.map +1 -0
- package/dist/core/styleExtractor/styleExtractor.d.ts.map +1 -1
- package/dist/core/styleExtractor/styleExtractor.js +14 -0
- package/dist/core/styleExtractor/styleExtractor.js.map +1 -1
- package/dist/types/UIFContract.d.ts +11 -0
- package/dist/types/UIFContract.d.ts.map +1 -1
- package/dist/types/UIFContract.js.map +1 -1
- package/package.json +1 -1
- package/schema/logicstamp.context.schema.json +48 -1
|
@@ -2,372 +2,372 @@
|
|
|
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
|
+
|
|
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
|
|
55
55
|
`;
|
|
56
56
|
}
|
|
57
57
|
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
|
|
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
|
|
106
106
|
`;
|
|
107
107
|
}
|
|
108
108
|
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)
|
|
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)
|
|
160
160
|
`;
|
|
161
161
|
}
|
|
162
162
|
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
|
|
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
|
|
193
193
|
`;
|
|
194
194
|
}
|
|
195
195
|
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
|
|
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
|
|
281
281
|
`;
|
|
282
282
|
}
|
|
283
283
|
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
|
|
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
330
|
`;
|
|
331
331
|
}
|
|
332
332
|
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
|
|
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
|
|
371
371
|
`;
|
|
372
372
|
}
|
|
373
373
|
//# sourceMappingURL=helpText.js.map
|