artifact-contracts 0.33.12 → 0.34.0
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/README.md +16 -0
- package/dist/artifact-contracts.bundle.mjs +201 -201
- package/dist/artifact-contracts.bundle.mjs.map +3 -3
- package/dist/core/resolver.d.ts +1 -0
- package/dist/core/resolver.d.ts.map +1 -1
- package/dist/core/resolver.js +65 -1
- package/dist/core/resolver.js.map +1 -1
- package/docs/cli-reference.md +955 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -210,6 +210,7 @@ Validation rules:
|
|
|
210
210
|
| Command | Description |
|
|
211
211
|
|---------|-------------|
|
|
212
212
|
| `audit [--adapter NAME]` | Semantic quality audit — naming consistency, authority appropriateness, coverage gaps |
|
|
213
|
+
| `discover [--adapter NAME] [--write]` | LLM-based artifact discovery — analyzes project structure and generates/updates `artifact-contracts.yaml` |
|
|
213
214
|
|
|
214
215
|
LLM commands require [agent-contracts-runtime](https://www.npmjs.com/package/agent-contracts-runtime) (optional peer dependency) and an adapter API key. Use `--show-prompt` or `--dry-run` to inspect the prompt without calling the LLM.
|
|
215
216
|
|
|
@@ -224,6 +225,21 @@ npx artifact-contracts audit --adapter openai
|
|
|
224
225
|
npx artifact-contracts audit --show-prompt
|
|
225
226
|
```
|
|
226
227
|
|
|
228
|
+
```bash
|
|
229
|
+
# Discover artifacts from project structure
|
|
230
|
+
npx artifact-contracts discover --adapter openai
|
|
231
|
+
|
|
232
|
+
# Write directly to artifact-contracts.yaml
|
|
233
|
+
npx artifact-contracts discover --adapter openai --write
|
|
234
|
+
|
|
235
|
+
# Preview prompt without LLM call
|
|
236
|
+
npx artifact-contracts discover --show-prompt
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The `discover` command has two modes:
|
|
240
|
+
- **init** — When no `artifact-contracts.yaml` exists, creates a registry from scratch by analyzing the file tree
|
|
241
|
+
- **update** — When the file exists, adds definitions for uncovered files while preserving existing artifacts
|
|
242
|
+
|
|
227
243
|
### Utility Commands
|
|
228
244
|
|
|
229
245
|
| Command | Description |
|