@rqml/schema 0.1.0 → 0.1.1
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/AGENTS.md +32 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rqml/schema",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Canonical RQML XSD schemas (the single source of truth), example documents, and the AGENTS.md template, with a typed version resolver. Schema text is inlined for offline, bundler-friendly consumption.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
package/templates/AGENTS.md
CHANGED
|
@@ -20,6 +20,23 @@ The RQML XSD schema is at https://rqml.org/schema/rqml-2.1.0.xsd (insert correct
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
+
## Toolchain
|
|
24
|
+
|
|
25
|
+
The spec-first loop is enforced by the `rqml` CLI (npm: `@rqml/cli`; the `@rqml/mcp` server exposes the same engine as agent tools):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
rqml check # deterministic gate: validation + coverage + drift (exit 0 = pass)
|
|
29
|
+
rqml status # re-anchor: spec, coverage, and drift state
|
|
30
|
+
rqml show <REQ-ID> # one requirement: statement, acceptance criteria, trace neighborhood
|
|
31
|
+
rqml impact <ID> # what is affected, transitively, if this artifact changes
|
|
32
|
+
rqml link <REQ-ID> <path> # record an implements edge + drift baseline (--type verifiedBy for tests)
|
|
33
|
+
rqml skeleton <kind> # schema-valid snippet: req | edge | testCase | stateMachine
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Run `rqml status` when you start a session to re-anchor on the spec. Run `rqml check` before finishing any task — it must exit 0.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
23
40
|
## Core Principle: Spec-First Development
|
|
24
41
|
|
|
25
42
|
```
|
|
@@ -43,10 +60,19 @@ Ask clarifying questions until you understand the goal, scope, acceptance criter
|
|
|
43
60
|
- Get developer confirmation before proceeding
|
|
44
61
|
|
|
45
62
|
### 3. Implement
|
|
46
|
-
|
|
63
|
+
Read the requirement first: `rqml show REQ-XXX`. Check blast radius before changing existing artifacts: `rqml impact REQ-XXX`. If you discover missing requirements, stop and add them to the spec first. After implementing, record the trace link:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
rqml link REQ-XXX src/path/to/implementation.ts
|
|
67
|
+
```
|
|
47
68
|
|
|
48
69
|
### 4. Verify
|
|
49
|
-
Add tests that reference requirement IDs
|
|
70
|
+
Add tests that reference requirement IDs, then record verification:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
rqml link REQ-XXX test/path/to/test.ts --type verifiedBy
|
|
74
|
+
rqml check # must exit 0 before you are done
|
|
75
|
+
```
|
|
50
76
|
|
|
51
77
|
---
|
|
52
78
|
|
|
@@ -91,15 +117,14 @@ For PRs and commits:
|
|
|
91
117
|
|
|
92
118
|
The `.rqml` file must remain valid XML conforming to the version of RQML referenced in the version attribute in the spec document.
|
|
93
119
|
|
|
94
|
-
**To validate:**
|
|
120
|
+
**To validate:** Use the toolchain — it validates offline against the bundled schema and also checks referential integrity the XSD alone cannot enforce:
|
|
95
121
|
```bash
|
|
96
|
-
|
|
122
|
+
rqml validate
|
|
97
123
|
```
|
|
98
124
|
|
|
99
|
-
If
|
|
125
|
+
If the `rqml` CLI is not installed, `npx @rqml/cli validate` works without installation. As a last resort, xmllint (pre-installed on macOS/Linux) checks XSD validity only:
|
|
100
126
|
```bash
|
|
101
|
-
|
|
102
|
-
python -c "from lxml import etree; s=etree.XMLSchema(etree.parse('https://rqml.org/schema/rqml-2.1.0.xsd')); print('Valid' if s.validate(etree.parse('<rqml-file-name>')) else s.error_log)"
|
|
127
|
+
xmllint --schema https://rqml.org/schema/rqml-2.1.0.xsd <rqml-file-name> --noout
|
|
103
128
|
```
|
|
104
129
|
|
|
105
130
|
**IDE validation:** If the `.rqml` file includes `xsi:schemaLocation`, XML-aware editors (VS Code with XML extension, IntelliJ) validate automatically.
|