@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,32 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "security-hardening",
4
+ "name": "Security Hardening",
5
+ "version": "1.0.0",
6
+ "category": "quality-policy",
7
+ "description": "Applies explicit scrutiny when the repository has exposed surfaces or dependency risk signals.",
8
+ "intended_use": [
9
+ "Use in diagnose and validate when risk signals suggest stronger security review."
10
+ ],
11
+ "stage_compatibility": [
12
+ "diagnose",
13
+ "validate"
14
+ ],
15
+ "activation_conditions": [
16
+ {
17
+ "all": [
18
+ {
19
+ "fact": "risk_signal",
20
+ "includes": "external-dependencies"
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "execution_guidance": [
26
+ "Check exposed command or network surfaces before declaring validation success.",
27
+ "Treat dependency-driven risk as additive evidence, not a blocker by itself."
28
+ ],
29
+ "caution_guidance": [
30
+ "Do not infer a security defect without repository evidence."
31
+ ]
32
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "test-hardening",
4
+ "name": "Test Hardening",
5
+ "version": "1.0.0",
6
+ "category": "quality-policy",
7
+ "description": "Improves confidence through regression-focused test additions or validation checks.",
8
+ "intended_use": [
9
+ "Use in refactor and validate when executable checks should be strengthened."
10
+ ],
11
+ "stage_compatibility": [
12
+ "refactor",
13
+ "validate"
14
+ ],
15
+ "activation_conditions": [],
16
+ "execution_guidance": [
17
+ "Add or strengthen tests around the selected behavior change boundary.",
18
+ "Prefer deterministic assertions over snapshot-like broad checks."
19
+ ],
20
+ "caution_guidance": [
21
+ "Do not add unrelated test churn outside the selected step."
22
+ ]
23
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "schema_version": "1",
3
+ "skills": [
4
+ "domain/react-frontend.skill.json",
5
+ "domain/typescript-backend.skill.json",
6
+ "quality-policy/maintainability-review.skill.json",
7
+ "quality-policy/security-hardening.skill.json",
8
+ "quality-policy/test-hardening.skill.json",
9
+ "stage-method/architecture-method.skill.json",
10
+ "stage-method/codebase-scanning.skill.json",
11
+ "stage-method/diagnosis-method.skill.json",
12
+ "stage-method/planning-method.skill.json",
13
+ "stage-method/refactoring-method.skill.json",
14
+ "stage-method/validation-method.skill.json"
15
+ ]
16
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "architecture-method",
4
+ "name": "Architecture Method",
5
+ "version": "1.0.0",
6
+ "category": "stage-method",
7
+ "description": "Focuses architecture work on boundaries, dependency direction, and modular responsibility splits.",
8
+ "intended_use": [
9
+ "Use during architecture to propose structural changes that preserve the contract model."
10
+ ],
11
+ "stage_compatibility": [
12
+ "architecture"
13
+ ],
14
+ "activation_conditions": [],
15
+ "execution_guidance": [
16
+ "Describe boundaries before proposing new modules or layers.",
17
+ "Flag mixed concerns and outward domain dependencies explicitly."
18
+ ],
19
+ "caution_guidance": [
20
+ "Do not treat architecture guidance as permission to rewrite unrelated code."
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "codebase-scanning",
4
+ "name": "Codebase Scanning",
5
+ "version": "1.0.0",
6
+ "category": "stage-method",
7
+ "description": "Guides the understand stage toward deterministic inventory, dependency, and ownership mapping.",
8
+ "intended_use": [
9
+ "Use during understand to scan the repository surface before drawing conclusions."
10
+ ],
11
+ "stage_compatibility": [
12
+ "understand"
13
+ ],
14
+ "activation_conditions": [],
15
+ "execution_guidance": [
16
+ "Inventory verified files and directories before summarizing the repository.",
17
+ "Prefer direct evidence over inferred structure."
18
+ ],
19
+ "caution_guidance": [
20
+ "Do not speculate about missing modules or undocumented ownership."
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "diagnosis-method",
4
+ "name": "Diagnosis Method",
5
+ "version": "1.0.0",
6
+ "category": "stage-method",
7
+ "description": "Keeps diagnosis anchored to observed evidence, root causes, and production-readiness risks.",
8
+ "intended_use": [
9
+ "Use during diagnose to separate symptoms, causes, and unsupported claims."
10
+ ],
11
+ "stage_compatibility": [
12
+ "diagnose"
13
+ ],
14
+ "activation_conditions": [],
15
+ "execution_guidance": [
16
+ "Tie every issue to observable evidence.",
17
+ "Separate root causes from downstream symptoms."
18
+ ],
19
+ "caution_guidance": [
20
+ "Do not prescribe implementation changes in the diagnosis stage."
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "planning-method",
4
+ "name": "Planning Method",
5
+ "version": "1.0.0",
6
+ "category": "stage-method",
7
+ "description": "Shapes implementation plans into bounded, testable, behavior-preserving steps.",
8
+ "intended_use": [
9
+ "Use during plan to convert diagnosis and architecture outputs into ordered steps."
10
+ ],
11
+ "stage_compatibility": [
12
+ "plan"
13
+ ],
14
+ "activation_conditions": [],
15
+ "execution_guidance": [
16
+ "Keep steps small, testable, and directly linked to diagnosed issues.",
17
+ "Call out guardrails when behavior must remain stable."
18
+ ],
19
+ "caution_guidance": [
20
+ "Do not introduce implementation detail that belongs in refactor."
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "refactoring-method",
4
+ "name": "Refactoring Method",
5
+ "version": "1.0.0",
6
+ "category": "stage-method",
7
+ "description": "Keeps refactor work bounded to a single selected step with minimal diff discipline.",
8
+ "intended_use": [
9
+ "Use during refactor when implementing one approved plan step."
10
+ ],
11
+ "stage_compatibility": [
12
+ "refactor"
13
+ ],
14
+ "activation_conditions": [],
15
+ "execution_guidance": [
16
+ "Implement one planned step at a time.",
17
+ "Preserve behavior unless the plan explicitly authorizes a change."
18
+ ],
19
+ "caution_guidance": [
20
+ "Do not expand the edit set beyond the selected step."
21
+ ]
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "schema_version": "1",
3
+ "id": "validation-method",
4
+ "name": "Validation Method",
5
+ "version": "1.0.0",
6
+ "category": "stage-method",
7
+ "description": "Ensures validation checks regressions, contract conformance, and structural improvements explicitly.",
8
+ "intended_use": [
9
+ "Use during validate to assess pass or fail after refactor work."
10
+ ],
11
+ "stage_compatibility": [
12
+ "validate"
13
+ ],
14
+ "activation_conditions": [],
15
+ "execution_guidance": [
16
+ "Check contract conformance before interpreting broader quality signals.",
17
+ "Record regressions and architecture violations explicitly."
18
+ ],
19
+ "caution_guidance": [
20
+ "Do not treat validation as optional after refactor."
21
+ ]
22
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "schema_version": "2",
3
+ "preset_name": "default",
4
+ "preset_version": "4.0.0",
5
+ "runtime": {
6
+ "status": "not_bootstrapped",
7
+ "current_state": "not_bootstrapped",
8
+ "mode": null,
9
+ "current_stage": null,
10
+ "current_task_id": null,
11
+ "pending_stage": null,
12
+ "completed_stages": [],
13
+ "awaiting_user_validation": false,
14
+ "last_validation_result": "unknown",
15
+ "last_validation": null,
16
+ "last_validated_contract_versions": {},
17
+ "resumable": false,
18
+ "blocked_reason": null,
19
+ "failure_metadata": null,
20
+ "bootstrap": {
21
+ "bootstrapped": false
22
+ },
23
+ "next_action": "$prodify-init",
24
+ "timestamps": {
25
+ "bootstrapped_at": null,
26
+ "last_transition_at": null,
27
+ "completed_at": null
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,83 @@
1
+ ---
2
+ task_id: 01-understand
3
+ reads: []
4
+ writes:
5
+ - .prodify/artifacts/01-understand.md
6
+ next_task: 02-diagnose
7
+ mode: analysis
8
+ ---
9
+ # Task 01 — Understand: Repository Architectural Orientation
10
+
11
+ ## Goal
12
+ Transform a raw repository into a machine-parseable architectural map.
13
+
14
+ ## Scope
15
+ Survey the repository structure conservatively and produce an evidence-based orientation artifact without modifying source code.
16
+
17
+ ## Inputs
18
+ - Absolute path to repository root
19
+
20
+ ## Execution Instructions
21
+ 1. **Scan boundaries**
22
+ - Execute a shallow scan of the repository first.
23
+ - Read `.gitignore` to establish the scope of valid source files.
24
+ - Exclude generated, vendored, cache, and build-output directories unless explicitly needed.
25
+
26
+ 2. **Tech stack detection**
27
+ - Locate ecosystem marker files such as:
28
+ - `package.json`
29
+ - `pyproject.toml`
30
+ - `go.mod`
31
+ - `Cargo.toml`
32
+ - `*.csproj`
33
+ - `pom.xml`
34
+ - Infer primary languages, frameworks, package managers, and runtime environment.
35
+
36
+ 3. **Entry point discovery**
37
+ - Search for standard startup patterns such as:
38
+ - `main.ts`, `index.ts`
39
+ - `app.py`, `main.py`
40
+ - `Program.cs`
41
+ - framework-specific bootstraps
42
+ - Record all likely entry points, and label confidence when ambiguous.
43
+
44
+ 4. **Monorepo identification**
45
+ - Check for markers such as:
46
+ - `nx.json`
47
+ - `turbo.json`
48
+ - `pnpm-workspace.yaml`
49
+ - `lerna.json`
50
+ - workspace definitions in root manifests
51
+ - If found, recursively map sub-projects and package boundaries.
52
+
53
+ 5. **Module mapping**
54
+ - Identify high-internal-cohesion directories such as:
55
+ - `src/services`
56
+ - `lib/core`
57
+ - `apps/*`
58
+ - `packages/*`
59
+ - For each major module, infer:
60
+ - purpose
61
+ - responsibility
62
+ - approximate boundary
63
+
64
+ 6. **Output discipline**
65
+ - Be conservative.
66
+ - Do not invent structure that is not supported by repository evidence.
67
+ - Mark uncertainty explicitly.
68
+ - MUST NOT modify source code.
69
+
70
+ ## Output Specification
71
+ Use `.prodify/templates/01-understand.template.md` and fill every section explicitly. Do not substitute a freeform structure.
72
+
73
+ ## Failure Conditions
74
+ - MUST STOP if the repository root cannot be read.
75
+ - MUST STOP if required repository evidence cannot be inspected safely.
76
+ - MUST STOP if the output cannot be produced in `.prodify/templates/01-understand.template.md`.
77
+ - MUST NOT modify source code.
78
+
79
+ ## Definition of Done
80
+ - The repository has a clear, evidence-based orientation map.
81
+ - Likely entry points are identified.
82
+ - Major modules and monorepo boundaries are captured.
83
+ - No code changes are made.
@@ -0,0 +1,67 @@
1
+ ---
2
+ task_id: 02-diagnose
3
+ reads:
4
+ - .prodify/artifacts/01-understand.md
5
+ writes:
6
+ - .prodify/artifacts/02-diagnose.md
7
+ next_task: 03-architecture
8
+ mode: analysis
9
+ ---
10
+ # Task 02 — Diagnose: Health and Risk Assessment
11
+
12
+ ## Goal
13
+ Detect technical debt, architectural erosion, and reliability risks.
14
+
15
+ ## Scope
16
+ Review the repository areas mapped in Task 01 and produce a concrete diagnostic snapshot without modifying source code.
17
+
18
+ ## Inputs
19
+ - `.prodify/artifacts/01-understand.md`
20
+ - read access to the mapped modules and entrypoints
21
+
22
+ ## Execution Instructions
23
+ 1. **Target selection**
24
+ - Prioritize core modules identified in Task 01.
25
+ - Focus first on high-centrality modules, entry points, and shared infrastructure.
26
+
27
+ 2. **Structural audit**
28
+ - Detect circular dependencies or import cycles.
29
+ - Detect mixed concerns, such as:
30
+ - SQL inside view or UI files
31
+ - business logic inside controllers or routes
32
+ - infrastructure details leaking into domain logic
33
+
34
+ 3. **Code smell detection**
35
+ - Identify functions longer than 50 lines.
36
+ - Identify files longer than 500 lines.
37
+ - Call out excessive branching, duplicated logic, and naming inconsistency when clearly supported.
38
+
39
+ 4. **Reliability check**
40
+ - Find I/O operations lacking explicit error handling.
41
+ - Look for missing `try/catch`, missing result handling, or unsafe fall-through behavior.
42
+ - Highlight unvalidated input at critical boundaries.
43
+
44
+ 5. **Vibe signal check**
45
+ - Detect dense clusters of `TODO`, `FIXME`, or `HACK`.
46
+ - Detect unreachable code, obviously dead code, or abandoned stubs.
47
+ - Note inconsistent naming or contradictory patterns across similar modules.
48
+
49
+ 6. **Severity discipline**
50
+ - Only elevate issues to critical when they materially affect correctness, operability, or architectural integrity.
51
+ - Prefer signal over noise.
52
+ - MUST NOT modify source code.
53
+
54
+ ## Output Specification
55
+ Use `.prodify/templates/02-diagnose.template.md` and fill every section explicitly. Do not substitute a freeform structure.
56
+
57
+ ## Failure Conditions
58
+ - MUST STOP if `.prodify/artifacts/01-understand.md` is missing.
59
+ - MUST STOP if the mapped repository areas cannot be inspected.
60
+ - MUST STOP if the output cannot be produced in `.prodify/templates/02-diagnose.template.md`.
61
+ - MUST NOT modify source code.
62
+
63
+ ## Definition of Done
64
+ - The codebase has a concrete health snapshot.
65
+ - Critical issues are tied to specific files.
66
+ - Reliability risks are explicitly listed.
67
+ - No fixes or refactors are proposed yet.
@@ -0,0 +1,70 @@
1
+ ---
2
+ task_id: 03-architecture
3
+ reads:
4
+ - .prodify/artifacts/01-understand.md
5
+ - .prodify/artifacts/02-diagnose.md
6
+ writes:
7
+ - .prodify/artifacts/03-architecture.md
8
+ next_task: 04-plan
9
+ mode: analysis
10
+ ---
11
+ # Task 03 — Architecture: Strategic Alignment
12
+
13
+ ## Goal
14
+ Define the target architecture and identify structural gaps against the current repository.
15
+
16
+ ## Scope
17
+ Use the outputs of Tasks 01 and 02 to define a grounded architecture target and explicit structural violations without modifying source code.
18
+
19
+ ## Inputs
20
+ - `.prodify/artifacts/01-understand.md`
21
+ - `.prodify/artifacts/02-diagnose.md`
22
+
23
+ ## Execution Instructions
24
+ 1. **Pattern detection**
25
+ - Classify the current architecture style as one of:
26
+ - Layered
27
+ - MVC
28
+ - Hexagonal / Clean
29
+ - Vibe Architecture
30
+ - Include a confidence score from `0.0` to `1.0`.
31
+
32
+ 2. **North Star design**
33
+ - Define a target **Modular Clean Architecture** composed of four layers:
34
+ - Domain
35
+ - Application
36
+ - Infrastructure
37
+ - Interface
38
+ - Tailor the recommendation to the actual tech stack and project type.
39
+
40
+ 3. **Dependency mapping**
41
+ - Mandate that dependencies point inward toward the Domain.
42
+ - Explicitly define which layers may depend on which.
43
+
44
+ 4. **Gap analysis**
45
+ - Identify places where:
46
+ - dependencies point outward
47
+ - layers are skipped
48
+ - responsibilities are mixed
49
+ - modules violate boundary expectations
50
+
51
+ 5. **Decision quality**
52
+ - Be opinionated, but ground all decisions in repository evidence.
53
+ - Do not choose a target style that the project cannot reasonably evolve toward.
54
+ - MUST NOT modify source code.
55
+
56
+ ## Output Specification
57
+ Use `.prodify/templates/03-architecture.template.md` and fill every section explicitly. Do not substitute a freeform structure.
58
+
59
+ ## Failure Conditions
60
+ - MUST STOP if `.prodify/artifacts/01-understand.md` is missing.
61
+ - MUST STOP if `.prodify/artifacts/02-diagnose.md` is missing.
62
+ - MUST STOP if the target architecture cannot be grounded in repository evidence.
63
+ - MUST STOP if the output cannot be produced in `.prodify/templates/03-architecture.template.md`.
64
+ - MUST NOT modify source code.
65
+
66
+ ## Definition of Done
67
+ - The current architecture is classified with confidence.
68
+ - The target architecture is clearly defined.
69
+ - Dependency rules are explicit.
70
+ - Structural violations are listed with concrete locations.
@@ -0,0 +1,71 @@
1
+ ---
2
+ task_id: 04-plan
3
+ reads:
4
+ - .prodify/artifacts/02-diagnose.md
5
+ - .prodify/artifacts/03-architecture.md
6
+ writes:
7
+ - .prodify/artifacts/04-plan.md
8
+ next_task: 05-refactor
9
+ mode: planning
10
+ ---
11
+ # Task 04 — Plan: Actionable Refactoring Strategy
12
+
13
+ ## Goal
14
+ Decompose architectural shifts into atomic, testable increments.
15
+
16
+ ## Scope
17
+ Turn the diagnosis and architecture outputs into a deterministic refactor plan that can be executed one step at a time without modifying source code.
18
+
19
+ ## Inputs
20
+ - `.prodify/artifacts/02-diagnose.md`
21
+ - `.prodify/artifacts/03-architecture.md`
22
+
23
+ ## Execution Instructions
24
+ 1. **Phase sequencing**
25
+ - Order the refactor into phases:
26
+ 1. Hygiene (rename, isolate, add safety checks)
27
+ 2. Peripheral systems (logging, notifications, integrations)
28
+ 3. Core domain restructuring
29
+ 4. Cleanup and consolidation
30
+
31
+ 2. **Atomicity**
32
+ - Each step must be small enough to execute independently.
33
+ - Each step must leave the codebase in a buildable state.
34
+
35
+ 3. **Risk weighting**
36
+ - Assign risk weights:
37
+ - Low = 1
38
+ - Med = 3
39
+ - High = 10
40
+ - Use these to estimate effort and execution difficulty.
41
+
42
+ 4. **Verification design**
43
+ - Define a concrete validation command for every step, such as:
44
+ - `npm test`
45
+ - `npm run build`
46
+ - `pytest`
47
+ - `dotnet test`
48
+
49
+ 5. **Planning discipline**
50
+ - Prefer safe sequencing over aggressive optimization.
51
+ - Avoid steps that combine unrelated concerns.
52
+ - Make sure the plan can be executed one step at a time by an autonomous coding agent.
53
+ - Every step block MUST use the exact repeated structure required by `.prodify/templates/04-plan.template.md`.
54
+ - Every step MUST have a stable step ID and `Status: pending`.
55
+ - MUST NOT modify source code.
56
+
57
+ ## Output Specification
58
+ Use `.prodify/templates/04-plan.template.md` and fill every section explicitly. Do not substitute a freeform structure.
59
+
60
+ ## Failure Conditions
61
+ - MUST STOP if `.prodify/artifacts/02-diagnose.md` is missing.
62
+ - MUST STOP if `.prodify/artifacts/03-architecture.md` is missing.
63
+ - MUST STOP if any plan step is ambiguous, combines unrelated concerns, or cannot be executed independently.
64
+ - MUST STOP if the output cannot be produced in `.prodify/templates/04-plan.template.md`.
65
+ - MUST NOT modify source code.
66
+
67
+ ## Definition of Done
68
+ - The codebase has an ordered, atomic refactor plan.
69
+ - Every step is independently executable.
70
+ - Risk is assigned per step.
71
+ - Validation expectations are explicit.
@@ -0,0 +1,61 @@
1
+ ---
2
+ task_id: 05-refactor
3
+ reads:
4
+ - .prodify/artifacts/04-plan.md
5
+ writes:
6
+ - .prodify/artifacts/05-refactor.md
7
+ next_task: 06-validate
8
+ mode: execution
9
+ ---
10
+ # Task 05 — Refactor: Controlled Step Execution
11
+
12
+ ## Goal
13
+ Surgically implement exactly one atomic refactoring step.
14
+
15
+ ## Scope
16
+ Execute one selected step from `04-plan.md`, update only the necessary source files for that step, and summarize the exact implementation result.
17
+
18
+ ## Inputs
19
+ - `.prodify/artifacts/04-plan.md`
20
+ - one selected step from the fixed step structure
21
+ - the target source files named by that selected step
22
+
23
+ ## Execution Instructions
24
+ 1. **Isolation**
25
+ - Read only the files specified by the selected plan step, unless a dependency is strictly required.
26
+ - Do not widen scope without documenting why.
27
+
28
+ 2. **Behavior preservation**
29
+ - Improve structure without changing external API behavior unless the selected step explicitly requires it.
30
+ - Preserve public contracts, side effects, and expected execution flow.
31
+
32
+ 3. **Standard compliance**
33
+ - Follow naming conventions, error handling style, and code organization patterns discovered in Task 01.
34
+ - Prefer consistency with the project over personal preference.
35
+
36
+ 4. **Diff minimization**
37
+ - Prefer surgical block updates over whole-file rewrites.
38
+ - Avoid opportunistic cleanup unrelated to the selected step.
39
+
40
+ 5. **Execution discipline**
41
+ - Implement one plan step only.
42
+ - Summarize exactly what changed and why.
43
+ - MUST execute exactly one selected refactor step.
44
+ - MUST NOT modify unrelated files.
45
+ - MUST STOP if the selected step is ambiguous, missing, malformed, or combines unrelated concerns.
46
+
47
+ ## Output Specification
48
+ Use `.prodify/templates/05-refactor.template.md` and fill every section explicitly. Do not substitute a freeform structure for the summary artifact.
49
+
50
+ ## Failure Conditions
51
+ - MUST STOP if `.prodify/artifacts/04-plan.md` is missing.
52
+ - MUST STOP if no single selected step can be resolved safely from the plan.
53
+ - MUST STOP if execution would require widening scope to unrelated files.
54
+ - MUST STOP if the output cannot be produced in `.prodify/templates/05-refactor.template.md`.
55
+ - MUST NOT modify unrelated files.
56
+
57
+ ## Definition of Done
58
+ - Exactly one plan step is implemented.
59
+ - Only necessary files are changed.
60
+ - The diff is minimal and traceable to the selected step.
61
+ - Changes preserve behavior unless otherwise required.
@@ -0,0 +1,69 @@
1
+ ---
2
+ task_id: 06-validate
3
+ reads:
4
+ - .prodify/artifacts/03-architecture.md
5
+ - .prodify/artifacts/04-plan.md
6
+ - .prodify/artifacts/05-refactor.md
7
+ writes:
8
+ - .prodify/artifacts/06-validate.md
9
+ next_task: 05-refactor
10
+ mode: validation
11
+ ---
12
+ # Task 06 — Validate: Production Readiness Audit
13
+
14
+ ## Goal
15
+ Rigorously audit the refactored code against the declared architecture and plan.
16
+
17
+ ## Scope
18
+ Validate the most recently executed refactor step using the current source files and the required runtime artifacts, without modifying source code.
19
+
20
+ ## Inputs
21
+ - `.prodify/artifacts/03-architecture.md`
22
+ - `.prodify/artifacts/04-plan.md`
23
+ - `.prodify/artifacts/05-refactor.md`
24
+ - current source files affected by the selected step
25
+
26
+ ## Execution Instructions
27
+ 1. **Architectural check**
28
+ - Verify adherence to the layer boundaries defined in Task 03.
29
+ - Call out every remaining boundary violation.
30
+
31
+ 2. **Dependency audit**
32
+ - Run or simulate cycle detection to confirm zero circular dependencies remain where applicable.
33
+ - Highlight any regressions.
34
+
35
+ 3. **Quality scoring**
36
+ - Grade the system from `0-100` across:
37
+ - Architecture
38
+ - Maintainability
39
+ - Reliability
40
+ - Testability
41
+
42
+ 4. **Regression check**
43
+ - Identify any new issues introduced after refactoring that were not present in the original Task 02 results.
44
+
45
+ 5. **Validation discipline**
46
+ - Be strict.
47
+ - Prefer evidence-based failure over optimistic passing.
48
+ - Recommend rerunning earlier steps when the result is not production ready.
49
+ - MUST run after Task 05 for the same selected step.
50
+ - MUST explicitly report PASS or FAIL.
51
+ - MUST NOT modify source code.
52
+
53
+ ## Output Specification
54
+ Use `.prodify/templates/06-validate.template.md` and fill every section explicitly. Do not substitute a freeform structure.
55
+
56
+ ## Failure Conditions
57
+ - MUST STOP if `.prodify/artifacts/03-architecture.md` is missing.
58
+ - MUST STOP if `.prodify/artifacts/04-plan.md` is missing.
59
+ - MUST STOP if `.prodify/artifacts/05-refactor.md` is missing.
60
+ - MUST STOP if Task 05 context for the selected step is missing or ambiguous.
61
+ - MUST STOP if a PASS or FAIL verdict cannot be supported by evidence.
62
+ - MUST STOP if the output cannot be produced in `.prodify/templates/06-validate.template.md`.
63
+ - MUST NOT modify source code.
64
+
65
+ ## Definition of Done
66
+ - The refactored code has a strict readiness verdict.
67
+ - Category scores are provided.
68
+ - Remaining issues and regressions are clearly listed.
69
+ - The report explicitly states PASS or FAIL.
@@ -0,0 +1,3 @@
1
+ # Prodify Tasks
2
+
3
+ This directory is reserved for task-scoped runtime artifacts and deterministic task definitions when a repository extends the default flow.