@lssm/app.cli-contractspec 0.0.0-canary-20251221164004
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/.contractsrc.example.json +25 -0
- package/AGENTS.md +102 -0
- package/AGENT_MODES.md +247 -0
- package/CHANGELOG.md +277 -0
- package/LICENSE +21 -0
- package/QUICK_REFERENCE.md +209 -0
- package/QUICK_START.md +174 -0
- package/README.md +628 -0
- package/contractsrc.schema.json +208 -0
- package/dist/cli.js +7521 -0
- package/docs/ci-cd.md +598 -0
- package/package.json +72 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./contractsrc.schema.json",
|
|
3
|
+
"aiProvider": "claude",
|
|
4
|
+
"aiModel": "claude-3-7-sonnet-20250219",
|
|
5
|
+
"agentMode": "claude-code",
|
|
6
|
+
"customEndpoint": null,
|
|
7
|
+
"customApiKey": null,
|
|
8
|
+
"outputDir": "./src",
|
|
9
|
+
"conventions": {
|
|
10
|
+
"operations": "interactions/commands|queries",
|
|
11
|
+
"events": "events",
|
|
12
|
+
"presentations": "presentations",
|
|
13
|
+
"forms": "forms"
|
|
14
|
+
},
|
|
15
|
+
"defaultOwners": ["@team"],
|
|
16
|
+
"defaultTags": ["auto-generated"],
|
|
17
|
+
|
|
18
|
+
"_comments": {
|
|
19
|
+
"aiProvider": "Options: 'claude', 'openai', 'ollama', 'custom'",
|
|
20
|
+
"agentMode": "Options: 'simple', 'cursor', 'claude-code', 'openai-codex'. Controls code generation strategy.",
|
|
21
|
+
"aiModel": "Specific model to use. Defaults vary by provider.",
|
|
22
|
+
"customEndpoint": "For custom providers. Example: 'https://your-llm-endpoint.com'",
|
|
23
|
+
"customApiKey": "Optional. Can also use CONTRACTSPEC_LLM_API_KEY env var"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# AI Agent Guide — `@lssm/app.cli-contractspec`
|
|
2
|
+
|
|
3
|
+
Scope: `packages/apps/cli-contractspec/*`
|
|
4
|
+
|
|
5
|
+
This is the ContractSpec CLI (`contractspec`).
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
The CLI is a **thin wrapper** around business logic in `@lssm/bundle.contractspec-workspace`. The separation is:
|
|
10
|
+
|
|
11
|
+
### CLI Layer (this package)
|
|
12
|
+
|
|
13
|
+
- **Commands** (`src/commands/`) - Thin wrappers that call bundle services
|
|
14
|
+
- **Prompts** (`src/commands/create/wizards/`) - Interactive UI using `@inquirer/prompts`
|
|
15
|
+
- **CLI setup** (`src/index.ts`, `src/cli.ts`) - Commander.js configuration
|
|
16
|
+
- **Types** (`src/types.ts`) - CLI-specific types
|
|
17
|
+
|
|
18
|
+
### Business Logic (bundle)
|
|
19
|
+
|
|
20
|
+
- **Services** (`@lssm/bundle.contractspec-workspace/services/`) - Core use-cases
|
|
21
|
+
- `create.ts` - Spec creation logic
|
|
22
|
+
- `build.ts` - Code generation from specs
|
|
23
|
+
- `openapi.ts` - OpenAPI export
|
|
24
|
+
- `registry.ts` - Registry client
|
|
25
|
+
- `examples.ts` - Examples management
|
|
26
|
+
- `validate.ts`, `diff.ts`, `deps.ts`, etc.
|
|
27
|
+
- **Templates** (`@lssm/bundle.contractspec-workspace/templates/`) - Spec templates
|
|
28
|
+
- **AI** (`@lssm/bundle.contractspec-workspace/ai/`) - AI agents and prompts
|
|
29
|
+
- **Adapters** (`@lssm/bundle.contractspec-workspace/adapters/`) - Infrastructure
|
|
30
|
+
|
|
31
|
+
## Build System
|
|
32
|
+
|
|
33
|
+
The CLI is bundled with `bun build`:
|
|
34
|
+
|
|
35
|
+
- Single executable output: `dist/cli.js`
|
|
36
|
+
- Target: `bun` runtime
|
|
37
|
+
- Minified for production
|
|
38
|
+
- Type declarations generated separately with `tsc`
|
|
39
|
+
|
|
40
|
+
## Test System
|
|
41
|
+
|
|
42
|
+
Tests use `bun:test` (not vitest):
|
|
43
|
+
|
|
44
|
+
- Run: `bun test`
|
|
45
|
+
- Watch: `bun test --watch`
|
|
46
|
+
- All test files import from `bun:test`
|
|
47
|
+
|
|
48
|
+
## Docs consumed by MCP
|
|
49
|
+
|
|
50
|
+
The CLI MCP server serves these markdown files by path:
|
|
51
|
+
|
|
52
|
+
- `packages/apps/cli-contractspec/QUICK_START.md`
|
|
53
|
+
- `packages/apps/cli-contractspec/QUICK_REFERENCE.md`
|
|
54
|
+
- `packages/apps/cli-contractspec/README.md`
|
|
55
|
+
|
|
56
|
+
If you rename/move them, update `packages/bundles/contractspec-studio/src/application/mcp/cliMcp.ts` (`CLI_DOC_PATHS`).
|
|
57
|
+
|
|
58
|
+
## Local commands
|
|
59
|
+
|
|
60
|
+
- **Dev/watch**: `bun run dev` - Watch mode, rebuilds on changes
|
|
61
|
+
- **Build**: `bun run build` - Bundles CLI + generates types
|
|
62
|
+
- **Test**: `bun test` - Run all tests
|
|
63
|
+
- **Lint**: `bun run lint` - Fix linting issues
|
|
64
|
+
|
|
65
|
+
## Prompt Library
|
|
66
|
+
|
|
67
|
+
The CLI uses `@inquirer/prompts` (not legacy `inquirer`):
|
|
68
|
+
|
|
69
|
+
- `select` - List selection
|
|
70
|
+
- `input` - Text input
|
|
71
|
+
- `confirm` - Yes/no confirmation
|
|
72
|
+
- `number` - Numeric input
|
|
73
|
+
|
|
74
|
+
## Adding a New Command
|
|
75
|
+
|
|
76
|
+
1. **Create service in bundle** (`@lssm/bundle.contractspec-workspace/services/`)
|
|
77
|
+
2. **Create CLI wrapper** (`src/commands/new-command.ts`)
|
|
78
|
+
3. **Add to index.ts** (`src/index.ts`)
|
|
79
|
+
4. **Add prompts if needed** (`src/commands/new-command/prompts.ts`)
|
|
80
|
+
5. **Write tests** (`src/commands/new-command/index.test.ts`)
|
|
81
|
+
|
|
82
|
+
Example CLI wrapper:
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
import { Command } from 'commander';
|
|
86
|
+
import { myService } from '@lssm/bundle.contractspec-workspace';
|
|
87
|
+
import { createFsAdapter } from '@lssm/bundle.contractspec-workspace/adapters';
|
|
88
|
+
|
|
89
|
+
export const myCommand = new Command('my-command')
|
|
90
|
+
.description('Do something')
|
|
91
|
+
.action(async () => {
|
|
92
|
+
const fs = createFsAdapter();
|
|
93
|
+
const logger = createLoggerAdapter();
|
|
94
|
+
|
|
95
|
+
await myService(
|
|
96
|
+
{
|
|
97
|
+
/* options */
|
|
98
|
+
},
|
|
99
|
+
{ fs, logger }
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
```
|
package/AGENT_MODES.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# AI Agent Modes
|
|
2
|
+
|
|
3
|
+
The contracts-cli supports multiple AI agent modes for code generation and validation. Each mode offers different capabilities and trade-offs.
|
|
4
|
+
|
|
5
|
+
## Available Agent Modes
|
|
6
|
+
|
|
7
|
+
### 1. Simple Mode (Default)
|
|
8
|
+
- **Mode**: `simple`
|
|
9
|
+
- **Description**: Direct LLM API calls for code generation
|
|
10
|
+
- **Best For**: Quick prototyping, basic implementations
|
|
11
|
+
- **Requirements**: API key for your chosen provider (Claude, OpenAI, Ollama)
|
|
12
|
+
- **Speed**: Fast
|
|
13
|
+
- **Quality**: Good baseline quality
|
|
14
|
+
|
|
15
|
+
**Example:**
|
|
16
|
+
```bash
|
|
17
|
+
contractspec build spec.contracts.ts --agent-mode simple
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Cursor Agent Mode
|
|
21
|
+
- **Mode**: `cursor`
|
|
22
|
+
- **Description**: Leverages Windsurf/Cursor's agentic capabilities
|
|
23
|
+
- **Best For**: Complex implementations, iterative development
|
|
24
|
+
- **Requirements**: Running in Windsurf/Cursor environment
|
|
25
|
+
- **Speed**: Moderate
|
|
26
|
+
- **Quality**: High quality with context awareness
|
|
27
|
+
|
|
28
|
+
**Example:**
|
|
29
|
+
```bash
|
|
30
|
+
contractspec build spec.contracts.ts --agent-mode cursor
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Note**: This mode requires Windsurf/Cursor CLI access. If not available, falls back to simple mode.
|
|
34
|
+
|
|
35
|
+
### 3. Claude Code Mode
|
|
36
|
+
- **Mode**: `claude-code`
|
|
37
|
+
- **Description**: Uses Anthropic's Claude with extended thinking for code generation
|
|
38
|
+
- **Best For**: Production-quality code, complex logic, thorough validation
|
|
39
|
+
- **Requirements**: `ANTHROPIC_API_KEY` environment variable
|
|
40
|
+
- **Speed**: Moderate to slow
|
|
41
|
+
- **Quality**: Very high quality, excellent for validation
|
|
42
|
+
|
|
43
|
+
**Features:**
|
|
44
|
+
- Extended context understanding
|
|
45
|
+
- Detailed code review capabilities
|
|
46
|
+
- Comprehensive validation reports
|
|
47
|
+
- Best for critical implementations
|
|
48
|
+
|
|
49
|
+
**Example:**
|
|
50
|
+
```bash
|
|
51
|
+
export ANTHROPIC_API_KEY=your_key
|
|
52
|
+
contractspec build spec.contracts.ts --agent-mode claude-code
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 4. OpenAI Codex Mode
|
|
56
|
+
- **Mode**: `openai-codex`
|
|
57
|
+
- **Description**: Uses OpenAI's GPT-4o and o1 models for code generation
|
|
58
|
+
- **Best For**: Complex algorithms, optimization tasks
|
|
59
|
+
- **Requirements**: `OPENAI_API_KEY` environment variable
|
|
60
|
+
- **Speed**: Fast (GPT-4o) to slow (o1 reasoning)
|
|
61
|
+
- **Quality**: High quality, excellent for algorithmic problems
|
|
62
|
+
|
|
63
|
+
**Features:**
|
|
64
|
+
- Automatically selects o1 for complex tasks
|
|
65
|
+
- Uses GPT-4o for standard generation
|
|
66
|
+
- Strong at optimization and algorithms
|
|
67
|
+
|
|
68
|
+
**Example:**
|
|
69
|
+
```bash
|
|
70
|
+
export OPENAI_API_KEY=your_key
|
|
71
|
+
contractspec build spec.contracts.ts --agent-mode openai-codex
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Configuring Agent Modes
|
|
75
|
+
|
|
76
|
+
### Via Configuration File
|
|
77
|
+
|
|
78
|
+
Add to `.contractsrc.json`:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"aiProvider": "claude",
|
|
83
|
+
"agentMode": "claude-code",
|
|
84
|
+
"aiModel": "claude-3-7-sonnet-20250219"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Via Environment Variables
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
export CONTRACTSPEC_AGENT_MODE=claude-code
|
|
92
|
+
export CONTRACTSPEC_AI_PROVIDER=claude
|
|
93
|
+
export ANTHROPIC_API_KEY=your_key
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Via CLI Options
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
contractspec build spec.ts --agent-mode claude-code --provider claude
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Agent Mode Comparison
|
|
103
|
+
|
|
104
|
+
| Feature | Simple | Cursor | Claude Code | OpenAI Codex |
|
|
105
|
+
|---------|--------|--------|-------------|--------------|
|
|
106
|
+
| Speed | ⚡⚡⚡ | ⚡⚡ | ⚡⚡ | ⚡⚡⚡ |
|
|
107
|
+
| Quality | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
|
|
108
|
+
| Validation | Basic | Good | Excellent | Good |
|
|
109
|
+
| Setup | Easy | Moderate | Easy | Easy |
|
|
110
|
+
| Cost | Low | N/A | Moderate | Low-Moderate |
|
|
111
|
+
|
|
112
|
+
## Fallback Behavior
|
|
113
|
+
|
|
114
|
+
The CLI automatically falls back to simpler modes if the primary mode fails:
|
|
115
|
+
|
|
116
|
+
1. **cursor** → **claude-code** → **openai-codex** → **simple**
|
|
117
|
+
2. **claude-code** → **openai-codex** → **simple**
|
|
118
|
+
3. **openai-codex** → **simple**
|
|
119
|
+
4. **simple** → Basic templates (no AI)
|
|
120
|
+
|
|
121
|
+
## Usage Examples
|
|
122
|
+
|
|
123
|
+
### Build with Agent Mode
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Use Claude Code for high-quality generation
|
|
127
|
+
contractspec build user.contracts.ts --agent-mode claude-code
|
|
128
|
+
|
|
129
|
+
# Use OpenAI for algorithmic code
|
|
130
|
+
contractspec build optimizer.contracts.ts --agent-mode openai-codex
|
|
131
|
+
|
|
132
|
+
# Disable AI entirely
|
|
133
|
+
contractspec build simple.contracts.ts --no-agent
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Validate with Agent Mode
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Validate implementation with AI
|
|
140
|
+
contractspec validate user.contracts.ts --check-implementation --agent-mode claude-code
|
|
141
|
+
|
|
142
|
+
# Interactive validation
|
|
143
|
+
contractspec validate user.contracts.ts -i --agent-mode claude-code
|
|
144
|
+
|
|
145
|
+
# Specify implementation path
|
|
146
|
+
contractspec validate user.contracts.ts \
|
|
147
|
+
--check-implementation \
|
|
148
|
+
--implementation-path ./handlers/user.handler.ts \
|
|
149
|
+
--agent-mode claude-code
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Best Practices
|
|
153
|
+
|
|
154
|
+
### For Development
|
|
155
|
+
- Use **simple** mode for rapid iteration
|
|
156
|
+
- Use **cursor** mode if working in Windsurf/Cursor
|
|
157
|
+
|
|
158
|
+
### For Production
|
|
159
|
+
- Use **claude-code** for critical implementations
|
|
160
|
+
- Always validate with `--check-implementation`
|
|
161
|
+
- Review AI-generated code before committing
|
|
162
|
+
|
|
163
|
+
### For Complex Logic
|
|
164
|
+
- Use **openai-codex** for algorithmic problems
|
|
165
|
+
- Use **claude-code** for comprehensive validation
|
|
166
|
+
|
|
167
|
+
### For CI/CD
|
|
168
|
+
- Use **simple** mode for speed
|
|
169
|
+
- Configure via environment variables
|
|
170
|
+
- Set up validation in pre-commit hooks
|
|
171
|
+
|
|
172
|
+
## Troubleshooting
|
|
173
|
+
|
|
174
|
+
### Agent Mode Not Working
|
|
175
|
+
|
|
176
|
+
Check:
|
|
177
|
+
1. API keys are set correctly
|
|
178
|
+
2. Network connectivity to AI providers
|
|
179
|
+
3. Provider quotas and rate limits
|
|
180
|
+
|
|
181
|
+
### Fallback to Simple Mode
|
|
182
|
+
|
|
183
|
+
This happens when:
|
|
184
|
+
- API key is missing
|
|
185
|
+
- Provider is unavailable
|
|
186
|
+
- Agent cannot handle the task
|
|
187
|
+
|
|
188
|
+
The CLI will show warnings explaining why.
|
|
189
|
+
|
|
190
|
+
### Poor Quality Output
|
|
191
|
+
|
|
192
|
+
Try:
|
|
193
|
+
1. Using a more powerful agent mode
|
|
194
|
+
2. Adding more context to your spec
|
|
195
|
+
3. Reviewing and refining the spec structure
|
|
196
|
+
|
|
197
|
+
## Environment Variables Reference
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Provider selection
|
|
201
|
+
CONTRACTSPEC_AI_PROVIDER=claude|openai|ollama|custom
|
|
202
|
+
|
|
203
|
+
# Agent mode
|
|
204
|
+
CONTRACTSPEC_AGENT_MODE=simple|cursor|claude-code|openai-codex
|
|
205
|
+
|
|
206
|
+
# Model selection
|
|
207
|
+
CONTRACTSPEC_AI_MODEL=claude-3-7-sonnet-20250219
|
|
208
|
+
|
|
209
|
+
# API Keys
|
|
210
|
+
ANTHROPIC_API_KEY=your_anthropic_key
|
|
211
|
+
OPENAI_API_KEY=your_openai_key
|
|
212
|
+
|
|
213
|
+
# Custom endpoints
|
|
214
|
+
CONTRACTSPEC_LLM_ENDPOINT=https://your-custom-endpoint
|
|
215
|
+
CONTRACTSPEC_LLM_API_KEY=your_custom_key
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Advanced Configuration
|
|
219
|
+
|
|
220
|
+
### Custom Agent Priorities
|
|
221
|
+
|
|
222
|
+
You can configure fallback priorities in `.contractsrc.json`:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"agentMode": "claude-code",
|
|
227
|
+
"aiProvider": "claude",
|
|
228
|
+
"aiModel": "claude-3-7-sonnet-20250219",
|
|
229
|
+
"outputDir": "./src",
|
|
230
|
+
"defaultOwners": ["@team"],
|
|
231
|
+
"defaultTags": ["auto-generated"]
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Multi-Model Strategy
|
|
236
|
+
|
|
237
|
+
Use different models for different tasks:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# Use Claude for generation
|
|
241
|
+
contractspec build spec.ts --agent-mode claude-code
|
|
242
|
+
|
|
243
|
+
# Use OpenAI for validation
|
|
244
|
+
contractspec validate spec.ts \
|
|
245
|
+
--check-implementation \
|
|
246
|
+
--agent-mode openai-codex
|
|
247
|
+
```
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.0.0-canary-20251221164004
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 66a5dfd: initial release
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [66a5dfd]
|
|
12
|
+
- @lssm/bundle.contractspec-workspace@0.0.0-canary-20251221164004
|
|
13
|
+
- @lssm/lib.ai-providers@0.0.0-canary-20251221164004
|
|
14
|
+
- @lssm/lib.contracts@0.0.0-canary-20251221164004
|
|
15
|
+
- @lssm/lib.contracts-transformers@0.0.0-canary-20251221164004
|
|
16
|
+
- @lssm/lib.schema@0.0.0-canary-20251221164004
|
|
17
|
+
- @lssm/lib.testing@0.0.0-canary-20251221164004
|
|
18
|
+
- @lssm/module.ai-chat@0.0.0-canary-20251221164004
|
|
19
|
+
- @lssm/module.contractspec-examples@0.0.0-canary-20251221164004
|
|
20
|
+
|
|
21
|
+
## 0.12.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- Refactor to be compatible with ai-sdk v6
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- @lssm/app.cli-database@1.12.0
|
|
31
|
+
- @lssm/lib.contracts@1.12.0
|
|
32
|
+
- @lssm/lib.schema@1.12.0
|
|
33
|
+
- @lssm/lib.testing@0.5.0
|
|
34
|
+
|
|
35
|
+
## 0.11.1
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Fix dependencies
|
|
40
|
+
- Updated dependencies
|
|
41
|
+
- @lssm/app.cli-database@1.11.1
|
|
42
|
+
- @lssm/lib.contracts@1.11.1
|
|
43
|
+
- @lssm/lib.schema@1.11.1
|
|
44
|
+
- @lssm/lib.testing@0.4.1
|
|
45
|
+
|
|
46
|
+
## 0.11.0
|
|
47
|
+
|
|
48
|
+
### Minor Changes
|
|
49
|
+
|
|
50
|
+
- b7621d3: Fix version
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [b7621d3]
|
|
55
|
+
- @lssm/app.cli-database@1.11.0
|
|
56
|
+
- @lssm/lib.contracts@1.11.0
|
|
57
|
+
- @lssm/lib.schema@1.11.0
|
|
58
|
+
- @lssm/lib.testing@0.4.0
|
|
59
|
+
|
|
60
|
+
## 0.10.0
|
|
61
|
+
|
|
62
|
+
### Minor Changes
|
|
63
|
+
|
|
64
|
+
- fix
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- Updated dependencies
|
|
69
|
+
- @lssm/app.cli-database@1.10.0
|
|
70
|
+
- @lssm/lib.contracts@1.10.0
|
|
71
|
+
- @lssm/lib.schema@1.10.0
|
|
72
|
+
- @lssm/lib.testing@0.3.0
|
|
73
|
+
|
|
74
|
+
## 0.9.2
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- fix dependencies
|
|
79
|
+
- Updated dependencies
|
|
80
|
+
- @lssm/lib.testing@0.2.2
|
|
81
|
+
- @lssm/app.cli-database@1.9.2
|
|
82
|
+
- @lssm/lib.contracts@1.9.2
|
|
83
|
+
- @lssm/lib.schema@1.9.2
|
|
84
|
+
|
|
85
|
+
## 0.9.1
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- fix
|
|
90
|
+
- Updated dependencies
|
|
91
|
+
- @lssm/app.cli-database@1.9.1
|
|
92
|
+
- @lssm/lib.contracts@1.9.1
|
|
93
|
+
- @lssm/lib.testing@0.2.1
|
|
94
|
+
- @lssm/lib.schema@1.9.1
|
|
95
|
+
|
|
96
|
+
## 0.9.0
|
|
97
|
+
|
|
98
|
+
### Minor Changes
|
|
99
|
+
|
|
100
|
+
- b1d0876: Managed platform
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- Updated dependencies [b1d0876]
|
|
105
|
+
- @lssm/app.cli-database@1.9.0
|
|
106
|
+
- @lssm/lib.contracts@1.9.0
|
|
107
|
+
- @lssm/lib.testing@0.2.0
|
|
108
|
+
- @lssm/lib.schema@1.9.0
|
|
109
|
+
|
|
110
|
+
## 0.8.0
|
|
111
|
+
|
|
112
|
+
### Minor Changes
|
|
113
|
+
|
|
114
|
+
- f1f4ddd: Foundation Hardening
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- Updated dependencies [f1f4ddd]
|
|
119
|
+
- @lssm/lib.contracts@1.8.0
|
|
120
|
+
- @lssm/lib.schema@1.8.0
|
|
121
|
+
|
|
122
|
+
## 0.7.4
|
|
123
|
+
|
|
124
|
+
### Patch Changes
|
|
125
|
+
|
|
126
|
+
- fix typing
|
|
127
|
+
- Updated dependencies
|
|
128
|
+
- @lssm/lib.contracts@1.7.4
|
|
129
|
+
- @lssm/lib.schema@1.7.4
|
|
130
|
+
|
|
131
|
+
## 0.7.3
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- add right-sidebar
|
|
136
|
+
- Updated dependencies
|
|
137
|
+
- @lssm/lib.contracts@1.7.3
|
|
138
|
+
- @lssm/lib.schema@1.7.3
|
|
139
|
+
|
|
140
|
+
## 0.7.2
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- fix typing
|
|
145
|
+
- Updated dependencies
|
|
146
|
+
- @lssm/lib.contracts@1.7.2
|
|
147
|
+
- @lssm/lib.schema@1.7.2
|
|
148
|
+
|
|
149
|
+
## 0.7.1
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- fix typing
|
|
154
|
+
- Updated dependencies
|
|
155
|
+
- @lssm/lib.contracts@1.7.1
|
|
156
|
+
- @lssm/lib.schema@1.7.1
|
|
157
|
+
|
|
158
|
+
## 0.7.0
|
|
159
|
+
|
|
160
|
+
### Minor Changes
|
|
161
|
+
|
|
162
|
+
- fixii
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- Updated dependencies
|
|
167
|
+
- @lssm/lib.contracts@1.7.0
|
|
168
|
+
- @lssm/lib.schema@1.7.0
|
|
169
|
+
|
|
170
|
+
## 0.6.0
|
|
171
|
+
|
|
172
|
+
### Minor Changes
|
|
173
|
+
|
|
174
|
+
- fix versionnnn
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- Updated dependencies
|
|
179
|
+
- @lssm/lib.contracts@1.6.0
|
|
180
|
+
- @lssm/lib.schema@1.6.0
|
|
181
|
+
|
|
182
|
+
## 0.5.0
|
|
183
|
+
|
|
184
|
+
### Minor Changes
|
|
185
|
+
|
|
186
|
+
- fix
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- Updated dependencies
|
|
191
|
+
- @lssm/lib.contracts@1.5.0
|
|
192
|
+
- @lssm/lib.schema@1.5.0
|
|
193
|
+
|
|
194
|
+
## 0.4.0
|
|
195
|
+
|
|
196
|
+
### Minor Changes
|
|
197
|
+
|
|
198
|
+
- fix exports
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- Updated dependencies
|
|
203
|
+
- @lssm/lib.contracts@1.4.0
|
|
204
|
+
- @lssm/lib.schema@1.4.0
|
|
205
|
+
|
|
206
|
+
## 0.3.0
|
|
207
|
+
|
|
208
|
+
### Minor Changes
|
|
209
|
+
|
|
210
|
+
- fix it
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- Updated dependencies
|
|
215
|
+
- @lssm/lib.contracts@1.3.0
|
|
216
|
+
- @lssm/lib.schema@1.3.0
|
|
217
|
+
|
|
218
|
+
## 0.2.0
|
|
219
|
+
|
|
220
|
+
### Minor Changes
|
|
221
|
+
|
|
222
|
+
- fix
|
|
223
|
+
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- Updated dependencies
|
|
227
|
+
- @lssm/lib.contracts@1.2.0
|
|
228
|
+
- @lssm/lib.schema@1.2.0
|
|
229
|
+
|
|
230
|
+
## 0.1.0
|
|
231
|
+
|
|
232
|
+
### Minor Changes
|
|
233
|
+
|
|
234
|
+
- fix
|
|
235
|
+
- 748b3a2: fix publish
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- Updated dependencies
|
|
240
|
+
- Updated dependencies [748b3a2]
|
|
241
|
+
- @lssm/lib.contracts@1.1.0
|
|
242
|
+
- @lssm/lib.schema@1.1.0
|
|
243
|
+
|
|
244
|
+
All notable changes to this project will be documented in this file.
|
|
245
|
+
|
|
246
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
247
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
248
|
+
|
|
249
|
+
## [Unreleased]
|
|
250
|
+
|
|
251
|
+
Initial version
|
|
252
|
+
|
|
253
|
+
### Added
|
|
254
|
+
|
|
255
|
+
- Initial release of contracts-cli
|
|
256
|
+
- `contractspec create` command with interactive wizards
|
|
257
|
+
- AI-assisted spec creation using Vercel AI SDK
|
|
258
|
+
- Multi-provider support (Claude, OpenAI, Ollama, custom endpoints)
|
|
259
|
+
- `contractspec build` command for code generation
|
|
260
|
+
- `contractspec validate` command for spec validation
|
|
261
|
+
- TypeScript templates for operations, events, and presentations
|
|
262
|
+
- Handler and component generation
|
|
263
|
+
- Test generation
|
|
264
|
+
- Comprehensive documentation and examples
|
|
265
|
+
- Agent-driven build workflow with automatic fallback to deterministic templates
|
|
266
|
+
- AI-powered implementation validation with consistent agent orchestration
|
|
267
|
+
|
|
268
|
+
### Features
|
|
269
|
+
|
|
270
|
+
- Interactive CLI with Commander.js
|
|
271
|
+
- Beautiful terminal output with Chalk and Ora
|
|
272
|
+
- Configuration via `.contractsrc.json`
|
|
273
|
+
- Environment variable support
|
|
274
|
+
- BYOLLM (Bring Your Own LLM) support
|
|
275
|
+
- Validation with detailed error messages
|
|
276
|
+
- Type-safe code generation
|
|
277
|
+
- `contractspec validate` now prompts for spec-only vs implementation validation unless `--check-implementation` is provided
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chaman Ventures, SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|