@suss/intent-ir 0.33.0 → 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 +6 -6
- package/dist/index.cjs +543 -214
- package/dist/index.d.cts +364 -104
- package/dist/index.d.ts +364 -104
- package/dist/index.js +516 -198
- package/package.json +3 -3
- package/schema/intent-doc.schema.json +430 -0
package/README.md
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
Part of [suss](https://github.com/nimbuscloud-ai/suss), which reads both sides of every call in a repository and says where the two disagree.
|
|
4
4
|
|
|
5
|
-
The team
|
|
5
|
+
The team writes this side: what the code was *meant* to do, in a form that pairs against the derived `BehavioralSummary` of what it *does*.
|
|
6
6
|
|
|
7
7
|
## What this package is
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
It defines two kinds of document, told apart by `kind`. Both build on `@suss/ir-core`, so intent and behaviour describe boundaries the same way:
|
|
10
10
|
|
|
11
|
-
- **System intent** (`kind: boundary`)
|
|
12
|
-
- **Outcome intent** (`kind: prd`)
|
|
11
|
+
- **System intent** (`kind: boundary`) describes what one boundary should do, as named outcomes. The boundary is REST, function-call, message-bus, storage or unit-invocation, and every field of one comes off the `@suss/ir-core` schema for that protocol.
|
|
12
|
+
- **Outcome intent** (`kind: prd`) is a set of human `when` / `expect` scenarios. Each has an optional `link` to a system-intent outcome (`<intent-name>.<outcome-id>`). A scenario with no `link` is valid. It reads fully, and nobody has linked it to an outcome yet.
|
|
13
13
|
|
|
14
14
|
## Where it fits in suss
|
|
15
15
|
|
|
16
|
-
It is a peer of `@suss/behavioral-ir
|
|
16
|
+
It is a peer of `@suss/behavioral-ir`, and both build on `@suss/ir-core`. Readers such as `@suss/contract-intent` parse files into `IntentDoc` and call `intentDocToSummary`. The checker then pairs the result against derived code summaries.
|
|
17
17
|
|
|
18
18
|
## Status
|
|
19
19
|
|
|
20
20
|
v0: REST, function-call, message-bus, storage and unit-invocation system intent, effects as outcomes, PRD outcome intent with optional links. GraphQL, runtime-config and metric boundaries have no block yet.
|
|
21
21
|
|
|
22
|
-
The file format is also published as a [JSON Schema](schema/intent-doc.schema.json), generated from the zod schemas at build time
|
|
22
|
+
The file format is also published as a [JSON Schema](schema/intent-doc.schema.json), generated from the zod schemas at build time. An editor can check a document against it, and a tool in another language can read one without depending on this package. [Intent format](../../docs/reference/intent-format.md) goes through both document kinds field by field.
|
|
23
23
|
|
|
24
24
|
## More
|
|
25
25
|
|