afyx-engineering-kit 0.0.0-stage → 0.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/.afyx-source-revision +1 -0
  2. package/LICENSE +21 -0
  3. package/README.md +377 -2
  4. package/SECURITY.md +74 -0
  5. package/afyx-context/LICENSE +21 -0
  6. package/afyx-context/README.md +155 -0
  7. package/afyx-context/afyx-context.json +30 -0
  8. package/afyx-context/contracts/integration-v1.schema.json +34 -0
  9. package/afyx-context/package-lock.json +53 -0
  10. package/afyx-context/package.json +34 -0
  11. package/afyx-context/scripts/benchmark.mjs +39 -0
  12. package/afyx-context/scripts/build.mjs +15 -0
  13. package/afyx-context/scripts/comparative-benchmark.mjs +342 -0
  14. package/afyx-context/scripts/comparative-worker.mjs +74 -0
  15. package/afyx-context/scripts/graph-integration-e2e.mjs +188 -0
  16. package/afyx-context/scripts/integrated-dogfood.mjs +309 -0
  17. package/afyx-context/src/budget.js +166 -0
  18. package/afyx-context/src/cli.js +110 -0
  19. package/afyx-context/src/coordination.js +343 -0
  20. package/afyx-context/src/engine.js +198 -0
  21. package/afyx-context/src/errors.js +14 -0
  22. package/afyx-context/src/graph-integration-worker.js +70 -0
  23. package/afyx-context/src/graph-integration.js +373 -0
  24. package/afyx-context/src/graph-mcp-bridge.js +103 -0
  25. package/afyx-context/src/index.js +25 -0
  26. package/afyx-context/src/integrations.js +87 -0
  27. package/afyx-context/src/memory.js +255 -0
  28. package/afyx-context/src/storage.js +364 -0
  29. package/afyx-context/test-fixtures/coordination-worker.mjs +52 -0
  30. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/__init__.py +1 -0
  31. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/__manifest__.py +4 -0
  32. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/models/__init__.py +1 -0
  33. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/models/sale_order.py +5 -0
  34. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/__init__.py +1 -0
  35. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/__manifest__.py +10 -0
  36. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/models/__init__.py +2 -0
  37. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/models/sale_order.py +20 -0
  38. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/models/sale_order_audit.py +11 -0
  39. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/security/ir.model.access.csv +2 -0
  40. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/views/sale_order_views.xml +14 -0
  41. package/afyx-forge/LICENSE +55 -0
  42. package/afyx-forge/README.md +126 -0
  43. package/afyx-forge/afyx-forge.json +28 -0
  44. package/afyx-forge/bin/afyx-forge +4 -0
  45. package/afyx-forge/bin/afyx-forge.cmd +3 -0
  46. package/afyx-forge/bin/afyx-forge.js +16 -0
  47. package/afyx-forge/contracts/forge-plan-v1.schema.json +172 -0
  48. package/afyx-forge/package.json +26 -0
  49. package/afyx-forge/src/classifier.js +190 -0
  50. package/afyx-forge/src/cli.js +111 -0
  51. package/afyx-forge/src/doctor.js +105 -0
  52. package/afyx-forge/src/guidance.js +120 -0
  53. package/afyx-forge/src/index.js +273 -0
  54. package/afyx-forge/src/planning.js +107 -0
  55. package/afyx-forge/src/policy.js +109 -0
  56. package/afyx-forge/src/workflow-refiner.js +151 -0
  57. package/afyx-graph/afyx-graph.json +20 -0
  58. package/afyx-graph/engine/LICENSE +21 -0
  59. package/afyx-graph/engine/README.md +104 -0
  60. package/afyx-graph/engine/release/RELEASE-MANIFEST.json +21 -0
  61. package/afyx-graph/engine/release/SHA256SUMS +2 -0
  62. package/afyx-graph/engine/release/afyx-graph-linux-x64.tar.gz +0 -0
  63. package/afyx-graph/engine/release/afyx-graph-win32-x64.zip +0 -0
  64. package/afyx-graph/engine/scripts/distribution-contract.mjs +212 -0
  65. package/afyx-graph/engine/scripts/distribution-product.json +33 -0
  66. package/bin/afyx-engineering-kit.mjs +61 -0
  67. package/install.ps1 +1053 -0
  68. package/install.sh +617 -0
  69. package/package.json +66 -4
  70. package/scripts/afyx-capability-orchestrator.mjs +752 -0
  71. package/scripts/afyx-claude-integration.mjs +547 -0
  72. package/scripts/afyx-context-artifact.mjs +105 -0
  73. package/scripts/afyx-credential-broker.mjs +75 -0
  74. package/scripts/afyx-doctor.ps1 +152 -0
  75. package/scripts/afyx-doctor.sh +146 -0
  76. package/scripts/afyx-forge-artifact.mjs +183 -0
  77. package/scripts/afyx-global-routing-policy.md +12 -0
  78. package/scripts/afyx-global-routing.mjs +168 -0
  79. package/scripts/afyx-graph-artifact.mjs +178 -0
  80. package/scripts/afyx-host-adapters.mjs +543 -0
  81. package/scripts/afyx-host-bridge-lifecycle.mjs +174 -0
  82. package/scripts/afyx-host-bridge.mjs +288 -0
  83. package/scripts/afyx-integration-contracts.mjs +825 -0
  84. package/scripts/afyx-mcp-integration.mjs +528 -0
  85. package/scripts/afyx-modular-integration.mjs +361 -0
  86. package/scripts/afyx-modular-runtime.mjs +451 -0
  87. package/scripts/afyx-native-skill-host.mjs +124 -0
  88. package/scripts/afyx-npm-installer.mjs +486 -0
  89. package/scripts/afyx-project.ps1 +205 -0
  90. package/scripts/afyx-project.sh +207 -0
  91. package/scripts/afyx-provider-backup.mjs +1206 -0
  92. package/scripts/afyx-provider-integration.mjs +724 -0
  93. package/scripts/afyx-provider-inventory.mjs +147 -0
  94. package/scripts/afyx-security-auditor.mjs +224 -0
  95. package/scripts/afyx-skill-engineering.mjs +354 -0
  96. package/scripts/afyx-tool-family-routing.mjs +64 -0
  97. package/scripts/afyx-universal-runtime.mjs +530 -0
  98. package/scripts/alpha_acceptance_preflight.py +240 -0
  99. package/scripts/benchmark-graph-memory.mjs +96 -0
  100. package/scripts/benchmark_capability_orchestrator.mjs +64 -0
  101. package/scripts/build-windows-installer.ps1 +259 -0
  102. package/scripts/build_forge_synthetic_image.py +328 -0
  103. package/scripts/check-reference-staleness.py +71 -0
  104. package/scripts/components.json +254 -0
  105. package/scripts/contracts/afyx-capability-request-v1.schema.json +189 -0
  106. package/scripts/contracts/afyx-capability-result-v1.schema.json +32 -0
  107. package/scripts/dogfood_engineering_comparison.mjs +303 -0
  108. package/scripts/engineering-assurance.json +28 -0
  109. package/scripts/install-afyx-context.ps1 +142 -0
  110. package/scripts/install-afyx-context.sh +126 -0
  111. package/scripts/install-afyx-forge.ps1 +265 -0
  112. package/scripts/install-afyx-forge.sh +273 -0
  113. package/scripts/install-afyx-graph.ps1 +571 -0
  114. package/scripts/install-afyx-graph.sh +438 -0
  115. package/scripts/install-codex-usage-tracker.ps1 +172 -0
  116. package/scripts/lib/AfyxComponents.psm1 +399 -0
  117. package/scripts/lib/AfyxSkillLifecycle.psm1 +289 -0
  118. package/scripts/lib/AfyxTerminal.psm1 +838 -0
  119. package/scripts/lib/afyx-components.sh +256 -0
  120. package/scripts/lib/afyx-skill-lifecycle.sh +271 -0
  121. package/scripts/link-global-dev.ps1 +193 -0
  122. package/scripts/link-global-dev.sh +130 -0
  123. package/scripts/phase8-paired-evidence.mjs +195 -0
  124. package/scripts/phase8-representative-workload.mjs +771 -0
  125. package/scripts/phase8-session-recorder.mjs +157 -0
  126. package/scripts/phase8_event_ledger.py +248 -0
  127. package/scripts/phase8_evidence_discovery.py +189 -0
  128. package/scripts/prepare-g6-package.mjs +349 -0
  129. package/scripts/resolve-git-release-artifacts.mjs +321 -0
  130. package/scripts/stage-npm-release.mjs +94 -0
  131. package/scripts/validate-afyx-graph.py +203 -0
  132. package/scripts/validate-components.py +194 -0
  133. package/scripts/validate-engineering-assurance.py +281 -0
  134. package/scripts/verify-graph-archive.mjs +64 -0
  135. package/skills/afyx-context/SKILL.md +26 -0
  136. package/skills/afyx-engineering-expert/README.md +42 -0
  137. package/skills/afyx-engineering-expert/SKILL.md +70 -0
  138. package/skills/afyx-engineering-expert/assets/result-template.md +15 -0
  139. package/skills/afyx-engineering-expert/references/ai-ml-engineer.md +17 -0
  140. package/skills/afyx-engineering-expert/references/business-analyst.md +17 -0
  141. package/skills/afyx-engineering-expert/references/clean-code-engineer.md +26 -0
  142. package/skills/afyx-engineering-expert/references/code-reviewer.md +24 -0
  143. package/skills/afyx-engineering-expert/references/cybersecurity-devsecops.md +17 -0
  144. package/skills/afyx-engineering-expert/references/data-analyst-bi.md +24 -0
  145. package/skills/afyx-engineering-expert/references/data-engineer.md +24 -0
  146. package/skills/afyx-engineering-expert/references/database-administrator.md +17 -0
  147. package/skills/afyx-engineering-expert/references/debugging-specialist.md +24 -0
  148. package/skills/afyx-engineering-expert/references/embedded-iot-engineer.md +24 -0
  149. package/skills/afyx-engineering-expert/references/erp-technical-specialist.md +17 -0
  150. package/skills/afyx-engineering-expert/references/hardware-diagnostics-auditor.md +24 -0
  151. package/skills/afyx-engineering-expert/references/hardware-electronics-engineer.md +24 -0
  152. package/skills/afyx-engineering-expert/references/integration-engineer.md +24 -0
  153. package/skills/afyx-engineering-expert/references/legacy-modernization-engineer.md +24 -0
  154. package/skills/afyx-engineering-expert/references/llmops-prompt-engineer.md +24 -0
  155. package/skills/afyx-engineering-expert/references/network-engineer.md +24 -0
  156. package/skills/afyx-engineering-expert/references/performance-benchmark-engineer.md +24 -0
  157. package/skills/afyx-engineering-expert/references/platform-engineer.md +24 -0
  158. package/skills/afyx-engineering-expert/references/product-manager.md +17 -0
  159. package/skills/afyx-engineering-expert/references/qa-engineer.md +17 -0
  160. package/skills/afyx-engineering-expert/references/site-reliability-engineer.md +17 -0
  161. package/skills/afyx-engineering-expert/references/software-engineer.md +17 -0
  162. package/skills/afyx-engineering-expert/references/solutions-architect.md +17 -0
  163. package/skills/afyx-engineering-expert/references/specialists-index.md +33 -0
  164. package/skills/afyx-engineering-expert/references/subject-matter-expert.md +17 -0
  165. package/skills/afyx-engineering-expert/references/system-analyst.md +17 -0
  166. package/skills/afyx-engineering-expert/references/technical-project-manager.md +24 -0
  167. package/skills/afyx-engineering-expert/references/technical-writer.md +24 -0
  168. package/skills/afyx-engineering-expert/references/ui-ux-designer.md +17 -0
  169. package/skills/afyx-engineering-expert/workflows/ai-data-erp.md +20 -0
  170. package/skills/afyx-engineering-expert/workflows/debugging.md +10 -0
  171. package/skills/afyx-engineering-expert/workflows/discovery-design.md +11 -0
  172. package/skills/afyx-engineering-expert/workflows/implementation.md +12 -0
  173. package/skills/afyx-engineering-expert/workflows/incident-reliability.md +12 -0
  174. package/skills/afyx-engineering-expert/workflows/review-audit.md +13 -0
  175. package/skills/afyx-forge/SKILL.md +43 -0
  176. package/skills/afyx-forge/references/adaptive-policy.md +19 -0
  177. package/skills/efficient-coding/SKILL.md +33 -0
  178. package/skills/efficient-coding/references/investigation.md +27 -0
  179. package/skills/efficient-coding/references/token-efficiency.md +25 -0
  180. package/skills/efficient-coding/references/tool-routing.md +13 -0
  181. package/skills/odoo-engineering/SKILL.md +33 -0
  182. package/skills/odoo-engineering/references/common.md +9 -0
  183. package/skills/odoo-engineering/references/odoo-10.md +32 -0
  184. package/skills/odoo-engineering/references/odoo-11.md +26 -0
  185. package/skills/odoo-engineering/references/odoo-12.md +31 -0
  186. package/skills/odoo-engineering/references/odoo-13.md +27 -0
  187. package/skills/odoo-engineering/references/odoo-14.md +31 -0
  188. package/skills/odoo-engineering/references/odoo-15.md +34 -0
  189. package/skills/odoo-engineering/references/odoo-16.md +37 -0
  190. package/skills/odoo-engineering/references/odoo-17.md +37 -0
  191. package/skills/odoo-engineering/references/odoo-18.md +48 -0
  192. package/skills/odoo-engineering/references/odoo-19.md +43 -0
  193. package/skills/odoo-engineering/references/odoo-20.md +39 -0
  194. package/skills/odoo-engineering/references/reference-schema.md +16 -0
  195. package/skills/odoo-engineering/references/version-detection.md +13 -0
  196. package/tools/codex-usage/CodexUsage.psm1 +496 -0
  197. package/tools/codex-usage/codex-usage-doctor.ps1 +150 -0
  198. package/tools/codex-usage/codex-usage-pricing.json +25 -0
  199. package/tools/codex-usage/codex-usage-stop.ps1 +167 -0
  200. package/tools/codex-usage/codex-usage-watch.ps1 +250 -0
  201. package/tools/codex-usage/vscode-user-task.json +31 -0
  202. package/tools/windows-setup/SetupBootstrapper.cs +258 -0
  203. package/uninstall.ps1 +189 -0
  204. package/uninstall.sh +167 -0
  205. package/update.ps1 +95 -0
  206. package/update.sh +67 -0
  207. package/verify.ps1 +411 -0
  208. package/verify.sh +265 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "AFYX Integrated Sales Fixture",
3
+ "version": "17.0.1.0.0",
4
+ "depends": ["sale"],
5
+ "data": [
6
+ "security/ir.model.access.csv",
7
+ "views/sale_order_views.xml",
8
+ ],
9
+ "installable": True,
10
+ }
@@ -0,0 +1,2 @@
1
+ from . import sale_order
2
+ from . import sale_order_audit
@@ -0,0 +1,20 @@
1
+ from odoo import api, fields, models
2
+
3
+
4
+ class SaleOrder(models.Model):
5
+ _inherit = "sale.order"
6
+
7
+ afyx_review_note = fields.Char(copy=False)
8
+ afyx_total_snapshot = fields.Monetary(compute="_compute_afyx_total_snapshot")
9
+
10
+ @api.depends("order_line.price_subtotal")
11
+ def _compute_afyx_total_snapshot(self):
12
+ for order in self:
13
+ order.afyx_total_snapshot = sum(order.order_line.mapped("price_subtotal"))
14
+
15
+ def afyx_repeated_summary(self):
16
+ return "AFYX integrated sale summary " * 48
17
+
18
+ def SECURITY(self):
19
+ """SECURITY ACCESS DENIED evidence must remain byte complete."""
20
+ return self.afyx_review_note
@@ -0,0 +1,11 @@
1
+ from odoo import fields, models
2
+
3
+
4
+ class SaleOrderAudit(models.Model):
5
+ _inherit = "sale.order"
6
+
7
+ afyx_audit_marker = fields.Char(copy=False)
8
+
9
+ def afyx_diagnostic_boundary(self):
10
+ """ERROR FAILURE TRACEBACK evidence must remain byte complete."""
11
+ return self.afyx_audit_marker
@@ -0,0 +1,2 @@
1
+ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2
+ access_sale_order_afyx_fixture,access.sale.order.afyx.fixture,sale.model_sale_order,sales_team.group_sale_salesman,1,0,0,0
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <odoo>
3
+ <record id="view_order_form_afyx_integrated" model="ir.ui.view">
4
+ <field name="name">sale.order.form.afyx.integrated</field>
5
+ <field name="model">sale.order</field>
6
+ <field name="inherit_id" ref="sale.view_order_form"/>
7
+ <field name="arch" type="xml">
8
+ <xpath expr="//field[@name='partner_id']" position="after">
9
+ <field name="afyx_review_note"/>
10
+ <field name="afyx_total_snapshot" readonly="1"/>
11
+ </xpath>
12
+ </field>
13
+ </record>
14
+ </odoo>
@@ -0,0 +1,55 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
+
33
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,126 @@
1
+ # Afyx Forge Core
2
+
3
+ **Standalone adaptive engineering guidance — Technical Alpha v0.1.0.**
4
+
5
+ Forge Core is an Afyx-owned Node.js runtime that analyzes an engineering task and
6
+ returns a bounded, actionable **plan**. Its primary job is to determine which
7
+ investigation, source evidence, specialist guidance and validation are warranted
8
+ by the task's complexity and risk. It is useful **without** Afyx Graph, Context
9
+ Engine, Expert, or the unified Kit installer.
10
+
11
+ > **Standalone by Design. Integrated by Contract. Activated by Need.**
12
+
13
+ ## What works today
14
+
15
+ - Deterministic task classification across known-file bugfixes, unknown
16
+ defects, cross-module changes, security-sensitive work, data reliability,
17
+ and negative/simple cases.
18
+ - Adaptive execution policies: `DIRECT_MINIMAL`, `FOCUSED_INVESTIGATION`,
19
+ `STRUCTURAL_GRAPH_AWARE`, `DOMAIN_SPECIALIST`, and
20
+ `SECURITY_DEFENSE_IN_DEPTH`.
21
+ - Recommendations for source reading, Afyx Graph, Odoo/Expert guidance,
22
+ proportionate checks, and explicit completion criteria.
23
+ - `plan` CLI with JSON or Markdown output; `doctor` for local environment
24
+ diagnostics; programmatic `createForgePlan` API for Node.js ESM consumers.
25
+ - Refusal of recognized unsafe directives. Plans describe permissible work;
26
+ they do **not** authorize the agent or execute the proposed steps.
27
+ - Optional on-demand companion `skills/afyx-forge/SKILL.md` on supported hosts.
28
+
29
+ ## Quick start
30
+
31
+ Requires **Node.js 22.5+**. From this directory, no model account or daemon
32
+ is needed for the local deterministic CLI:
33
+
34
+ ~~~bash
35
+ node bin/afyx-forge.js --version
36
+ node bin/afyx-forge.js doctor
37
+ node bin/afyx-forge.js plan --task "Investigate a cross-module authorization regression" --format markdown
38
+ npm test
39
+ ~~~
40
+
41
+ After an installation that places the launcher on your PATH:
42
+
43
+ ~~~bash
44
+ afyx-forge doctor
45
+ afyx-forge plan --task-file ./task.md --format json --output ./plan.json
46
+ ~~~
47
+
48
+ The result has contract `afyx-forge-plan/v1` and is a **proposal**, not proof
49
+ that source code was changed or tests ran. The available task and guidance
50
+ fields are defined by `src/index.js` and `contracts/forge-plan-v1.schema.json`.
51
+
52
+ ## Installation and lifecycle
53
+
54
+ Forge Core is registered as component ID `afyx-forge` in the Kit registry but
55
+ **not** included in the implicit `minimal`, `recommended`, or `full` presets.
56
+
57
+ On Windows, from the Kit root:
58
+
59
+ ~~~powershell
60
+ .\install.ps1 -WhatIf -Preset custom -CustomComponent afyx-forge
61
+ .\install.ps1 -Preset custom -CustomComponent afyx-forge
62
+ .\verify.ps1 -Preset custom -CustomComponent afyx-forge
63
+ ~~~
64
+
65
+ For standalone lifecycle on Windows or Unix, inspect the dedicated installers:
66
+
67
+ ~~~powershell
68
+ .\scripts\install-afyx-forge.ps1 -ValidateOnly
69
+ ~~~
70
+
71
+ ~~~bash
72
+ ./scripts/install-afyx-forge.sh --validate-only
73
+ ~~~
74
+
75
+ The current Kit-level Unix preset flow should not be assumed to select Forge
76
+ Core: use the dedicated standalone installer when that capability is needed.
77
+ Read [Installation](../docs/INSTALLATION.md) and the
78
+ [Forge Core Alpha guide](../docs/AFYX_FORGE_CORE_ALPHA.md) for supported flags,
79
+ ownership and rollback. Never overwrite foreign/user-owned runtime state.
80
+
81
+ ## Optional component cooperation
82
+
83
+ Forge recommends **Graph** only when structural or cross-file relationships
84
+ materially help. If Graph is absent, its plan suggests direct-source methods.
85
+
86
+ A healthy installed **Context Engine** may be considered available for on-demand
87
+ use by the current policy; `AFYX_CONTEXT_OPT_IN=0` explicitly disables it.
88
+ The `ACTIVE` policy value means *available for a selected task*, **not** proof
89
+ of actual context reduction, automatic Graph MCP interception, or token savings.
90
+
91
+ **Engineering Expert** and **Odoo Engineering** provide specialist instructions,
92
+ not mandatory Forge runtime dependencies. Forge does not replace their
93
+ source-grounded review.
94
+
95
+ ## Governance and known limits
96
+
97
+ **MB8.1 owner decision (2026-11-10):** A8 is GO for the local-first, assistive Forge Planner and adaptive guidance architecture. The Project Owner waived the formal 36-cell campaign for this scoped decision; its result remains `0/36 NOT_RUN`. Autonomous execution is not authorized, provider token savings are not measured, and public npm publication is deferred. Historical campaign requirements remain recorded in `evals/forge/`.
98
+
99
+ **Important distinction:** Forge Core Alpha is **not** the formal Forge
100
+ B0–B5 benchmark campaign under `evals/forge/`.
101
+
102
+ | Boundary | Current state on the verified `dev` baseline |
103
+ |---|---|
104
+ | Forge Core CLI/API and deterministic guidance | Implemented as Technical Alpha v0.1.0 |
105
+ | Standalone ordinary task planning | Available; examine output against the task |
106
+ | Autonomous source mutation or tool execution | Not provided |
107
+ | Formal benchmark campaign | `0/36 NOT_RUN`; waived by owner for local-first scope |
108
+ | Forge A8 architecture decision | `GO_OWNER_APPROVED_LOCAL_SCOPE` |
109
+ | Full Forge A12 / Stable v1 acceptance | Not claimed |
110
+
111
+ The presence of a plan, a passing unit test, or successful Kit CI must not be
112
+ relabelled as a formal campaign verdict. Follow the separate
113
+ [A0–A3 contract](../docs/AFYX_FORGE_A0_A3_CONTRACT.md),
114
+ [evaluator readiness](../docs/AFYX_FORGE_T09_P0_READINESS.md), and
115
+ [master roadmap](../docs/AFYX_V1_MASTER_ROADMAP.md).
116
+
117
+ ## Source, validation and license
118
+
119
+ - Runtime: `src/`; launcher: `bin/`; plan schema: `contracts/`.
120
+ - Validation from this directory: `npm test`.
121
+ - Package: `@afyx/forge-core` v0.1.0, declaring `Apache-2.0` in
122
+ `package.json`. Review distribution-specific notices independently of the
123
+ Kit root's MIT license.
124
+
125
+ Source baseline: `dev` at `e332230a2c0ba162b447af1359cf591057ce26b6`
126
+ (2026-11-05). This identifies the reviewed **source**, not a signed public release.
@@ -0,0 +1,28 @@
1
+ {
2
+ "product_name": "Afyx Forge Core",
3
+ "product_version": "0.1.0",
4
+ "distribution_channel": "technical-alpha",
5
+ "component_id": "afyx-forge",
6
+ "runtime_mode": "ASSISTIVE_GUIDANCE_ONLY",
7
+ "evaluation_gate": {
8
+ "contract": "AFYX_FORGE_A0_A3_CONTRACT",
9
+ "gate": "A8_FORMAL_CAMPAIGN",
10
+ "status": "EVALUATION_GATED",
11
+ "autonomous_code_execution": false,
12
+ "uncontrolled_model_invocation": false
13
+ },
14
+ "capabilities": [
15
+ "task-classification",
16
+ "adaptive-policy-selection",
17
+ "actionable-guidance-generation",
18
+ "graph-aware-routing",
19
+ "bounded-execution-enforcement",
20
+ "agent-surface-integration"
21
+ ],
22
+ "supported_agent_surfaces": [
23
+ "codex",
24
+ "antigravity",
25
+ "claude"
26
+ ]
27
+ }
28
+
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3
+ exec node "$DIR/afyx-forge.js" "$@"
4
+
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ node "%~dp0afyx-forge.js" %*
3
+
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Afyx Forge Core — CLI Executable Entrypoint
4
+ */
5
+
6
+ import { runCli } from '../src/cli.js';
7
+
8
+ runCli(process.argv.slice(2)).then((code) => {
9
+ if (typeof code === 'number' && code !== 0) {
10
+ process.exit(code);
11
+ }
12
+ }).catch((err) => {
13
+ console.error(`Unexpected failure in afyx-forge: ${err.stack || err.message}`);
14
+ process.exit(1);
15
+ });
16
+
@@ -0,0 +1,172 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "AfyxForgePlanResultV1",
4
+ "type": "object",
5
+ "required": [
6
+ "contract",
7
+ "version",
8
+ "timestamp",
9
+ "taskSummary",
10
+ "classification",
11
+ "adaptivePolicy",
12
+ "guidance",
13
+ "boundedExecution",
14
+ "status"
15
+ ],
16
+ "properties": {
17
+ "contract": {
18
+ "type": "string",
19
+ "const": "afyx-forge-plan/v1"
20
+ },
21
+ "version": {
22
+ "type": "string"
23
+ },
24
+ "timestamp": {
25
+ "type": "string"
26
+ },
27
+ "taskSummary": {
28
+ "type": "object",
29
+ "required": ["title", "observedComplexity", "domainContext"],
30
+ "properties": {
31
+ "title": { "type": "string" },
32
+ "observedComplexity": { "type": "string", "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"] },
33
+ "domainContext": { "type": "string" },
34
+ "relevantFiles": { "type": "array", "items": { "type": "string" } }
35
+ }
36
+ },
37
+ "classification": {
38
+ "type": "object",
39
+ "required": ["primaryCategory", "riskLevel", "confidence"],
40
+ "properties": {
41
+ "primaryCategory": {
42
+ "type": "string",
43
+ "enum": [
44
+ "KNOWN_FILE_BUG",
45
+ "UNKNOWN_DEFECT_DIAGNOSIS",
46
+ "CROSS_MODULE_CHANGE",
47
+ "SECURITY_SENSITIVE",
48
+ "DATA_RELIABILITY",
49
+ "NEGATIVE_SIMPLE"
50
+ ]
51
+ },
52
+ "riskLevel": { "type": "string", "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"] },
53
+ "frameworks": { "type": "array", "items": { "type": "string" } },
54
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
55
+ }
56
+ },
57
+ "adaptivePolicy": {
58
+ "type": "object",
59
+ "required": ["executionMode", "graphRouting", "contextEngine", "expertEngagement"],
60
+ "properties": {
61
+ "executionMode": {
62
+ "type": "string",
63
+ "enum": [
64
+ "DIRECT_MINIMAL",
65
+ "FOCUSED_INVESTIGATION",
66
+ "STRUCTURAL_GRAPH_AWARE",
67
+ "DOMAIN_SPECIALIST",
68
+ "SECURITY_DEFENSE_IN_DEPTH"
69
+ ]
70
+ },
71
+ "executionDirective": { "type": "string", "enum": ["DIRECT_SIMPLE", "SURGICAL_KNOWN_FILE", "FOCUSED_DIAGNOSIS", "CROSS_FILE", "DOMAIN_AWARE", "HIGH_RISK"] },
72
+ "graphRouting": {
73
+ "type": "string",
74
+ "enum": ["BYPASS", "RECOMMENDED", "NOT_AVAILABLE", "BYPASS_USER_DISABLED", "BYPASS_PROVIDER_UNSUPPORTED"]
75
+ },
76
+ "graphRoutingReason": { "type": "string" },
77
+ "contextEngine": {
78
+ "type": "string",
79
+ "enum": ["BYPASS_DEFAULT_OFF", "EXPLICIT_OPT_IN_REQUIRED", "ACTIVE", "NOT_AVAILABLE", "BYPASS_USER_DISABLED", "BYPASS_PROVIDER_UNSUPPORTED", "BYPASS_TASK_REFUSED"]
80
+ },
81
+ "expertEngagement": { "type": "string" }
82
+ }
83
+ },
84
+ "guidance": {
85
+ "type": "object",
86
+ "required": [
87
+ "investigationPriorities",
88
+ "toolRecommendations",
89
+ "validationScope",
90
+ "completionCriteria"
91
+ ],
92
+ "properties": {
93
+ "investigationPriorities": { "type": "array", "items": { "type": "string" } },
94
+ "toolRecommendations": {
95
+ "type": "object",
96
+ "required": ["preferred", "avoided"],
97
+ "properties": {
98
+ "preferred": { "type": "array", "items": { "type": "string" } },
99
+ "avoided": { "type": "array", "items": { "type": "string" } }
100
+ }
101
+ },
102
+ "validationScope": { "type": "array", "items": { "type": "string" } },
103
+ "completionCriteria": { "type": "array", "items": { "type": "string" } }
104
+ }
105
+ },
106
+ "requirements": {
107
+ "type": "object",
108
+ "required": ["objective", "functionalRequirements", "affectedFiles", "constraints", "dependencies", "unknownAssumptions", "acceptanceCriteria", "scopeBoundaries", "riskLevel", "evidenceStatus"],
109
+ "properties": {
110
+ "objective": { "type": "string" },
111
+ "riskLevel": { "type": "string" },
112
+ "evidenceStatus": { "const": "REQUEST_TEXT_ONLY" },
113
+ "functionalRequirements": { "type": "array", "items": { "type": "string" } },
114
+ "affectedFiles": { "type": "array", "items": { "type": "string" } },
115
+ "affectedComponents": { "type": "array", "items": { "type": "string" } },
116
+ "constraints": { "type": "array", "items": { "type": "string" } },
117
+ "dependencies": { "type": "array", "items": { "type": "string" } },
118
+ "assumptions": { "type": "array", "items": { "type": "string" } },
119
+ "unknownAssumptions": { "type": "array", "items": { "type": "string" } },
120
+ "acceptanceCriteria": { "type": "array", "items": { "type": "string" } },
121
+ "scopeBoundaries": { "type": "array", "items": { "type": "string" } }
122
+ }
123
+ },
124
+ "executionPlan": {
125
+ "type": "object",
126
+ "required": ["status", "steps", "completionCriteria", "stoppingCondition"],
127
+ "properties": {
128
+ "status": { "type": "string", "enum": ["PROPOSED_NOT_EXECUTED", "REFUSED_NOT_EXECUTED"] },
129
+ "steps": { "type": "array", "items": { "type": "object", "required": ["id", "dependsOn", "action"] } },
130
+ "completionCriteria": { "type": "array", "items": { "type": "string" } },
131
+ "stoppingCondition": { "type": "string" }
132
+ }
133
+ },
134
+ "executionBudget": {
135
+ "type": "object",
136
+ "required": ["status", "observedToolCalls", "observedProviderTokens"],
137
+ "properties": {
138
+ "status": { "type": "string", "enum": ["RECOMMENDED_NOT_ENFORCED", "REFUSED_NOT_EXECUTED"] },
139
+ "investigationDepth": { "type": "integer", "minimum": 1 },
140
+ "toolCallCeiling": { "type": "integer", "minimum": 1 },
141
+ "retryCeiling": { "type": "integer", "minimum": 0 },
142
+ "elapsedTimeCeilingMs": { "type": "integer", "minimum": 1 },
143
+ "validationIntensity": { "type": "string" },
144
+ "contextGuideline": { "type": "string" },
145
+ "observedToolCalls": { "type": ["integer", "null"] },
146
+ "observedProviderTokens": { "type": ["integer", "null"] },
147
+ "escalation": { "type": "string" }
148
+ }
149
+ },
150
+ "boundedExecution": {
151
+ "type": "object",
152
+ "required": [
153
+ "autonomousCodeExecution",
154
+ "uncontrolledModelInvocation",
155
+ "privilegeElevationAllowed",
156
+ "governanceGateA8"
157
+ ],
158
+ "properties": {
159
+ "autonomousCodeExecution": { "type": "boolean" },
160
+ "uncontrolledModelInvocation": { "type": "boolean" },
161
+ "privilegeElevationAllowed": { "type": "boolean" },
162
+ "governanceGateA8": { "type": "string" }
163
+ }
164
+ },
165
+ "status": {
166
+ "type": "string",
167
+ "enum": ["PLANNED", "PREPARED", "VALIDATED", "REFUSED_UNSAFE"]
168
+ },
169
+ "refusalReason": { "type": "string" }
170
+ }
171
+ }
172
+
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@afyx/forge-core",
3
+ "version": "0.1.0",
4
+ "description": "Afyx Forge Core: Standalone adaptive engineering guidance and policy engine",
5
+ "main": "src/index.js",
6
+ "bin": {
7
+ "afyx-forge": "bin/afyx-forge.js"
8
+ },
9
+ "type": "module",
10
+ "scripts": {
11
+ "test": "node --test test/*.test.js"
12
+ },
13
+ "keywords": [
14
+ "afyx",
15
+ "forge",
16
+ "engineering-policy",
17
+ "adaptive-guidance",
18
+ "developer-tooling"
19
+ ],
20
+ "author": "Afyx Engineering Team",
21
+ "license": "Apache-2.0",
22
+ "engines": {
23
+ "node": ">=22.5.0"
24
+ }
25
+ }
26
+