@promptscript/cli 1.0.0-alpha.0 → 1.0.0-alpha.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,253 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0-alpha.2](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2026-01-24)
9
+
10
+
11
+ ### chore
12
+
13
+ * prepare alpha.2 release ([449fbcc](https://github.com/mrwogu/promptscript/commit/449fbccc119d34ab2a674cbfcd8cc4cc3012d108))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **cli:** resolve ESM dynamic require error for simple-git ([748a401](https://github.com/mrwogu/promptscript/commit/748a401377b5b58dff1935b94543f65f11f5360c))
19
+ * **formatters:** read devCommands and postWork from [@knowledge](https://github.com/knowledge) block ([83a2727](https://github.com/mrwogu/promptscript/commit/83a272707bf3550142ae440f1a595657bb5704e9))
20
+ * sync package.publish.json keywords and description ([ae7481f](https://github.com/mrwogu/promptscript/commit/ae7481fe64639420ba38fc98ea1349bca17cb91d))
21
+
22
+ ## [1.0.0-alpha.1](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.1...v1.0.0-alpha.1) (2026-01-23)
23
+
24
+
25
+ ### ⚠ BREAKING CHANGES
26
+
27
+ * All packages now use ES Modules. Consumers must use ESM imports.
28
+ * All packages now use ES Modules. Consumers must use ESM imports.
29
+
30
+ ### chore
31
+
32
+ * prepare alpha.1 release ([01bb952](https://github.com/mrwogu/promptscript/commit/01bb952a967566c0dcd61b80eec2119c06966167))
33
+
34
+
35
+ ### refactor
36
+
37
+ * migrate to pure ESM ([72d0333](https://github.com/mrwogu/promptscript/commit/72d0333580c688c617831885c13a270619817d5b))
38
+ * migrate to pure ESM ([8a59387](https://github.com/mrwogu/promptscript/commit/8a59387d6f81ee9db33c46db8e737fe52e705c2e))
39
+
40
+
41
+ ### Features
42
+
43
+ * cli ([d6cfb7c](https://github.com/mrwogu/promptscript/commit/d6cfb7c5ee7262fcfb63f3ee79333fadfb39ee34))
44
+ * **cli/diff:** support pager ([c5133f7](https://github.com/mrwogu/promptscript/commit/c5133f7a58f0f03323c8fa925387178e823d9415))
45
+ * **cli:** add Antigravity to AI tool detection ([809d055](https://github.com/mrwogu/promptscript/commit/809d055d9b9308059306c6dd8d5893ecdfe8f3b5))
46
+ * **cli:** add chokidar watch mode and --registry flag ([afe30a9](https://github.com/mrwogu/promptscript/commit/afe30a93171ae2f08ea3d022b30a1356deca0627))
47
+ * **cli:** add Codecov bundle analysis ([b93568f](https://github.com/mrwogu/promptscript/commit/b93568f81835dd62517ff5f290687dd5ef9cb4da))
48
+ * **cli:** force init ([5275c14](https://github.com/mrwogu/promptscript/commit/5275c14b9559f16cbc1b4aecf2f8edcf520e51ff))
49
+ * **core:** config schema ([2692b4d](https://github.com/mrwogu/promptscript/commit/2692b4d51e1fb20c4df35b5ce6b8264369910bcb))
50
+ * **formatters:** copilot agents support ([886f6fc](https://github.com/mrwogu/promptscript/commit/886f6fca9d0a7cd276997a31e62618ef0153322f))
51
+ * interactive cli init ([3f77d28](https://github.com/mrwogu/promptscript/commit/3f77d28c1f7644cb9c0620ab4b9f94c01d1ea243))
52
+ * **resolver:** add Git registry support for remote configuration sharing ([555e488](https://github.com/mrwogu/promptscript/commit/555e4883c26b45661965d5994cbaf7f43b928d26))
53
+ * support conventions ([3ccea55](https://github.com/mrwogu/promptscript/commit/3ccea55eb92e3374a2613bbf975c7b4cae80fcf5))
54
+
55
+
56
+ ### Bug Fixes
57
+
58
+ * **cli:** change registry configuration default to No ([0927050](https://github.com/mrwogu/promptscript/commit/0927050523df7a659ea5eff47c11ae11dba976a6))
59
+
60
+ ## [1.0.0-alpha.1](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2026-01-23)
61
+
62
+
63
+ ### Features
64
+
65
+ * **cli:** add Antigravity to AI tool detection ([809d055](https://github.com/mrwogu/promptscript/commit/809d055d9b9308059306c6dd8d5893ecdfe8f3b5))
66
+ * **resolver:** add Git registry support for remote configuration sharing ([555e488](https://github.com/mrwogu/promptscript/commit/555e4883c26b45661965d5994cbaf7f43b928d26))
67
+
68
+
69
+ ### Bug Fixes
70
+
71
+ * **cli:** change registry configuration default to No ([0927050](https://github.com/mrwogu/promptscript/commit/0927050523df7a659ea5eff47c11ae11dba976a6))
72
+
73
+
74
+ ### Miscellaneous Chores
75
+
76
+ * prepare alpha.1 release ([01bb952](https://github.com/mrwogu/promptscript/commit/01bb952a967566c0dcd61b80eec2119c06966167))
77
+
78
+ ## [1.0.0-alpha.0] - 2026-01-22
79
+
80
+ ### Added
81
+
82
+ 🎉 **PromptScript Language Implementation** - A language for standardizing AI instructions across organizations.
83
+
84
+ #### Language Features
85
+
86
+ - **PromptScript Syntax 1.0.0** - Initial language specification for `.prs` files
87
+ - **@meta block** - Metadata with `id` and `syntax` fields, optional `org`, `team`, `tags`
88
+ - **@inherit directive** - Single inheritance from registry namespaces or relative paths
89
+ - **@use directive** - Import fragments for composition with optional aliasing
90
+ - **@extend block** - Modify inherited blocks at any nesting level
91
+ - **Content blocks:**
92
+ - `@identity` - AI persona definition
93
+ - `@context` - Project context with key-value properties and text
94
+ - `@standards` - Coding standards with nested objects (merged during inheritance)
95
+ - `@restrictions` - Things AI should avoid (concatenated during inheritance)
96
+ - `@shortcuts` - Custom commands (child overrides parent)
97
+ - `@params` - Configurable parameters with types and defaults
98
+ - `@guards` - Validation rules with `globs` for file targeting
99
+ - `@skills` - Reusable AI workflows with tool permissions
100
+ - `@local` - Private instructions (not committed to git)
101
+ - `@knowledge` - Reference documentation
102
+ - **Value types:** Strings, numbers, booleans, null, arrays, objects, multi-line text (`"""`)
103
+ - **Type expressions:** `range(min..max)`, `enum("a", "b", "c")`
104
+
105
+ #### Formatters
106
+
107
+ - **GitHub Copilot** - `simple`, `multifile`, `full` versions with agents support (`.github/copilot-instructions.md`, `.github/agents/`, `.github/skills/`)
108
+ - **Claude Code** - `simple`, `multifile`, `full` versions with local memory support (`CLAUDE.md`, `.claude/agents/`, `.claude/skills/`, `CLAUDE.local.md`)
109
+ - **Cursor** - `modern`, `multifile`, `legacy` versions (`.cursor/rules/project.mdc`, `.cursorrules`)
110
+ - **Google Antigravity** - `simple`, `frontmatter` versions (`.agent/rules/project.md`)
111
+ - Output conventions: `markdown` (default) and `xml`
112
+ - Path-specific rule generation with glob patterns
113
+
114
+ #### Internal Packages (bundled into CLI)
115
+
116
+ - `core` - AST types, error classes, utility functions
117
+ - `parser` - PromptScript parser with recovery support
118
+ - `resolver` - Resolution for `@inherit`, `@use`, `@extend` with registry support
119
+ - `validator` - Semantic validation with custom rule support
120
+ - `compiler` - Compilation pipeline with watch mode
121
+ - `formatters` - Multiple formatter implementations
122
+
123
+ #### CLI Features
124
+
125
+ - `prs init` - Project initialization with auto-detection
126
+ - Tech stack detection (TypeScript, JavaScript, Python, Rust, Go, Java, Ruby, PHP, C#)
127
+ - Framework detection (React, Vue, Angular, Next.js, Django, FastAPI, Express, NestJS, etc.)
128
+ - Existing AI tools detection (GitHub Copilot, Claude Code, Cursor)
129
+ - Interactive configuration wizard
130
+ - `prs compile` - Multi-file compilation with watch mode and dry-run support
131
+ - `prs validate` - File validation with detailed error reporting
132
+ - `prs diff` - Show compilation diff
133
+ - `prs pull` - Registry updates
134
+
135
+ #### Configuration
136
+
137
+ - `promptscript.yaml` - Project configuration
138
+ - Registry configuration with authentication support
139
+ - Target configuration for multiple AI platforms
140
+ - Validation rules configuration
141
+
142
+ #### Documentation
143
+
144
+ - Complete language reference
145
+ - API documentation for all 6 packages
146
+ - CLI reference guide
147
+ - Getting started guide and tutorial
148
+ - Multiple examples (minimal, enterprise, skills & local, team setup)
149
+ - Package READMEs with ecosystem diagrams
150
+
151
+ #### Infrastructure
152
+
153
+ - Nx monorepo with pnpm workspaces
154
+ - TypeScript strict mode with 100% type coverage
155
+ - Pure ESM packages with NodeNext module resolution
156
+ - Comprehensive test suite (Vitest)
157
+ - ESLint and Prettier
158
+ - Husky pre-commit hooks (format, lint, schema validation)
159
+ - TypeDoc for automated API documentation
160
+ - MkDocs documentation site with versioning support (mike)
161
+ - GitHub Actions CI/CD pipeline
162
+ - Code coverage tracking
163
+
164
+ ### Internal Architecture
165
+
166
+ > All packages below are internal and bundled into `@promptscript/cli`. They are not published separately.
167
+
168
+ #### core
169
+
170
+ - AST types and interfaces
171
+ - Error classes (`PSError`, `ParseError`, `ResolveError`, `ValidationError`)
172
+ - Utility functions for version comparison, paths, AST operations
173
+ - Config types: `input`, `watch`, `output`, `registry` with auth support
174
+ - Utility exports: `formatPath()`, `diagnostics`, constants
175
+
176
+ #### parser
177
+
178
+ - Chevrotain-based lexer and parser
179
+ - CST to AST transformation
180
+ - `parse()` and `parseOrThrow()` API
181
+ - `parseFile()` function with recovery option
182
+ - Error recovery for better diagnostics
183
+
184
+ #### resolver
185
+
186
+ - `@inherit`, `@use`, `@extend` resolution
187
+ - File loader with registry support
188
+ - `RegistryInterface` for custom registry implementations
189
+ - Standalone `resolve()` function for programmatic use
190
+
191
+ #### validator
192
+
193
+ - Required fields validation
194
+ - Semantic version format checking
195
+ - Custom rule support
196
+ - Standalone `validate()` function
197
+ - `removeRule()` API for dynamic rule management
198
+ - `formatters` export for formatting validation results
199
+
200
+ #### compiler
201
+
202
+ - Resolve → Validate → Format pipeline
203
+ - Watch mode with chokidar for file monitoring
204
+ - Dry-run support
205
+ - Standalone `compile()` function
206
+
207
+ #### formatters
208
+
209
+ - **GitHub Copilot** - `simple`, `multifile`, `full` versions with agents support
210
+ - **Claude Code** - `simple`, `multifile`, `full` versions
211
+ - **Cursor** - `modern`, `multifile`, `legacy` versions
212
+ - **Antigravity** - `simple`, `frontmatter` versions
213
+ - Output conventions: `markdown` or `xml`
214
+ - Base formatter class for custom implementations
215
+ - Standalone `format()` functions for each formatter
216
+
217
+ #### cli (published)
218
+
219
+ - `prs init` - Initialize project with auto-detection
220
+ - Tech stack detection (TypeScript, JavaScript, Python, Rust, Go, Java, Ruby, PHP, C#)
221
+ - Framework detection (React, Vue, Angular, Next.js, Django, FastAPI, etc.)
222
+ - Existing AI tools detection (GitHub, Claude, Cursor)
223
+ - `prs compile` - Compile to target formats with watch mode support
224
+ - `prs validate` - Validate files
225
+ - `prs diff` - Show output diff
226
+ - `prs pull` - Pull registry updates with `--registry` flag
227
+
228
+ ### Configuration
229
+
230
+ - `promptscript.yaml` configuration file
231
+ - Registry and targets configuration with authentication
232
+ - Validation rules configuration
233
+ - Support for multiple output formats per target
234
+
235
+ ### Documentation
236
+
237
+ - Complete language reference
238
+ - CLI and configuration reference
239
+ - Getting started guide and tutorial
240
+ - API documentation for all 6 packages
241
+ - Multiple examples and best practices
242
+
243
+ ### Infrastructure
244
+
245
+ - Nx monorepo with pnpm workspaces
246
+ - TypeScript strict mode
247
+ - Pure ESM packages with NodeNext module resolution
248
+ - Comprehensive test suite with Vitest
249
+ - ESLint and Prettier for code quality
250
+ - Husky pre-commit hooks
251
+ - TypeDoc for automated API documentation
252
+ - MkDocs documentation site with versioning (mike)
253
+ - GitHub Actions CI/CD pipeline
package/README.md CHANGED
@@ -8,16 +8,17 @@ Command-line interface for PromptScript. Compile, validate, and manage AI instru
8
8
 
9
9
  The CLI bundles all internal packages into a single distributable:
10
10
 
11
- ```text
11
+ ```
12
12
  @promptscript/cli (published)
13
13
 
14
- └─► bundles:
15
- ├─► compiler
16
- │ ├─► parser
17
- ├─► resolver
18
- ├─► validator
19
- └─► formatters
20
- └─► core
14
+ ├─► compiler (pipeline orchestration)
15
+ ├─► resolver
16
+ │ ├─► validator ─────► core
17
+ └─► formatters ────► core
18
+
19
+ └─► resolver (inheritance & import resolution)
20
+ ├─► parser ────────► core
21
+ └───────────────────► core
21
22
  ```
22
23
 
23
24
  See the [PromptScript monorepo](https://github.com/mrwogu/promptscript) for development details.