@graphrefly/stack 0.1.0 → 0.1.2
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 +49 -24
- package/dist/assets/contracts/repository/v1/review-bundle.schema.json +49 -0
- package/dist/assets/contracts/repository/v1/review-decision-request.schema.json +15 -0
- package/dist/assets/contracts/repository/v1/review-decision.schema.json +52 -0
- package/dist/assets/contracts/repository/v1/review.schema.json +2 -1
- package/dist/grfs.js +360 -32
- package/dist/review/assets/{abnfDiagram-VRR7QNED-5JVeQ-ZW.js → abnfDiagram-VRR7QNED-DxGYeLns.js} +1 -1
- package/dist/review/assets/{architectureDiagram-ZJ3FMSHR-BnEvDO7X.js → architectureDiagram-ZJ3FMSHR-CoaG1PSB.js} +1 -1
- package/dist/review/assets/{chunk-EX3LRPZG-BrpCa9zr.js → chunk-EX3LRPZG-C1ZhSVKp.js} +1 -1
- package/dist/review/assets/{chunk-MOJQB5TN-BshP08Ez.js → chunk-MOJQB5TN-Ct40HB9X.js} +1 -1
- package/dist/review/assets/{chunk-PUDLZKDR-HkwEqIVB.js → chunk-PUDLZKDR-C2Is490W.js} +1 -1
- package/dist/review/assets/{chunk-V7JOEXUC-CswDacm3.js → chunk-V7JOEXUC-Z3n_IPe-.js} +1 -1
- package/dist/review/assets/{classDiagram-OUVF2IWQ-U8e_ZvC4.js → classDiagram-OUVF2IWQ-BVlewphI.js} +1 -1
- package/dist/review/assets/{classDiagram-v2-EOCWNBFH-U8e_ZvC4.js → classDiagram-v2-EOCWNBFH-BVlewphI.js} +1 -1
- package/dist/review/assets/{cynefinDiagram-TSTJHNR4-CfYu2mB5.js → cynefinDiagram-TSTJHNR4-Cjm1OFIk.js} +1 -1
- package/dist/review/assets/{dagre-VKFMJZFB-BvyihZfA.js → dagre-VKFMJZFB-EvQo1qj2.js} +1 -1
- package/dist/review/assets/{diagram-G47NLZAW-qFNMv5An.js → diagram-G47NLZAW-k0H6Hccx.js} +1 -1
- package/dist/review/assets/{diagram-NH7WQ7WH-CsvacND9.js → diagram-NH7WQ7WH-VUneNb0M.js} +1 -1
- package/dist/review/assets/{diagram-OA4YK3LP-qFtWcyNi.js → diagram-OA4YK3LP-tUGLM6tT.js} +1 -1
- package/dist/review/assets/{diagram-WEI45ONY-C5nYGL8t.js → diagram-WEI45ONY-aN8naqL-.js} +1 -1
- package/dist/review/assets/{ebnfDiagram-CCIWWBDH-D_0nhpry.js → ebnfDiagram-CCIWWBDH-PjAeMUc1.js} +1 -1
- package/dist/review/assets/{erDiagram-Q63AITRT-CIS7hpdK.js → erDiagram-Q63AITRT-CkxN3vs2.js} +1 -1
- package/dist/review/assets/{flowDiagram-23GEKE2U-Df5sjnlg.js → flowDiagram-23GEKE2U-ChS1-2Qo.js} +1 -1
- package/dist/review/assets/index-CUaeHlgA.js +64 -0
- package/dist/review/assets/index-Cfj-JRmr.css +1 -0
- package/dist/review/assets/{infoDiagram-FWYZ7A6U-CT7TZgi6.js → infoDiagram-FWYZ7A6U-CcLr4Fgp.js} +1 -1
- package/dist/review/assets/{ishikawaDiagram-FXEZZL3T-BUpotH7r.js → ishikawaDiagram-FXEZZL3T-p7DbRTIs.js} +1 -1
- package/dist/review/assets/{kanban-definition-HUTT4EX6-e-emfNuh.js → kanban-definition-HUTT4EX6-BgXdqTkK.js} +1 -1
- package/dist/review/assets/{mindmap-definition-LN4V7U3C-ClSEPrvR.js → mindmap-definition-LN4V7U3C-zdfirl2I.js} +1 -1
- package/dist/review/assets/{pegDiagram-2B236MQR-Ck_v89jl.js → pegDiagram-2B236MQR-ScPkpaWR.js} +1 -1
- package/dist/review/assets/{pieDiagram-ENE6RG2P-C63dxyZj.js → pieDiagram-ENE6RG2P-BAQHg9fC.js} +1 -1
- package/dist/review/assets/{railroadDiagram-RFXS5EU6-DYI7CPMt.js → railroadDiagram-RFXS5EU6-DV8AQwDM.js} +1 -1
- package/dist/review/assets/{requirementDiagram-TGXJPOKE-BMW46SXM.js → requirementDiagram-TGXJPOKE-CnPqfxpt.js} +1 -1
- package/dist/review/assets/{sequenceDiagram-DBY2YBRQ-DVtyVuxr.js → sequenceDiagram-DBY2YBRQ-Bl7q6mbL.js} +1 -1
- package/dist/review/assets/{stateDiagram-2N3HPSRC-BM1s-zUo.js → stateDiagram-2N3HPSRC-iIZcI3Ny.js} +1 -1
- package/dist/review/assets/{stateDiagram-v2-6OUMAXLB-BEfolAkc.js → stateDiagram-v2-6OUMAXLB-Ct4036z_.js} +1 -1
- package/dist/review/assets/{swimlanes-5IMT3BWC-Bnu9mzxz.js → swimlanes-5IMT3BWC-DQR9TtlF.js} +1 -1
- package/dist/review/assets/{swimlanesDiagram-G3AALYLV-DlNNBK53.js → swimlanesDiagram-G3AALYLV-LS62ia1i.js} +1 -1
- package/dist/review/assets/{timeline-definition-FHXFAJF6-CwlO71Lp.js → timeline-definition-FHXFAJF6-Dm738Pbf.js} +1 -1
- package/dist/review/assets/{vennDiagram-L72KCM5P-DZxbcc_O.js → vennDiagram-L72KCM5P-DBxm9_YT.js} +1 -1
- package/dist/review/assets/{wardleyDiagram-EHGQE667-DGQto3hn.js → wardleyDiagram-EHGQE667-CKwVekAc.js} +1 -1
- package/dist/review/assets/{xychartDiagram-FW5EYKEG-BfD1lSXX.js → xychartDiagram-FW5EYKEG-TVh8_sN-.js} +1 -1
- package/dist/review/index.html +2 -2
- package/package.json +1 -1
- package/dist/review/assets/index-Bt3i8n39.css +0 -1
- package/dist/review/assets/index-CqjR4YYp.js +0 -64
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
**Semantic stacked diffs that know when their architectural assumptions expire.**
|
|
4
4
|
|
|
5
5
|
GraphReFly Stack is an OpenAI Build Week developer tool built with Codex, GPT-5.6, Git, and
|
|
6
|
-
GraphReFly.
|
|
7
|
-
|
|
8
|
-
deterministic `GateResult`.
|
|
6
|
+
GraphReFly. Its generic local review binds every stacked commit to the GraphBlueprint generated at
|
|
7
|
+
that Git object and its exact parent diff. Repositories that adopt semantic change records can also
|
|
8
|
+
bind allowed source scopes, dependency claims, required checks, and a deterministic `GateResult`.
|
|
9
9
|
|
|
10
10
|
Git can report a clean rebase while an agent-generated change is no longer valid under the
|
|
11
11
|
architecture it was planned against. GraphReFly Stack makes that mismatch visible, keeps unaffected
|
|
@@ -15,38 +15,59 @@ decides validity.
|
|
|
15
15
|
## Install and review a GraphReFly repository
|
|
16
16
|
|
|
17
17
|
Requirements: macOS or Linux, Node.js 24, pnpm 11.7, and Git. The CLI and local web review shell use
|
|
18
|
-
no hosted service, database, or credentials.
|
|
19
|
-
|
|
18
|
+
no hosted service, database, or credentials. Install it in the GraphReFly repository you want to
|
|
19
|
+
review:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
pnpm add -D @graphrefly/stack
|
|
23
23
|
pnpm exec grfs init --graph-module src/application-graph.ts
|
|
24
|
-
git add .graphrefly-stack.json graphrefly-stack.blueprint.mjs
|
|
25
|
-
git commit -m "configure GraphReFly Stack"
|
|
26
24
|
|
|
27
25
|
BASE=<the commit immediately before your stack>
|
|
28
26
|
pnpm exec grfs review --repo . --base "$BASE" --head HEAD
|
|
29
27
|
```
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
The review command stays running and prints its loopback URL; it does not launch a browser
|
|
30
|
+
automatically. Open the printed URL (normally <http://127.0.0.1:4173>), then:
|
|
32
31
|
|
|
33
32
|
1. Select each commit discovered from the real linear Git range.
|
|
34
33
|
2. See the Blueprint and parent delta produced by the repository's installed GraphReFly 0.3.x
|
|
35
34
|
runtime.
|
|
36
35
|
3. Verify that commit OID, Blueprint hash, upstream Mermaid diagram, delta events, and split code diff
|
|
37
36
|
move together.
|
|
38
|
-
4.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
`.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
4. Use **Review changes** to record Approve or Request changes for the exact commit and Blueprint.
|
|
38
|
+
5. Open **Help** for the Git → Blueprint delta → code diff relationship, and expand **Technical
|
|
39
|
+
details** only when troubleshooting runtime or immutable identities.
|
|
40
|
+
|
|
41
|
+
Local review decisions and their summaries are strict immutable records under the repository's Git
|
|
42
|
+
common directory at `.git/grfs/reviews`; they never appear in `git status`, change source files, or
|
|
43
|
+
update Git refs. The Technical details disclosure offers an explicit portable review export after a
|
|
44
|
+
decision exists. That content-hashed bundle is the explicit sharing boundary for another reviewer or
|
|
45
|
+
CI. A future hosted GraphReFly Stack can wrap selected exported artifacts in its policy-redacted
|
|
46
|
+
upload envelope; this release neither treats the local export as upload-ready nor uploads review
|
|
47
|
+
state automatically.
|
|
48
|
+
|
|
49
|
+
`--graph-module` means the repository's root Graph construction module, not the only Graph module
|
|
50
|
+
allowed in the repository. That root module may import, compose, and mount any number of Graphs and
|
|
51
|
+
subgraphs. The first version reviews one configured root Blueprint target at a time; selecting among
|
|
52
|
+
multiple independent application roots in a monorepo is roadmap work.
|
|
53
|
+
|
|
54
|
+
`grfs init` does not guess how an arbitrary application assembles that root Graph. You point it at
|
|
55
|
+
the module and export that already construct it once during onboarding. The command generates the
|
|
56
|
+
strict `.graphrefly-stack.json` config and a small deterministic
|
|
57
|
+
`graphrefly-stack.blueprint.mjs` adapter; both are ordinary source files that should be committed.
|
|
58
|
+
Use `--graph-export <name>` when the module does not export `createApplicationGraph`. JSON is the v1
|
|
59
|
+
configuration format; optional YAML and TOML authoring formats are deferred roadmap work and must
|
|
60
|
+
normalize to the same strict configuration contract before execution.
|
|
61
|
+
|
|
62
|
+
Initialization may happen after the stack already exists. The review snapshots the configured
|
|
63
|
+
adapter and supplies those same bounded bytes only inside isolated detached revisions where that
|
|
64
|
+
entrypoint did not exist yet; it does not rewrite repository history. The referenced root Graph
|
|
65
|
+
module must exist at every reviewed revision. Commit the config and adapter after onboarding so
|
|
66
|
+
future reviews have a Git-owned configuration witness.
|
|
67
|
+
|
|
68
|
+
The CLI executes the adapter at the base and every commit in permission-limited detached worktrees.
|
|
69
|
+
Each invocation calls the real GraphReFly `graph.blueprint()` API; Stack then parses, verifies,
|
|
70
|
+
renders, and diffs only with the installed runtime's public GraphReFly APIs.
|
|
50
71
|
|
|
51
72
|
## Generic repository contract
|
|
52
73
|
|
|
@@ -71,8 +92,10 @@ pnpm exec grfs review --repo . --base "$BASE" --head HEAD --json
|
|
|
71
92
|
```
|
|
72
93
|
|
|
73
94
|
The generic payload is commit-centric. When a repository has not adopted semantic change records,
|
|
74
|
-
the
|
|
75
|
-
`GateResult`.
|
|
95
|
+
the payload records that internal absence but the primary UI does not advertise an unavailable
|
|
96
|
+
gate, and it never turns missing semantic evidence into a passing `GateResult`. A local human
|
|
97
|
+
decision remains separate from any future semantic gate and does not approve or merge a GitHub pull
|
|
98
|
+
request.
|
|
76
99
|
|
|
77
100
|
Before registry publication, the same install path is exercised from the packed tarball rather than
|
|
78
101
|
from workspace imports:
|
|
@@ -185,8 +208,10 @@ and canonical milestones in `docs/evidence/milestones.jsonl` distinguish that wo
|
|
|
185
208
|
- The portable bundle is not self-listed in its manifest because that would create a circular hash.
|
|
186
209
|
- Raw provider responses, generated repositories, and sensitive submission drafts stay under
|
|
187
210
|
ignored `.private/` paths.
|
|
188
|
-
- The review server only binds to `127.0.0.1
|
|
189
|
-
|
|
211
|
+
- The review server only binds to `127.0.0.1` and sends a restrictive CSP. Its sole write surface is
|
|
212
|
+
a size-bounded, same-origin `application/json` endpoint that appends validated review decisions
|
|
213
|
+
below `.git/grfs`; source files, Git objects and refs, repository config, and `GateResult` remain
|
|
214
|
+
read-only.
|
|
190
215
|
- Generic Blueprint entrypoints run with an empty environment, a five-second timeout, a one-MiB
|
|
191
216
|
stdout bound, read-only filesystem allowlists, and no network or child-process permission.
|
|
192
217
|
- Generic payloads omit Blueprint provenance and reject absolute paths in topology metadata before
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:graphrefly-stack:schema:repository-review-bundle:v1",
|
|
4
|
+
"title": "GraphReFly Stack portable repository review bundle v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "repository", "artifacts"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "graphrefly.stack.repository-review-bundle.v1" },
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["label", "baseOid", "headOid"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"label": { "type": "string", "minLength": 1 },
|
|
16
|
+
"baseOid": {
|
|
17
|
+
"$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid"
|
|
18
|
+
},
|
|
19
|
+
"headOid": {
|
|
20
|
+
"$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"artifacts": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["path", "hash", "record"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"path": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^reviews/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\.json$"
|
|
34
|
+
},
|
|
35
|
+
"hash": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["algorithm", "value"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"algorithm": { "const": "sha256" },
|
|
41
|
+
"value": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"record": { "$ref": "urn:graphrefly-stack:schema:repository-review-decision:v1" }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:graphrefly-stack:schema:repository-review-decision-request:v1",
|
|
4
|
+
"title": "GraphReFly Stack local repository review decision request v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema", "commitOid", "decision", "reviewerLabel", "summary"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": { "const": "graphrefly.stack.repository-review-decision-request.v1" },
|
|
10
|
+
"commitOid": { "$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid" },
|
|
11
|
+
"decision": { "enum": ["approve", "request-changes"] },
|
|
12
|
+
"reviewerLabel": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
13
|
+
"summary": { "type": "string", "maxLength": 10000 }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:graphrefly-stack:schema:repository-review-decision:v1",
|
|
4
|
+
"title": "GraphReFly Stack local repository review decision v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"id",
|
|
10
|
+
"target",
|
|
11
|
+
"decision",
|
|
12
|
+
"reviewerLabel",
|
|
13
|
+
"summary",
|
|
14
|
+
"recordedAt",
|
|
15
|
+
"identityVerified"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema": { "const": "graphrefly.stack.repository-review-decision.v1" },
|
|
19
|
+
"id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
|
|
22
|
+
},
|
|
23
|
+
"target": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["baseOid", "headOid", "parentOid", "commitOid", "blueprintHash"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"baseOid": {
|
|
29
|
+
"$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid"
|
|
30
|
+
},
|
|
31
|
+
"headOid": {
|
|
32
|
+
"$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid"
|
|
33
|
+
},
|
|
34
|
+
"parentOid": {
|
|
35
|
+
"$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid"
|
|
36
|
+
},
|
|
37
|
+
"commitOid": {
|
|
38
|
+
"$ref": "urn:graphrefly-stack:schema:repository-review:v1#/definitions/GitOid"
|
|
39
|
+
},
|
|
40
|
+
"blueprintHash": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"decision": { "enum": ["approve", "request-changes"] },
|
|
44
|
+
"reviewerLabel": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
45
|
+
"summary": { "type": "string", "maxLength": 10000 },
|
|
46
|
+
"recordedAt": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$"
|
|
49
|
+
},
|
|
50
|
+
"identityVerified": { "const": false }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "object",
|
|
13
13
|
"additionalProperties": false,
|
|
14
|
-
"required": ["label", "graphreflyVersion", "entrypoint", "baseOid", "headOid"],
|
|
14
|
+
"required": ["label", "headLabel", "graphreflyVersion", "entrypoint", "baseOid", "headOid"],
|
|
15
15
|
"properties": {
|
|
16
16
|
"label": { "type": "string", "minLength": 1 },
|
|
17
|
+
"headLabel": { "type": "string", "minLength": 1 },
|
|
17
18
|
"graphreflyVersion": { "type": "string", "pattern": "^0\\.3\\.[0-9]+$" },
|
|
18
19
|
"entrypoint": {
|
|
19
20
|
"$ref": "urn:graphrefly-stack:schema:repository-config:v1#/properties/blueprint/properties/entrypoint"
|