@urielsh/prodify 0.1.0

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 (273) hide show
  1. package/.prodify/AGENTS.md +56 -0
  2. package/.prodify/README.md +10 -0
  3. package/.prodify/artifacts/01-understand.md +28 -0
  4. package/.prodify/artifacts/02-diagnose.md +26 -0
  5. package/.prodify/artifacts/03-architecture.md +30 -0
  6. package/.prodify/artifacts/04-plan.md +35 -0
  7. package/.prodify/artifacts/05-refactor.md +24 -0
  8. package/.prodify/artifacts/06-validate.md +17 -0
  9. package/.prodify/artifacts/README.md +6 -0
  10. package/.prodify/artifacts/architecture_spec.md +29 -0
  11. package/.prodify/artifacts/artifact-validation-design.md +276 -0
  12. package/.prodify/artifacts/cli-command-design.md +299 -0
  13. package/.prodify/artifacts/completed-steps-tracking.md +201 -0
  14. package/.prodify/artifacts/diagnostic_report.md +45 -0
  15. package/.prodify/artifacts/hardening-patch-summary.md +57 -0
  16. package/.prodify/artifacts/hardening-verification-report.md +48 -0
  17. package/.prodify/artifacts/implementation_summary.md +19 -0
  18. package/.prodify/artifacts/improvement-evaluation-spec.md +148 -0
  19. package/.prodify/artifacts/next-step-resolver-design.md +570 -0
  20. package/.prodify/artifacts/orientation_map.md +32 -0
  21. package/.prodify/artifacts/persona-removal-audit.md +106 -0
  22. package/.prodify/artifacts/planning-alignment-report.md +189 -0
  23. package/.prodify/artifacts/refactor-plan-template-hardening.md +83 -0
  24. package/.prodify/artifacts/refactor-validate-loop-design.md +231 -0
  25. package/.prodify/artifacts/refactor_plan.md +21 -0
  26. package/.prodify/artifacts/refactor_plan.strict-example.md +31 -0
  27. package/.prodify/artifacts/run-state-design.md +292 -0
  28. package/.prodify/artifacts/run-summary-spec.md +149 -0
  29. package/.prodify/artifacts/run_state.json +14 -0
  30. package/.prodify/artifacts/sample-repo-test-plan.md +129 -0
  31. package/.prodify/artifacts/status-output-spec.md +349 -0
  32. package/.prodify/artifacts/step-selection-design.md +251 -0
  33. package/.prodify/artifacts/task-dispatcher-design.md +266 -0
  34. package/.prodify/artifacts/task-header-audit.md +42 -0
  35. package/.prodify/artifacts/task-log-enhancement-spec.md +264 -0
  36. package/.prodify/artifacts/task-protocol-hardening-plan.md +68 -0
  37. package/.prodify/artifacts/task-self-validation-spec.md +171 -0
  38. package/.prodify/artifacts/task_log.json +160 -0
  39. package/.prodify/artifacts/template-usage-audit.md +20 -0
  40. package/.prodify/artifacts/validation_report.md +22 -0
  41. package/.prodify/contracts/README.md +3 -0
  42. package/.prodify/contracts/architecture.contract.json +42 -0
  43. package/.prodify/contracts/diagnose.contract.json +42 -0
  44. package/.prodify/contracts/plan.contract.json +42 -0
  45. package/.prodify/contracts/refactor.contract.json +45 -0
  46. package/.prodify/contracts/understand.contract.json +42 -0
  47. package/.prodify/contracts/validate.contract.json +52 -0
  48. package/.prodify/contracts-src/README.md +4 -0
  49. package/.prodify/contracts-src/architecture.contract.md +29 -0
  50. package/.prodify/contracts-src/diagnose.contract.md +29 -0
  51. package/.prodify/contracts-src/plan.contract.md +29 -0
  52. package/.prodify/contracts-src/refactor.contract.md +32 -0
  53. package/.prodify/contracts-src/understand.contract.md +29 -0
  54. package/.prodify/contracts-src/validate.contract.md +35 -0
  55. package/.prodify/metrics/README.md +4 -0
  56. package/.prodify/planning.md +13 -0
  57. package/.prodify/project.md +15 -0
  58. package/.prodify/rules/01-global-operating-rules.md +21 -0
  59. package/.prodify/rules/02-analysis-discipline.md +17 -0
  60. package/.prodify/rules/03-diagnosis-severity-rules.md +42 -0
  61. package/.prodify/rules/04-architecture-rules.md +27 -0
  62. package/.prodify/rules/05-planning-rules.md +23 -0
  63. package/.prodify/rules/06-refactor-rules.md +20 -0
  64. package/.prodify/rules/07-validation-rules.md +25 -0
  65. package/.prodify/rules/08-output-format-rules.md +20 -0
  66. package/.prodify/rules/09-template-usage-rules.md +11 -0
  67. package/.prodify/rules/10-artifact-flow-and-orchestration-rules.md +40 -0
  68. package/.prodify/rules/README.md +3 -0
  69. package/.prodify/rules/example-rule.md +4 -0
  70. package/.prodify/runtime-commands.md +57 -0
  71. package/.prodify/skills/README.md +8 -0
  72. package/.prodify/skills/domain/react-frontend.skill.json +34 -0
  73. package/.prodify/skills/domain/typescript-backend.skill.json +34 -0
  74. package/.prodify/skills/quality-policy/maintainability-review.skill.json +25 -0
  75. package/.prodify/skills/quality-policy/security-hardening.skill.json +32 -0
  76. package/.prodify/skills/quality-policy/test-hardening.skill.json +23 -0
  77. package/.prodify/skills/registry.json +16 -0
  78. package/.prodify/skills/stage-method/architecture-method.skill.json +22 -0
  79. package/.prodify/skills/stage-method/codebase-scanning.skill.json +22 -0
  80. package/.prodify/skills/stage-method/diagnosis-method.skill.json +22 -0
  81. package/.prodify/skills/stage-method/planning-method.skill.json +22 -0
  82. package/.prodify/skills/stage-method/refactoring-method.skill.json +22 -0
  83. package/.prodify/skills/stage-method/validation-method.skill.json +22 -0
  84. package/.prodify/state.json +30 -0
  85. package/.prodify/tasks/01-understand.md +83 -0
  86. package/.prodify/tasks/02-diagnose.md +67 -0
  87. package/.prodify/tasks/03-architecture.md +70 -0
  88. package/.prodify/tasks/04-plan.md +71 -0
  89. package/.prodify/tasks/05-refactor.md +61 -0
  90. package/.prodify/tasks/06-validate.md +69 -0
  91. package/.prodify/tasks/README.md +3 -0
  92. package/.prodify/tasks/example-task.md +13 -0
  93. package/.prodify/templates/01-understand.template.md +18 -0
  94. package/.prodify/templates/02-diagnose.template.md +18 -0
  95. package/.prodify/templates/03-architecture.template.md +18 -0
  96. package/.prodify/templates/04-plan.template.md +22 -0
  97. package/.prodify/templates/05-refactor.template.md +19 -0
  98. package/.prodify/templates/06-validate.template.md +16 -0
  99. package/.prodify/templates/README.md +3 -0
  100. package/.prodify/templates/architecture_spec.template.md +29 -0
  101. package/.prodify/templates/diagnostic_report.template.md +45 -0
  102. package/.prodify/templates/example.template.md +5 -0
  103. package/.prodify/templates/implementation_summary.template.md +19 -0
  104. package/.prodify/templates/orientation_map.template.md +32 -0
  105. package/.prodify/templates/refactor_plan.template.md +24 -0
  106. package/.prodify/templates/validation_report.template.md +22 -0
  107. package/.prodify/version.json +5 -0
  108. package/AGENTS.md +305 -0
  109. package/LICENSE +201 -0
  110. package/README.md +118 -0
  111. package/assets/presets/default/canonical/AGENTS.md +54 -0
  112. package/assets/presets/default/canonical/artifacts/README.md +6 -0
  113. package/assets/presets/default/canonical/contracts-src/README.md +4 -0
  114. package/assets/presets/default/canonical/contracts-src/architecture.contract.md +56 -0
  115. package/assets/presets/default/canonical/contracts-src/diagnose.contract.md +49 -0
  116. package/assets/presets/default/canonical/contracts-src/plan.contract.md +42 -0
  117. package/assets/presets/default/canonical/contracts-src/refactor.contract.md +54 -0
  118. package/assets/presets/default/canonical/contracts-src/understand.contract.md +56 -0
  119. package/assets/presets/default/canonical/contracts-src/validate.contract.md +64 -0
  120. package/assets/presets/default/canonical/metrics/README.md +4 -0
  121. package/assets/presets/default/canonical/planning.md +13 -0
  122. package/assets/presets/default/canonical/project.md +15 -0
  123. package/assets/presets/default/canonical/rules/README.md +3 -0
  124. package/assets/presets/default/canonical/rules/example-rule.md +4 -0
  125. package/assets/presets/default/canonical/runtime-commands.md +57 -0
  126. package/assets/presets/default/canonical/skills/README.md +8 -0
  127. package/assets/presets/default/canonical/skills/domain/react-frontend.skill.json +34 -0
  128. package/assets/presets/default/canonical/skills/domain/typescript-backend.skill.json +34 -0
  129. package/assets/presets/default/canonical/skills/quality-policy/maintainability-review.skill.json +25 -0
  130. package/assets/presets/default/canonical/skills/quality-policy/security-hardening.skill.json +32 -0
  131. package/assets/presets/default/canonical/skills/quality-policy/test-hardening.skill.json +23 -0
  132. package/assets/presets/default/canonical/skills/registry.json +16 -0
  133. package/assets/presets/default/canonical/skills/stage-method/architecture-method.skill.json +22 -0
  134. package/assets/presets/default/canonical/skills/stage-method/codebase-scanning.skill.json +22 -0
  135. package/assets/presets/default/canonical/skills/stage-method/diagnosis-method.skill.json +22 -0
  136. package/assets/presets/default/canonical/skills/stage-method/planning-method.skill.json +22 -0
  137. package/assets/presets/default/canonical/skills/stage-method/refactoring-method.skill.json +22 -0
  138. package/assets/presets/default/canonical/skills/stage-method/validation-method.skill.json +22 -0
  139. package/assets/presets/default/canonical/state.json +30 -0
  140. package/assets/presets/default/canonical/tasks/README.md +3 -0
  141. package/assets/presets/default/canonical/tasks/example-task.md +13 -0
  142. package/assets/presets/default/canonical/templates/README.md +3 -0
  143. package/assets/presets/default/canonical/templates/example.template.md +5 -0
  144. package/assets/presets/default/preset.json +5 -0
  145. package/dist/cli.js +53 -0
  146. package/dist/commands/doctor.js +16 -0
  147. package/dist/commands/init.js +30 -0
  148. package/dist/commands/install.js +27 -0
  149. package/dist/commands/setup-agent.js +23 -0
  150. package/dist/commands/status.js +28 -0
  151. package/dist/commands/sync.js +29 -0
  152. package/dist/commands/update.js +18 -0
  153. package/dist/contracts/compiled-schema.js +37 -0
  154. package/dist/contracts/compiler.js +83 -0
  155. package/dist/contracts/freshness.js +52 -0
  156. package/dist/contracts/index.js +5 -0
  157. package/dist/contracts/parser.js +201 -0
  158. package/dist/contracts/schema.js +138 -0
  159. package/dist/contracts/source-schema.js +111 -0
  160. package/dist/core/agent-runtime.js +36 -0
  161. package/dist/core/agent-setup.js +111 -0
  162. package/dist/core/doctor.js +155 -0
  163. package/dist/core/errors.js +19 -0
  164. package/dist/core/flow-state.js +262 -0
  165. package/dist/core/fs.js +50 -0
  166. package/dist/core/install.js +44 -0
  167. package/dist/core/managed-files.js +106 -0
  168. package/dist/core/paths.js +56 -0
  169. package/dist/core/preset-validation.js +43 -0
  170. package/dist/core/prompt-builder.js +63 -0
  171. package/dist/core/repo-context.js +77 -0
  172. package/dist/core/repo-root.js +55 -0
  173. package/dist/core/skill-resolution.js +123 -0
  174. package/dist/core/state.js +220 -0
  175. package/dist/core/status.js +293 -0
  176. package/dist/core/sync.js +63 -0
  177. package/dist/core/targets.js +48 -0
  178. package/dist/core/upgrade.js +57 -0
  179. package/dist/core/validation.js +138 -0
  180. package/dist/core/version-checks.js +35 -0
  181. package/dist/generators/claude.js +14 -0
  182. package/dist/generators/codex.js +14 -0
  183. package/dist/generators/copilot.js +29 -0
  184. package/dist/generators/header.js +13 -0
  185. package/dist/generators/opencode.js +14 -0
  186. package/dist/generators/shared.js +37 -0
  187. package/dist/index.js +9 -0
  188. package/dist/legacy/targets.js +55 -0
  189. package/dist/presets/default.js +3 -0
  190. package/dist/presets/loader.js +34 -0
  191. package/dist/presets/version.js +18 -0
  192. package/dist/scoring/model.js +262 -0
  193. package/dist/skills/loader.js +40 -0
  194. package/dist/skills/schema.js +159 -0
  195. package/dist/types.js +1 -0
  196. package/docs/canonical-prodify-layout.md +87 -0
  197. package/docs/claude-support.md +22 -0
  198. package/docs/cli-doctor-spec.md +52 -0
  199. package/docs/cli-init-spec.md +70 -0
  200. package/docs/cli-install-agent-spec.md +48 -0
  201. package/docs/cli-sync-spec.md +40 -0
  202. package/docs/codex-support.md +24 -0
  203. package/docs/compatibility-targets.md +59 -0
  204. package/docs/copilot-support.md +30 -0
  205. package/docs/default-preset.md +47 -0
  206. package/docs/generated-file-headers.md +45 -0
  207. package/docs/generation-rules.md +94 -0
  208. package/docs/idempotency-guarantees.md +31 -0
  209. package/docs/managed-file-detection.md +45 -0
  210. package/docs/manual-edit-conflicts.md +37 -0
  211. package/docs/opencode-support.md +27 -0
  212. package/docs/ownership-rules.md +39 -0
  213. package/docs/path-resolution-rules.md +40 -0
  214. package/docs/preset-structure.md +49 -0
  215. package/docs/skill-system.md +67 -0
  216. package/docs/versioning-and-upgrade-strategy.md +40 -0
  217. package/package.json +22 -0
  218. package/src/README.md +11 -0
  219. package/src/cli.ts +61 -0
  220. package/src/commands/doctor.ts +20 -0
  221. package/src/commands/init.ts +37 -0
  222. package/src/commands/setup-agent.ts +28 -0
  223. package/src/commands/status.ts +34 -0
  224. package/src/commands/update.ts +23 -0
  225. package/src/contracts/README.md +10 -0
  226. package/src/contracts/compiled-schema.ts +42 -0
  227. package/src/contracts/compiler.ts +111 -0
  228. package/src/contracts/freshness.ts +58 -0
  229. package/src/contracts/index.ts +11 -0
  230. package/src/contracts/parser.ts +253 -0
  231. package/src/contracts/source-schema.ts +141 -0
  232. package/src/core/agent-runtime.ts +53 -0
  233. package/src/core/agent-setup.ts +147 -0
  234. package/src/core/doctor.ts +171 -0
  235. package/src/core/errors.ts +28 -0
  236. package/src/core/flow-state.ts +333 -0
  237. package/src/core/fs.ts +59 -0
  238. package/src/core/paths.ts +63 -0
  239. package/src/core/preset-validation.ts +47 -0
  240. package/src/core/prompt-builder.ts +73 -0
  241. package/src/core/repo-context.ts +93 -0
  242. package/src/core/repo-root.ts +74 -0
  243. package/src/core/skill-resolution.ts +151 -0
  244. package/src/core/state.ts +264 -0
  245. package/src/core/status.ts +372 -0
  246. package/src/core/targets.ts +53 -0
  247. package/src/core/upgrade.ts +66 -0
  248. package/src/core/validation.ts +233 -0
  249. package/src/core/version-checks.ts +40 -0
  250. package/src/index.ts +13 -0
  251. package/src/presets/default.ts +7 -0
  252. package/src/presets/loader.ts +46 -0
  253. package/src/presets/version.ts +31 -0
  254. package/src/scoring/model.ts +332 -0
  255. package/src/skills/loader.ts +58 -0
  256. package/src/skills/schema.ts +197 -0
  257. package/src/types.ts +329 -0
  258. package/tests/integration/cli-flows.test.js +347 -0
  259. package/tests/unit/agent-setup.test.js +81 -0
  260. package/tests/unit/cli.test.js +28 -0
  261. package/tests/unit/contracts.test.js +61 -0
  262. package/tests/unit/helpers.js +28 -0
  263. package/tests/unit/paths.test.js +52 -0
  264. package/tests/unit/preset-loader.test.js +37 -0
  265. package/tests/unit/scoring.test.js +65 -0
  266. package/tests/unit/self-hosted-workspace.test.js +22 -0
  267. package/tests/unit/skills.test.js +115 -0
  268. package/tests/unit/state-and-flow.test.js +120 -0
  269. package/tests/unit/targets.test.js +13 -0
  270. package/tests/unit/validation.test.js +73 -0
  271. package/tests/unit/version.test.js +24 -0
  272. package/tsconfig.json +23 -0
  273. package/urielsh-prodify-0.1.0.tgz +0 -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, and
10
+ 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/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # Prodify
2
+
3
+ Prodify turns AI- or vibe-coded repositories into production-grade code through a deterministic, agent-native workflow.
4
+
5
+ ## Product Purpose
6
+
7
+ Fast AI-generated code drifts into inconsistent structure, weak validation, and unclear ownership. Prodify gives that repo a repeatable upgrade path instead of relying on ad hoc prompting.
8
+
9
+ ## Architecture
10
+
11
+ Prodify has two layers:
12
+
13
+ - external CLI for repository setup and health
14
+ - inside-agent runtime commands for actually running the contract-driven transformation flow
15
+
16
+ External CLI:
17
+
18
+ - `prodify init`
19
+ - `prodify status`
20
+ - `prodify doctor`
21
+ - `prodify update`
22
+
23
+ Inside the agent:
24
+
25
+ - read `.prodify/AGENTS.md`
26
+ - `$prodify-init`
27
+ - `$prodify-execute`
28
+ - `$prodify-execute --auto`
29
+ - `$prodify-resume`
30
+
31
+ ## Repo Model
32
+
33
+ - `.prodify/` is the only required product-owned footprint.
34
+ - No root-level agent files are required in the default flow.
35
+ - If this repository contains a root `AGENTS.md`, treat it as repository-local contributor guidance for developing Prodify itself, not as a generated or required product runtime file.
36
+ - All durable workflow state lives in `.prodify/`.
37
+ - Humans edit stage contracts under `.prodify/contracts-src/`.
38
+ - Runtime execution reads only compiled contracts under `.prodify/contracts/`.
39
+ - Product-owned skill definitions live under `.prodify/skills/`.
40
+ - Stage outputs live under `.prodify/artifacts/`.
41
+ - Local baseline/final/delta scoring lives under `.prodify/metrics/`.
42
+ - This repository’s checked-in repo-root `.prodify/` directory is the self-hosting workspace for Prodify itself. It includes the generated runtime layout plus repo-specific design and development artifacts, so it is not a byte-for-byte snapshot of fresh `prodify init` output.
43
+
44
+ ## User Flow
45
+
46
+ 1. Set up an agent once per machine:
47
+
48
+ ```sh
49
+ prodify setup-agent codex
50
+ ```
51
+
52
+ 2. Initialize the repository:
53
+
54
+ ```sh
55
+ npm run build
56
+ node ./dist/index.js init
57
+ ```
58
+
59
+ 3. Open the supported agent you want to use.
60
+
61
+ - Codex
62
+ - Claude
63
+ - Copilot
64
+ - OpenCode
65
+
66
+ 4. Tell it: `Read .prodify/AGENTS.md and bootstrap Prodify for this repository.`
67
+
68
+ 5. Inside that agent, run `$prodify-init`.
69
+
70
+ 6. Run `$prodify-execute` for stage-by-stage execution, or `$prodify-execute --auto` to continue until a hard stop.
71
+
72
+ 7. If the flow pauses for validation or is interrupted, continue with `$prodify-resume`.
73
+ 8. Use `prodify status`, `prodify doctor`, and `prodify update` from the CLI to inspect or refresh the `.prodify/` scaffolding, compiled contracts, and local metrics workspace.
74
+
75
+ Repo initialization stays agent-agnostic. The active agent is resolved when `$prodify-init` runs inside the opened agent, not when `prodify init` creates `.prodify/`.
76
+
77
+ ## Contracts And Validation
78
+
79
+ - Contract source files are Markdown with YAML frontmatter under `.prodify/contracts-src/`.
80
+ - `prodify init` and `prodify update` compile those sources into deterministic runtime JSON under `.prodify/contracts/`.
81
+ - Each stage can also declare bounded `skill_routing` metadata, while concrete skill definitions stay versioned under `.prodify/skills/`.
82
+ - Status can report which stage skills were considered and activated from repository context, but contracts and validators remain authoritative.
83
+ - Stage completion is gated by compiled-contract validation, not by agent assertion alone.
84
+ - Validation checks required artifacts, write boundaries, forbidden writes, Markdown sections, JSON keys, and contract criteria.
85
+
86
+ ## Local Scoring
87
+
88
+ - Prodify can persist local baseline, final, and delta score artifacts under `.prodify/metrics/`.
89
+ - Raw tool outputs and normalized scores are stored separately so the score is traceable and deterministic.
90
+
91
+ ## Supported Agents
92
+
93
+ - Codex
94
+ - Claude
95
+ - Copilot
96
+ - OpenCode
97
+
98
+ All supported agents use the same `.prodify/AGENTS.md` bootstrap path in the current product model.
99
+
100
+ ## Development
101
+
102
+ Run the test suite:
103
+
104
+ ```sh
105
+ npm test
106
+ ```
107
+
108
+ The implementation lives primarily in:
109
+ - `src/`
110
+ - `assets/presets/default/`
111
+ - `tests/`
112
+ - `docs/`
113
+
114
+ Repository-local contributor guidance for this self-hosted repo lives in root [AGENTS.md](/Users/urielsh/projects/prodify/AGENTS.md). Product runtime guidance lives in [.prodify/AGENTS.md](/Users/urielsh/projects/prodify/.prodify/AGENTS.md).
115
+
116
+ ## License
117
+
118
+ This project is licensed under the Apache License 2.0. See [LICENSE](./LICENSE).
@@ -0,0 +1,54 @@
1
+ # Prodify Agent Entry
2
+
3
+ ## First Message
4
+
5
+ When the user opens a coding agent manually, the first instruction should be:
6
+
7
+ `Read .prodify/AGENTS.md and bootstrap Prodify for this repository.`
8
+
9
+ After the agent reads this file, it should continue with `$prodify-init` and keep the full workflow anchored to `.prodify/`.
10
+
11
+ ## Core Rules
12
+
13
+ - `.prodify/` is the only source of truth.
14
+ - Humans edit `.prodify/contracts-src/`; runtime reads only `.prodify/contracts/*.contract.json`.
15
+ - No root-level `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, or `.opencode/AGENTS.md` is required for the main flow.
16
+ - Repository initialization remains agent-agnostic. The active agent is resolved when `$prodify-init` runs, not when `prodify init` creates `.prodify/`.
17
+ - External CLI commands prepare and inspect the repo.
18
+ - Runtime commands are executed inside the chosen coding agent.
19
+ - Durable workflow state lives in `.prodify/state.json`.
20
+
21
+ ## External CLI
22
+
23
+ - `prodify init`
24
+ - `prodify setup-agent`
25
+ - `prodify status`
26
+ - `prodify doctor`
27
+ - `prodify update`
28
+
29
+ ## Runtime Files
30
+
31
+ - `.prodify/AGENTS.md`
32
+ - `.prodify/project.md`
33
+ - `.prodify/planning.md`
34
+ - `.prodify/contracts-src/`
35
+ - `.prodify/contracts/`
36
+ - `.prodify/skills/`
37
+ - `.prodify/artifacts/`
38
+ - `.prodify/metrics/`
39
+ - `.prodify/tasks/`
40
+ - `.prodify/state.json`
41
+ - `.prodify/runtime-commands.md`
42
+
43
+ ## Stage Skill System
44
+
45
+ - Contracts may declare stage-bounded `skill_routing`.
46
+ - Concrete skill definitions live under `.prodify/skills/`.
47
+ - Skills can improve stage execution quality, but they must not override contracts, write boundaries, or validation outcomes.
48
+
49
+ ## Runtime Commands
50
+
51
+ - `$prodify-init`
52
+ - `$prodify-execute`
53
+ - `$prodify-execute --auto`
54
+ - `$prodify-resume`
@@ -0,0 +1,6 @@
1
+ # Stage Artifacts
2
+
3
+ Stage execution writes validated outputs into this directory.
4
+ Each stage contract declares the canonical artifact paths and required sections.
5
+ The active runtime stage outputs use numbered filenames such as `01-understand.md` through `06-validate.md`.
6
+ This self-hosted repository may also keep repository-local design or historical artifacts here when they are useful for developing Prodify itself.
@@ -0,0 +1,4 @@
1
+ # Contract Sources
2
+
3
+ Edit the human-readable Markdown contracts in this directory.
4
+ Run `prodify update` to regenerate the compiled runtime JSON under `.prodify/contracts/`.
@@ -0,0 +1,56 @@
1
+ ---
2
+ schema_version: 1
3
+ contract_version: 1.0.0
4
+ stage: architecture
5
+ task_id: 03-architecture
6
+ required_artifacts:
7
+ - path: .prodify/artifacts/03-architecture.md
8
+ format: markdown
9
+ required_sections:
10
+ - Dependency Rules
11
+ - Policy Checks
12
+ - Proposed Structure
13
+ - Success Criteria
14
+ - Tradeoffs
15
+ allowed_write_roots:
16
+ - .prodify/artifacts/
17
+ forbidden_writes:
18
+ - src/
19
+ - tests/
20
+ policy_rules:
21
+ - Flag mixed concerns explicitly.
22
+ - Keep Domain dependencies pointing inward only.
23
+ success_criteria:
24
+ - The target structure is explicit.
25
+ - Architecture violations are listed clearly.
26
+ skill_routing:
27
+ default_skills:
28
+ - architecture-method
29
+ allowed_skills:
30
+ - architecture-method
31
+ - maintainability-review
32
+ - react-frontend
33
+ - typescript-backend
34
+ conditional_skills:
35
+ - skill: maintainability-review
36
+ when:
37
+ all:
38
+ - fact: architecture_pattern
39
+ includes: contract-driven-runtime
40
+ reason: contract-driven runtime boundaries need maintainability review
41
+ - skill: react-frontend
42
+ when:
43
+ all:
44
+ - fact: framework
45
+ includes: react
46
+ reason: repo framework includes React
47
+ - skill: typescript-backend
48
+ when:
49
+ all:
50
+ - fact: language
51
+ includes: typescript
52
+ reason: repo language includes TypeScript
53
+ ---
54
+ # Architecture Contract
55
+
56
+ Use this contract to define the target structure, dependency rules, and major tradeoffs before planning.
@@ -0,0 +1,49 @@
1
+ ---
2
+ schema_version: 1
3
+ contract_version: 1.0.0
4
+ stage: diagnose
5
+ task_id: 02-diagnose
6
+ required_artifacts:
7
+ - path: .prodify/artifacts/02-diagnose.md
8
+ format: markdown
9
+ required_sections:
10
+ - Constraints
11
+ - Observed Issues
12
+ - Policy Checks
13
+ - Root Causes
14
+ - Success Criteria
15
+ allowed_write_roots:
16
+ - .prodify/artifacts/
17
+ forbidden_writes:
18
+ - src/
19
+ - tests/
20
+ policy_rules:
21
+ - Diagnose from repository evidence only.
22
+ - Do not propose implementation changes in the diagnosis stage.
23
+ success_criteria:
24
+ - Every critical issue is tied to evidence.
25
+ - Root causes are separated from symptoms.
26
+ skill_routing:
27
+ default_skills:
28
+ - diagnosis-method
29
+ allowed_skills:
30
+ - diagnosis-method
31
+ - maintainability-review
32
+ - security-hardening
33
+ conditional_skills:
34
+ - skill: maintainability-review
35
+ when:
36
+ all:
37
+ - fact: architecture_pattern
38
+ includes: layered-cli
39
+ reason: layered CLI ownership should be reviewed for maintainability
40
+ - skill: security-hardening
41
+ when:
42
+ all:
43
+ - fact: risk_signal
44
+ includes: external-dependencies
45
+ reason: repo carries external dependency risk
46
+ ---
47
+ # Diagnose Contract
48
+
49
+ Use this contract to record observed problems, supporting evidence, and the most likely root causes.
@@ -0,0 +1,42 @@
1
+ ---
2
+ schema_version: 1
3
+ contract_version: 1.0.0
4
+ stage: plan
5
+ task_id: 04-plan
6
+ required_artifacts:
7
+ - path: .prodify/artifacts/04-plan.md
8
+ format: markdown
9
+ required_sections:
10
+ - Policy Checks
11
+ - Risks
12
+ - Step Breakdown
13
+ - Success Criteria
14
+ - Verification
15
+ allowed_write_roots:
16
+ - .prodify/artifacts/
17
+ forbidden_writes:
18
+ - src/
19
+ - tests/
20
+ policy_rules:
21
+ - Keep the plan deterministic and minimal.
22
+ - Map every step back to a diagnosed issue or architecture rule.
23
+ success_criteria:
24
+ - The plan enumerates executable steps.
25
+ - Verification is defined before refactoring starts.
26
+ skill_routing:
27
+ default_skills:
28
+ - planning-method
29
+ allowed_skills:
30
+ - maintainability-review
31
+ - planning-method
32
+ conditional_skills:
33
+ - skill: maintainability-review
34
+ when:
35
+ all:
36
+ - fact: project_type
37
+ includes: cli
38
+ reason: CLI lifecycle changes should be reviewed for maintainability
39
+ ---
40
+ # Plan Contract
41
+
42
+ Use this contract to produce the smallest safe sequence of refactor steps and verification checkpoints.
@@ -0,0 +1,54 @@
1
+ ---
2
+ schema_version: 1
3
+ contract_version: 1.0.0
4
+ stage: refactor
5
+ task_id: 05-refactor
6
+ required_artifacts:
7
+ - path: .prodify/artifacts/05-refactor.md
8
+ format: markdown
9
+ required_sections:
10
+ - Behavior Guardrails
11
+ - Changed Files
12
+ - Policy Checks
13
+ - Selected Step
14
+ - Success Criteria
15
+ allowed_write_roots:
16
+ - .prodify/artifacts/
17
+ - README.md
18
+ - assets/
19
+ - src/
20
+ - tests/
21
+ forbidden_writes:
22
+ - .prodify/contracts/
23
+ policy_rules:
24
+ - Execute exactly one selected step.
25
+ - Keep the diff minimal and behavior-preserving unless the plan says otherwise.
26
+ success_criteria:
27
+ - The selected plan step is implemented fully.
28
+ - Unrelated files remain untouched.
29
+ skill_routing:
30
+ default_skills:
31
+ - refactoring-method
32
+ - test-hardening
33
+ allowed_skills:
34
+ - react-frontend
35
+ - refactoring-method
36
+ - test-hardening
37
+ - typescript-backend
38
+ conditional_skills:
39
+ - skill: react-frontend
40
+ when:
41
+ all:
42
+ - fact: framework
43
+ includes: react
44
+ reason: repo framework includes React
45
+ - skill: typescript-backend
46
+ when:
47
+ all:
48
+ - fact: language
49
+ includes: typescript
50
+ reason: repo language includes TypeScript
51
+ ---
52
+ # Refactor Contract
53
+
54
+ Use this contract to record the single plan step executed, the files changed, and the guardrails that preserved behavior.
@@ -0,0 +1,56 @@
1
+ ---
2
+ schema_version: 1
3
+ contract_version: 1.0.0
4
+ stage: understand
5
+ task_id: 01-understand
6
+ required_artifacts:
7
+ - path: .prodify/artifacts/01-understand.md
8
+ format: markdown
9
+ required_sections:
10
+ - Current State
11
+ - Open Questions
12
+ - Policy Checks
13
+ - Repository Summary
14
+ - Success Criteria
15
+ allowed_write_roots:
16
+ - .prodify/artifacts/
17
+ forbidden_writes:
18
+ - src/
19
+ - tests/
20
+ policy_rules:
21
+ - Operate only on verified data.
22
+ - Preserve the existing behavior during understanding.
23
+ success_criteria:
24
+ - The repository intent is captured clearly.
25
+ - Known unknowns are listed explicitly.
26
+ skill_routing:
27
+ default_skills:
28
+ - codebase-scanning
29
+ allowed_skills:
30
+ - codebase-scanning
31
+ - maintainability-review
32
+ - react-frontend
33
+ - typescript-backend
34
+ conditional_skills:
35
+ - skill: maintainability-review
36
+ when:
37
+ all:
38
+ - fact: project_type
39
+ includes: cli
40
+ reason: repo exposes a CLI surface
41
+ - skill: react-frontend
42
+ when:
43
+ all:
44
+ - fact: framework
45
+ includes: react
46
+ reason: repo framework includes React
47
+ - skill: typescript-backend
48
+ when:
49
+ all:
50
+ - fact: language
51
+ includes: typescript
52
+ reason: repo language includes TypeScript
53
+ ---
54
+ # Understand Contract
55
+
56
+ Use this contract to describe the current repository, verified constraints, and open questions before diagnosis begins.