@echopath-labs/forgerail 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
Files changed (63) hide show
  1. package/.codex-plugin/plugin.json +2 -3
  2. package/CHANGELOG.md +22 -1
  3. package/CODE_OF_CONDUCT.md +34 -0
  4. package/CONTRIBUTING.md +68 -4
  5. package/README.md +126 -49
  6. package/README.zh-CN.md +131 -28
  7. package/SECURITY.md +48 -4
  8. package/SUPPORT.md +37 -0
  9. package/adapters/claude-code.json +6 -1
  10. package/adapters/codex.json +6 -0
  11. package/adapters/cursor.json +5 -0
  12. package/contracts/adoption-plan.schema.json +39 -18
  13. package/contracts/effective-profile.schema.json +4 -4
  14. package/contracts/host-adapter.schema.json +66 -4
  15. package/contracts/host-binding-receipt.schema.json +1 -1
  16. package/contracts/launch-contract.schema.json +38 -2
  17. package/contracts/profile-change-candidate.schema.json +1 -1
  18. package/contracts/return-receipt.schema.json +1 -1
  19. package/contracts/task-envelope.schema.json +1 -1
  20. package/directory/README.md +1 -1
  21. package/directory/release-notes-alpha3.md +7 -0
  22. package/directory/release-notes-alpha4.md +9 -0
  23. package/directory/submission-candidate.json +5 -6
  24. package/docs/adoption.md +63 -26
  25. package/docs/adoption.zh-CN.md +62 -25
  26. package/docs/architecture-acceptance.md +1 -1
  27. package/docs/composable-autonomy.zh-CN.md +16 -22
  28. package/docs/installation.md +72 -40
  29. package/docs/installation.zh-CN.md +90 -31
  30. package/docs/release-alpha3.md +25 -0
  31. package/docs/release-alpha3.zh-CN.md +25 -0
  32. package/docs/release-alpha4.md +33 -0
  33. package/docs/release-alpha4.zh-CN.md +33 -0
  34. package/package.json +7 -3
  35. package/scripts/adoption-closeout-regressions.mjs +100 -0
  36. package/scripts/build-universal-directory-candidate.mjs +2 -2
  37. package/scripts/disposable-consumer.mjs +11 -18
  38. package/scripts/fixtures/contracts/adoption-plan.multi-host.valid.json +16 -7
  39. package/scripts/fixtures/contracts/adoption-plan.mutating.invalid.json +6 -3
  40. package/scripts/fixtures/contracts/adoption-plan.single-host.valid.json +9 -4
  41. package/scripts/fixtures/contracts/effective-profile.duplicate-rule.invalid.json +1 -1
  42. package/scripts/fixtures/contracts/effective-profile.valid.json +3 -4
  43. package/scripts/fixtures/contracts/host-adapter.claude-code.profile-only.valid.json +6 -1
  44. package/scripts/fixtures/contracts/host-adapter.codex.valid.json +6 -0
  45. package/scripts/fixtures/contracts/host-adapter.cursor.profile-only.valid.json +5 -0
  46. package/scripts/fixtures/contracts/host-adapter.false-supported.invalid.json +6 -1
  47. package/scripts/fixtures/contracts/launch-contract.execution-owner.invalid.json +5 -1
  48. package/scripts/fixtures/contracts/launch-contract.valid.json +5 -1
  49. package/scripts/fixtures/open-source-docs/cases.json +65 -0
  50. package/scripts/forgerail.mjs +61 -16
  51. package/scripts/integrity-regressions.mjs +1261 -0
  52. package/scripts/lib/adoption.mjs +666 -51
  53. package/scripts/lib/bounded-read.mjs +80 -0
  54. package/scripts/lib/composition.mjs +77 -7
  55. package/scripts/lib/contracts.mjs +126 -40
  56. package/scripts/lib/diagnosis.mjs +146 -39
  57. package/scripts/shadow-comparison.mjs +52 -34
  58. package/scripts/validate-open-source-docs.mjs +132 -0
  59. package/scripts/validate-release.mjs +77 -13
  60. package/scripts/validate-universal-directory.mjs +17 -5
  61. package/skills/forgerail/references/adoption.md +2 -2
  62. package/skills/forgerail/references/contracts.md +2 -2
  63. package/scripts/lib/bundle.mjs +0 -77
package/SUPPORT.md ADDED
@@ -0,0 +1,37 @@
1
+ # ForgeRail Support
2
+
3
+ ForgeRail is alpha software maintained as an open-source project. Support is best effort; no response-time or resolution-time service level is promised.
4
+
5
+ ## Start here
6
+
7
+ 1. Read the [README](README.md) and [installation guide](docs/installation.md).
8
+ 2. Confirm you installed the exact public tag `v0.1.0-alpha.4`.
9
+ 3. Start a new Codex task and verify the four ForgeRail Skills.
10
+ 4. Reproduce the problem with Plugin Only and a read-only request when possible.
11
+ 5. Remove secrets, private paths, project memory, customer data, and production configuration before sharing evidence.
12
+
13
+ ## Where to ask
14
+
15
+ - **Reproducible bug:** use the Bug report issue form.
16
+ - **Feature or product proposal:** use the Feature request form and explain the user problem before the proposed mechanism.
17
+ - **Documentation problem:** use the Documentation issue form.
18
+ - **Security vulnerability:** do not open a normal issue; follow [SECURITY.md](SECURITY.md).
19
+ - **Conduct concern:** follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
20
+
21
+ The issue tracker is not a place to request access to private repositories, share API keys, ask maintainers to operate production systems, or bypass a human approval boundary.
22
+
23
+ ## Include useful evidence
24
+
25
+ Share the ForgeRail version, Codex/host version, operating system, installation route, exact Skill invoked, expected result, observed result, and the smallest sanitized reproduction. State whether the workspace changed and whether any remote action occurred.
26
+
27
+ Screenshots and receipts must be redacted. Prefer copied error text over an image when it does not expose private data.
28
+
29
+ ## Current support boundary
30
+
31
+ - Codex is the verified host for `0.1.0-alpha.4`.
32
+ - Claude Code and Cursor are `profile-only`; end-to-end support is not claimed.
33
+ - Plugin Only and reviewed Lightweight Adoption are usable; persisted `.forgerail/` governance is deferred.
34
+ - Capability Packs are independent Plugins and keep their own identity, permissions, and approval requirements.
35
+ - Universal Plugins Directory publication is not currently available; exact-tag Marketplace installation is the supported route.
36
+
37
+ If your case falls outside this boundary, an issue can still be useful as product evidence, but it may not receive an immediate fix.
@@ -6,7 +6,12 @@
6
6
  "instructionDiscovery": "task-start",
7
7
  "skillDiscovery": "agent-skills",
8
8
  "bindingTarget": "CLAUDE.md",
9
- "bindingModes": ["managed-block", "thin-reference"],
9
+ "detectionTargets": ["CLAUDE.md", ".claude"],
10
+ "bindingModes": ["thin-reference"],
11
+ "bindingTemplates": {
12
+ "thin-reference": "bindings/claude-code-thin.md"
13
+ },
14
+ "unmanagedBindingPolicy": "append-managed-block",
10
15
  "managedMarker": "forgerail:binding:claude-code:v1",
11
16
  "activationBoundary": "host-specific-verification-required",
12
17
  "verification": {
@@ -6,7 +6,13 @@
6
6
  "instructionDiscovery": "task-start",
7
7
  "skillDiscovery": "agent-plugin-skills",
8
8
  "bindingTarget": "AGENTS.md",
9
+ "detectionTargets": ["AGENTS.md"],
9
10
  "bindingModes": ["managed-block", "thin-reference"],
11
+ "bindingTemplates": {
12
+ "managed-block": "bindings/codex-compact.md",
13
+ "thin-reference": "bindings/codex-thin.md"
14
+ },
15
+ "unmanagedBindingPolicy": "append-managed-block",
10
16
  "managedMarker": "forgerail:binding:codex:v1",
11
17
  "activationBoundary": "new-task-required",
12
18
  "verification": {
@@ -6,7 +6,12 @@
6
6
  "instructionDiscovery": "rules",
7
7
  "skillDiscovery": "unknown",
8
8
  "bindingTarget": ".cursor/rules/forgerail.mdc",
9
+ "detectionTargets": [".cursor"],
9
10
  "bindingModes": ["thin-reference"],
11
+ "bindingTemplates": {
12
+ "thin-reference": "bindings/cursor-thin.mdc"
13
+ },
14
+ "unmanagedBindingPolicy": "reject",
10
15
  "managedMarker": "forgerail:binding:cursor:v1",
11
16
  "activationBoundary": "host-specific-verification-required",
12
17
  "verification": {
@@ -2,45 +2,66 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://forgerail.dev/schemas/adoption-plan-v1.json",
4
4
  "title": "ForgeRail Adoption Plan",
5
+ "$comment": "Before approval or applying any write, validate the complete plan with ForgeRail validateContract('adoption-plan', plan). Runtime validation additionally rejects case-folded duplicate and ancestor/descendant target paths and reserved shared-contract collisions; standard JSON Schema cannot compare arbitrary path strings across entries.",
5
6
  "type": "object",
6
7
  "additionalProperties": false,
7
- "required": ["schemaVersion", "planId", "workspace", "currentLevel", "proposedLevel", "strategy", "evidence", "hosts", "proposedWrites", "requiredConfirmation", "verification", "confirmedNonMutations", "mutations", "status"],
8
+ "required": ["schemaVersion", "planId", "workspace", "currentLevel", "proposedLevel", "strategy", "hostSelection", "evidence", "proposedWrites", "requiredConfirmation", "verification", "confirmedNonMutations", "mutations", "status"],
8
9
  "properties": {
9
10
  "schemaVersion": { "const": "1.0" },
10
- "planId": { "type": "string", "pattern": "^[a-zA-Z0-9._:-]+$" },
11
+ "planId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
11
12
  "workspace": { "type": "string", "minLength": 1 },
12
13
  "currentLevel": { "enum": ["plugin-only", "lightweight-adoption", "persisted-governance"] },
13
14
  "proposedLevel": { "enum": ["plugin-only", "lightweight-adoption", "persisted-governance"] },
14
15
  "strategy": { "enum": ["no-change", "single-host-managed-block", "shared-contract-with-thin-bindings"] },
15
- "evidence": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
16
- "hosts": {
17
- "type": "array",
18
- "minItems": 1,
19
- "items": {
20
- "type": "object",
21
- "additionalProperties": false,
22
- "required": ["adapterId", "status", "bindingTarget", "verificationMode"],
23
- "properties": {
24
- "adapterId": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
25
- "status": { "enum": ["supported", "profile-only"] },
26
- "bindingTarget": { "type": "string", "minLength": 1 },
27
- "verificationMode": { "enum": ["new-task-discovery", "profile-only"] }
16
+ "hostSelection": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["mode", "hosts"],
20
+ "properties": {
21
+ "mode": { "enum": ["explicit", "all-detected", "all-available"] },
22
+ "hosts": {
23
+ "type": "object",
24
+ "minProperties": 1,
25
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]+$" },
26
+ "additionalProperties": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["status", "bindingTarget", "verificationMode"],
30
+ "properties": {
31
+ "status": { "enum": ["supported", "profile-only"] },
32
+ "bindingTarget": { "type": "string", "minLength": 1, "pattern": "^(?![\\\\/])(?![a-zA-Z]:)(?!.*//)(?!.*(?:^|/)\\.(?:/|$))(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.|/|$))(?!.*/$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" },
33
+ "verificationMode": { "enum": ["new-task-discovery", "profile-only"] }
34
+ },
35
+ "allOf": [
36
+ {
37
+ "if": { "properties": { "status": { "const": "supported" } }, "required": ["status"] },
38
+ "then": { "properties": { "verificationMode": { "const": "new-task-discovery" } } }
39
+ },
40
+ {
41
+ "if": { "properties": { "status": { "const": "profile-only" } }, "required": ["status"] },
42
+ "then": { "properties": { "verificationMode": { "const": "profile-only" } } }
43
+ }
44
+ ]
45
+ }
28
46
  }
29
47
  }
30
48
  },
49
+ "evidence": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
31
50
  "proposedWrites": {
32
51
  "type": "array",
33
52
  "items": {
34
53
  "type": "object",
35
54
  "additionalProperties": false,
36
- "required": ["path", "operation", "baseSha256", "contentSha256", "content", "managedMarker"],
55
+ "required": ["workspaceSha256", "path", "operation", "baseSha256", "contentSha256", "content", "managedMarker", "approvalSha256"],
37
56
  "properties": {
38
- "path": { "type": "string", "minLength": 1 },
57
+ "workspaceSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
58
+ "path": { "type": "string", "minLength": 1, "pattern": "^(?![\\\\/])(?![a-zA-Z]:)(?!.*//)(?!.*(?:^|/)\\.(?:/|$))(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.|/|$))(?!.*/$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" },
39
59
  "operation": { "enum": ["create", "append-managed-block", "replace-managed-block"] },
40
60
  "baseSha256": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" },
41
61
  "contentSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
42
62
  "content": { "type": "string", "minLength": 1 },
43
- "managedMarker": { "type": "string", "pattern": "^forgerail:(binding:[a-z][a-z0-9-]+|adoption-contract):v1$" }
63
+ "managedMarker": { "type": "string", "pattern": "^forgerail:(binding:[a-z][a-z0-9-]+|adoption-contract):v1$" },
64
+ "approvalSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
44
65
  }
45
66
  }
46
67
  },
@@ -25,13 +25,13 @@
25
25
  }
26
26
  },
27
27
  "packs": {
28
- "type": "array",
29
- "items": {
28
+ "type": "object",
29
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]+$" },
30
+ "additionalProperties": {
30
31
  "type": "object",
31
32
  "additionalProperties": false,
32
- "required": ["id", "state", "reason"],
33
+ "required": ["state", "reason"],
33
34
  "properties": {
34
- "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
35
35
  "state": { "enum": ["available", "recommended", "enabled", "required", "blocked", "disabled"] },
36
36
  "reason": { "type": "string", "minLength": 1 }
37
37
  }
@@ -4,7 +4,7 @@
4
4
  "title": "ForgeRail Host Adapter",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["schemaVersion", "id", "displayName", "status", "instructionDiscovery", "skillDiscovery", "bindingTarget", "bindingModes", "managedMarker", "activationBoundary", "verification", "limitations"],
7
+ "required": ["schemaVersion", "id", "displayName", "status", "instructionDiscovery", "skillDiscovery", "bindingTarget", "detectionTargets", "bindingModes", "bindingTemplates", "unmanagedBindingPolicy", "managedMarker", "activationBoundary", "verification", "limitations"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": "1.0" },
10
10
  "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
@@ -12,13 +12,29 @@
12
12
  "status": { "enum": ["supported", "profile-only"] },
13
13
  "instructionDiscovery": { "enum": ["task-start", "rules", "explicit-only", "unknown"] },
14
14
  "skillDiscovery": { "enum": ["agent-plugin-skills", "agent-skills", "explicit-only", "unknown"] },
15
- "bindingTarget": { "type": "string", "minLength": 1 },
15
+ "bindingTarget": { "type": "string", "minLength": 1, "pattern": "^(?![\\\\/])(?![a-zA-Z]:)(?!.*//)(?!.*(?:^|/)\\.(?:/|$))(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.|/|$))(?!.*/$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" },
16
+ "detectionTargets": {
17
+ "type": "array",
18
+ "items": { "type": "string", "minLength": 1, "pattern": "^(?![\\\\/])(?![a-zA-Z]:)(?!.*//)(?!.*(?:^|/)\\.(?:/|$))(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.|/|$))(?!.*/$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" },
19
+ "minItems": 1,
20
+ "uniqueItems": true
21
+ },
16
22
  "bindingModes": {
17
23
  "type": "array",
18
24
  "items": { "enum": ["managed-block", "thin-reference"] },
19
25
  "minItems": 1,
20
- "uniqueItems": true
26
+ "uniqueItems": true,
27
+ "contains": { "const": "thin-reference" }
28
+ },
29
+ "bindingTemplates": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "managed-block": { "type": "string", "minLength": 1, "pattern": "^(?![\\\\/])(?![a-zA-Z]:)(?!.*//)(?!.*(?:^|/)\\.(?:/|$))(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.|/|$))(?!.*/$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" },
34
+ "thin-reference": { "type": "string", "minLength": 1, "pattern": "^(?![\\\\/])(?![a-zA-Z]:)(?!.*//)(?!.*(?:^|/)\\.(?:/|$))(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)[^/]*\\.(?:/|$))(?!.*(?:^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][1-9]|[Ll][Pp][Tt][1-9])(?:\\.|/|$))(?!.*/$)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" }
35
+ }
21
36
  },
37
+ "unmanagedBindingPolicy": { "enum": ["append-managed-block", "reject"] },
22
38
  "managedMarker": { "type": "string", "pattern": "^forgerail:binding:[a-z][a-z0-9-]+:v1$" },
23
39
  "activationBoundary": { "enum": ["new-task-required", "host-specific-verification-required"] },
24
40
  "verification": {
@@ -39,5 +55,51 @@
39
55
  "items": { "type": "string", "minLength": 1 },
40
56
  "uniqueItems": true
41
57
  }
42
- }
58
+ },
59
+ "allOf": [
60
+ {
61
+ "if": { "properties": { "status": { "const": "supported" } }, "required": ["status"] },
62
+ "then": {
63
+ "properties": {
64
+ "activationBoundary": { "const": "new-task-required" },
65
+ "verification": {
66
+ "properties": {
67
+ "mode": { "const": "new-task-discovery" },
68
+ "expectedSkills": { "minItems": 1 }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "if": { "properties": { "status": { "const": "profile-only" } }, "required": ["status"] },
76
+ "then": {
77
+ "properties": {
78
+ "activationBoundary": { "const": "host-specific-verification-required" },
79
+ "verification": {
80
+ "properties": {
81
+ "mode": { "const": "profile-only" },
82
+ "expectedSkills": { "maxItems": 0 }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ {
89
+ "if": { "properties": { "bindingModes": { "contains": { "const": "managed-block" } } }, "required": ["bindingModes"] },
90
+ "then": { "properties": { "bindingTemplates": { "required": ["managed-block"] } } }
91
+ },
92
+ {
93
+ "if": { "properties": { "bindingModes": { "contains": { "const": "thin-reference" } } }, "required": ["bindingModes"] },
94
+ "then": { "properties": { "bindingTemplates": { "required": ["thin-reference"] } } }
95
+ },
96
+ {
97
+ "if": { "properties": { "bindingTemplates": { "required": ["managed-block"] } }, "required": ["bindingTemplates"] },
98
+ "then": { "properties": { "bindingModes": { "contains": { "const": "managed-block" } } } }
99
+ },
100
+ {
101
+ "if": { "properties": { "bindingTemplates": { "required": ["thin-reference"] } }, "required": ["bindingTemplates"] },
102
+ "then": { "properties": { "bindingModes": { "contains": { "const": "thin-reference" } } } }
103
+ }
104
+ ]
43
105
  }
@@ -7,7 +7,7 @@
7
7
  "required": ["schemaVersion", "planId", "workspace", "adoptionLevel", "contractPath", "hosts", "changedFiles", "validationEvidence", "discoveredSkills", "activationVerification", "confirmedNonMutations", "deviations", "closeout"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": "1.0" },
10
- "planId": { "type": "string", "pattern": "^[a-zA-Z0-9._:-]+$" },
10
+ "planId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
11
11
  "workspace": { "type": "string", "minLength": 1 },
12
12
  "adoptionLevel": { "enum": ["plugin-only", "lightweight-adoption", "persisted-governance"] },
13
13
  "contractPath": { "type": ["string", "null"] },
@@ -4,10 +4,46 @@
4
4
  "title": "ForgeRail Launch Contract",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["schemaVersion", "envelope", "effectiveRuleSources", "hostAgent", "executionOwner"],
7
+ "required": ["schemaVersion", "envelope", "effectiveProfile", "effectivePackManifests", "effectiveRuleSources", "hostAgent", "executionOwner"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": "1.0" },
10
- "envelope": { "$ref": "task-envelope.schema.json" },
10
+ "envelope": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "description": "Resolved Task Envelope. Requested Pack identities are represented once as an identity-to-manifest-digest map so schema-only consumers cannot accept an unbound requested Pack.",
14
+ "required": ["schemaVersion", "taskId", "intent", "nonGoals", "ownerWorkspace", "allowedOperations", "prohibitedOperations", "packs", "approvalGates", "validation", "returnContract"],
15
+ "properties": {
16
+ "schemaVersion": { "const": "1.0" },
17
+ "taskId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
18
+ "intent": { "type": "string", "minLength": 1 },
19
+ "nonGoals": { "type": "array", "items": { "type": "string", "minLength": 1 } },
20
+ "ownerWorkspace": { "type": "string", "minLength": 1 },
21
+ "allowedOperations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
22
+ "prohibitedOperations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
23
+ "packs": {
24
+ "type": "object",
25
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]+$" },
26
+ "additionalProperties": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
27
+ },
28
+ "approvalGates": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" }, "uniqueItems": true },
29
+ "validation": { "type": "array", "items": { "type": "string", "minLength": 1 } },
30
+ "returnContract": { "const": "forgerail-return-receipt-v1" }
31
+ }
32
+ },
33
+ "effectiveProfile": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "description": "Identity of the validated effective profile. Workspace identity is represented once by envelope.ownerWorkspace.",
37
+ "required": ["digest"],
38
+ "properties": {
39
+ "digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
40
+ }
41
+ },
42
+ "effectivePackManifests": {
43
+ "type": "object",
44
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]+$" },
45
+ "additionalProperties": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
46
+ },
11
47
  "effectiveRuleSources": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
12
48
  "hostAgent": { "type": "string", "minLength": 1 },
13
49
  "executionOwner": { "const": "host-agent" }
@@ -7,7 +7,7 @@
7
7
  "required": ["schemaVersion", "candidateId", "workspace", "ruleId", "proposedValue", "evidence", "targetOwner", "targetSource", "reason", "requiresConfirmation", "status"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": "1.0" },
10
- "candidateId": { "type": "string", "pattern": "^[a-zA-Z0-9._:-]+$" },
10
+ "candidateId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
11
11
  "workspace": { "type": "string", "minLength": 1 },
12
12
  "ruleId": { "type": "string", "pattern": "^[a-z][a-z0-9.-]+$" },
13
13
  "proposedValue": {},
@@ -7,7 +7,7 @@
7
7
  "required": ["schemaVersion", "taskId", "ownerWorkspace", "branch", "commit", "changedScope", "validationEvidence", "externalSideEffects", "confirmedNonMutations", "residualRisks", "rollbackOrRecovery", "deviations", "closeout"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": "1.0" },
10
- "taskId": { "type": "string", "pattern": "^[a-zA-Z0-9._:-]+$" },
10
+ "taskId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
11
11
  "ownerWorkspace": { "type": "string", "minLength": 1 },
12
12
  "branch": { "type": ["string", "null"] },
13
13
  "commit": { "type": ["string", "null"], "pattern": "^[0-9a-f]{40}$" },
@@ -7,7 +7,7 @@
7
7
  "required": ["schemaVersion", "taskId", "intent", "nonGoals", "ownerWorkspace", "allowedOperations", "prohibitedOperations", "packs", "approvalGates", "validation", "returnContract"],
8
8
  "properties": {
9
9
  "schemaVersion": { "const": "1.0" },
10
- "taskId": { "type": "string", "pattern": "^[a-zA-Z0-9._:-]+$" },
10
+ "taskId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
11
11
  "intent": { "type": "string", "minLength": 1 },
12
12
  "nonGoals": { "type": "array", "items": { "type": "string", "minLength": 1 } },
13
13
  "ownerWorkspace": { "type": "string", "minLength": 1 },
@@ -9,7 +9,7 @@ The candidate follows the OpenAI submission guidance observed on 2026-08-30:
9
9
  - <https://developers.openai.com/plugins/build/plugins>
10
10
  - <https://developers.openai.com/plugins/deploy/submission>
11
11
 
12
- The alpha.2 source candidate records the user-confirmed `Productivity` category, GitHub Issues support, repository Privacy and Terms URLs, and an intent to make ForgeRail available in all platform-supported regions. The live portal's exact region enumeration remains `pending_confirmation`; no country list is invented locally.
12
+ The alpha.4 forward-fix candidate records the user-confirmed `Productivity` category, GitHub Issues support, repository Privacy and Terms URLs, and an intent to make ForgeRail available in all platform-supported regions. It also keeps the main Plugin within Codex's maximum of three starter prompts while preserving four independently owned Skills. The live portal's exact region enumeration remains `pending_confirmation`; no country list is invented locally.
13
13
 
14
14
  Before any Platform draft or submission, a human must still verify the publisher identity, Apps Management Write permission, live portal region encoding, accepted asset format, and exact final public source. `submission-candidate.json` records every unresolved item; `evaluations.json` contains the local positive and negative evaluation cases. Remote Git integration cannot grant Directory submission or publication authority.
15
15
 
@@ -0,0 +1,7 @@
1
+ # ForgeRail 0.1.0-alpha.3 release notes candidate
2
+
3
+ ForgeRail alpha.3 is a narrow host-compatibility forward fix. The main Agent Plugin now exposes three reviewed starter prompts, which stays within the Codex host limit, while all four Skills remain independently discoverable and directly invokable.
4
+
5
+ The third prompt is an either-or router: it directs a workspace-health request to `$workspace-health-review` or a duplicated-architecture-ownership request to `$architecture-convergence-audit`. It does not merge those Skills, make either depend on the other, or activate both implicitly.
6
+
7
+ The candidate retains the alpha.2 Skills-only Directory shape, public Privacy and Terms, GitHub Issues support, Productivity category, all-platform-supported-regions intent, optional scoped npm CLI, no project Node.js requirement, and no implicit `.forgerail/` state. Directory submission, release, and lifecycle approvals remain separate and are not granted by this candidate.
@@ -0,0 +1,9 @@
1
+ # ForgeRail 0.1.0-alpha.4 release notes candidate
2
+
3
+ ForgeRail alpha.4 is an integrity-focused forward fix for real project use. It makes contract, Profile, Pack, Launch, Receipt, Adoption, projection, Shadow and cross-workspace orchestration boundaries fail closed when input is malformed, duplicated, inconsistent or outside the declared workspace.
4
+
5
+ Adoption approvals now bind the canonical workspace and every executable write field with a separately retained digest and immutable apply-time snapshot, while existing managed bindings are replaced atomically without intentionally removing the target path. Contract timestamps also preserve literal four-digit years, including `0000` through `0099`.
6
+
7
+ The release adds deterministic regression coverage and complete Node.js 22 and 24 CI gates. It preserves the public product shape: four independently invokable Skills, a maximum of three starter prompts, Skills-only Marketplace installation, optional scoped npm CLI, no project `package.json` or `node_modules` requirement, no implicit `.forgerail/` state, and Apache-2.0.
8
+
9
+ Some previously tolerated invalid inputs are intentionally rejected. Valid alpha.3 contracts remain supported; full v2 receipt lineage, cross-platform CI expansion, SBOM/OIDC provenance and other architectural improvements remain future work. Directory submission, release and lifecycle approvals stay independent and are not granted by this candidate.
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": "1.0",
3
3
  "candidateType": "openai-universal-plugin-directory",
4
4
  "submissionType": "skills_only",
5
- "status": "local_alpha2_source_candidate",
5
+ "status": "local_alpha4_integrity_candidate",
6
6
  "approval": { "type": "submission_approval", "status": "not_granted" },
7
7
  "officialBaseline": {
8
8
  "observedAt": "2026-08-30",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "plugin": {
15
15
  "id": "forgerail",
16
- "version": "0.1.0-alpha.2",
16
+ "version": "0.1.0-alpha.4",
17
17
  "manifest": ".codex-plugin/plugin.json",
18
18
  "skills": [
19
19
  "forgerail",
@@ -43,8 +43,7 @@
43
43
  "starterPrompts": [
44
44
  "Use ForgeRail to govern this engineering task.",
45
45
  "Diagnose this workspace before recommending governance changes.",
46
- "Review this workspace for governance and recovery risks.",
47
- "Audit this architecture for duplicated capability ownership."
46
+ "Review workspace health or audit duplicated architecture ownership using the matching independent ForgeRail Skill."
48
47
  ]
49
48
  },
50
49
  "availability": {
@@ -58,8 +57,8 @@
58
57
  },
59
58
  "releaseNotes": {
60
59
  "state": "candidate",
61
- "path": "./directory/release-notes-alpha2.md",
62
- "value": "ForgeRail alpha.2 adds an independently invoked read-only architecture convergence audit and prepares a Skills-only Directory candidate with public Privacy and Terms, deterministic evaluations, and no project-local Node.js or persistent ForgeRail state requirement."
60
+ "path": "./directory/release-notes-alpha4.md",
61
+ "value": "ForgeRail alpha.4 hardens fail-closed contracts, profile and Pack identity, filesystem confinement, deterministic projection, shadow evidence and cross-workspace orchestration while preserving four independent Skills, no project Node.js requirement and read-only adoption defaults."
63
62
  },
64
63
  "evaluationFile": "./directory/evaluations.json",
65
64
  "unresolvedGates": [
package/docs/adoption.md CHANGED
@@ -1,51 +1,88 @@
1
1
  # Progressive Adoption
2
2
 
3
- ForgeRail separates availability from project adoption. Installing the Agent Plugin or optional CLI makes capabilities available; it does not edit workspace instructions, create durable state, enable Capability Packs, or authorize external effects.
3
+ ForgeRail separates **installation**, **availability**, **project adoption**, and **execution approval**. Installing the Plugin exposes guidance to the Agent; it does not edit workspace instructions, create durable state, enable Capability Packs, or authorize external effects.
4
4
 
5
- ## Three Levels
5
+ This guide describes the `0.1.0-alpha.4` / `v0.1.0-alpha.4` candidate. Check the published release for availability; this source document does not prove publication.
6
6
 
7
- ### Level 0 Plugin Only
7
+ Start with Plugin Only. Move up only when repeated evidence shows that a small durable project binding is more useful than asking explicitly each time.
8
8
 
9
- This is the default. Skills are available to the host Agent, while the workspace remains unchanged. Use this level when occasional explicit or implicit Skill discovery is enough.
9
+ ## Level 0 Plugin Only
10
10
 
11
- ### Level 1 Lightweight Adoption
11
+ This is the default and recommended first experience. The workspace remains unchanged while these four Skills are available:
12
12
 
13
- Use this only after an Agent shows an exact Adoption Plan and the user confirms its writes.
13
+ - `$forgerail` for bounded engineering guidance;
14
+ - `$forgerail-workspace-diagnosis` for a read-only project picture;
15
+ - `$workspace-health-review` for an independent health review;
16
+ - `$architecture-convergence-audit` for duplicated-capability and ownership review.
14
17
 
15
- - For one host with concise principles, ForgeRail proposes one versioned managed block in that host's native instruction entry.
16
- - For multiple hosts, ForgeRail proposes `FORGERAIL.md` as the portable Adoption Contract plus thin host bindings that point to it.
18
+ Use Plugin Only for occasional diagnosis, unfamiliar repositories, early experimentation, and any project whose existing instructions are already sufficient.
17
19
 
18
- The planner is read-only:
20
+ ## Level 1 — Lightweight Adoption
21
+
22
+ Use this level only when repeated ForgeRail use justifies a small, reviewable project binding.
23
+
24
+ - A single-host project may add one versioned managed block when its adapter supports that mode.
25
+ - A multi-host project, or a single host whose adapter supports only thin references, uses `FORGERAIL.md` as a portable Adoption Contract plus thin host bindings.
26
+ - Existing project instructions, specifications, ADRs, CI, and documentation remain authoritative in their own domains.
27
+
28
+ The optional planner is read-only:
19
29
 
20
30
  ```bash
21
- forgerail adoption-plan --workspace . --host codex
22
- forgerail adoption-plan --workspace . --host codex --host claude-code --host cursor
31
+ # Default: resolve only registered hosts detected in this workspace.
32
+ npx --yes @echopath-labs/forgerail@0.1.0-alpha.4 adoption-plan --workspace . --selection all-detected
33
+
34
+ # Explicit subset chosen from the validated Host Adapter Registry.
35
+ npx --yes @echopath-labs/forgerail@0.1.0-alpha.4 adoption-plan --workspace . --host codex
36
+
37
+ # Every adapter in the current validated registry.
38
+ npx --yes @echopath-labs/forgerail@0.1.0-alpha.4 adoption-plan --workspace . --selection all-available
23
39
  ```
24
40
 
25
- Each proposal contains the current and proposed level, exact target paths and content, base SHA-256 digests, required confirmation, verification steps, support status, and confirmed non-mutations. There is deliberately no `apply-adoption` command. The host Agent must display the proposal or diff, wait for confirmation, make only the approved writes, then return a Host Binding Receipt.
41
+ Read-only diagnosis never follows links inside the selected workspace. It reads only bounded regular `package.json` and registered Host binding files, with a 4 MiB per-file limit; opened paths are revalidated against the canonical workspace before content is consumed. Unsafe, changed, non-regular, or oversized entries are reported as unavailable evidence for human review. A Markdown record practice is reported only when a safely confined well-known directory contains at least one bounded regular `.md` file; enumeration is capped at 4,096 entries, and empty, oversized, linked, or non-regular evidence is not treated as an ADR practice.
42
+
43
+ The active Agent may translate a request such as “only Codex”, “all Agents used by this project”, or “all currently available adapters” into these deterministic modes. ForgeRail Core does not guess instruction paths, template names, or how to treat an existing unmanaged binding: detection targets, binding targets, binding templates, and that existing-content policy belong to versioned Host Adapters. Omitting both `--host` and `--selection` defaults to `all-detected`; if no registered host is detected, the planner asks for an explicit host or `all-available` instead of guessing. For human review, the plan records the mode and one `hostSelection.hosts` map keyed by each resolved adapter ID; it does not duplicate Host identity in requested/resolved arrays.
44
+
45
+ Every proposal must show the current and proposed level, exact target paths and content, base digests, each write's `approvalSha256`, required confirmation, verification steps, support status, and non-actions. ForgeRail deliberately has no `apply-adoption` command. The Agent shows the proposal and waits for a human decision. Node-based integrations must retain the approved `approvalSha256` separately from the mutable proposal, then pass it as the third argument to `applyApprovedAdoptionWrite()` from `scripts/lib/adoption.mjs` so the canonical workspace path plus opened directory identity, destination, operation, marker, content, confinement, no-follow open, file identity and base digest are revalidated against one immutable snapshot at write time. Apply accepts only `create`, `append-managed-block`, or `replace-managed-block`, even when another operation is covered by a syntactically valid digest. Replacing the directory at the same path invalidates the approval. If a post-install check fails after replacing an existing binding, ForgeRail atomically renames the retained original inode directly over the verified installed candidate; it preserves recovery evidence and returns the original failure when safe restoration is impossible. The Agent verifies discovery in a new task and returns a Host Binding Receipt.
26
46
 
27
- ### Level 2 Persisted Governance
47
+ If safe automatic rollback is impossible because concurrent content now occupies the approved target, ForgeRail keeps the original binding as a same-directory `.forgerail-<random>.bak` file and includes its project-relative path in the error. Compare that file with the current target, restore only the intended content through a new reviewed operation, and delete the recovery file only after confirming recovery. ForgeRail never treats the retained file as a successful write.
28
48
 
29
- This level is reserved for evidence that cannot be represented coherently through existing workspace sources: machine-consumed configuration, CI enforcement, or repeated cross-host conflicts. ForgeRail alpha.1 neither creates nor proposes `.forgerail/` state. A future design must define ownership, precedence, migration, and deletion semantics before enabling it.
49
+ ### Subset plans and received plans
30
50
 
31
- ## Host Support
51
+ Only selected hosts enter strict write planning. Other registered bindings are inspected through the same bounded, no-follow reader used by diagnosis: known managed bindings contribute to the observed current level and are listed as retained; unreadable entries are explicitly unknown and never block the selected-host plan. `currentLevel` describes readable workspace evidence, while `proposedLevel` and writes apply only to the selection. A `no-change` proposal does not remove an unselected binding. Selecting a subset does not consolidate other hosts' rules; review the coexistence warning before approving a new shared contract.
32
52
 
33
- | Host | Native target | Alpha.1 status | Verification |
53
+ Before approving or applying **any** write from a received plan, validate the complete plan with `validateContract("adoption-plan", plan)`. Per-write approval digests do not replace that check. The runtime rejects case-folded duplicates, ancestor/descendant write targets and Host targets conflicting with reserved `FORGERAIL.md`; JSON Schema alone cannot compare arbitrary paths across entries. Thin-reference templates must name the exact shared `FORGERAIL.md` inside their managed block. This is a structural reference check, not proof that an Agent obeyed the instruction.
54
+
55
+ ## Level 2 — Persisted Governance
56
+
57
+ Persisted machine-consumed ForgeRail state is deferred in the current alpha. It should be considered only when important evidence cannot be represented coherently through existing project sources, such as repeated cross-host conflicts or genuinely machine-enforced policy.
58
+
59
+ ForgeRail does not create `.forgerail/` at this level today. A future design must define ownership, precedence, migration, recovery, and deletion before enabling it.
60
+
61
+ ## Host support
62
+
63
+ | Host | Native target | Alpha.4 status | Verification boundary |
34
64
  | --- | --- | --- | --- |
35
- | Codex | `AGENTS.md` | `supported` | Start a new Codex task, verify the binding is in scope, and discover the three main Plugin Skills. |
36
- | Claude Code | `CLAUDE.md` | `profile-only` | The target and thin binding are modeled, but end-to-end activation is not claimed until host-specific verification exists. |
37
- | Cursor | `.cursor/rules/forgerail.mdc` | `profile-only` | The Rules target is modeled, but Skill discovery and end-to-end activation are not claimed. |
65
+ | Codex | `AGENTS.md` | `supported` | New Codex task discovers all four main Skills and the approved binding is in scope |
66
+ | Claude Code | `CLAUDE.md` | `profile-only` | Target and thin binding are modeled; end-to-end activation is not claimed |
67
+ | Cursor | `.cursor/rules/forgerail.mdc` | `profile-only` | Target is modeled; Skill discovery and end-to-end activation are not claimed |
68
+
69
+ Unknown hosts need a reviewed Host Adapter before ForgeRail can generate a binding. Every adapter provides a thin-reference projection so `all-detected` and `all-available` can always compose through the shared contract; adapters may additionally provide a managed-block projection for a single explicit Host. Registry validation limits target, detection and template locators to an ASCII-safe portable path alphabet, rejects trailing-dot aliases and Windows device basenames, then case-folds the remaining identities. Binding targets are prefix-free and cannot conflict with reserved `FORGERAIL.md`; every template contains exactly one ordered adapter-owned marker boundary. A Host Adapter projects ForgeRail into a host; it is not ForgeRail Core or a second policy source.
70
+
71
+ ## Capability Packs stay separate
38
72
 
39
- Unknown hosts require a reviewed Host Adapter before ForgeRail can generate a binding. A Host Adapter is a projection boundary, not the ForgeRail Core or a second policy source.
73
+ Do not add a Capability Pack to project instructions simply because it is installed. Recommend one only when project evidence calls for that capability. Packs keep independent authentication, approval, validation, rollback, and lifecycle boundaries.
40
74
 
41
- ## Optional Cross-Workspace Orchestration
75
+ Cross-Workspace Orchestration is for genuine multi-owner, multi-repository, or multi-release coordination with safe dependency waves. It is not a reason to split an ordinary repository into artificial tasks. RelayPact can transport a bounded delegation and EchoPath can support recovery/context; neither is a ForgeRail runtime dependency.
42
76
 
43
- Do not promote the orchestration Pack into a workspace binding merely because it is installed. Recommend it only after observing multiple independent owner/repository/release boundaries and a safe parallel dependency wave. Keep ordinary single-repository work on ForgeRail Core.
77
+ ## Completion and removal
44
78
 
45
- If the project repeatedly uses this pattern, record the choice through its existing OpenSpec, Spec Kit, ADR, Markdown, issue, or instruction habit after exact durable-write confirmation. Do not create a new orchestration state directory. Task creation and every durable, remote, release, or lifecycle operation retain their own authorization.
79
+ A Lightweight Adoption is complete only when:
46
80
 
47
- ## Verification And Removal
81
+ 1. the applied file digest matches the approved plan;
82
+ 2. supported-host discovery is verified in a new task or equivalent fresh check;
83
+ 3. deviations are empty or explicitly accepted;
84
+ 4. the receipt records exactly what changed and did not change.
48
85
 
49
- An adoption is complete only when the applied file digest matches the approved plan, supported-host discovery is verified in a new task or equivalent supported check, deviations are empty, and non-mutations are recorded. Profile-only hosts remain unverified until their own host check passes.
86
+ Uninstalling the Plugin does not silently remove adopted instructions. Revise or remove managed blocks through another exact, reviewed plan so unrelated project content is preserved.
50
87
 
51
- Removing ForgeRail does not silently remove adopted project instructions. Uninstall the Plugin separately; remove or revise managed blocks through another reviewed plan so unrelated project content is preserved.
88
+ For normal use, begin with the [installation guide](installation.md) and stay at Plugin Only until a real project need appears.