@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
@@ -0,0 +1,13 @@
1
+ # Example Task
2
+
3
+ ## Goal
4
+
5
+ Describe the task goal.
6
+
7
+ ## Inputs
8
+
9
+ - List required inputs.
10
+
11
+ ## Output
12
+
13
+ - Describe the expected output.
@@ -0,0 +1,18 @@
1
+ # 01-understand
2
+
3
+ ## Current State
4
+ -
5
+
6
+ ## Open Questions
7
+ -
8
+
9
+ ## Policy Checks
10
+ - Operate only on verified data.
11
+ - Preserve the existing behavior during understanding.
12
+
13
+ ## Repository Summary
14
+ -
15
+
16
+ ## Success Criteria
17
+ - The repository intent is captured clearly.
18
+ - Known unknowns are listed explicitly.
@@ -0,0 +1,18 @@
1
+ # 02-diagnose
2
+
3
+ ## Constraints
4
+ -
5
+
6
+ ## Observed Issues
7
+ -
8
+
9
+ ## Policy Checks
10
+ - Diagnose from repository evidence only.
11
+ - Do not propose implementation changes in the diagnosis stage.
12
+
13
+ ## Root Causes
14
+ -
15
+
16
+ ## Success Criteria
17
+ - Every critical issue is tied to evidence.
18
+ - Root causes are separated from symptoms.
@@ -0,0 +1,18 @@
1
+ # 03-architecture
2
+
3
+ ## Dependency Rules
4
+ -
5
+
6
+ ## Policy Checks
7
+ - Flag mixed concerns explicitly.
8
+ - Keep Domain dependencies pointing inward only.
9
+
10
+ ## Proposed Structure
11
+ -
12
+
13
+ ## Success Criteria
14
+ - The target structure is explicit.
15
+ - Architecture violations are listed clearly.
16
+
17
+ ## Tradeoffs
18
+ -
@@ -0,0 +1,22 @@
1
+ # 04-plan
2
+
3
+ ## Policy Checks
4
+ - Keep the plan deterministic and minimal.
5
+ - Map every step back to a diagnosed issue or architecture rule.
6
+
7
+ ## Risks
8
+ -
9
+
10
+ ## Step Breakdown
11
+ - Step ID:
12
+ - Description:
13
+ - Files:
14
+ - Risk:
15
+ - Validation:
16
+
17
+ ## Success Criteria
18
+ - The plan enumerates executable steps.
19
+ - Verification is defined before refactoring starts.
20
+
21
+ ## Verification
22
+ -
@@ -0,0 +1,19 @@
1
+ # 05-refactor
2
+
3
+ ## Behavior Guardrails
4
+ -
5
+
6
+ ## Changed Files
7
+ -
8
+
9
+ ## Policy Checks
10
+ - Execute exactly one selected step.
11
+ - Keep the diff minimal and behavior-preserving unless the plan says otherwise.
12
+
13
+ ## Selected Step
14
+ - Step ID:
15
+ - Description:
16
+
17
+ ## Success Criteria
18
+ - The selected plan step is implemented fully.
19
+ - Unrelated files remain untouched.
@@ -0,0 +1,16 @@
1
+ # 06-validate
2
+
3
+ ## Policy Checks
4
+ - Validation must follow every refactor step.
5
+ - Critical regressions block forward progress.
6
+
7
+ ## Regressions
8
+ -
9
+
10
+ ## Success Criteria
11
+ - Validation records whether regressions were found.
12
+ - The result is strong enough to gate the next runtime transition.
13
+
14
+ ## Validation Results
15
+ - PASS/FAIL:
16
+ - Evidence:
@@ -0,0 +1,3 @@
1
+ # Prodify Templates
2
+
3
+ This directory is reserved for repository-local templates that the runtime may need while executing the Prodify workflow.
@@ -0,0 +1,29 @@
1
+ # Architecture Spec
2
+
3
+ ## Detected Pattern
4
+ - Pattern:
5
+ - Confidence:
6
+
7
+ ## Target Style
8
+ - Modular Clean Architecture
9
+
10
+ ## Layer Definitions
11
+ - Layer: Domain
12
+ - Allowed dependencies:
13
+ - Layer: Application
14
+ - Allowed dependencies: Domain
15
+ - Layer: Infrastructure
16
+ - Allowed dependencies: Application, Domain
17
+ - Layer: Interface
18
+ - Allowed dependencies: Application, Domain
19
+
20
+ ## Violations
21
+ - Location:
22
+ - Violation type:
23
+ - Evidence:
24
+
25
+ ## Gap Analysis
26
+ -
27
+
28
+ ## Migration Notes
29
+ -
@@ -0,0 +1,45 @@
1
+ # Diagnostic Report
2
+
3
+ ## Top 5 Priorities
4
+ 1.
5
+ 2.
6
+ 3.
7
+ 4.
8
+ 5.
9
+
10
+ ## Critical Issues
11
+ - Issue:
12
+ - File:
13
+ - Category:
14
+ - Impact:
15
+ - Evidence:
16
+
17
+ ## High Issues
18
+ - Issue:
19
+ - File:
20
+ - Category:
21
+ - Impact:
22
+ - Evidence:
23
+
24
+ ## Medium Issues
25
+ - Issue:
26
+ - File:
27
+ - Category:
28
+ - Impact:
29
+ - Evidence:
30
+
31
+ ## Low Issues
32
+ - Issue:
33
+ - File:
34
+ - Category:
35
+ - Impact:
36
+ - Evidence:
37
+
38
+ ## Reliability Risks
39
+ -
40
+
41
+ ## Technical Debt Score
42
+ - Score:
43
+
44
+ ## Notes
45
+ -
@@ -0,0 +1,5 @@
1
+ # Example Template
2
+
3
+ ## Section
4
+
5
+ Fill this section explicitly.
@@ -0,0 +1,19 @@
1
+ # Implementation Summary
2
+
3
+ ## Step Executed
4
+ - Step ID:
5
+
6
+ ## Objective Achieved
7
+ - Yes/No:
8
+
9
+ ## Files Changed
10
+ -
11
+
12
+ ## Diff Summary
13
+ -
14
+
15
+ ## Behavior Change Expected
16
+ - Yes/No:
17
+
18
+ ## Notes
19
+ -
@@ -0,0 +1,32 @@
1
+ # Orientation Map
2
+
3
+ ## Project Summary
4
+ - Project name:
5
+ - Primary tech stack:
6
+ - Project type:
7
+ - Runtime environment:
8
+
9
+ ## Entry Points
10
+ -
11
+
12
+ ## Module Map
13
+ - Module:
14
+ - Path:
15
+ - Role:
16
+ - Confidence:
17
+
18
+ ## Monorepo Metadata
19
+ - Is monorepo:
20
+ - Tooling:
21
+ - Workspace roots:
22
+
23
+ ## Dependency Overview
24
+ - Core dependency flows:
25
+ - High-centrality modules:
26
+ - Tight coupling areas:
27
+
28
+ ## Key Observations
29
+ -
30
+
31
+ ## Uncertainty
32
+ -
@@ -0,0 +1,24 @@
1
+ # Refactor Plan
2
+
3
+ ## Summary
4
+ - Total phases:
5
+ - Total steps:
6
+ - Estimated complexity:
7
+
8
+ ## Phase Breakdown
9
+ - Phase:
10
+ - Goal:
11
+ - Notes:
12
+
13
+ ## Steps
14
+
15
+ ### Step: <ID>
16
+ - Status: pending
17
+ - Description:
18
+ - Files:
19
+ - Risk:
20
+ - Expected outcome:
21
+ - Validation command:
22
+
23
+ ## Notes
24
+ -
@@ -0,0 +1,22 @@
1
+ # Validation Report
2
+
3
+ ## Readiness Status
4
+ - PASS/FAIL:
5
+
6
+ ## Final Score
7
+ - Score:
8
+
9
+ ## Category Scores
10
+ - Architecture:
11
+ - Maintainability:
12
+ - Reliability:
13
+ - Testability:
14
+
15
+ ## Remaining Issues
16
+ -
17
+
18
+ ## Regressions Detected
19
+ -
20
+
21
+ ## Recommended Next Step
22
+ -
@@ -0,0 +1,5 @@
1
+ {
2
+ "schema_version": "4",
3
+ "preset_name": "default",
4
+ "preset_version": "4.0.0"
5
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,305 @@
1
+ # AGENTS.md
2
+
3
+ Repository note: this root file exists for contributors working on the Prodify source repository. It is not created or required by Prodify's default product lifecycle. The product runtime entrypoint remains `.prodify/AGENTS.md`.
4
+
5
+ ## 1. Purpose
6
+
7
+ This system defines a **deterministic execution protocol** for evolving a codebase to production-grade quality.
8
+
9
+ All behavior MUST follow this document.
10
+ If any rule cannot be satisfied, execution MUST stop.
11
+
12
+ ---
13
+
14
+ ## 2. Execution Model
15
+
16
+ Execution is **state-driven** and **artifact-driven**.
17
+
18
+ * State source: `.prodify/artifacts/run_state.json`
19
+ * Outputs: `.prodify/artifacts/*.md`
20
+ * Tasks: `.prodify/tasks/*.md`
21
+ * Templates: `.prodify/templates/*.md`
22
+ * Active stage artifacts use the numbered runtime filenames `01-understand.md` through `06-validate.md`
23
+
24
+ No implicit state is allowed.
25
+
26
+ ---
27
+
28
+ ## 3. Mandatory Task Pipeline
29
+
30
+ Tasks MUST execute in this exact order:
31
+
32
+ ```text
33
+ 01-understand → 02-diagnose → 03-architecture → 04-plan → 05-refactor → 06-validate
34
+ ```
35
+
36
+ ### Violations
37
+
38
+ Execution MUST stop if:
39
+
40
+ * a task is skipped
41
+ * a required artifact is missing
42
+ * a task is executed out of order
43
+
44
+ ---
45
+
46
+ ## 4. Artifact Contract
47
+
48
+ ### 4.1 General Rules
49
+
50
+ * Every task MUST:
51
+
52
+ * read declared inputs
53
+ * write exactly one primary artifact
54
+ * All artifacts MUST:
55
+
56
+ * exist in `.prodify/artifacts/`
57
+ * follow the matching template exactly
58
+ * contain all required sections
59
+
60
+ ### 4.2 Validation
61
+
62
+ An artifact is INVALID if:
63
+
64
+ * a required section is missing
65
+ * section structure deviates from template
66
+ * content is empty without justification
67
+
68
+ If artifact is invalid:
69
+
70
+ * DO NOT continue
71
+ * mark task as failed
72
+
73
+ ---
74
+
75
+ ## 5. Task Execution Protocol
76
+
77
+ For every task:
78
+
79
+ ### Step 1 — Input Verification
80
+
81
+ * Verify all declared input artifacts exist
82
+ * If missing → STOP
83
+
84
+ ### Step 2 — Load Context
85
+
86
+ * Load artifacts
87
+ * Extract only relevant structured data
88
+
89
+ ### Step 3 — Execute Task
90
+
91
+ * Follow task instructions exactly
92
+ * No deviation allowed
93
+
94
+ ### Step 4 — Output Write
95
+
96
+ * Write artifact using template
97
+ * Do not add extra sections
98
+
99
+ ### Step 5 — Output Validation
100
+
101
+ * Compare artifact to template
102
+ * If mismatch → FAIL
103
+
104
+ ### Step 6 — State Update
105
+
106
+ * Update `run_state.json`
107
+ * Append to `task_log.json`
108
+
109
+ ---
110
+
111
+ ## 6. Refactor Constraints (Task 05)
112
+
113
+ ### 6.1 Scope
114
+
115
+ * EXACTLY ONE step from `04-plan.md`
116
+ * NO additional changes allowed
117
+
118
+ ### 6.2 Violations
119
+
120
+ Execution MUST stop if:
121
+
122
+ * multiple steps are executed
123
+ * unrelated files are modified
124
+ * behavior changes without being specified
125
+
126
+ ---
127
+
128
+ ## 7. Validation Enforcement (Task 06)
129
+
130
+ Task 06 MUST run after EVERY Task 05 execution.
131
+
132
+ ### 7.1 Fail Conditions
133
+
134
+ Validation FAIL if:
135
+
136
+ * any critical issue exists
137
+ * regression detected
138
+ * architecture rules violated
139
+
140
+ ### 7.2 Pass Conditions
141
+
142
+ Validation PASS only if:
143
+
144
+ * no critical issues
145
+ * no regressions
146
+ * structure improved
147
+
148
+ ---
149
+
150
+ ## 8. Loop Control
151
+
152
+ Execution loop:
153
+
154
+ ```text
155
+ 05-refactor → 06-validate → decision
156
+ ```
157
+
158
+ ### Rules
159
+
160
+ * If FAIL → retry or repair the same selected step before continuing
161
+ * If PASS → continue only if more steps remain; otherwise STOP
162
+ * If no steps remain → STOP
163
+
164
+ ---
165
+
166
+ ## 9. Prohibited Behavior
167
+
168
+ The following are STRICTLY FORBIDDEN:
169
+
170
+ * modifying code outside Task 05
171
+ * skipping validation
172
+ * generating artifacts without templates
173
+ * adding undocumented fields
174
+ * assuming file existence without verification
175
+ * performing bulk rewrites
176
+ * making implicit decisions
177
+
178
+ Violation → IMMEDIATE STOP
179
+
180
+ ---
181
+
182
+ ## 10. Required Behavior
183
+
184
+ The system MUST:
185
+
186
+ * use relative paths only
187
+ * produce minimal diffs
188
+ * preserve behavior unless explicitly required
189
+ * justify all non-trivial decisions
190
+ * operate only on verified data
191
+
192
+ ---
193
+
194
+ ## 11. Data Integrity Rules
195
+
196
+ * Artifacts are the ONLY source of truth
197
+ * Do not rely on memory across tasks
198
+ * Do not infer missing data
199
+ * If data is incomplete → STOP
200
+
201
+ ---
202
+
203
+ ## 12. Output Contract (MANDATORY)
204
+
205
+ Every response MUST include:
206
+
207
+ * task_id
208
+ * inputs
209
+ * actions performed
210
+ * artifact written
211
+ * code_modified: yes/no
212
+ * next_task
213
+
214
+ Missing fields → INVALID RESPONSE
215
+
216
+ ---
217
+
218
+ ## 13. Failure Protocol
219
+
220
+ If any rule is violated:
221
+
222
+ 1. STOP execution
223
+ 2. Do NOT proceed
224
+ 3. Return:
225
+
226
+ ```text
227
+ STATE_BLOCK:
228
+ status: failed
229
+ task_id: <task>
230
+ reason: <exact failure>
231
+ blocking_artifact: <artifact or file>
232
+ ```
233
+
234
+ ---
235
+
236
+ ## 14. State Model
237
+
238
+ `run_state.json` MUST include:
239
+
240
+ * current_task
241
+ * last_completed_task
242
+ * next_task
243
+ * completed_step_ids
244
+ * status
245
+
246
+ If state is inconsistent → STOP
247
+
248
+ ---
249
+
250
+ ## 15. Determinism Requirements
251
+
252
+ Given the same:
253
+
254
+ * repository
255
+ * artifacts
256
+ * templates
257
+
258
+ The system MUST produce identical outputs.
259
+
260
+ Non-deterministic behavior is a violation.
261
+
262
+ ---
263
+
264
+ ## 16. Architecture Rules
265
+
266
+ * Dependencies MUST NOT point outward from Domain
267
+ * Mixed concerns MUST be flagged
268
+ * Violations MUST be explicitly listed
269
+
270
+ ---
271
+
272
+ ## 17. Completion Criteria
273
+
274
+ Execution is complete ONLY when:
275
+
276
+ * all required artifacts exist
277
+ * validation passes
278
+ * no remaining critical issues
279
+ * no pending refactor steps
280
+
281
+ ---
282
+
283
+ ## 18. Enforcement Priority
284
+
285
+ If rules conflict, priority is:
286
+
287
+ ```text
288
+ 1. Artifact Contract
289
+ 2. Task Order
290
+ 3. Refactor Constraints
291
+ 4. Validation Rules
292
+ 5. Output Contract
293
+ ```
294
+
295
+ Higher priority rules override lower ones.
296
+
297
+ ---
298
+
299
+ ## 19. Zero-Assumption Policy
300
+
301
+ * Never assume structure
302
+ * Never assume intent
303
+ * Never assume correctness
304
+
305
+ Everything MUST be verified.