@ivorycanvas/qamap 0.3.5 → 0.4.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/CHANGELOG.md +49 -0
- package/README.md +37 -23
- package/dist/agent-init.js +2 -2
- package/dist/agent-init.js.map +1 -1
- package/dist/behavior-intent.d.ts +6 -0
- package/dist/behavior-intent.js +183 -0
- package/dist/behavior-intent.js.map +1 -0
- package/dist/behavior-manifest.d.ts +6 -0
- package/dist/behavior-manifest.js +221 -0
- package/dist/behavior-manifest.js.map +1 -0
- package/dist/behavior.d.ts +151 -0
- package/dist/behavior.js +458 -0
- package/dist/behavior.js.map +1 -0
- package/dist/change-intent.d.ts +81 -0
- package/dist/change-intent.js +884 -0
- package/dist/change-intent.js.map +1 -0
- package/dist/cli.js +13 -8
- package/dist/cli.js.map +1 -1
- package/dist/e2e.d.ts +16 -1
- package/dist/e2e.js +290 -25
- package/dist/e2e.js.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/qa.d.ts +1 -0
- package/dist/qa.js +293 -88
- package/dist/qa.js.map +1 -1
- package/dist/terminal.js +1 -1
- package/dist/terminal.js.map +1 -1
- package/dist/test-plan.d.ts +18 -0
- package/dist/test-plan.js +123 -13
- package/dist/test-plan.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/adoption.md +11 -10
- package/docs/agent-format.md +16 -10
- package/docs/agent-skill.md +8 -5
- package/docs/architecture.md +131 -0
- package/docs/benchmarking.md +23 -4
- package/docs/commands.md +13 -7
- package/docs/e2e-output-examples.md +29 -28
- package/docs/quickstart-demo.md +29 -17
- package/docs/release-validation.md +49 -6
- package/docs/releasing.md +26 -3
- package/docs/roadmap.md +20 -10
- package/package.json +4 -2
- package/schema/qamap-agent.schema.json +122 -3
- package/schema/qamap-behavior.schema.json +339 -0
- package/skills/qamap-pr-qa/SKILL.md +20 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.4.1 - 2026-07-13
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added head-side diff hunk provenance to change-intent evidence. Scenario sources can now identify renamed paths, exact line ranges, symbols, and hunk headers without uploading source or calling an LLM.
|
|
10
|
+
- Added base-side evidence for removed lines and deleted files. Removed guards and validation now produce a source-linked critical QA scenario instead of disappearing from the change lifecycle.
|
|
11
|
+
- Added `direct`, `supporting`, and `contextual` evidence relations. Context-only scenarios stay low-confidence and cannot be promoted to critical without a located diff source.
|
|
12
|
+
- Capped the complete `qa --format agent` line at 8KB. Large PRs preserve the strongest evidence first and disclose total and omitted intent/flow counts plus compaction metadata.
|
|
13
|
+
- Added scenario-level confidence and review requirements to Markdown, JSON, Behavior Graph evidence, and the additive `qamap.qa` v1 agent contract. Agent output keeps the existing string evidence field and adds compact structured `sources` for intent and scenario review.
|
|
14
|
+
- Added benchmark trace contracts. The web and mobile lifecycle fixtures now fail CI when a critical QA scenario lacks an exact diff file and line source; the benchmark table reports scenario trace coverage.
|
|
15
|
+
- Documented the repository collaboration contract for branch names, Conventional Commits, PR titles, assignment, labels, squash merges, and canonical `vX.Y.Z` release tags.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- `qamap qa` now keeps Playwright, Maestro, and manual setup in a final opt-in automation section. The primary report focuses on change intent, behavior lifecycle, scenario rationale, evidence locations, uncertainty, and PR review actions; missing runner setup is no longer presented as required QA evidence.
|
|
20
|
+
- The README, quick start, agent skill, agent schema contract, output examples, and benchmark guide now describe the evidence-first QA loop. Install and first-run guidance starts with `qa` and `qa --format agent`; E2E draft and setup commands follow only after a scenario and adapter are accepted.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Structured agent evidence no longer discards file, symbol, line, rename, or hunk provenance when compacting change-intent results.
|
|
25
|
+
- Test-light repositories no longer receive runner installation as the default next step from `qamap qa`; repository validation remains prominent and executable draft generation remains available through explicit `qamap e2e` commands.
|
|
26
|
+
- State updates no longer fabricate scheduling QA because `date` matched inside `update`, and `navigation.setOptions` no longer fabricates destination-routing QA. A branch with no diff now returns no affected flow or automation handoff from `qamap qa` instead of inventing an app-launch smoke flow.
|
|
27
|
+
|
|
28
|
+
## 0.4.0 - 2026-07-12
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Added the first framework-neutral Behavior Graph contract with stable content-derived node and edge ids, evidence provenance, direct and propagated impact, deterministic graph merging, adapter diagnostics, and an analyzer adapter interface for future language and framework support.
|
|
33
|
+
- Added a compatibility adapter that maps existing inferred flows, entrypoints, steps, assertions, selectors, fixtures, and changed source files into the graph.
|
|
34
|
+
- Added a verification-manifest Behavior Graph adapter. Matched domains, flows, checks, routes, selectors, and source files now retain reviewed manifest provenance and package-scoped impact inside the graph.
|
|
35
|
+
- Added deterministic Change Intent analysis. Behavior-bearing commits are grouped by normalized product evidence, connected to added diff symbols, assigned confidence and review requirements, and converted into ordered trigger, condition, action, state-change, side-effect, and observable-outcome lifecycles.
|
|
36
|
+
- Added runner-independent primary, failure, boundary, and state-transition QA scenarios derived from each lifecycle. Medium- and high-confidence intent now replaces generic `primary journey` and `smoke flow` candidates before Playwright, Maestro, or manual draft compilation.
|
|
37
|
+
- Added the `qamap.change-intent` Behavior Graph adapter with commit provenance, intent contracts, lifecycle nodes, scenario assertions, source links, and direct or propagated impact.
|
|
38
|
+
- Added Change Intent, lifecycle, and QA scenarios to Markdown, JSON, dry-run, and the additive `qamap.qa` agent format contract.
|
|
39
|
+
- Added public Vue and SvelteKit branch fixtures that require changed selectors, success signals, exact routes, draft paths, and Behavior Graph node kinds to remain useful without React-specific assumptions.
|
|
40
|
+
- Added synthetic web preferences and mobile reminder lifecycle benchmarks. The public matrix now rejects generic titles and directly requires intent names, lifecycle stages, QA scenario axes, commit-backed graph nodes, selectors, outcomes, and draft paths.
|
|
41
|
+
- Added a shipped Behavior Graph JSON Schema and exported runtime enum constants so local consumers and future adapters can validate graph version 1 without an LLM or cloud service.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- Human reports now present change intent and QA design before runner setup. Playwright, Maestro, and manual output are labeled automation adapters rather than the primary recommendation.
|
|
46
|
+
- Documented the architecture and conservative pre-1.0 version policy: compatible analyzer and adapter improvements remain patch work, while the next minor is reserved for explicit temporary execution and normalized evidence.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- Test and benchmark fixtures no longer make a CLI repository look like a design-token or data-catalog project, and a real `package.json` bin entry takes precedence over incidental artifact files.
|
|
51
|
+
- SvelteKit convention files such as `+page.svelte` now resolve to their containing route (`/settings`) instead of adding a false `/page` segment.
|
|
52
|
+
- Language syntax such as TypeScript `export` and `async` no longer contaminates intent clustering or lifecycle state inference, and ordinary web click handlers no longer fabricate external entry-payload scenarios.
|
|
53
|
+
|
|
5
54
|
## 0.3.5 - 2026-07-11
|
|
6
55
|
|
|
7
56
|
### Added
|
package/README.md
CHANGED
|
@@ -4,36 +4,46 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@ivorycanvas/qamap)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
**A local-
|
|
7
|
+
**A local, zero-LLM PR QA designer. QAMap turns commit intent and code diffs into evidence-backed behavior lifecycles, missing QA, and deterministic automation drafts. No cloud. No source upload. No token.**
|
|
8
8
|
|
|
9
|
-
QAMap reads git changes, project structure,
|
|
9
|
+
QAMap reads commit subjects and bodies, git changes, project structure, selectors, existing tests, and optional repo QA memory, then answers the question every reviewer asks: *"What behavior did this PR intend to change, how does that behavior move through the product, and what should we verify before merge?"* Playwright, Maestro, and manual checklists are output adapters after that judgment, not the product recommendation itself.
|
|
10
10
|
|
|
11
11
|
```txt
|
|
12
|
-
PR diff
|
|
12
|
+
PR commits + diff
|
|
13
13
|
-> qamap qa
|
|
14
|
-
->
|
|
14
|
+
-> change intent + behavior lifecycle + QA scenarios + missing evidence
|
|
15
|
+
-> optional Playwright / Maestro / manual draft
|
|
15
16
|
|
|
16
17
|
Optional team memory (.qamap/manifest.yaml)
|
|
17
18
|
-> sharper recommendations on every future PR
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
## 30-Second
|
|
21
|
+
## 30-Second QA Pass
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
Run one read-only command on a branch. A manifest and test runner are not required:
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
```sh
|
|
26
|
+
pnpm dlx @ivorycanvas/qamap qa . --base origin/main --head HEAD
|
|
27
|
+
```
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
The report starts with the inferred behavior and keeps each proposed scenario connected to the commit or exact base/head diff line that caused it. Removed guards and validation remain visible as base-side evidence; each source is labeled `direct`, `supporting`, or `contextual` (trimmed from the committed lifecycle benchmark):
|
|
27
30
|
|
|
28
31
|
```txt
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
32
|
+
Change intent: Submit notification preferences and show the saved state [high]
|
|
33
|
+
Behavior lifecycle: trigger -> state-change -> side-effect -> observable-outcome
|
|
34
|
+
|
|
35
|
+
QA scenarios:
|
|
36
|
+
- [critical] changed preference lifecycle (confidence: high)
|
|
37
|
+
- Source: src/pages/preferences.tsx:17, symbol onClick [supporting, head]
|
|
38
|
+
- Source: src/pages/preferences.tsx:8, symbol setSaved [supporting, head]
|
|
39
|
+
- Assert: the saved state becomes observable
|
|
40
|
+
- [recommended] failure, timeout, and retry handling (confidence: medium; review required)
|
|
41
|
+
- Source: src/pages/preferences.tsx:7, symbol fetch [supporting, head]
|
|
42
|
+
- Assert: retries do not duplicate requests or side effects
|
|
43
|
+
|
|
44
|
+
Optional automation:
|
|
45
|
+
- Adapter candidate: Playwright
|
|
46
|
+
- qamap e2e draft . --base origin/main --head HEAD
|
|
37
47
|
```
|
|
38
48
|
|
|
39
49
|
## Install & Quick Start
|
|
@@ -42,12 +52,14 @@ Requires Node.js 20 or newer. Inside a repository whose default branch is `origi
|
|
|
42
52
|
|
|
43
53
|
```sh
|
|
44
54
|
pnpm dlx @ivorycanvas/qamap qa # what should this branch prove before merge?
|
|
45
|
-
pnpm dlx @ivorycanvas/qamap
|
|
55
|
+
pnpm dlx @ivorycanvas/qamap qa --format agent # compact evidence for a coding agent or PR workflow
|
|
46
56
|
pnpm dlx @ivorycanvas/qamap manifest init # optional: save reviewed team QA memory for sharper future runs
|
|
47
57
|
```
|
|
48
58
|
|
|
49
59
|
Pass `--base <ref> --head <ref>` for anything non-standard. Run bare `qamap` for a start-here guide, `qamap help` for the full reference, and see the [command reference](docs/commands.md) for every command and output shape.
|
|
50
60
|
|
|
61
|
+
After a reviewer accepts a scenario, automation is an explicit opt-in. `qamap e2e draft` can produce a Playwright, Maestro, or manual draft; `qamap e2e setup` proposes missing runner files only when the team chooses that adapter.
|
|
62
|
+
|
|
51
63
|
## For Coding Agents
|
|
52
64
|
|
|
53
65
|
Stop re-explaining the same QA context to your agent on every PR:
|
|
@@ -56,11 +68,12 @@ Stop re-explaining the same QA context to your agent on every PR:
|
|
|
56
68
|
qamap qa --format agent
|
|
57
69
|
```
|
|
58
70
|
|
|
59
|
-
One minified JSON object (`schema: qamap.qa
|
|
71
|
+
One minified JSON object (`schema: qamap.qa`) with change intents, lifecycle stages, QA scenarios, structured diff sources, affected flows, and required evidence. The complete line stays at or below 8KB; total and omitted intent/flow counts remain visible when lower-priority detail is compacted. It carries the decision content of the full report at a fraction of the context cost. The shape is a documented, versioned contract: [agent format contract](docs/agent-format.md). To make agents run this themselves, run `qamap init --agent` once: it adds a Pre-PR QA section to `AGENTS.md` and installs the packaged skill ([skills/qamap-pr-qa/SKILL.md](skills/qamap-pr-qa/SKILL.md)) into `.claude/skills/`. Details: [agent skill guide](docs/agent-skill.md).
|
|
60
72
|
|
|
61
73
|
## Why QAMap
|
|
62
74
|
|
|
63
|
-
- **
|
|
75
|
+
- **Intent and lifecycle before runner choice.** QAMap groups behavior-bearing commits, connects them to diff symbols, and proposes success, failure, boundary, and state-transition QA before selecting an automation adapter.
|
|
76
|
+
- **Judgment first, generation second.** Deciding *what deserves testing* for a given change is the missing layer. QAMap makes that judgment statically, deterministically, and locally for free.
|
|
64
77
|
- **The repo remembers.** Team QA knowledge lives in `.qamap/manifest.yaml`, reviewed once and reused on every PR — instead of re-prompting an agent each session.
|
|
65
78
|
- **Honest output.** Drafts state what blocks them from being trusted; changed endpoints are observed, never mocked away; generated specs never assert what cannot pass. Configuration, docs, generated artifacts, and changed tests stay in verification mode instead of fabricating a product-journey E2E.
|
|
66
79
|
|
|
@@ -69,15 +82,15 @@ Positioning against recorders, LLM test generation, and impact-analysis tools: [
|
|
|
69
82
|
<details>
|
|
70
83
|
<summary>한국어 소개</summary>
|
|
71
84
|
|
|
72
|
-
QAMap는
|
|
85
|
+
QAMap는 PR을 리뷰하기 전에 로컬에서 실행하는 zero-LLM QA 설계 CLI입니다.
|
|
73
86
|
|
|
74
|
-
PR diff
|
|
87
|
+
PR 커밋 의도와 diff, repo 구조를 읽고 변경 의도, 기능 생명주기, 정상·실패·경계·상태 전환 QA, 부족한 fixture/selector/assertion 근거를 정리합니다. 그 다음 기존 테스트 환경에 맞춰 Playwright, Maestro 또는 수동 체크리스트 초안을 제시합니다. 클라우드나 LLM 토큰을 쓰지 않습니다.
|
|
75
88
|
|
|
76
89
|
```sh
|
|
77
90
|
pnpm dlx @ivorycanvas/qamap qa . --base origin/main --head HEAD
|
|
78
91
|
```
|
|
79
92
|
|
|
80
|
-
에이전트에게 넘길 때는 `--format agent`를 붙이면 같은 판단 내용을
|
|
93
|
+
에이전트에게 넘길 때는 `--format agent`를 붙이면 같은 판단 내용을 압축된 JSON으로 받을 수 있어, 매 세션 repo 탐색에 토큰을 반복해서 쓰지 않아도 됩니다.
|
|
81
94
|
|
|
82
95
|
목표는 거대한 QA 플랫폼이 아니라, 유지보수자가 매번 에이전트에게 프로젝트 맥락과 검증 방법을 다시 설명하느라 쓰는 시간을 줄여주는 작고 선명한 도구입니다. Manifest 없이 바로 시작하고, 반복해서 틀리는 추천은 `.qamap/manifest.yaml`에 팀의 QA 언어로 보정해 향후 PR 추천을 개선합니다.
|
|
83
96
|
|
|
@@ -97,8 +110,9 @@ pnpm dlx @ivorycanvas/qamap qa . --base origin/main --head HEAD
|
|
|
97
110
|
| [Configuration](docs/configuration.md) | `qamap.config.json` policy options |
|
|
98
111
|
| [GitHub Action](docs/github-action.md) | PR annotations, summaries, and comments in CI |
|
|
99
112
|
| [Benchmarking](docs/benchmarking.md) | Scoring output quality against pinned repositories |
|
|
113
|
+
| [Architecture](docs/architecture.md) | Behavior Graph, adapter boundaries, execution safety, and migration order |
|
|
100
114
|
| [Roadmap](docs/roadmap.md) | Where this is going |
|
|
101
115
|
|
|
102
116
|
## Project Status
|
|
103
117
|
|
|
104
|
-
QAMap is early and pre-`1.0`; the public API may change. Issues and pull requests are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). QAMap does not replace review, tests, or security tooling; it removes the blank-page work that makes teams skip good verification.
|
|
118
|
+
QAMap is early and pre-`1.0`; the public API may change. Issues and pull requests are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). QAMap does not replace review, tests, or security tooling; it removes the blank-page work that makes teams skip good verification. AI-assisted PRs are an important use case, not a requirement.
|
package/dist/agent-init.js
CHANGED
|
@@ -29,9 +29,9 @@ export function buildAgentQaSection(dlxCommand) {
|
|
|
29
29
|
`${dlxCommand} qa . --base origin/main --head HEAD --format agent`,
|
|
30
30
|
"```",
|
|
31
31
|
"",
|
|
32
|
-
"-
|
|
32
|
+
"- Read `intents[].scenarios[].sources` first: each accepted scenario should point to a commit or exact diff file and line.",
|
|
33
33
|
"- Address every `requiredEvidence` item before handing the pull request to a human.",
|
|
34
|
-
"-
|
|
34
|
+
"- Treat `automation` as opt-in. Generate or set up an E2E adapter only after the scenario and source evidence are accepted.",
|
|
35
35
|
"- Treat the result as QA planning evidence, not as proof that browser, device, or manual QA passed.",
|
|
36
36
|
"- The full agent workflow lives in `.claude/skills/qamap-pr-qa/SKILL.md` when installed via `qamap init --agent`.",
|
|
37
37
|
SECTION_END,
|
package/dist/agent-init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-init.js","sourceRoot":"","sources":["../src/agent-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAgBjD,MAAM,aAAa,GAAG,4BAA4B,CAAC;AACnD,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAC/C,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AAC3E,MAAM,0BAA0B,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AAE7F,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,SAAiB,EAAE,UAA+B,EAAE;IACvF,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,GAAG,UAAU,qDAAqD,CAAC;IAEvF,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,KAAK,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AAE,CAAC,CAAC;IACrE,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,6GAA6G,CAAC,CAAC;IAC1H,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC/B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type BehaviorAnalyzerAdapter } from "./behavior.js";
|
|
2
|
+
import type { ChangeIntentAnalysis } from "./change-intent.js";
|
|
3
|
+
export interface ChangeIntentBehaviorAdapterOptions {
|
|
4
|
+
analysis: ChangeIntentAnalysis;
|
|
5
|
+
}
|
|
6
|
+
export declare function createChangeIntentBehaviorAdapter(options: ChangeIntentBehaviorAdapterOptions): BehaviorAnalyzerAdapter;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { createBehaviorEdge, createBehaviorNodeId, } from "./behavior.js";
|
|
2
|
+
export function createChangeIntentBehaviorAdapter(options) {
|
|
3
|
+
return {
|
|
4
|
+
id: "qamap.change-intent",
|
|
5
|
+
version: "1",
|
|
6
|
+
detect: () => ({
|
|
7
|
+
confidence: detectionConfidence(options.analysis.intents),
|
|
8
|
+
reason: options.analysis.intents.length > 0
|
|
9
|
+
? "Behavior-bearing commit and diff evidence produced runner-independent change intents."
|
|
10
|
+
: "No behavior-bearing change intent was available.",
|
|
11
|
+
evidence: options.analysis.intents.slice(0, 8).map((intent) => intent.title),
|
|
12
|
+
}),
|
|
13
|
+
analyze: (context) => buildChangeIntentFragment(context, options.analysis.intents),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function buildChangeIntentFragment(context, intents) {
|
|
17
|
+
const nodes = [];
|
|
18
|
+
const edges = [];
|
|
19
|
+
const changedFiles = new Set(context.changedFiles.map((file) => file.path));
|
|
20
|
+
for (const intent of intents) {
|
|
21
|
+
const confidence = behaviorConfidence(intent.confidence);
|
|
22
|
+
const intentFiles = uniqueStrings(intent.files);
|
|
23
|
+
const directlyChangedFiles = intentFiles.filter((file) => changedFiles.has(file));
|
|
24
|
+
const impactFiles = directlyChangedFiles.length > 0
|
|
25
|
+
? directlyChangedFiles
|
|
26
|
+
: context.changedFiles.map((file) => file.path).slice(0, 12);
|
|
27
|
+
const contractId = createBehaviorNodeId("contract", "change-intent", intent.id);
|
|
28
|
+
nodes.push({
|
|
29
|
+
id: contractId,
|
|
30
|
+
kind: "contract",
|
|
31
|
+
label: intent.title,
|
|
32
|
+
confidence,
|
|
33
|
+
evidence: intent.evidence.map(toBehaviorEvidence),
|
|
34
|
+
attributes: {
|
|
35
|
+
contractType: "change-intent",
|
|
36
|
+
intentId: intent.id,
|
|
37
|
+
summary: intent.summary,
|
|
38
|
+
reviewRequired: intent.reviewRequired,
|
|
39
|
+
commitCount: intent.commits.length,
|
|
40
|
+
},
|
|
41
|
+
impact: impactFiles.length > 0
|
|
42
|
+
? {
|
|
43
|
+
kind: directlyChangedFiles.length > 0 ? "direct" : "propagated",
|
|
44
|
+
changedFiles: uniqueStrings(impactFiles),
|
|
45
|
+
}
|
|
46
|
+
: undefined,
|
|
47
|
+
});
|
|
48
|
+
for (const file of intentFiles) {
|
|
49
|
+
const sourceId = createBehaviorNodeId("source", file);
|
|
50
|
+
const direct = changedFiles.has(file);
|
|
51
|
+
nodes.push({
|
|
52
|
+
id: sourceId,
|
|
53
|
+
kind: "source",
|
|
54
|
+
label: file,
|
|
55
|
+
confidence: "high",
|
|
56
|
+
evidence: [{ kind: direct ? "diff" : "source", value: file, file }],
|
|
57
|
+
attributes: { path: file },
|
|
58
|
+
impact: direct ? { kind: "direct", changedFiles: [file] } : undefined,
|
|
59
|
+
});
|
|
60
|
+
edges.push(direct
|
|
61
|
+
? createBehaviorEdge("impacts", sourceId, contractId, "high", [{ kind: "diff", value: file, file }])
|
|
62
|
+
: createBehaviorEdge("implemented-by", contractId, sourceId, "medium", [{ kind: "source", value: file, file }]));
|
|
63
|
+
}
|
|
64
|
+
let previousStageId;
|
|
65
|
+
intent.lifecycle.forEach((stage, index) => {
|
|
66
|
+
const stageKind = nodeKindForLifecycle(stage);
|
|
67
|
+
const stageId = createBehaviorNodeId(stageKind, "change-intent", intent.id, stage.id);
|
|
68
|
+
const stageFiles = uniqueStrings([
|
|
69
|
+
...stage.files,
|
|
70
|
+
...stage.evidence.map((item) => item.file).filter((file) => Boolean(file)),
|
|
71
|
+
]);
|
|
72
|
+
nodes.push({
|
|
73
|
+
id: stageId,
|
|
74
|
+
kind: stageKind,
|
|
75
|
+
label: stage.label,
|
|
76
|
+
confidence: behaviorConfidence(stage.confidence),
|
|
77
|
+
evidence: stage.evidence.map(toBehaviorEvidence),
|
|
78
|
+
attributes: {
|
|
79
|
+
intentId: intent.id,
|
|
80
|
+
lifecyclePhase: stage.kind,
|
|
81
|
+
order: index + 1,
|
|
82
|
+
},
|
|
83
|
+
impact: stageFiles.length > 0
|
|
84
|
+
? { kind: "direct", changedFiles: stageFiles }
|
|
85
|
+
: impactFiles.length > 0
|
|
86
|
+
? { kind: "propagated", changedFiles: uniqueStrings(impactFiles) }
|
|
87
|
+
: undefined,
|
|
88
|
+
});
|
|
89
|
+
edges.push(createBehaviorEdge(stage.kind === "observable-outcome" ? "expects" : "contains", contractId, stageId, behaviorConfidence(stage.confidence), stage.evidence.map(toBehaviorEvidence)));
|
|
90
|
+
if (previousStageId) {
|
|
91
|
+
edges.push(createBehaviorEdge("precedes", previousStageId, stageId, behaviorConfidence(stage.confidence)));
|
|
92
|
+
}
|
|
93
|
+
previousStageId = stageId;
|
|
94
|
+
for (const file of stageFiles) {
|
|
95
|
+
const sourceId = createBehaviorNodeId("source", file);
|
|
96
|
+
if (intentFiles.includes(file)) {
|
|
97
|
+
edges.push(createBehaviorEdge("implemented-by", stageId, sourceId, "high", [
|
|
98
|
+
{ kind: changedFiles.has(file) ? "diff" : "source", value: file, file },
|
|
99
|
+
]));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
for (const scenario of intent.scenarios) {
|
|
104
|
+
for (const [assertionIndex, assertion] of scenario.assertions.entries()) {
|
|
105
|
+
const assertionId = createBehaviorNodeId("assertion", "change-intent", intent.id, scenario.id, String(assertionIndex), assertion);
|
|
106
|
+
nodes.push({
|
|
107
|
+
id: assertionId,
|
|
108
|
+
kind: "assertion",
|
|
109
|
+
label: assertion,
|
|
110
|
+
confidence: scenario.priority === "critical" ? confidence : "medium",
|
|
111
|
+
evidence: scenario.evidence.map(toBehaviorEvidence),
|
|
112
|
+
attributes: {
|
|
113
|
+
intentId: intent.id,
|
|
114
|
+
scenarioId: scenario.id,
|
|
115
|
+
scenarioKind: scenario.kind,
|
|
116
|
+
scenarioTitle: scenario.title,
|
|
117
|
+
priority: scenario.priority,
|
|
118
|
+
scenarioConfidence: scenario.confidence ?? "low",
|
|
119
|
+
reviewRequired: scenario.reviewRequired ?? true,
|
|
120
|
+
},
|
|
121
|
+
impact: impactFiles.length > 0
|
|
122
|
+
? { kind: "propagated", changedFiles: uniqueStrings(impactFiles) }
|
|
123
|
+
: undefined,
|
|
124
|
+
});
|
|
125
|
+
edges.push(createBehaviorEdge("expects", contractId, assertionId, scenario.priority === "critical" ? confidence : "medium"));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return { nodes, edges };
|
|
130
|
+
}
|
|
131
|
+
function nodeKindForLifecycle(stage) {
|
|
132
|
+
if (stage.kind === "condition" || stage.kind === "state-change") {
|
|
133
|
+
return "state";
|
|
134
|
+
}
|
|
135
|
+
if (stage.kind === "side-effect") {
|
|
136
|
+
return "effect";
|
|
137
|
+
}
|
|
138
|
+
if (stage.kind === "observable-outcome") {
|
|
139
|
+
return "assertion";
|
|
140
|
+
}
|
|
141
|
+
return "action";
|
|
142
|
+
}
|
|
143
|
+
function toBehaviorEvidence(evidence) {
|
|
144
|
+
if (evidence.kind === "commit") {
|
|
145
|
+
return {
|
|
146
|
+
kind: "commit",
|
|
147
|
+
value: evidence.commit ? `${evidence.commit.slice(0, 12)} ${evidence.value}` : evidence.value,
|
|
148
|
+
commit: evidence.commit,
|
|
149
|
+
relation: evidence.relation,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
kind: evidence.kind,
|
|
154
|
+
value: evidence.symbol ? `${evidence.symbol}: ${evidence.value}` : evidence.value,
|
|
155
|
+
file: evidence.file,
|
|
156
|
+
previousFile: evidence.previousFile,
|
|
157
|
+
symbol: evidence.symbol,
|
|
158
|
+
relation: evidence.relation,
|
|
159
|
+
side: evidence.side,
|
|
160
|
+
startLine: evidence.startLine,
|
|
161
|
+
endLine: evidence.endLine,
|
|
162
|
+
hunkHeader: evidence.hunkHeader,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function detectionConfidence(intents) {
|
|
166
|
+
if (intents.length === 0) {
|
|
167
|
+
return "none";
|
|
168
|
+
}
|
|
169
|
+
if (intents.some((intent) => intent.confidence === "high")) {
|
|
170
|
+
return "high";
|
|
171
|
+
}
|
|
172
|
+
if (intents.some((intent) => intent.confidence === "medium")) {
|
|
173
|
+
return "medium";
|
|
174
|
+
}
|
|
175
|
+
return "low";
|
|
176
|
+
}
|
|
177
|
+
function behaviorConfidence(confidence) {
|
|
178
|
+
return confidence;
|
|
179
|
+
}
|
|
180
|
+
function uniqueStrings(values) {
|
|
181
|
+
return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=behavior-intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"behavior-intent.js","sourceRoot":"","sources":["../src/behavior-intent.ts"],"names":[],"mappings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AAC,MAAM,CAAC,UAAU,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC7D,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,UAAkC;IAC5D,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,aAAa,CAAC,MAAgB;IACrC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type BehaviorAnalyzerAdapter } from "./behavior.js";
|
|
2
|
+
import type { VerificationManifestMatch } from "./manifest.js";
|
|
3
|
+
export interface ManifestBehaviorAdapterOptions {
|
|
4
|
+
matches: VerificationManifestMatch[];
|
|
5
|
+
}
|
|
6
|
+
export declare function createManifestBehaviorAdapter(options: ManifestBehaviorAdapterOptions): BehaviorAnalyzerAdapter;
|