@echopath-labs/forgerail 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/.codex-plugin/plugin.json +37 -0
  2. package/CHANGELOG.md +17 -0
  3. package/CONTRIBUTING.md +7 -0
  4. package/LICENSE +201 -0
  5. package/NOTICE +4 -0
  6. package/PLUGIN.md +11 -0
  7. package/README.md +65 -0
  8. package/README.zh-CN.md +39 -0
  9. package/SECURITY.md +7 -0
  10. package/adapters/claude-code.json +20 -0
  11. package/adapters/codex.json +20 -0
  12. package/adapters/cursor.json +20 -0
  13. package/contracts/adoption-plan.schema.json +53 -0
  14. package/contracts/capability-pack.schema.json +23 -0
  15. package/contracts/effective-profile.schema.json +42 -0
  16. package/contracts/host-adapter.schema.json +43 -0
  17. package/contracts/host-binding-receipt.schema.json +47 -0
  18. package/contracts/launch-contract.schema.json +15 -0
  19. package/contracts/profile-change-candidate.schema.json +21 -0
  20. package/contracts/return-receipt.schema.json +23 -0
  21. package/contracts/task-envelope.schema.json +21 -0
  22. package/docs/adoption.md +51 -0
  23. package/docs/adoption.zh-CN.md +51 -0
  24. package/docs/agw-coverage-baseline.json +21 -0
  25. package/docs/agw-coverage-baseline.md +21 -0
  26. package/docs/agw-frozen-baseline.json +51 -0
  27. package/docs/architecture-acceptance.md +38 -0
  28. package/docs/context-cost.md +13 -0
  29. package/docs/external-capability-packs.md +25 -0
  30. package/docs/installation.md +88 -0
  31. package/docs/installation.zh-CN.md +60 -0
  32. package/docs/migration-from-agw.md +12 -0
  33. package/docs/pack-authoring.md +17 -0
  34. package/docs/release.md +50 -0
  35. package/docs/release.zh-CN.md +50 -0
  36. package/package.json +48 -0
  37. package/packs/workspace-health-review.json +15 -0
  38. package/scripts/disposable-consumer.mjs +143 -0
  39. package/scripts/fixtures/contracts/adoption-plan.multi-host.valid.json +44 -0
  40. package/scripts/fixtures/contracts/adoption-plan.mutating.invalid.json +18 -0
  41. package/scripts/fixtures/contracts/adoption-plan.single-host.valid.json +27 -0
  42. package/scripts/fixtures/contracts/effective-profile.valid.json +29 -0
  43. package/scripts/fixtures/contracts/host-adapter.claude-code.profile-only.valid.json +14 -0
  44. package/scripts/fixtures/contracts/host-adapter.codex.valid.json +17 -0
  45. package/scripts/fixtures/contracts/host-adapter.cursor.profile-only.valid.json +14 -0
  46. package/scripts/fixtures/contracts/host-binding-receipt.unverified.invalid.json +27 -0
  47. package/scripts/fixtures/contracts/host-binding-receipt.valid.json +27 -0
  48. package/scripts/fixtures/contracts/launch-contract.valid.json +19 -0
  49. package/scripts/fixtures/contracts/profile-change-candidate.valid.json +13 -0
  50. package/scripts/fixtures/contracts/profile-input.available-pack.json +26 -0
  51. package/scripts/fixtures/contracts/profile-input.conflict.json +20 -0
  52. package/scripts/fixtures/contracts/profile-input.external-rulesets.json +11 -0
  53. package/scripts/fixtures/contracts/profile-input.orchestration-available.json +11 -0
  54. package/scripts/fixtures/contracts/return-receipt.deviation.invalid.json +15 -0
  55. package/scripts/fixtures/contracts/return-receipt.valid.json +15 -0
  56. package/scripts/fixtures/contracts/task-envelope.overlap.invalid.json +13 -0
  57. package/scripts/fixtures/contracts/task-envelope.valid.json +13 -0
  58. package/scripts/fixtures/workspaces/empty-records/README.md +3 -0
  59. package/scripts/fixtures/workspaces/markdown-existing/AGENTS.md +3 -0
  60. package/scripts/fixtures/workspaces/markdown-existing/docs/adr/0001-record-strategy.md +3 -0
  61. package/scripts/fixtures/workspaces/markdown-existing/package.json +7 -0
  62. package/scripts/forgerail.mjs +210 -0
  63. package/scripts/lib/adoption.mjs +158 -0
  64. package/scripts/lib/bundle.mjs +77 -0
  65. package/scripts/lib/composition.mjs +96 -0
  66. package/scripts/lib/contracts.mjs +316 -0
  67. package/scripts/lib/diagnosis.mjs +93 -0
  68. package/scripts/shadow-comparison.mjs +98 -0
  69. package/scripts/validate-external-packs.mjs +27 -0
  70. package/scripts/validate-release.mjs +194 -0
  71. package/skills/forgerail/SKILL.md +53 -0
  72. package/skills/forgerail/agents/openai.yaml +7 -0
  73. package/skills/forgerail/references/adoption.md +13 -0
  74. package/skills/forgerail/references/contracts.md +57 -0
  75. package/skills/forgerail/references/profile-resolution.md +14 -0
  76. package/skills/forgerail-workspace-diagnosis/SKILL.md +42 -0
  77. package/skills/forgerail-workspace-diagnosis/agents/openai.yaml +7 -0
  78. package/skills/forgerail-workspace-diagnosis/references/record-strategies.md +13 -0
  79. package/skills/workspace-health-review/SKILL.md +27 -0
  80. package/skills/workspace-health-review/agents/openai.yaml +7 -0
  81. package/skills/workspace-health-review/references/health-review.md +21 -0
  82. package/templates/FORGERAIL.md +15 -0
  83. package/templates/bindings/claude-code-thin.md +5 -0
  84. package/templates/bindings/codex-compact.md +5 -0
  85. package/templates/bindings/codex-thin.md +5 -0
  86. package/templates/bindings/cursor-thin.mdc +7 -0
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "forgerail",
3
+ "version": "0.1.0-alpha.1",
4
+ "description": "Engineering guidance and governance for coding agents, with workspace diagnosis and composable capability packs.",
5
+ "author": {
6
+ "name": "EchoPath Labs",
7
+ "url": "https://github.com/echopath-labs"
8
+ },
9
+ "homepage": "https://github.com/echopath-labs/forgerail",
10
+ "repository": "https://github.com/echopath-labs/forgerail",
11
+ "license": "Apache-2.0",
12
+ "keywords": [
13
+ "agent-governance",
14
+ "coding-agent",
15
+ "workspace-diagnosis",
16
+ "engineering-workflow"
17
+ ],
18
+ "skills": "./skills/",
19
+ "interface": {
20
+ "displayName": "ForgeRail",
21
+ "shortDescription": "Engineering guidance and guardrails for coding agents.",
22
+ "longDescription": "ForgeRail diagnoses workspace habits, composes applicable governance, launches coding agents with explicit boundaries, and verifies observable results without replacing the agent or the workspace's own record system.",
23
+ "developerName": "EchoPath Labs",
24
+ "category": "Productivity",
25
+ "capabilities": [
26
+ "Agent engineering governance",
27
+ "Read-only workspace diagnosis",
28
+ "Workspace health review"
29
+ ],
30
+ "defaultPrompt": [
31
+ "Use ForgeRail to govern this engineering task.",
32
+ "Diagnose this workspace before recommending governance changes.",
33
+ "Review this workspace for governance and recovery risks."
34
+ ],
35
+ "brandColor": "#B45309"
36
+ }
37
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ No shipping changes yet.
6
+
7
+ ## 0.1.0-alpha.1 - 2026-08-13
8
+
9
+ - Establish the first ForgeRail Agent Plugin with Core, Workspace Diagnosis, and Workspace Health Review entrypoints.
10
+ - Add deterministic contracts for Capability Packs, effective Profiles, Task Envelopes, Launch Contracts, Return Receipts, and Profile evolution candidates.
11
+ - Add progressive project adoption with deterministic Adoption Plan, Host Adapter, and Host Binding Receipt contracts; a supported Codex binding; profile-only Claude Code and Cursor boundaries; and read-only single-host or multi-host planning without an apply command or `.forgerail/` state.
12
+ - Add offline validation, read-only diagnosis fixtures, deterministic public projection, and a disposable npm consumer lifecycle covering install, diagnosis, Launch/Receipt, upgrade, rollback, reinstall, and uninstall.
13
+ - Publish the EchoPath Labs Marketplace catalog with the main Plugin plus separately installed GitHub Rulesets, Release Safety, and Thread Closure Capability Pack Plugins.
14
+ - Add Cross-Workspace Orchestration as a separately installed, explicit-use Capability Pack for genuine independent owner boundaries; keep it out of the main Plugin's default Skill set.
15
+ - Add Node.js 22 and 24 Plugin contract CI, frozen AGW behavior coverage, installation guidance, and a project-owned prerelease runbook.
16
+ - Publish the optional CLI under the official `@echopath-labs/forgerail` organization scope while preserving the `forgerail` binary shim and leaving the unscoped reservation package unchanged.
17
+ - Adopt Apache-2.0 for ForgeRail and every Capability Pack included in this release candidate.
@@ -0,0 +1,7 @@
1
+ # Contributing
2
+
3
+ Contributions should preserve ForgeRail's non-executor boundary, existing-habits-first diagnosis, progressive loading, explicit approvals, and deterministic receipts.
4
+
5
+ Start domain-specific behavior as a Capability Pack. Keep project facts and private release procedures in the owning workspace. Add positive and fail-closed fixtures for contract changes, run the Plugin and Skill validators, and document migration impact.
6
+
7
+ Contributions are accepted under Apache-2.0.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ ForgeRail
2
+ Copyright 2026 EchoPath Labs
3
+
4
+ This product includes workflow patterns derived from the Agent Workflow Governance and EverCraft workflow-governance projects maintained by EchoPath Labs and their contributors.
package/PLUGIN.md ADDED
@@ -0,0 +1,11 @@
1
+ # ForgeRail Agent Plugin
2
+
3
+ The Plugin exposes three separately addressable Skills:
4
+
5
+ - `forgerail` is the small task-governance Core.
6
+ - `forgerail-workspace-diagnosis` is a read-only, existing-habits-first diagnosis entry.
7
+ - `workspace-health-review` is the first built-in Capability Pack and keeps its established identity.
8
+
9
+ Availability is not activation. Installing this Plugin does not make every Skill or pack mandatory in every workspace.
10
+
11
+ Project adoption is also separate from installation. ForgeRail defaults to Plugin Only, can propose a confirmed lightweight Host Binding, and defers persisted `.forgerail/` governance. See `docs/adoption.md` or `docs/adoption.zh-CN.md`.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # ForgeRail
2
+
3
+ ForgeRail is an engineering guidance and governance framework for Coding Agents.
4
+
5
+ It observes a workspace, recommends improvements only when evidence warrants them, composes applicable rules, launches the host Agent with explicit scope and approval boundaries, and verifies observable results. It does not replace the Agent or force a new specification system onto the project.
6
+
7
+ ## First Alpha Shape
8
+
9
+ - `$forgerail`: task-level guidance and guardrails.
10
+ - `$forgerail-workspace-diagnosis`: bounded read-only diagnosis that follows existing workspace habits first.
11
+ - `$workspace-health-review`: independently invokable workspace governance health pack.
12
+
13
+ GitHub Rulesets, Release Safety, and Thread Closure are separately distributed Capability Packs because they have independent authentication, risk, lifecycle, and release boundaries.
14
+
15
+ Cross-Workspace Orchestration is also separately distributed and explicit-use. It applies only when a master task coordinates multiple genuine owner/repository/release boundaries with safe parallel dependency stages; it is not a general multi-agent mode for one repository.
16
+
17
+ The EchoPath Labs Marketplace candidate includes `forgerail-github-rulesets`, `forgerail-release-safety`, `forgerail-thread-closure`, and `forgerail-cross-workspace-orchestration` as separate, explicitly installed Plugins with `ON_USE` policy. They are not installed or activated merely because the main ForgeRail Plugin is selected.
18
+
19
+ ## Architecture
20
+
21
+ ForgeRail composes four layers:
22
+
23
+ 1. Core governance;
24
+ 2. optional Capability Packs;
25
+ 3. an effective Workspace Profile resolved from existing sources;
26
+ 4. a temporary Task Envelope.
27
+
28
+ The Profile is computed by default. ForgeRail does not create `.forgerail/profile.yaml`, edit `AGENTS.md`, or install OpenSpec merely because it was invoked.
29
+
30
+ Workspace adoption is progressive: Plugin Only by default; user-confirmed lightweight bindings when durable guidance is valuable; persisted `.forgerail/` governance only for future evidence-backed machine configuration or repeated conflicts. Host-specific instruction files are adapters, not ForgeRail Core. Codex is supported for alpha.1; Claude Code and Cursor profiles are explicit but unverified.
31
+
32
+ ## Local Validation
33
+
34
+ ```bash
35
+ node scripts/forgerail.mjs validate
36
+ node scripts/forgerail.mjs validate-fixtures
37
+ node scripts/forgerail.mjs validate-adoption
38
+ node scripts/validate-release.mjs
39
+ node scripts/forgerail.mjs diagnose --workspace scripts/fixtures/workspaces/markdown-existing
40
+ node scripts/forgerail.mjs adoption-plan --workspace scripts/fixtures/workspaces/markdown-existing --host codex
41
+ ```
42
+
43
+ The optional official npm package is `@echopath-labs/forgerail`; it exposes the same deterministic CLI through the short `forgerail` binary shim. The unscoped `forgerail` package remains a reservation and is not the product install path.
44
+
45
+ ```bash
46
+ npm install --global @echopath-labs/forgerail@0.1.0-alpha.1
47
+ forgerail validate
48
+ forgerail diagnose --workspace .
49
+ forgerail adoption-plan --workspace . --host codex
50
+ ```
51
+
52
+ ## Install The Prerelease
53
+
54
+ After `v0.1.0-alpha.1` is published, register the exact ForgeRail Marketplace snapshot and install the main Plugin:
55
+
56
+ ```bash
57
+ codex plugin marketplace add echopath-labs/forgerail --ref v0.1.0-alpha.1
58
+ codex plugin add forgerail@echopath-labs
59
+ ```
60
+
61
+ Start a new Codex task after installation. Install high-risk Capability Packs separately and only when the project needs them. See [Installation And Adoption](docs/installation.md) and [Progressive Adoption](docs/adoption.md) for exact commands, adoption levels, Host Adapter status, upgrade, rollback, and uninstall boundaries.
62
+
63
+ ## Status
64
+
65
+ The public bootstrap and Node.js 22/24 contract CI are complete. `0.1.0-alpha.1` remains a signed release candidate until its ordinary branch/PR CI and independent release approval complete; the commands above become a supported install path only after the tag exists.
@@ -0,0 +1,39 @@
1
+ # ForgeRail
2
+
3
+ ForgeRail 是面向 Coding Agent 的工程引航与治理框架。
4
+
5
+ 它观察工作区,在证据表明存在缺口时提出建议,组装适用规约,以明确的范围和审批边界发起宿主 Agent 工作,并核验可观察结果。它不替代 Agent,也不强迫项目采用新的规格系统。
6
+
7
+ ## 首个 Alpha 形态
8
+
9
+ - `$forgerail`:任务级引航与围栏;
10
+ - `$forgerail-workspace-diagnosis`:优先沿用现有习惯的有界只读诊断;
11
+ - `$workspace-health-review`:可独立触发的工作区治理健康能力包。
12
+
13
+ GitHub Rulesets、Release Safety 与 Thread Closure 由于具有独立身份、权限、风险与生命周期边界,作为单独分发、按需安装和显式触发的 Capability Packs。主插件被安装不代表这些能力包已安装、启用、认证或获批执行。
14
+
15
+ Cross-Workspace Orchestration 同样单独分发并显式使用。它只适用于主控任务协调多个真实独立 owner/repository/release 边界,且依赖关系允许安全并行的场景;它不是单仓通用的多 Agent 开关。
16
+
17
+ ForgeRail 默认动态计算有效 Workspace Profile,不会因为被调用就创建 `.forgerail/profile.yaml`、修改 `AGENTS.md` 或安装 OpenSpec。
18
+
19
+ 工作区采用遵循渐进式三级模型:默认 Plugin Only;只有用户确认后才使用轻量绑定;未来只有机器配置或反复冲突等证据充分时,才考虑持久化 `.forgerail/` 治理。宿主 instruction 文件只是 Adapter,不是 ForgeRail Core。alpha.1 支持 Codex;Claude Code 与 Cursor profile 会明确发布,但仍标记为未验证。
20
+
21
+ 可选官方 npm 包为 `@echopath-labs/forgerail`,安装后仍提供简短的 `forgerail` 命令入口,用于离线校验、只读诊断和合同闭环;Agent Plugin 本身不依赖该 CLI 才能使用。未作用域 `forgerail` 只保留名称占位,不是正式安装入口。
22
+
23
+ ```bash
24
+ npm install --global @echopath-labs/forgerail@0.1.0-alpha.1
25
+ forgerail validate
26
+ ```
27
+
28
+ ## 安装预发布版
29
+
30
+ 在 `v0.1.0-alpha.1` 正式发布后,先注册精确版本的 ForgeRail Marketplace 快照,再安装主插件:
31
+
32
+ ```bash
33
+ codex plugin marketplace add echopath-labs/forgerail --ref v0.1.0-alpha.1
34
+ codex plugin add forgerail@echopath-labs
35
+ ```
36
+
37
+ 安装后请启动一个新的 Codex 任务。GitHub Rulesets、Release Safety 与 Thread Closure 必须按项目实际需要单独安装;精确命令、三级采用模型、Host Adapter 状态、升级、回滚和卸载边界见[安装与采用](docs/installation.zh-CN.md)及[渐进式采用](docs/adoption.zh-CN.md)。
38
+
39
+ 公开仓库 bootstrap 与 Node.js 22/24 合同 CI 已完成。`0.1.0-alpha.1` 在普通分支/PR CI 与独立发布审批完成前仍是签名候选;只有对应 tag 存在后,上述命令才成为受支持的安装路径。
package/SECURITY.md ADDED
@@ -0,0 +1,7 @@
1
+ # Security
2
+
3
+ Report suspected ForgeRail vulnerabilities privately to the EchoPath Labs maintainers before public disclosure.
4
+
5
+ ForgeRail workspace diagnosis is read-only by default and must not inspect secrets, credentials, broad private archives, or unrelated child repositories. Capability Packs that access remote systems must declare identity, permissions, approval, validation, and rollback boundaries.
6
+
7
+ Do not include credentials, private project memory, production configuration, or customer data in issues, fixtures, receipts, or public bundles.
@@ -0,0 +1,20 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "id": "claude-code",
4
+ "displayName": "Claude Code",
5
+ "status": "profile-only",
6
+ "instructionDiscovery": "task-start",
7
+ "skillDiscovery": "agent-skills",
8
+ "bindingTarget": "CLAUDE.md",
9
+ "bindingModes": ["managed-block", "thin-reference"],
10
+ "managedMarker": "forgerail:binding:claude-code:v1",
11
+ "activationBoundary": "host-specific-verification-required",
12
+ "verification": {
13
+ "mode": "profile-only",
14
+ "expectedSkills": []
15
+ },
16
+ "limitations": [
17
+ "The instruction target is modeled, but ForgeRail alpha.1 does not claim end-to-end plugin discovery or a verified new-session activation receipt for Claude Code.",
18
+ "Treat generated content as a proposal until verified in the target host."
19
+ ]
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "id": "codex",
4
+ "displayName": "Codex",
5
+ "status": "supported",
6
+ "instructionDiscovery": "task-start",
7
+ "skillDiscovery": "agent-plugin-skills",
8
+ "bindingTarget": "AGENTS.md",
9
+ "bindingModes": ["managed-block", "thin-reference"],
10
+ "managedMarker": "forgerail:binding:codex:v1",
11
+ "activationBoundary": "new-task-required",
12
+ "verification": {
13
+ "mode": "new-task-discovery",
14
+ "expectedSkills": ["forgerail", "forgerail-workspace-diagnosis", "workspace-health-review"]
15
+ },
16
+ "limitations": [
17
+ "A binding is discovered only by a new Codex task started inside the applicable instruction scope.",
18
+ "Plugin installation and workspace adoption remain separate actions."
19
+ ]
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "id": "cursor",
4
+ "displayName": "Cursor",
5
+ "status": "profile-only",
6
+ "instructionDiscovery": "rules",
7
+ "skillDiscovery": "unknown",
8
+ "bindingTarget": ".cursor/rules/forgerail.mdc",
9
+ "bindingModes": ["thin-reference"],
10
+ "managedMarker": "forgerail:binding:cursor:v1",
11
+ "activationBoundary": "host-specific-verification-required",
12
+ "verification": {
13
+ "mode": "profile-only",
14
+ "expectedSkills": []
15
+ },
16
+ "limitations": [
17
+ "The project Rules target is modeled, but ForgeRail alpha.1 does not claim verified Skill discovery or end-to-end activation in Cursor.",
18
+ "Treat generated content as a proposal until verified in the target host."
19
+ ]
20
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://forgerail.dev/schemas/adoption-plan-v1.json",
4
+ "title": "ForgeRail Adoption Plan",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "planId", "workspace", "currentLevel", "proposedLevel", "strategy", "evidence", "hosts", "proposedWrites", "requiredConfirmation", "verification", "confirmedNonMutations", "mutations", "status"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "1.0" },
10
+ "planId": { "type": "string", "pattern": "^[a-zA-Z0-9._:-]+$" },
11
+ "workspace": { "type": "string", "minLength": 1 },
12
+ "currentLevel": { "enum": ["plugin-only", "lightweight-adoption", "persisted-governance"] },
13
+ "proposedLevel": { "enum": ["plugin-only", "lightweight-adoption", "persisted-governance"] },
14
+ "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"] }
28
+ }
29
+ }
30
+ },
31
+ "proposedWrites": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["path", "operation", "baseSha256", "contentSha256", "content", "managedMarker"],
37
+ "properties": {
38
+ "path": { "type": "string", "minLength": 1 },
39
+ "operation": { "enum": ["create", "append-managed-block", "replace-managed-block"] },
40
+ "baseSha256": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" },
41
+ "contentSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
42
+ "content": { "type": "string", "minLength": 1 },
43
+ "managedMarker": { "type": "string", "pattern": "^forgerail:(binding:[a-z][a-z0-9-]+|adoption-contract):v1$" }
44
+ }
45
+ }
46
+ },
47
+ "requiredConfirmation": { "const": true },
48
+ "verification": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
49
+ "confirmedNonMutations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
50
+ "mutations": { "type": "array", "maxItems": 0 },
51
+ "status": { "const": "candidate" }
52
+ }
53
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://forgerail.dev/schemas/capability-pack-v1.json",
4
+ "title": "ForgeRail Capability Pack",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "purpose", "entry", "risk", "states", "triggers", "inputs", "dependencies", "conflicts", "approvals", "validation", "receiptExtensions"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "1.0" },
10
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
11
+ "purpose": { "type": "string", "minLength": 12 },
12
+ "entry": { "type": "string", "pattern": "^skills/[a-z][a-z0-9-]+/SKILL\\.md$" },
13
+ "risk": { "enum": ["low", "medium", "high"] },
14
+ "states": { "type": "array", "const": ["available", "recommended", "enabled", "required", "blocked", "disabled"] },
15
+ "triggers": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
16
+ "inputs": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
17
+ "dependencies": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" }, "uniqueItems": true },
18
+ "conflicts": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" }, "uniqueItems": true },
19
+ "approvals": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" }, "uniqueItems": true },
20
+ "validation": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
21
+ "receiptExtensions": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][A-Za-z0-9]*$" }, "uniqueItems": true }
22
+ }
23
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://forgerail.dev/schemas/effective-profile-v1.json",
4
+ "title": "ForgeRail Effective Profile",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "workspace", "computed", "rules", "packs", "conflicts"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "1.0" },
10
+ "workspace": { "type": "string", "minLength": 1 },
11
+ "computed": { "const": true },
12
+ "rules": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["id", "value", "source", "precedence", "status"],
18
+ "properties": {
19
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9.-]+$" },
20
+ "value": {},
21
+ "source": { "type": "string", "minLength": 1 },
22
+ "precedence": { "type": "integer", "minimum": 1, "maximum": 6 },
23
+ "status": { "enum": ["observed", "inferred", "confirmed", "default"] }
24
+ }
25
+ }
26
+ },
27
+ "packs": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["id", "state", "reason"],
33
+ "properties": {
34
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
35
+ "state": { "enum": ["available", "recommended", "enabled", "required", "blocked", "disabled"] },
36
+ "reason": { "type": "string", "minLength": 1 }
37
+ }
38
+ }
39
+ },
40
+ "conflicts": { "type": "array", "items": { "type": "string", "minLength": 1 } }
41
+ }
42
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://forgerail.dev/schemas/host-adapter-v1.json",
4
+ "title": "ForgeRail Host Adapter",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "id", "displayName", "status", "instructionDiscovery", "skillDiscovery", "bindingTarget", "bindingModes", "managedMarker", "activationBoundary", "verification", "limitations"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "1.0" },
10
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
11
+ "displayName": { "type": "string", "minLength": 1 },
12
+ "status": { "enum": ["supported", "profile-only"] },
13
+ "instructionDiscovery": { "enum": ["task-start", "rules", "explicit-only", "unknown"] },
14
+ "skillDiscovery": { "enum": ["agent-plugin-skills", "agent-skills", "explicit-only", "unknown"] },
15
+ "bindingTarget": { "type": "string", "minLength": 1 },
16
+ "bindingModes": {
17
+ "type": "array",
18
+ "items": { "enum": ["managed-block", "thin-reference"] },
19
+ "minItems": 1,
20
+ "uniqueItems": true
21
+ },
22
+ "managedMarker": { "type": "string", "pattern": "^forgerail:binding:[a-z][a-z0-9-]+:v1$" },
23
+ "activationBoundary": { "enum": ["new-task-required", "host-specific-verification-required"] },
24
+ "verification": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["mode", "expectedSkills"],
28
+ "properties": {
29
+ "mode": { "enum": ["new-task-discovery", "profile-only"] },
30
+ "expectedSkills": {
31
+ "type": "array",
32
+ "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
33
+ "uniqueItems": true
34
+ }
35
+ }
36
+ },
37
+ "limitations": {
38
+ "type": "array",
39
+ "items": { "type": "string", "minLength": 1 },
40
+ "uniqueItems": true
41
+ }
42
+ }
43
+ }