@echopath-labs/forgerail 0.1.0-alpha.1 → 0.1.0-alpha.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/.codex-plugin/plugin.json +7 -3
- package/CHANGELOG.md +8 -0
- package/PLUGIN.md +2 -1
- package/PRIVACY.md +15 -0
- package/README.md +14 -2
- package/README.zh-CN.md +13 -2
- package/TERMS.md +19 -0
- package/adapters/codex.json +1 -1
- package/assets/forgerail-icon.svg +6 -0
- package/assets/forgerail-logo.svg +7 -0
- package/contracts/authority-evidence-v1.schema.json +48 -0
- package/contracts/cross-workspace-pack-composition-v1.schema.json +241 -0
- package/contracts/effective-profile-v2.schema.json +113 -0
- package/contracts/entry-mode-v1.schema.json +20 -0
- package/contracts/evidence-identity-v1.schema.json +48 -0
- package/contracts/execution-context-identity-v1.schema.json +76 -0
- package/contracts/gate-result-v1.schema.json +32 -0
- package/contracts/governance-source-v1.schema.json +30 -0
- package/contracts/host-adapter-observation-v1.schema.json +61 -0
- package/contracts/limited-reason-v1.schema.json +46 -0
- package/contracts/operation-authority-requirement-v1.schema.json +43 -0
- package/contracts/operation-grant-v1.schema.json +83 -0
- package/contracts/phase-slice-correlation-v1.schema.json +20 -0
- package/contracts/profile-explanation-v1.schema.json +91 -0
- package/contracts/provider-adapter-observation-v1.schema.json +87 -0
- package/contracts/return-receipt-v2.schema.json +55 -0
- package/contracts/review-authority-requirement-v1.schema.json +117 -0
- package/contracts/rollback-envelope-lineage-v1.schema.json +46 -0
- package/contracts/rule-claim-v1.schema.json +34 -0
- package/contracts/source-dependency-edge-v1.schema.json +37 -0
- package/contracts/task-control-revision-v1.schema.json +39 -0
- package/contracts/task-envelope-v2.schema.json +67 -0
- package/contracts/validation-result-v1.schema.json +57 -0
- package/contracts/validation-topology-v1.schema.json +55 -0
- package/contracts/workspace-identity-v1.schema.json +28 -0
- package/contracts/workspace-relationship-v1.schema.json +31 -0
- package/directory/README.md +23 -0
- package/directory/evaluations.json +78 -0
- package/directory/release-notes-alpha2.md +7 -0
- package/directory/submission-candidate.json +80 -0
- package/docs/composable-autonomy.zh-CN.md +183 -0
- package/docs/control-authority-validation-contracts.md +36 -0
- package/docs/control-authority-validation-contracts.zh-CN.md +36 -0
- package/docs/control-profile-contracts.md +35 -0
- package/docs/control-profile-contracts.zh-CN.md +35 -0
- package/docs/control-system-fixture-matrix.md +30 -0
- package/docs/control-system-fixture-matrix.zh-CN.md +30 -0
- package/docs/control-task-contracts.md +39 -0
- package/docs/control-task-contracts.zh-CN.md +39 -0
- package/docs/cross-workspace-pack-composition-contract.md +31 -0
- package/docs/cross-workspace-pack-composition-contract.zh-CN.md +31 -0
- package/docs/installation.md +9 -3
- package/docs/installation.zh-CN.md +9 -3
- package/docs/release-alpha2.md +21 -0
- package/docs/release-alpha2.zh-CN.md +21 -0
- package/package.json +9 -3
- package/packs/architecture-convergence-audit.json +30 -0
- package/scripts/build-universal-directory-candidate.mjs +72 -0
- package/scripts/disposable-consumer.mjs +1 -1
- package/scripts/fixtures/contracts/authority-evidence.revoked-without-invalidation.invalid.json +22 -0
- package/scripts/fixtures/contracts/authority-evidence.revoked.valid.json +32 -0
- package/scripts/fixtures/contracts/authority-evidence.valid.json +22 -0
- package/scripts/fixtures/contracts/capability-pack.missing-entry.invalid.json +14 -0
- package/scripts/fixtures/contracts/capability-pack.valid.json +15 -0
- package/scripts/fixtures/contracts/cross-workspace-pack-composition.authority-collapse.invalid.json +156 -0
- package/scripts/fixtures/contracts/cross-workspace-pack-composition.false-closure.invalid.json +138 -0
- package/scripts/fixtures/contracts/cross-workspace-pack-composition.valid.json +156 -0
- package/scripts/fixtures/contracts/effective-profile-v2.optional-unavailable-degraded.valid.json +36 -0
- package/scripts/fixtures/contracts/effective-profile-v2.required-unavailable-degraded.invalid.json +36 -0
- package/scripts/fixtures/contracts/effective-profile-v2.unresolved-claim-false-complete.invalid.json +34 -0
- package/scripts/fixtures/contracts/effective-profile-v2.valid.json +53 -0
- package/scripts/fixtures/contracts/effective-profile.duplicate-rule.invalid.json +23 -0
- package/scripts/fixtures/contracts/entry-mode.missing-evidence.invalid.json +6 -0
- package/scripts/fixtures/contracts/entry-mode.valid.json +6 -0
- package/scripts/fixtures/contracts/evidence-identity.unavailable-without-reason.invalid.json +21 -0
- package/scripts/fixtures/contracts/evidence-identity.valid.json +21 -0
- package/scripts/fixtures/contracts/execution-context-identity.unavailable-without-reason.invalid.json +31 -0
- package/scripts/fixtures/contracts/execution-context-identity.valid.json +31 -0
- package/scripts/fixtures/contracts/gate-result.satisfied-without-evidence.invalid.json +14 -0
- package/scripts/fixtures/contracts/gate-result.valid.json +14 -0
- package/scripts/fixtures/contracts/governance-source.unavailable-without-reason.invalid.json +16 -0
- package/scripts/fixtures/contracts/governance-source.valid.json +16 -0
- package/scripts/fixtures/contracts/host-adapter-observation.claims-authorization.invalid.json +23 -0
- package/scripts/fixtures/contracts/host-adapter-observation.valid.json +39 -0
- package/scripts/fixtures/contracts/host-adapter.codex.valid.json +1 -1
- package/scripts/fixtures/contracts/host-adapter.false-supported.invalid.json +14 -0
- package/scripts/fixtures/contracts/host-binding-receipt.valid.json +1 -1
- package/scripts/fixtures/contracts/launch-contract.execution-owner.invalid.json +19 -0
- package/scripts/fixtures/contracts/limited-reason.unbounded.invalid.json +11 -0
- package/scripts/fixtures/contracts/limited-reason.valid.json +11 -0
- package/scripts/fixtures/contracts/operation-authority-requirement.no-issuer.invalid.json +22 -0
- package/scripts/fixtures/contracts/operation-authority-requirement.valid.json +22 -0
- package/scripts/fixtures/contracts/operation-grant.missing-issuer-evidence.invalid.json +34 -0
- package/scripts/fixtures/contracts/operation-grant.valid.json +34 -0
- package/scripts/fixtures/contracts/phase-slice-correlation.aggregate-closure.invalid.json +12 -0
- package/scripts/fixtures/contracts/phase-slice-correlation.valid.json +12 -0
- package/scripts/fixtures/contracts/profile-change-candidate.unconfirmed.invalid.json +13 -0
- package/scripts/fixtures/contracts/profile-explanation.false-complete.invalid.json +36 -0
- package/scripts/fixtures/contracts/profile-explanation.valid.json +29 -0
- package/scripts/fixtures/contracts/provider-adapter-observation.unauthenticated-supported.invalid.json +43 -0
- package/scripts/fixtures/contracts/provider-adapter-observation.valid.json +62 -0
- package/scripts/fixtures/contracts/return-receipt-v2.changed-subject.valid.json +36 -0
- package/scripts/fixtures/contracts/return-receipt-v2.unverified-closeout.invalid.json +36 -0
- package/scripts/fixtures/contracts/return-receipt-v2.valid.json +36 -0
- package/scripts/fixtures/contracts/review-authority-requirement.transitive.invalid.json +33 -0
- package/scripts/fixtures/contracts/review-authority-requirement.valid.json +21 -0
- package/scripts/fixtures/contracts/rollback-envelope-lineage.reused-grant.invalid.json +24 -0
- package/scripts/fixtures/contracts/rollback-envelope-lineage.valid.json +24 -0
- package/scripts/fixtures/contracts/rule-claim.inferred-enforceable.invalid.json +16 -0
- package/scripts/fixtures/contracts/rule-claim.valid.json +16 -0
- package/scripts/fixtures/contracts/source-dependency-edge.unavailable-without-reason.invalid.json +18 -0
- package/scripts/fixtures/contracts/source-dependency-edge.valid.json +18 -0
- package/scripts/fixtures/contracts/task-control-revision.closed-without-receipt.invalid.json +37 -0
- package/scripts/fixtures/contracts/task-control-revision.valid.json +37 -0
- package/scripts/fixtures/contracts/task-envelope-v2.missing-workspace-identity.invalid.json +39 -0
- package/scripts/fixtures/contracts/task-envelope-v2.valid.json +54 -0
- package/scripts/fixtures/contracts/task-envelope-v2.workspace-mismatch.invalid.json +40 -0
- package/scripts/fixtures/contracts/validation-result.passed-without-evidence.invalid.json +29 -0
- package/scripts/fixtures/contracts/validation-result.valid.json +19 -0
- package/scripts/fixtures/contracts/validation-topology.dangling-requirement.invalid.json +32 -0
- package/scripts/fixtures/contracts/validation-topology.protected-environment.valid.json +32 -0
- package/scripts/fixtures/contracts/validation-topology.valid.json +32 -0
- package/scripts/fixtures/contracts/workspace-identity.missing-root.invalid.json +6 -0
- package/scripts/fixtures/contracts/workspace-identity.valid.json +14 -0
- package/scripts/fixtures/contracts/workspace-relationship.inferred-authority.invalid.json +13 -0
- package/scripts/fixtures/contracts/workspace-relationship.valid.json +13 -0
- package/scripts/fixtures/control-system/architecture-convergence-cases.json +25 -0
- package/scripts/fixtures/control-system/task-2.9-invalid-boundary-matrix.json +203 -0
- package/scripts/fixtures/control-system/task-4-diagnosis-health-separation.json +19 -0
- package/scripts/fixtures/workspaces/no-node-project/AGENTS.md +3 -0
- package/scripts/fixtures/workspaces/no-node-project/README.md +3 -0
- package/scripts/fixtures/workspaces/no-node-project/docs/adr/0001-durable-records.md +3 -0
- package/scripts/forgerail.mjs +467 -14
- package/scripts/lib/contracts.mjs +1132 -2
- package/scripts/shadow-comparison.mjs +1 -1
- package/scripts/validate-release.mjs +15 -15
- package/scripts/validate-universal-directory.mjs +151 -0
- package/skills/architecture-convergence-audit/SKILL.md +31 -0
- package/skills/architecture-convergence-audit/agents/openai.yaml +7 -0
- package/skills/architecture-convergence-audit/assets/github-issue-template.md +26 -0
- package/skills/architecture-convergence-audit/references/audit-contract.md +62 -0
- package/skills/workspace-health-review/references/health-review.md +15 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Control Authority 与 Validation 合同
|
|
2
|
+
|
|
3
|
+
ForgeRail 新增八个版本化 Control System 合同,不改变 alpha 合同、task-control 合同或任何 Host Adapter profile。
|
|
4
|
+
|
|
5
|
+
| 合同 | Schema 版本 | 文件 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Review Authority Requirement | 1.0 | `contracts/review-authority-requirement-v1.schema.json` |
|
|
8
|
+
| Authority Evidence | 1.0 | `contracts/authority-evidence-v1.schema.json` |
|
|
9
|
+
| Validation Topology | 1.0 | `contracts/validation-topology-v1.schema.json` |
|
|
10
|
+
| Validation Result | 1.0 | `contracts/validation-result-v1.schema.json` |
|
|
11
|
+
| Execution Context Identity | 1.0 | `contracts/execution-context-identity-v1.schema.json` |
|
|
12
|
+
| Host Adapter Observation | 1.0 | `contracts/host-adapter-observation-v1.schema.json` |
|
|
13
|
+
| Provider Adapter Observation | 1.0 | `contracts/provider-adapter-observation-v1.schema.json` |
|
|
14
|
+
| Limited Reason | 1.0 | `contracts/limited-reason-v1.schema.json` |
|
|
15
|
+
|
|
16
|
+
这些合同建立以下首批边界:
|
|
17
|
+
|
|
18
|
+
- Review Authority 与 Operation Authority、Operation Grant 相互独立。Requirement 绑定 authority class、exact subject/scope、accepted evidence、quorum、actor exclusion、owner coverage、freshness、默认不可替代和有界 waiver policy。
|
|
19
|
+
- Authority Evidence 引用 Evidence Identity,并区分 `current`、`stale`、`revoked`、`dismissed`、`expired`、`superseded`;已经失效的 evidence 不能继续声明 current。
|
|
20
|
+
- Validation Topology 连接 changed surface、owner、consumer、selected requirement、governance dependency edge、accepted trust class、expected result、entrypoint 与 evidence locator。
|
|
21
|
+
- Validation Result 保留七种状态:`passed`、`failed`、`blocked`、`unavailable`、`not_applicable`、`not_selected`、`waived`。passed 必须有 evidence;waiver 必须绑定 current authority、exact requirement、subject、scope 与 expiry。
|
|
22
|
+
- Execution Context Identity 记录权威 entrypoint、invocation root、executor/runner、trust class、tool、provider 与 sanitized external dependency。入口消费外部依赖不代表该依赖成为治理来源。
|
|
23
|
+
- Host/Provider Adapter observation 按 capability 报告状态。安装、认证、激活或 mutation capability 均不能 mint authority;observation 的 `authorizationClaim` 固定为 `false`。
|
|
24
|
+
- Limited Reason 使用有界 code、长度受限且 sanitized 的摘要、evidence pointer 与 sanitized locator。新合同使用该结构,但不修改已经版本化的 Profile 或 Task 合同。
|
|
25
|
+
|
|
26
|
+
本任务只定义 schema 与 deterministic validation contract。Authority、Topology、Execution Context、Adapter evaluator 仍属于后续任务。版本兼容的 Pack composition schema 已定义在 [Cross-Workspace Pack Composition 合同](cross-workspace-pack-composition-contract.zh-CN.md);pre-evaluator invalid boundary 已记录在 [Control System Fixture Matrix](control-system-fixture-matrix.zh-CN.md)。canonical serialization、digest 与 version negotiation 仍属于 task 2.10。
|
|
27
|
+
|
|
28
|
+
运行聚焦校验:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node scripts/forgerail.mjs validate
|
|
32
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
33
|
+
node scripts/forgerail.mjs validate-contract --type review-authority-requirement --file scripts/fixtures/contracts/review-authority-requirement.valid.json
|
|
34
|
+
node scripts/forgerail.mjs validate-contract --type validation-result --file scripts/fixtures/contracts/validation-result.valid.json
|
|
35
|
+
node scripts/forgerail.mjs validate-contract --type provider-adapter-observation --file scripts/fixtures/contracts/provider-adapter-observation.valid.json
|
|
36
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Control Profile Contracts
|
|
2
|
+
|
|
3
|
+
ForgeRail keeps the alpha contracts intact while introducing the first versioned Control System contracts inside the same package.
|
|
4
|
+
|
|
5
|
+
| Contract | Schema version | File |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Workspace Identity | 1.0 | `contracts/workspace-identity-v1.schema.json` |
|
|
8
|
+
| Workspace Relationship | 1.0 | `contracts/workspace-relationship-v1.schema.json` |
|
|
9
|
+
| Governance Source | 1.0 | `contracts/governance-source-v1.schema.json` |
|
|
10
|
+
| Source Dependency Edge | 1.0 | `contracts/source-dependency-edge-v1.schema.json` |
|
|
11
|
+
| Rule Claim | 1.0 | `contracts/rule-claim-v1.schema.json` |
|
|
12
|
+
| Effective Profile | 2.0 | `contracts/effective-profile-v2.schema.json` |
|
|
13
|
+
| Profile Explanation | 1.0 | `contracts/profile-explanation-v1.schema.json` |
|
|
14
|
+
|
|
15
|
+
`effective-profile-v2` is intentionally separate from the frozen alpha `effective-profile-v1` contract. It binds claims and dependency edges to one exact Workspace Identity and makes `complete`, `degraded`, and `unresolved` explicit without changing the alpha resolver or user entry.
|
|
16
|
+
|
|
17
|
+
The contracts enforce these initial invariants:
|
|
18
|
+
|
|
19
|
+
- filesystem nesting does not transfer authority;
|
|
20
|
+
- only confirmed or provider-declared relationships may apply scoped governance;
|
|
21
|
+
- inferred claims cannot be enforceable;
|
|
22
|
+
- unavailable, ambiguous, or unverified sources and dependencies carry a limited reason;
|
|
23
|
+
- a required unavailable dependency, unresolved claim, or conflict cannot appear in a complete Profile;
|
|
24
|
+
- Profile Explanation contains identities, dispositions, reason codes, confirmation needs, and limited reasons rather than private rule bodies.
|
|
25
|
+
|
|
26
|
+
Task Envelope, Operation Grant, Control Revision, Evidence Identity, Return Receipt, and rollback lineage are defined in [Control Task Contracts](control-task-contracts.md). Review Authority lifecycle, Validation Topology, Execution Context, and Adapter observations are defined in [Control Authority And Validation Contracts](control-authority-validation-contracts.md). Pack bundles remain later work.
|
|
27
|
+
|
|
28
|
+
Run the focused catalog and fixture checks with:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node scripts/forgerail.mjs validate
|
|
32
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
33
|
+
node scripts/forgerail.mjs validate-contract --type workspace-identity --file scripts/fixtures/contracts/workspace-identity.valid.json
|
|
34
|
+
node scripts/forgerail.mjs validate-contract --type effective-profile-v2 --file scripts/fixtures/contracts/effective-profile-v2.valid.json
|
|
35
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Control Profile 合同
|
|
2
|
+
|
|
3
|
+
ForgeRail 在同一个 package 内增加首批版本化 Control System 合同,同时保持现有 alpha 合同不变。
|
|
4
|
+
|
|
5
|
+
| 合同 | Schema 版本 | 文件 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Workspace Identity | 1.0 | `contracts/workspace-identity-v1.schema.json` |
|
|
8
|
+
| Workspace Relationship | 1.0 | `contracts/workspace-relationship-v1.schema.json` |
|
|
9
|
+
| Governance Source | 1.0 | `contracts/governance-source-v1.schema.json` |
|
|
10
|
+
| Source Dependency Edge | 1.0 | `contracts/source-dependency-edge-v1.schema.json` |
|
|
11
|
+
| Rule Claim | 1.0 | `contracts/rule-claim-v1.schema.json` |
|
|
12
|
+
| Effective Profile | 2.0 | `contracts/effective-profile-v2.schema.json` |
|
|
13
|
+
| Profile Explanation | 1.0 | `contracts/profile-explanation-v1.schema.json` |
|
|
14
|
+
|
|
15
|
+
`effective-profile-v2` 与冻结的 alpha `effective-profile-v1` 明确分开。新合同把 claims 和 dependency edges 绑定到一个精确 Workspace Identity,并显式区分 `complete`、`degraded` 与 `unresolved`,但不改变 alpha resolver 或用户入口。
|
|
16
|
+
|
|
17
|
+
首批合同固定以下不变量:
|
|
18
|
+
|
|
19
|
+
- 目录物理嵌套不转移 authority;
|
|
20
|
+
- 只有 confirmed 或 provider-declared relationship 才能让 scoped governance 生效;
|
|
21
|
+
- inferred claim 不能直接 enforce;
|
|
22
|
+
- unavailable、ambiguous 或 unverified source/dependency 必须携带 limited reason;
|
|
23
|
+
- required dependency 不可用、claim unresolved 或存在 conflict 时,Profile 不能声明 complete;
|
|
24
|
+
- Profile Explanation 只携带 identity、disposition、reason code、confirmation need 和 limited reason,不复制私有规则正文。
|
|
25
|
+
|
|
26
|
+
Task Envelope、Operation Grant、Control Revision、Evidence Identity、Return Receipt 与 rollback lineage 已定义在 [Control Task 合同](control-task-contracts.zh-CN.md)中。Review Authority lifecycle、Validation Topology、Execution Context 与 Adapter observation 已定义在 [Control Authority 与 Validation 合同](control-authority-validation-contracts.zh-CN.md)中。Pack bundle 仍属于后续工作。
|
|
27
|
+
|
|
28
|
+
运行聚焦校验:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node scripts/forgerail.mjs validate
|
|
32
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
33
|
+
node scripts/forgerail.mjs validate-contract --type workspace-identity --file scripts/fixtures/contracts/workspace-identity.valid.json
|
|
34
|
+
node scripts/forgerail.mjs validate-contract --type effective-profile-v2 --file scripts/fixtures/contracts/effective-profile-v2.valid.json
|
|
35
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Control System Fixture Matrix
|
|
2
|
+
|
|
3
|
+
ForgeRail's pre-evaluator fixture gate covers every registered contract schema with at least one schema-valid and one schema-invalid focused fixture. The deterministic `validate-fixture-matrix` command checks all 35 registered contract types, verifies every referenced fixture through its existing dependency-free contract validator, and requires the ten task 2.9 invalid boundaries exactly once.
|
|
4
|
+
|
|
5
|
+
The required invalid boundaries are:
|
|
6
|
+
|
|
7
|
+
- missing Workspace Identity;
|
|
8
|
+
- stale Profile Change Candidate base digest;
|
|
9
|
+
- forged Operation Grant digest;
|
|
10
|
+
- ineligible Operation Grant issuer;
|
|
11
|
+
- duplicate actor used for a distinct-actor quorum;
|
|
12
|
+
- revoked approval evidence;
|
|
13
|
+
- validation evidence from the wrong trust class;
|
|
14
|
+
- dangling governance dependency;
|
|
15
|
+
- Return Receipt bound to a changed subject;
|
|
16
|
+
- cross-workspace authority, Operation Grant, or Receipt collapse.
|
|
17
|
+
|
|
18
|
+
## Validation Layers
|
|
19
|
+
|
|
20
|
+
`schema` cases contain at least one structurally invalid contract and are rejected by the current hand-validator. `cross-contract` cases intentionally keep every component schema-valid and declare the observations that a later evaluator must compare. The fixture checker validates coverage, references, component schema validity, expected rejection labels, and the explicit `evaluatorImplemented: false` boundary; it does not make transition, quorum, issuer, trust, freshness, subject, or dependency decisions.
|
|
21
|
+
|
|
22
|
+
The alpha Profile Change Candidate does not contain a base-digest field, and canonical Grant digest computation is not defined yet. Their task 2.9 cases therefore preserve mismatching comparison inputs in fixture metadata without modifying the existing contract or implementing task 2.10 serialization/digest rules. The future Profile Change Candidate successor and evaluators must consume these fixtures when their separately gated tasks begin.
|
|
23
|
+
|
|
24
|
+
Run the focused and full checks with:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node scripts/forgerail.mjs validate-fixture-matrix
|
|
28
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
29
|
+
npm test
|
|
30
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Control System Fixture Matrix
|
|
2
|
+
|
|
3
|
+
ForgeRail 的 pre-evaluator fixture gate 为每个已注册 contract schema 至少提供一个 schema-valid 与一个 schema-invalid focused fixture。确定性的 `validate-fixture-matrix` 命令检查全部 35 个已注册 contract type,用既有 dependency-free contract validator 验证每个引用 fixture,并要求 task 2.9 的十类 invalid boundary 各出现且只出现一次。
|
|
4
|
+
|
|
5
|
+
必须覆盖的 invalid boundary 包括:
|
|
6
|
+
|
|
7
|
+
- 缺失 Workspace Identity;
|
|
8
|
+
- Profile Change Candidate 的 base digest 已 stale;
|
|
9
|
+
- Operation Grant digest forged;
|
|
10
|
+
- Operation Grant issuer 不具备资格;
|
|
11
|
+
- distinct-actor quorum 重复使用同一 actor;
|
|
12
|
+
- approval evidence 已 revoked;
|
|
13
|
+
- validation evidence 的 trust class 错误;
|
|
14
|
+
- governance dependency dangling;
|
|
15
|
+
- Return Receipt 绑定了已经变化的 subject;
|
|
16
|
+
- 跨 workspace 折叠 authority、Operation Grant 或 Receipt。
|
|
17
|
+
|
|
18
|
+
## Validation layer
|
|
19
|
+
|
|
20
|
+
`schema` case 至少包含一个结构无效的 contract,并由当前 hand-validator 拒绝。`cross-contract` case 刻意保持所有 component schema-valid,只声明未来 evaluator 必须比较的 observation。fixture checker 只验证覆盖率、引用、component schema validity、预期拒绝标签与显式 `evaluatorImplemented: false` 边界;它不做 transition、quorum、issuer、trust、freshness、subject 或 dependency 决策。
|
|
21
|
+
|
|
22
|
+
alpha Profile Change Candidate 尚无 base-digest 字段,canonical Grant digest 计算也尚未定义。因此 task 2.9 fixture 只在 metadata 中保留不一致的 comparison input,不修改既有合同,也不实现 task 2.10 serialization/digest 规则。未来的 Profile Change Candidate successor 与 evaluator 必须在各自独立 gate 获批后消费这些 fixture。
|
|
23
|
+
|
|
24
|
+
运行 focused 与 full check:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node scripts/forgerail.mjs validate-fixture-matrix
|
|
28
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
29
|
+
npm test
|
|
30
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Control Task Contracts
|
|
2
|
+
|
|
3
|
+
ForgeRail keeps the alpha Task Envelope and Return Receipt intact while adding versioned Control System task contracts in the same package.
|
|
4
|
+
|
|
5
|
+
| Contract | Schema version | File |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Task Envelope | 2.0 | `contracts/task-envelope-v2.schema.json` |
|
|
8
|
+
| Operation Authority Requirement | 1.0 | `contracts/operation-authority-requirement-v1.schema.json` |
|
|
9
|
+
| Operation Grant | 1.0 | `contracts/operation-grant-v1.schema.json` |
|
|
10
|
+
| Task Control Revision | 1.0 | `contracts/task-control-revision-v1.schema.json` |
|
|
11
|
+
| Entry Mode | 1.0 | `contracts/entry-mode-v1.schema.json` |
|
|
12
|
+
| Phase/Slice Correlation | 1.0 | `contracts/phase-slice-correlation-v1.schema.json` |
|
|
13
|
+
| Gate Result | 1.0 | `contracts/gate-result-v1.schema.json` |
|
|
14
|
+
| Evidence Identity | 1.0 | `contracts/evidence-identity-v1.schema.json` |
|
|
15
|
+
| Return Receipt | 2.0 | `contracts/return-receipt-v2.schema.json` |
|
|
16
|
+
| Rollback Envelope Lineage | 1.0 | `contracts/rollback-envelope-lineage-v1.schema.json` |
|
|
17
|
+
|
|
18
|
+
These contracts establish the task-control identity boundary without implementing the evaluator:
|
|
19
|
+
|
|
20
|
+
- every Envelope, revision, gate, evidence item, and Receipt binds one exact Workspace Identity and subject;
|
|
21
|
+
- `new`, `resumed`, and `imported` entry modes remain explicit, and resumed/imported work requires source evidence;
|
|
22
|
+
- Core closure stays on one exact owner phase/slice and never claims aggregate closure;
|
|
23
|
+
- an Operation Grant binds one executor, operation, exact target/ref/environment, subject, scope, authority requirement, issuer evidence, and validity window;
|
|
24
|
+
- review or validation evidence does not mint an Operation Grant;
|
|
25
|
+
- task-control revisions and Receipts are immutable identity-bearing claims; changed subjects or evidence require successors;
|
|
26
|
+
- a Host receipt is not complete until receipt verification is satisfied and unresolved deviations are absent;
|
|
27
|
+
- rollback uses a new Envelope revision, rollback-specific grants, validation, and Receipt; forward grants cannot be reused.
|
|
28
|
+
|
|
29
|
+
The alpha `task-envelope-v1` and `return-receipt-v1` schemas and their runtime paths are unchanged. Review-authority lifecycle, validation topology/result, Execution Context, adapter observations, and bounded limited reasons are defined in [Control Authority And Validation Contracts](control-authority-validation-contracts.md). The Workspace Receipt Bundle is defined by the [Cross-Workspace Pack Composition Contract](cross-workspace-pack-composition-contract.md), and its pre-evaluator invalid boundaries are included in the [Control System Fixture Matrix](control-system-fixture-matrix.md). Canonical serialization, digest calculation, and version negotiation remain later work.
|
|
30
|
+
|
|
31
|
+
Run the focused checks with:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
node scripts/forgerail.mjs validate
|
|
35
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
36
|
+
node scripts/forgerail.mjs validate-contract --type task-envelope-v2 --file scripts/fixtures/contracts/task-envelope-v2.valid.json
|
|
37
|
+
node scripts/forgerail.mjs validate-contract --type operation-grant --file scripts/fixtures/contracts/operation-grant.valid.json
|
|
38
|
+
node scripts/forgerail.mjs validate-contract --type return-receipt-v2 --file scripts/fixtures/contracts/return-receipt-v2.valid.json
|
|
39
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Control Task 合同
|
|
2
|
+
|
|
3
|
+
ForgeRail 在同一个 package 内增加版本化 Control System 任务合同,同时保持 alpha Task Envelope 与 Return Receipt 不变。
|
|
4
|
+
|
|
5
|
+
| 合同 | Schema 版本 | 文件 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Task Envelope | 2.0 | `contracts/task-envelope-v2.schema.json` |
|
|
8
|
+
| Operation Authority Requirement | 1.0 | `contracts/operation-authority-requirement-v1.schema.json` |
|
|
9
|
+
| Operation Grant | 1.0 | `contracts/operation-grant-v1.schema.json` |
|
|
10
|
+
| Task Control Revision | 1.0 | `contracts/task-control-revision-v1.schema.json` |
|
|
11
|
+
| Entry Mode | 1.0 | `contracts/entry-mode-v1.schema.json` |
|
|
12
|
+
| Phase/Slice Correlation | 1.0 | `contracts/phase-slice-correlation-v1.schema.json` |
|
|
13
|
+
| Gate Result | 1.0 | `contracts/gate-result-v1.schema.json` |
|
|
14
|
+
| Evidence Identity | 1.0 | `contracts/evidence-identity-v1.schema.json` |
|
|
15
|
+
| Return Receipt | 2.0 | `contracts/return-receipt-v2.schema.json` |
|
|
16
|
+
| Rollback Envelope Lineage | 1.0 | `contracts/rollback-envelope-lineage-v1.schema.json` |
|
|
17
|
+
|
|
18
|
+
这些合同只固定任务控制的身份与边界,不实现 evaluator:
|
|
19
|
+
|
|
20
|
+
- 每个 Envelope、revision、gate、evidence 与 Receipt 都绑定一个精确 Workspace Identity 和 subject;
|
|
21
|
+
- `new`、`resumed`、`imported` entry mode 保持显式,resumed/imported 必须携带来源证据;
|
|
22
|
+
- Core closure 只覆盖一个精确 owner phase/slice,不能声明 aggregate closure;
|
|
23
|
+
- Operation Grant 精确绑定 executor、operation、target/ref/environment、subject、scope、authority requirement、issuer evidence 与有效期;
|
|
24
|
+
- review 或 validation evidence 不能 mint Operation Grant;
|
|
25
|
+
- task-control revision 与 Receipt 是带 identity 的不可变 claim;subject 或 evidence 变化时必须产生 successor;
|
|
26
|
+
- Host receipt 在 receipt verification 满足且没有未解决 deviation 前不能 complete;
|
|
27
|
+
- rollback 必须使用新 Envelope revision、rollback-specific grant、validation 与 Receipt,禁止复用 forward grant。
|
|
28
|
+
|
|
29
|
+
冻结的 alpha `task-envelope-v1`、`return-receipt-v1` schema 与 runtime path 均不改变。Review Authority lifecycle、Validation Topology/result、Execution Context、Adapter observation 与 bounded limited reason 已定义在 [Control Authority 与 Validation 合同](control-authority-validation-contracts.zh-CN.md)中。Workspace Receipt Bundle 已由 [Cross-Workspace Pack Composition 合同](cross-workspace-pack-composition-contract.zh-CN.md)定义,其 pre-evaluator invalid boundary 已纳入 [Control System Fixture Matrix](control-system-fixture-matrix.zh-CN.md)。canonical serialization、digest 计算与 version negotiation 仍属于后续任务。
|
|
30
|
+
|
|
31
|
+
运行聚焦校验:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
node scripts/forgerail.mjs validate
|
|
35
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
36
|
+
node scripts/forgerail.mjs validate-contract --type task-envelope-v2 --file scripts/fixtures/contracts/task-envelope-v2.valid.json
|
|
37
|
+
node scripts/forgerail.mjs validate-contract --type operation-grant --file scripts/fixtures/contracts/operation-grant.valid.json
|
|
38
|
+
node scripts/forgerail.mjs validate-contract --type return-receipt-v2 --file scripts/fixtures/contracts/return-receipt-v2.valid.json
|
|
39
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Cross-Workspace Pack Composition Contract
|
|
2
|
+
|
|
3
|
+
ForgeRail defines one versioned `cross-workspace-pack-composition-v1` contract for an optional Cross-Workspace Orchestration Pack. The Pack composes independent Core-governed workspaces; it does not introduce a second state model, authority system, grant mechanism, or receipt-verification path.
|
|
4
|
+
|
|
5
|
+
The contract binds these composition surfaces:
|
|
6
|
+
|
|
7
|
+
- `coreCompatibility` declares the supported Workspace Identity, Task Envelope, Return Receipt, and Phase/Slice Correlation schema versions, plus the Evidence Identities that support the compatibility claim.
|
|
8
|
+
- `workspaceSet` identifies at least two independent owner workspaces, the optional coordinator workspace, the aggregate writer, and the governing relationships.
|
|
9
|
+
- every node keeps one owner Workspace Identity, one writer identity, one `task-envelope-v2` reference, one `phase-slice-correlation-v1` reference, and at most one `return-receipt-v2` reference;
|
|
10
|
+
- dependency edges remain directional and may unlock only from a Core-verified Receipt that the coordinator independently accepts;
|
|
11
|
+
- phase aggregation partitions every required node into accepted, pending, failed, blocked, or stale state; aggregate closure is permitted only when all required nodes are accepted;
|
|
12
|
+
- the immutable Workspace Receipt Bundle binds the composition, Workspace Set, phases, accepted Core Receipts, dependency status, unresolved nodes, deviations, and next eligible nodes.
|
|
13
|
+
|
|
14
|
+
## Kernel Boundaries
|
|
15
|
+
|
|
16
|
+
The Pack cannot redefine Core or weaken Kernel invariants. Its invariant flags are fixed to `false`: no state-model redefinition, Operation Grant minting, authority substitution, waiver or freshness broadening, receipt-verification bypass, or treating transport as acceptance.
|
|
17
|
+
|
|
18
|
+
Receipt delivery, Core verification, and coordinator acceptance remain independent claims. A delivered Receipt is not necessarily verified or accepted. A node cannot become accepted, unlock a required successor, or enter an accepted bundle until its Core Receipt is verified and coordinator acceptance carries Evidence Identity references.
|
|
19
|
+
|
|
20
|
+
Writer identity is explicit. Concurrent nodes cannot share a writer unless a dependency edge orders them. Dependency edges never transfer authority, Operation Grants, or Receipts between workspaces.
|
|
21
|
+
|
|
22
|
+
This contract defines only the schema, deterministic hand-validation, schema-native assertions, and focused fixtures. The pre-evaluator authority-collapse and other invalid boundaries are recorded in the [Control System Fixture Matrix](control-system-fixture-matrix.md); canonical serialization, digest computation, and version negotiation remain task 2.10. No Pack runtime, evaluator, adapter expansion, or alpha contract migration is implemented here.
|
|
23
|
+
|
|
24
|
+
Run the focused checks with:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node scripts/forgerail.mjs validate
|
|
28
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
29
|
+
node scripts/forgerail.mjs validate-contract --type cross-workspace-pack-composition --file scripts/fixtures/contracts/cross-workspace-pack-composition.valid.json
|
|
30
|
+
node scripts/forgerail.mjs validate-contract --type cross-workspace-pack-composition --file scripts/fixtures/contracts/cross-workspace-pack-composition.false-closure.invalid.json
|
|
31
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Cross-Workspace Pack Composition 合同
|
|
2
|
+
|
|
3
|
+
ForgeRail 为可选的 Cross-Workspace Orchestration Pack 定义一个版本化 `cross-workspace-pack-composition-v1` 合同。Pack 只组合多个独立的 Core-governed workspace;它不引入第二套状态模型、authority system、grant mechanism 或 receipt-verification path。
|
|
4
|
+
|
|
5
|
+
合同绑定以下 composition surface:
|
|
6
|
+
|
|
7
|
+
- `coreCompatibility` 声明支持的 Workspace Identity、Task Envelope、Return Receipt 与 Phase/Slice Correlation schema 版本,以及支撑兼容性声明的 Evidence Identity;
|
|
8
|
+
- `workspaceSet` 标识至少两个独立 owner workspace、可选 coordinator workspace、aggregate writer 与治理 relationship;
|
|
9
|
+
- 每个 node 保留一个 owner Workspace Identity、一个 writer identity、一个 `task-envelope-v2` 引用、一个 `phase-slice-correlation-v1` 引用,并且最多引用一个 `return-receipt-v2`;
|
|
10
|
+
- dependency edge 保持有向,只能由 Core 已验证且 coordinator 独立接受的 Receipt 解锁;
|
|
11
|
+
- phase aggregation 把每个 required node 精确归入 accepted、pending、failed、blocked 或 stale;只有全部 required node 都 accepted 时才能声明 aggregate closure;
|
|
12
|
+
- 不可变 Workspace Receipt Bundle 绑定 composition、Workspace Set、phase、已接受的 Core Receipt、dependency status、未解决 node、deviation 与 next eligible node。
|
|
13
|
+
|
|
14
|
+
## Kernel 边界
|
|
15
|
+
|
|
16
|
+
Pack 不能重定义 Core,也不能弱化 Kernel invariant。合同中的 invariant flag 全部固定为 `false`:禁止重定义状态模型、mint Operation Grant、authority substitution、扩大 waiver/freshness、绕过 receipt verification,或把 transport 当作 acceptance。
|
|
17
|
+
|
|
18
|
+
Receipt delivery、Core verification 与 coordinator acceptance 是相互独立的 claim。delivered Receipt 不必然 verified 或 accepted。在 Core Receipt 完成验证且 coordinator acceptance 携带 Evidence Identity 引用之前,node 不能成为 accepted、不能解锁 required successor,也不能进入 accepted bundle。
|
|
19
|
+
|
|
20
|
+
writer identity 必须显式记录。并发 node 不能共享 writer,除非 dependency edge 已经为它们建立顺序。dependency edge 永远不能在 workspace 之间转移 authority、Operation Grant 或 Receipt。
|
|
21
|
+
|
|
22
|
+
本合同只定义 schema、deterministic hand-validation、schema-native assertion 与 focused fixture。pre-evaluator authority-collapse 及其他 invalid boundary 已记录在 [Control System Fixture Matrix](control-system-fixture-matrix.zh-CN.md);canonical serialization、digest 计算与 version negotiation 属于 task 2.10。本任务不实现 Pack runtime、evaluator、adapter expansion 或 alpha contract migration。
|
|
23
|
+
|
|
24
|
+
运行聚焦校验:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node scripts/forgerail.mjs validate
|
|
28
|
+
node scripts/forgerail.mjs validate-fixtures
|
|
29
|
+
node scripts/forgerail.mjs validate-contract --type cross-workspace-pack-composition --file scripts/fixtures/contracts/cross-workspace-pack-composition.valid.json
|
|
30
|
+
node scripts/forgerail.mjs validate-contract --type cross-workspace-pack-composition --file scripts/fixtures/contracts/cross-workspace-pack-composition.false-closure.invalid.json
|
|
31
|
+
```
|
package/docs/installation.md
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
ForgeRail is primarily an Agent Plugin. The npm package is an optional deterministic CLI and compatibility payload.
|
|
4
4
|
|
|
5
|
+
The canonical source currently proposes `@echopath-labs/forgerail@0.1.0-alpha.2` / `v0.1.0-alpha.2`, but that candidate is not yet remotely integrated or released. Do not construct an installation command from a local version proposal. The commands below remain bound to the currently released alpha.1 until a separately approved alpha.2 release completes.
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
The intended default human route is the Universal Plugins Directory in ChatGPT or Codex. ForgeRail is **not currently available there**: the local Skills-only candidate still needs separately approved submission, OpenAI review, and developer publication. When a verified ForgeRail listing becomes available, use that interface and confirm the publisher and requested capabilities before installation.
|
|
10
|
+
|
|
11
|
+
The current available Agent Plugin route is the immutable `v0.1.0-alpha.1` EchoPath Labs Marketplace snapshot:
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
14
|
codex plugin marketplace add echopath-labs/forgerail --ref v0.1.0-alpha.1
|
|
@@ -17,6 +21,8 @@ Start a new Codex task after installation so discovery uses the installed snapsh
|
|
|
17
21
|
- `$forgerail-workspace-diagnosis`;
|
|
18
22
|
- `$workspace-health-review`.
|
|
19
23
|
|
|
24
|
+
This Agent Plugin route does not require the target project to have Node.js, `package.json`, `node_modules`, or the optional npm CLI.
|
|
25
|
+
|
|
20
26
|
The versioned Marketplace registration is the Plugin release identity; do not replace the tag with a mutable branch when reproducibility matters. For local canonical testing, build a disposable bundle or npm tarball; do not point production workspaces at an uncommitted source tree.
|
|
21
27
|
|
|
22
28
|
## Optional Capability Pack Plugins
|
|
@@ -83,6 +89,6 @@ Re-register the last validated Marketplace tag and reinstall the selected Plugin
|
|
|
83
89
|
|
|
84
90
|
## Release Boundary
|
|
85
91
|
|
|
86
|
-
|
|
92
|
+
Creating or submitting a Universal Plugins Directory draft, publishing a reviewed listing, publishing npm, moving `latest`, pushing a public candidate, tagging, creating a GitHub Release, or changing AGW lifecycle requires its own exact approval and receipt.
|
|
87
93
|
|
|
88
|
-
See [ForgeRail 0.1.0-alpha.1 Release Runbook](release.md) for the
|
|
94
|
+
See the historical [ForgeRail 0.1.0-alpha.1 Release Runbook](release.md) for the current release and the [ForgeRail 0.1.0-alpha.2 Candidate Runbook](release-alpha2.md) for the proposed source-first gate order. Neither document grants execution authority.
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
ForgeRail 的主要形态是 Agent Plugin;npm 包是可选的确定性 CLI 与兼容载荷。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
canonical source 当前拟议 `@echopath-labs/forgerail@0.1.0-alpha.2` / `v0.1.0-alpha.2`,但该候选尚未远端集成或发布。不要根据本地版本提案自行拼装安装命令。以下命令继续绑定当前已发布 alpha.1,直到另行批准的 alpha.2 发布完成。
|
|
6
|
+
|
|
7
|
+
面向人的目标默认入口是 ChatGPT 或 Codex 中的 Universal Plugins Directory。ForgeRail **当前尚未在该目录上线**:本地 Skills-only 候选仍需独立提交审批、OpenAI 审查和开发者发布。以后只有在核对真实 ForgeRail listing、publisher 和能力请求后,才应从界面安装。
|
|
8
|
+
|
|
9
|
+
当前可用的 Agent Plugin 路径是不可变的 EchoPath Labs Marketplace `v0.1.0-alpha.1` 快照:
|
|
6
10
|
|
|
7
11
|
```bash
|
|
8
12
|
codex plugin marketplace add echopath-labs/forgerail --ref v0.1.0-alpha.1
|
|
@@ -11,6 +15,8 @@ codex plugin add forgerail@echopath-labs
|
|
|
11
15
|
|
|
12
16
|
安装后启动一个新的 Codex 任务,使插件发现基于已安装快照。新任务必须发现 `$forgerail`、`$forgerail-workspace-diagnosis` 和 `$workspace-health-review`。需要可复现安装时,不要用可变分支替代精确 tag。
|
|
13
17
|
|
|
18
|
+
通过该 Agent Plugin 路径使用 ForgeRail,不要求目标项目安装 Node.js,也不要求存在 `package.json`、`node_modules` 或可选 npm CLI。
|
|
19
|
+
|
|
14
20
|
GitHub Rulesets、Release Safety 与 Thread Closure 是单独插件,只按项目需要安装:
|
|
15
21
|
|
|
16
22
|
```bash
|
|
@@ -55,6 +61,6 @@ npm install --global @echopath-labs/forgerail@0.1.0-alpha.1
|
|
|
55
61
|
|
|
56
62
|
升级时注册新的精确 Marketplace tag,重新安装已选择的插件,再启动新的 Codex 任务验证 Skill 发现与只读诊断;npm CLI 只能在精确 `@echopath-labs/forgerail` 版本之间升级。回滚时重新注册最近已验证 tag,或退回冻结的 AGW 版本;卸载可选 CLI 使用 `npm uninstall --global @echopath-labs/forgerail`,不得删除项目记录、Agent instructions 或 Git 历史。
|
|
57
63
|
|
|
58
|
-
npm 发布、移动 `latest`、推送公共候选、tag、GitHub Release 和 AGW
|
|
64
|
+
创建或提交 Universal Plugins Directory draft、发布已审查 listing、npm 发布、移动 `latest`、推送公共候选、tag、GitHub Release 和 AGW 生命周期变更都属于各自独立的精确审批门。
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
当前发布的历史门序见 [ForgeRail 0.1.0-alpha.1 发布 Runbook](release.zh-CN.md),拟议 source-first 门序见 [ForgeRail 0.1.0-alpha.2 候选 Runbook](release-alpha2.zh-CN.md)。两份文档都不授予执行权限。
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ForgeRail 0.1.0-alpha.2 Candidate Runbook
|
|
2
|
+
|
|
3
|
+
This source-first runbook governs the proposed `@echopath-labs/forgerail@0.1.0-alpha.2`, tag `v0.1.0-alpha.2`, and matching Agent Plugin projection. It does not grant `remote_integration_approval`, `release_approval`, `submission_approval`, or `lifecycle_change_approval`. The unscoped `forgerail@0.0.0-reserved.0` remains a reservation and must never receive product code or serve as an install or rollback source.
|
|
4
|
+
|
|
5
|
+
## Candidate integration
|
|
6
|
+
|
|
7
|
+
The public candidate is an ordinary child of the observed remote `main`. A future exact `remote_integration_approval` may push only the signed commit to `codex/forgerail-alpha2-scoped`, create one Draft PR, and observe Node.js 22 and 24 Plugin Contracts CI. The Draft PR base and publication comparison baseline remain bound to the observed remote `main`.
|
|
8
|
+
|
|
9
|
+
Any correction is an ordinary source-first successor commit. Do not force push, rewrite the candidate, transition the PR to Ready, merge, tag, publish, or create a release under remote-integration authority. Install and discover each external Capability Pack separately; availability never implies authentication, enablement, or mutation authority.
|
|
10
|
+
|
|
11
|
+
## Separate release gate
|
|
12
|
+
|
|
13
|
+
Only a later exact `release_approval` can authorize Ready/merge, scoped npm publication, dist-tags, annotated tag, GitHub prerelease, and disposable consumer verification. The merged public `main` tree must equal the final signed projection tree before release validation begins.
|
|
14
|
+
|
|
15
|
+
Run Node.js 22 and 24 checks for Core, contracts, external Packs, frozen AGW behavior coverage, release source, Directory readiness, disposable consumer lifecycle, pack metadata, and audit. Verify GitHub API/SSH/npm identity as `chasechou007` without exposing credentials. Preserve Apache-2.0, the unscoped reservation, and the immutable alpha.1 package/tag.
|
|
16
|
+
|
|
17
|
+
Do not unpublish or move an immutable version or Git tag. A shipped defect requires a forward version. Installation and diagnosis must leave project files unchanged unless the user separately approves an exact managed binding; return a Host Binding Receipt and confirm no implicit `.forgerail/` state.
|
|
18
|
+
|
|
19
|
+
## Independent Directory and lifecycle gates
|
|
20
|
+
|
|
21
|
+
Universal Plugins Directory draft, submission, review publication, verified publisher identity, Apps Management Write, portal regions and assets remain under a separate `submission_approval` or publication gate. AGW deprecation, redirect, archive, or deletion requires `lifecycle_change_approval`. No approval is transitive.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ForgeRail 0.1.0-alpha.2 候选 Runbook
|
|
2
|
+
|
|
3
|
+
本 source-first runbook 约束拟议的 `@echopath-labs/forgerail@0.1.0-alpha.2`、tag `v0.1.0-alpha.2` 与对应 Agent Plugin 投影。文档本身不授予 `remote_integration_approval`、`release_approval`、`submission_approval` 或 `lifecycle_change_approval`。未作用域 `forgerail@0.0.0-reserved.0` 继续只作占位,不得接收产品代码,也不是安装或回滚来源。
|
|
4
|
+
|
|
5
|
+
## 候选集成
|
|
6
|
+
|
|
7
|
+
公共候选是已观测远端 `main` 的普通子 commit。未来精确 `remote_integration_approval` 只能把签名 commit 推到 `codex/forgerail-alpha2-scoped`,创建一个 Draft PR,并观察 Node.js 22 and 24 Plugin Contracts CI。Draft PR base 与 publication comparison baseline 继续绑定已观测远端 `main`。
|
|
8
|
+
|
|
9
|
+
任何修正都必须形成普通的 source-first successor commit。remote integration 权限不允许 force push、历史重写、转 Ready、merge、tag、publish 或创建 Release。每个外部 Capability Pack 分别安装与发现;可用不等于认证、启用或获得 mutation authority。
|
|
10
|
+
|
|
11
|
+
## 独立发布门
|
|
12
|
+
|
|
13
|
+
只有后续精确 `release_approval` 才能授权 Ready/merge、scoped npm 发布、dist-tag、annotated tag、GitHub prerelease 与一次性消费者验证。发布验证开始前,合并后的公共 `main` tree 必须等于最终签名 projection tree。
|
|
14
|
+
|
|
15
|
+
在 Node.js 22 和 24 上运行 Core、contracts、external Packs、冻结 AGW 行为覆盖、release source、Directory readiness、一次性 consumer、pack metadata 与 audit。不得暴露凭据地确认 GitHub API/SSH/npm 身份为 `chasechou007`。保持 Apache-2.0、未作用域占位和不可变 alpha.1 package/tag。
|
|
16
|
+
|
|
17
|
+
Do not unpublish 或移动不可变 version/tag。已发布缺陷使用前向版本修复。安装和诊断默认不修改项目;只有用户另行批准精确 managed binding 后才写入,并返回 Host Binding Receipt,确认没有隐式 `.forgerail/` 状态。
|
|
18
|
+
|
|
19
|
+
## 独立 Directory 与生命周期门
|
|
20
|
+
|
|
21
|
+
Universal Plugins Directory draft、submit、review publication、verified publisher identity、Apps Management Write、portal regions/assets 继续属于独立 `submission_approval` 或 publication gate。AGW deprecation、redirect、archive 或 deletion 需要 `lifecycle_change_approval`。任何审批都不传递。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@echopath-labs/forgerail",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "Deterministic validation and diagnosis CLI for the ForgeRail Agent Plugin.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
".codex-plugin/",
|
|
12
|
+
"assets/",
|
|
12
13
|
"adapters/",
|
|
13
14
|
"contracts/",
|
|
14
15
|
"docs/",
|
|
16
|
+
"directory/",
|
|
15
17
|
"marketplace/",
|
|
16
18
|
"packs/",
|
|
17
19
|
"scripts/",
|
|
@@ -22,9 +24,11 @@
|
|
|
22
24
|
"LICENSE",
|
|
23
25
|
"NOTICE",
|
|
24
26
|
"PLUGIN.md",
|
|
27
|
+
"PRIVACY.md",
|
|
25
28
|
"README.md",
|
|
26
29
|
"README.zh-CN.md",
|
|
27
|
-
"SECURITY.md"
|
|
30
|
+
"SECURITY.md",
|
|
31
|
+
"TERMS.md"
|
|
28
32
|
],
|
|
29
33
|
"engines": {
|
|
30
34
|
"node": ">=22"
|
|
@@ -34,8 +38,10 @@
|
|
|
34
38
|
"test:consumer": "node scripts/disposable-consumer.mjs",
|
|
35
39
|
"test:release": "node scripts/validate-release.mjs",
|
|
36
40
|
"test:shadow": "node scripts/shadow-comparison.mjs",
|
|
41
|
+
"test:directory": "node scripts/validate-universal-directory.mjs",
|
|
42
|
+
"build:directory-candidate": "node scripts/build-universal-directory-candidate.mjs",
|
|
37
43
|
"diagnose:fixture": "node scripts/forgerail.mjs diagnose --workspace scripts/fixtures/workspaces/markdown-existing",
|
|
38
|
-
"prepublishOnly": "npm test && npm run test:shadow && npm run test:release && npm run test:consumer"
|
|
44
|
+
"prepublishOnly": "npm test && npm run test:shadow && npm run test:release && npm run test:consumer && npm run test:directory"
|
|
39
45
|
},
|
|
40
46
|
"repository": {
|
|
41
47
|
"type": "git",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0",
|
|
3
|
+
"id": "architecture-convergence-audit",
|
|
4
|
+
"purpose": "Trace capability ownership and return the smallest evidence-backed implementation boundary without changing the workspace.",
|
|
5
|
+
"entry": "skills/architecture-convergence-audit/SKILL.md",
|
|
6
|
+
"risk": "medium",
|
|
7
|
+
"states": ["available", "recommended", "enabled", "required", "blocked", "disabled"],
|
|
8
|
+
"triggers": [
|
|
9
|
+
"explicit architecture convergence request",
|
|
10
|
+
"mature capability appears rebuilt in a new context",
|
|
11
|
+
"duplicate identity state recovery parser or schema ownership signal"
|
|
12
|
+
],
|
|
13
|
+
"inputs": [
|
|
14
|
+
"requested outcomes and non-goals",
|
|
15
|
+
"reproducible baseline and freshness",
|
|
16
|
+
"governance source inventory",
|
|
17
|
+
"effective profile and task envelope",
|
|
18
|
+
"implementation callers persistence lifecycle and validation evidence"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": [],
|
|
21
|
+
"conflicts": [],
|
|
22
|
+
"approvals": [],
|
|
23
|
+
"validation": [
|
|
24
|
+
"analysis remains read-only and labels inference",
|
|
25
|
+
"ownership map traces durable facts and current consumers",
|
|
26
|
+
"deletion recommendations preserve required invariants and failure coverage",
|
|
27
|
+
"no profile task ledger receipt state or external tracker is created"
|
|
28
|
+
],
|
|
29
|
+
"receiptExtensions": ["convergenceStatus", "ownershipMap", "remainingBoundary"]
|
|
30
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { dirname, relative, resolve, sep } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const pluginRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
9
|
+
const include = [
|
|
10
|
+
".codex-plugin/plugin.json",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"PRIVACY.md",
|
|
13
|
+
"README.md",
|
|
14
|
+
"README.zh-CN.md",
|
|
15
|
+
"TERMS.md",
|
|
16
|
+
"assets",
|
|
17
|
+
"directory",
|
|
18
|
+
"docs/installation.md",
|
|
19
|
+
"docs/installation.zh-CN.md",
|
|
20
|
+
"scripts/build-universal-directory-candidate.mjs",
|
|
21
|
+
"scripts/fixtures/workspaces/no-node-project",
|
|
22
|
+
"scripts/validate-universal-directory.mjs",
|
|
23
|
+
"skills"
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
function sha256(content) {
|
|
27
|
+
return createHash("sha256").update(content).digest("hex");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function filesAt(path) {
|
|
31
|
+
if (!existsSync(path)) throw new Error(`candidate source does not exist: ${path}`);
|
|
32
|
+
if (statSync(path).isFile()) return [path];
|
|
33
|
+
return readdirSync(path, { withFileTypes: true })
|
|
34
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
|
35
|
+
.flatMap((entry) => filesAt(resolve(path, entry.name)));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const paths = [...new Set(include.flatMap((entry) => filesAt(resolve(pluginRoot, entry))))]
|
|
39
|
+
.sort((a, b) => a.localeCompare(b));
|
|
40
|
+
const inventory = paths.map((path) => {
|
|
41
|
+
const content = readFileSync(path);
|
|
42
|
+
return {
|
|
43
|
+
path: relative(pluginRoot, path).split(sep).join("/"),
|
|
44
|
+
bytes: content.length,
|
|
45
|
+
sha256: sha256(content)
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const manifest = JSON.parse(readFileSync(resolve(pluginRoot, ".codex-plugin/plugin.json"), "utf8"));
|
|
49
|
+
const candidate = JSON.parse(readFileSync(resolve(pluginRoot, "directory/submission-candidate.json"), "utf8"));
|
|
50
|
+
const result = {
|
|
51
|
+
schemaVersion: "1.0",
|
|
52
|
+
candidateType: "openai-universal-plugin-directory-skills-only",
|
|
53
|
+
status: "local_candidate",
|
|
54
|
+
approvalStatus: candidate.approval.status,
|
|
55
|
+
product: manifest.name,
|
|
56
|
+
pluginVersion: manifest.version,
|
|
57
|
+
privateBaseline: "59c7bb52f16cda2d47a8a49bb43860517f9bd7eb",
|
|
58
|
+
sourceDate: "2026-08-30",
|
|
59
|
+
inventory,
|
|
60
|
+
contentDigest: sha256(JSON.stringify(inventory)),
|
|
61
|
+
unresolvedGates: candidate.unresolvedGates,
|
|
62
|
+
nonMutations: candidate.confirmedNonMutations
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const outputFlag = process.argv.indexOf("--output");
|
|
66
|
+
const serialized = `${JSON.stringify(result, null, 2)}\n`;
|
|
67
|
+
if (outputFlag >= 0) {
|
|
68
|
+
const output = process.argv[outputFlag + 1];
|
|
69
|
+
if (!output) throw new Error("--output requires a path");
|
|
70
|
+
writeFileSync(resolve(process.cwd(), output), serialized);
|
|
71
|
+
}
|
|
72
|
+
process.stdout.write(serialized);
|
|
@@ -128,7 +128,7 @@ const result = {
|
|
|
128
128
|
adoptionPlan: adoptionPlan.strategy === "single-host-managed-block" && adoptionPlan.requiredConfirmation && adoptionPlan.mutations.length === 0 && proposed.path === "AGENTS.md",
|
|
129
129
|
targetUnchangedByPlanner: after === afterPlan,
|
|
130
130
|
explicitApprovedWrite: approvedDigest === sha256(approvedContent) && approvedContent.includes("forgerail:binding:codex:v1:start"),
|
|
131
|
-
equivalentNewTaskDiscovery: bindingReceipt.activationVerification.verified && discoveredSkills.length ===
|
|
131
|
+
equivalentNewTaskDiscovery: bindingReceipt.activationVerification.verified && discoveredSkills.length === 4,
|
|
132
132
|
bindingReceipt: receiptValidation.valid,
|
|
133
133
|
noPersistedGovernance: !existsSync(resolve(target, ".forgerail")),
|
|
134
134
|
launch: launch.valid && launch.launch.executionOwner === "host-agent",
|
package/scripts/fixtures/contracts/authority-evidence.revoked-without-invalidation.invalid.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0",
|
|
3
|
+
"authorityEvidenceId": "authority-evidence:owner-review-a",
|
|
4
|
+
"evidenceIdentityId": "evidence:provider-review-a",
|
|
5
|
+
"requirementId": "review:req-ownership",
|
|
6
|
+
"workspaceIdentityId": "workspace:forgerail",
|
|
7
|
+
"operation": "merge",
|
|
8
|
+
"authorityClass": "ownership_approval",
|
|
9
|
+
"subjectId": "subject:commit-a",
|
|
10
|
+
"actorId": "actor:owner-a",
|
|
11
|
+
"actorRelations": ["surface-owner"],
|
|
12
|
+
"scope": ["plugins/forgerail/contracts"],
|
|
13
|
+
"coveredSurfaceIds": ["surface:contracts"],
|
|
14
|
+
"lifecycle": "revoked",
|
|
15
|
+
"observedAt": "2026-08-18T15:30:00Z",
|
|
16
|
+
"effectiveAt": "2026-08-18T15:20:00Z",
|
|
17
|
+
"expiresAt": "2026-08-18T16:20:00Z",
|
|
18
|
+
"invalidatedAt": null,
|
|
19
|
+
"invalidationEvidenceIdentityId": null,
|
|
20
|
+
"supersededByAuthorityEvidenceId": null,
|
|
21
|
+
"limitedReason": null
|
|
22
|
+
}
|