@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.
- package/.prodify/AGENTS.md +56 -0
- package/.prodify/README.md +10 -0
- package/.prodify/artifacts/01-understand.md +28 -0
- package/.prodify/artifacts/02-diagnose.md +26 -0
- package/.prodify/artifacts/03-architecture.md +30 -0
- package/.prodify/artifacts/04-plan.md +35 -0
- package/.prodify/artifacts/05-refactor.md +24 -0
- package/.prodify/artifacts/06-validate.md +17 -0
- package/.prodify/artifacts/README.md +6 -0
- package/.prodify/artifacts/architecture_spec.md +29 -0
- package/.prodify/artifacts/artifact-validation-design.md +276 -0
- package/.prodify/artifacts/cli-command-design.md +299 -0
- package/.prodify/artifacts/completed-steps-tracking.md +201 -0
- package/.prodify/artifacts/diagnostic_report.md +45 -0
- package/.prodify/artifacts/hardening-patch-summary.md +57 -0
- package/.prodify/artifacts/hardening-verification-report.md +48 -0
- package/.prodify/artifacts/implementation_summary.md +19 -0
- package/.prodify/artifacts/improvement-evaluation-spec.md +148 -0
- package/.prodify/artifacts/next-step-resolver-design.md +570 -0
- package/.prodify/artifacts/orientation_map.md +32 -0
- package/.prodify/artifacts/persona-removal-audit.md +106 -0
- package/.prodify/artifacts/planning-alignment-report.md +189 -0
- package/.prodify/artifacts/refactor-plan-template-hardening.md +83 -0
- package/.prodify/artifacts/refactor-validate-loop-design.md +231 -0
- package/.prodify/artifacts/refactor_plan.md +21 -0
- package/.prodify/artifacts/refactor_plan.strict-example.md +31 -0
- package/.prodify/artifacts/run-state-design.md +292 -0
- package/.prodify/artifacts/run-summary-spec.md +149 -0
- package/.prodify/artifacts/run_state.json +14 -0
- package/.prodify/artifacts/sample-repo-test-plan.md +129 -0
- package/.prodify/artifacts/status-output-spec.md +349 -0
- package/.prodify/artifacts/step-selection-design.md +251 -0
- package/.prodify/artifacts/task-dispatcher-design.md +266 -0
- package/.prodify/artifacts/task-header-audit.md +42 -0
- package/.prodify/artifacts/task-log-enhancement-spec.md +264 -0
- package/.prodify/artifacts/task-protocol-hardening-plan.md +68 -0
- package/.prodify/artifacts/task-self-validation-spec.md +171 -0
- package/.prodify/artifacts/task_log.json +160 -0
- package/.prodify/artifacts/template-usage-audit.md +20 -0
- package/.prodify/artifacts/validation_report.md +22 -0
- package/.prodify/contracts/README.md +3 -0
- package/.prodify/contracts/architecture.contract.json +42 -0
- package/.prodify/contracts/diagnose.contract.json +42 -0
- package/.prodify/contracts/plan.contract.json +42 -0
- package/.prodify/contracts/refactor.contract.json +45 -0
- package/.prodify/contracts/understand.contract.json +42 -0
- package/.prodify/contracts/validate.contract.json +52 -0
- package/.prodify/contracts-src/README.md +4 -0
- package/.prodify/contracts-src/architecture.contract.md +29 -0
- package/.prodify/contracts-src/diagnose.contract.md +29 -0
- package/.prodify/contracts-src/plan.contract.md +29 -0
- package/.prodify/contracts-src/refactor.contract.md +32 -0
- package/.prodify/contracts-src/understand.contract.md +29 -0
- package/.prodify/contracts-src/validate.contract.md +35 -0
- package/.prodify/metrics/README.md +4 -0
- package/.prodify/planning.md +13 -0
- package/.prodify/project.md +15 -0
- package/.prodify/rules/01-global-operating-rules.md +21 -0
- package/.prodify/rules/02-analysis-discipline.md +17 -0
- package/.prodify/rules/03-diagnosis-severity-rules.md +42 -0
- package/.prodify/rules/04-architecture-rules.md +27 -0
- package/.prodify/rules/05-planning-rules.md +23 -0
- package/.prodify/rules/06-refactor-rules.md +20 -0
- package/.prodify/rules/07-validation-rules.md +25 -0
- package/.prodify/rules/08-output-format-rules.md +20 -0
- package/.prodify/rules/09-template-usage-rules.md +11 -0
- package/.prodify/rules/10-artifact-flow-and-orchestration-rules.md +40 -0
- package/.prodify/rules/README.md +3 -0
- package/.prodify/rules/example-rule.md +4 -0
- package/.prodify/runtime-commands.md +57 -0
- package/.prodify/skills/README.md +8 -0
- package/.prodify/skills/domain/react-frontend.skill.json +34 -0
- package/.prodify/skills/domain/typescript-backend.skill.json +34 -0
- package/.prodify/skills/quality-policy/maintainability-review.skill.json +25 -0
- package/.prodify/skills/quality-policy/security-hardening.skill.json +32 -0
- package/.prodify/skills/quality-policy/test-hardening.skill.json +23 -0
- package/.prodify/skills/registry.json +16 -0
- package/.prodify/skills/stage-method/architecture-method.skill.json +22 -0
- package/.prodify/skills/stage-method/codebase-scanning.skill.json +22 -0
- package/.prodify/skills/stage-method/diagnosis-method.skill.json +22 -0
- package/.prodify/skills/stage-method/planning-method.skill.json +22 -0
- package/.prodify/skills/stage-method/refactoring-method.skill.json +22 -0
- package/.prodify/skills/stage-method/validation-method.skill.json +22 -0
- package/.prodify/state.json +30 -0
- package/.prodify/tasks/01-understand.md +83 -0
- package/.prodify/tasks/02-diagnose.md +67 -0
- package/.prodify/tasks/03-architecture.md +70 -0
- package/.prodify/tasks/04-plan.md +71 -0
- package/.prodify/tasks/05-refactor.md +61 -0
- package/.prodify/tasks/06-validate.md +69 -0
- package/.prodify/tasks/README.md +3 -0
- package/.prodify/tasks/example-task.md +13 -0
- package/.prodify/templates/01-understand.template.md +18 -0
- package/.prodify/templates/02-diagnose.template.md +18 -0
- package/.prodify/templates/03-architecture.template.md +18 -0
- package/.prodify/templates/04-plan.template.md +22 -0
- package/.prodify/templates/05-refactor.template.md +19 -0
- package/.prodify/templates/06-validate.template.md +16 -0
- package/.prodify/templates/README.md +3 -0
- package/.prodify/templates/architecture_spec.template.md +29 -0
- package/.prodify/templates/diagnostic_report.template.md +45 -0
- package/.prodify/templates/example.template.md +5 -0
- package/.prodify/templates/implementation_summary.template.md +19 -0
- package/.prodify/templates/orientation_map.template.md +32 -0
- package/.prodify/templates/refactor_plan.template.md +24 -0
- package/.prodify/templates/validation_report.template.md +22 -0
- package/.prodify/version.json +5 -0
- package/AGENTS.md +305 -0
- package/LICENSE +201 -0
- package/README.md +118 -0
- package/assets/presets/default/canonical/AGENTS.md +54 -0
- package/assets/presets/default/canonical/artifacts/README.md +6 -0
- package/assets/presets/default/canonical/contracts-src/README.md +4 -0
- package/assets/presets/default/canonical/contracts-src/architecture.contract.md +56 -0
- package/assets/presets/default/canonical/contracts-src/diagnose.contract.md +49 -0
- package/assets/presets/default/canonical/contracts-src/plan.contract.md +42 -0
- package/assets/presets/default/canonical/contracts-src/refactor.contract.md +54 -0
- package/assets/presets/default/canonical/contracts-src/understand.contract.md +56 -0
- package/assets/presets/default/canonical/contracts-src/validate.contract.md +64 -0
- package/assets/presets/default/canonical/metrics/README.md +4 -0
- package/assets/presets/default/canonical/planning.md +13 -0
- package/assets/presets/default/canonical/project.md +15 -0
- package/assets/presets/default/canonical/rules/README.md +3 -0
- package/assets/presets/default/canonical/rules/example-rule.md +4 -0
- package/assets/presets/default/canonical/runtime-commands.md +57 -0
- package/assets/presets/default/canonical/skills/README.md +8 -0
- package/assets/presets/default/canonical/skills/domain/react-frontend.skill.json +34 -0
- package/assets/presets/default/canonical/skills/domain/typescript-backend.skill.json +34 -0
- package/assets/presets/default/canonical/skills/quality-policy/maintainability-review.skill.json +25 -0
- package/assets/presets/default/canonical/skills/quality-policy/security-hardening.skill.json +32 -0
- package/assets/presets/default/canonical/skills/quality-policy/test-hardening.skill.json +23 -0
- package/assets/presets/default/canonical/skills/registry.json +16 -0
- package/assets/presets/default/canonical/skills/stage-method/architecture-method.skill.json +22 -0
- package/assets/presets/default/canonical/skills/stage-method/codebase-scanning.skill.json +22 -0
- package/assets/presets/default/canonical/skills/stage-method/diagnosis-method.skill.json +22 -0
- package/assets/presets/default/canonical/skills/stage-method/planning-method.skill.json +22 -0
- package/assets/presets/default/canonical/skills/stage-method/refactoring-method.skill.json +22 -0
- package/assets/presets/default/canonical/skills/stage-method/validation-method.skill.json +22 -0
- package/assets/presets/default/canonical/state.json +30 -0
- package/assets/presets/default/canonical/tasks/README.md +3 -0
- package/assets/presets/default/canonical/tasks/example-task.md +13 -0
- package/assets/presets/default/canonical/templates/README.md +3 -0
- package/assets/presets/default/canonical/templates/example.template.md +5 -0
- package/assets/presets/default/preset.json +5 -0
- package/dist/cli.js +53 -0
- package/dist/commands/doctor.js +16 -0
- package/dist/commands/init.js +30 -0
- package/dist/commands/install.js +27 -0
- package/dist/commands/setup-agent.js +23 -0
- package/dist/commands/status.js +28 -0
- package/dist/commands/sync.js +29 -0
- package/dist/commands/update.js +18 -0
- package/dist/contracts/compiled-schema.js +37 -0
- package/dist/contracts/compiler.js +83 -0
- package/dist/contracts/freshness.js +52 -0
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/parser.js +201 -0
- package/dist/contracts/schema.js +138 -0
- package/dist/contracts/source-schema.js +111 -0
- package/dist/core/agent-runtime.js +36 -0
- package/dist/core/agent-setup.js +111 -0
- package/dist/core/doctor.js +155 -0
- package/dist/core/errors.js +19 -0
- package/dist/core/flow-state.js +262 -0
- package/dist/core/fs.js +50 -0
- package/dist/core/install.js +44 -0
- package/dist/core/managed-files.js +106 -0
- package/dist/core/paths.js +56 -0
- package/dist/core/preset-validation.js +43 -0
- package/dist/core/prompt-builder.js +63 -0
- package/dist/core/repo-context.js +77 -0
- package/dist/core/repo-root.js +55 -0
- package/dist/core/skill-resolution.js +123 -0
- package/dist/core/state.js +220 -0
- package/dist/core/status.js +293 -0
- package/dist/core/sync.js +63 -0
- package/dist/core/targets.js +48 -0
- package/dist/core/upgrade.js +57 -0
- package/dist/core/validation.js +138 -0
- package/dist/core/version-checks.js +35 -0
- package/dist/generators/claude.js +14 -0
- package/dist/generators/codex.js +14 -0
- package/dist/generators/copilot.js +29 -0
- package/dist/generators/header.js +13 -0
- package/dist/generators/opencode.js +14 -0
- package/dist/generators/shared.js +37 -0
- package/dist/index.js +9 -0
- package/dist/legacy/targets.js +55 -0
- package/dist/presets/default.js +3 -0
- package/dist/presets/loader.js +34 -0
- package/dist/presets/version.js +18 -0
- package/dist/scoring/model.js +262 -0
- package/dist/skills/loader.js +40 -0
- package/dist/skills/schema.js +159 -0
- package/dist/types.js +1 -0
- package/docs/canonical-prodify-layout.md +87 -0
- package/docs/claude-support.md +22 -0
- package/docs/cli-doctor-spec.md +52 -0
- package/docs/cli-init-spec.md +70 -0
- package/docs/cli-install-agent-spec.md +48 -0
- package/docs/cli-sync-spec.md +40 -0
- package/docs/codex-support.md +24 -0
- package/docs/compatibility-targets.md +59 -0
- package/docs/copilot-support.md +30 -0
- package/docs/default-preset.md +47 -0
- package/docs/generated-file-headers.md +45 -0
- package/docs/generation-rules.md +94 -0
- package/docs/idempotency-guarantees.md +31 -0
- package/docs/managed-file-detection.md +45 -0
- package/docs/manual-edit-conflicts.md +37 -0
- package/docs/opencode-support.md +27 -0
- package/docs/ownership-rules.md +39 -0
- package/docs/path-resolution-rules.md +40 -0
- package/docs/preset-structure.md +49 -0
- package/docs/skill-system.md +67 -0
- package/docs/versioning-and-upgrade-strategy.md +40 -0
- package/package.json +22 -0
- package/src/README.md +11 -0
- package/src/cli.ts +61 -0
- package/src/commands/doctor.ts +20 -0
- package/src/commands/init.ts +37 -0
- package/src/commands/setup-agent.ts +28 -0
- package/src/commands/status.ts +34 -0
- package/src/commands/update.ts +23 -0
- package/src/contracts/README.md +10 -0
- package/src/contracts/compiled-schema.ts +42 -0
- package/src/contracts/compiler.ts +111 -0
- package/src/contracts/freshness.ts +58 -0
- package/src/contracts/index.ts +11 -0
- package/src/contracts/parser.ts +253 -0
- package/src/contracts/source-schema.ts +141 -0
- package/src/core/agent-runtime.ts +53 -0
- package/src/core/agent-setup.ts +147 -0
- package/src/core/doctor.ts +171 -0
- package/src/core/errors.ts +28 -0
- package/src/core/flow-state.ts +333 -0
- package/src/core/fs.ts +59 -0
- package/src/core/paths.ts +63 -0
- package/src/core/preset-validation.ts +47 -0
- package/src/core/prompt-builder.ts +73 -0
- package/src/core/repo-context.ts +93 -0
- package/src/core/repo-root.ts +74 -0
- package/src/core/skill-resolution.ts +151 -0
- package/src/core/state.ts +264 -0
- package/src/core/status.ts +372 -0
- package/src/core/targets.ts +53 -0
- package/src/core/upgrade.ts +66 -0
- package/src/core/validation.ts +233 -0
- package/src/core/version-checks.ts +40 -0
- package/src/index.ts +13 -0
- package/src/presets/default.ts +7 -0
- package/src/presets/loader.ts +46 -0
- package/src/presets/version.ts +31 -0
- package/src/scoring/model.ts +332 -0
- package/src/skills/loader.ts +58 -0
- package/src/skills/schema.ts +197 -0
- package/src/types.ts +329 -0
- package/tests/integration/cli-flows.test.js +347 -0
- package/tests/unit/agent-setup.test.js +81 -0
- package/tests/unit/cli.test.js +28 -0
- package/tests/unit/contracts.test.js +61 -0
- package/tests/unit/helpers.js +28 -0
- package/tests/unit/paths.test.js +52 -0
- package/tests/unit/preset-loader.test.js +37 -0
- package/tests/unit/scoring.test.js +65 -0
- package/tests/unit/self-hosted-workspace.test.js +22 -0
- package/tests/unit/skills.test.js +115 -0
- package/tests/unit/state-and-flow.test.js +120 -0
- package/tests/unit/targets.test.js +13 -0
- package/tests/unit/validation.test.js +73 -0
- package/tests/unit/version.test.js +24 -0
- package/tsconfig.json +23 -0
- package/urielsh-prodify-0.1.0.tgz +0 -0
|
@@ -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,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,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
|
+
-
|
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.
|