@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,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
contract_version: 1.0.0
|
|
4
|
+
stage: architecture
|
|
5
|
+
task_id: 03-architecture
|
|
6
|
+
required_artifacts:
|
|
7
|
+
- path: .prodify/artifacts/03-architecture.md
|
|
8
|
+
format: markdown
|
|
9
|
+
required_sections:
|
|
10
|
+
- Dependency Rules
|
|
11
|
+
- Policy Checks
|
|
12
|
+
- Proposed Structure
|
|
13
|
+
- Success Criteria
|
|
14
|
+
- Tradeoffs
|
|
15
|
+
allowed_write_roots:
|
|
16
|
+
- .prodify/artifacts/
|
|
17
|
+
forbidden_writes:
|
|
18
|
+
- src/
|
|
19
|
+
- tests/
|
|
20
|
+
policy_rules:
|
|
21
|
+
- Flag mixed concerns explicitly.
|
|
22
|
+
- Keep Domain dependencies pointing inward only.
|
|
23
|
+
success_criteria:
|
|
24
|
+
- The target structure is explicit.
|
|
25
|
+
- Architecture violations are listed clearly.
|
|
26
|
+
---
|
|
27
|
+
# Architecture Contract
|
|
28
|
+
|
|
29
|
+
Use this contract to define the target structure, dependency rules, and major tradeoffs before planning.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
contract_version: 1.0.0
|
|
4
|
+
stage: diagnose
|
|
5
|
+
task_id: 02-diagnose
|
|
6
|
+
required_artifacts:
|
|
7
|
+
- path: .prodify/artifacts/02-diagnose.md
|
|
8
|
+
format: markdown
|
|
9
|
+
required_sections:
|
|
10
|
+
- Constraints
|
|
11
|
+
- Observed Issues
|
|
12
|
+
- Policy Checks
|
|
13
|
+
- Root Causes
|
|
14
|
+
- Success Criteria
|
|
15
|
+
allowed_write_roots:
|
|
16
|
+
- .prodify/artifacts/
|
|
17
|
+
forbidden_writes:
|
|
18
|
+
- src/
|
|
19
|
+
- tests/
|
|
20
|
+
policy_rules:
|
|
21
|
+
- Diagnose from repository evidence only.
|
|
22
|
+
- Do not propose implementation changes in the diagnosis stage.
|
|
23
|
+
success_criteria:
|
|
24
|
+
- Every critical issue is tied to evidence.
|
|
25
|
+
- Root causes are separated from symptoms.
|
|
26
|
+
---
|
|
27
|
+
# Diagnose Contract
|
|
28
|
+
|
|
29
|
+
Use this contract to record observed problems, supporting evidence, and the most likely root causes.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
contract_version: 1.0.0
|
|
4
|
+
stage: plan
|
|
5
|
+
task_id: 04-plan
|
|
6
|
+
required_artifacts:
|
|
7
|
+
- path: .prodify/artifacts/04-plan.md
|
|
8
|
+
format: markdown
|
|
9
|
+
required_sections:
|
|
10
|
+
- Policy Checks
|
|
11
|
+
- Risks
|
|
12
|
+
- Step Breakdown
|
|
13
|
+
- Success Criteria
|
|
14
|
+
- Verification
|
|
15
|
+
allowed_write_roots:
|
|
16
|
+
- .prodify/artifacts/
|
|
17
|
+
forbidden_writes:
|
|
18
|
+
- src/
|
|
19
|
+
- tests/
|
|
20
|
+
policy_rules:
|
|
21
|
+
- Keep the plan deterministic and minimal.
|
|
22
|
+
- Map every step back to a diagnosed issue or architecture rule.
|
|
23
|
+
success_criteria:
|
|
24
|
+
- The plan enumerates executable steps.
|
|
25
|
+
- Verification is defined before refactoring starts.
|
|
26
|
+
---
|
|
27
|
+
# Plan Contract
|
|
28
|
+
|
|
29
|
+
Use this contract to produce the smallest safe sequence of refactor steps and verification checkpoints.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
contract_version: 1.0.0
|
|
4
|
+
stage: refactor
|
|
5
|
+
task_id: 05-refactor
|
|
6
|
+
required_artifacts:
|
|
7
|
+
- path: .prodify/artifacts/05-refactor.md
|
|
8
|
+
format: markdown
|
|
9
|
+
required_sections:
|
|
10
|
+
- Behavior Guardrails
|
|
11
|
+
- Changed Files
|
|
12
|
+
- Policy Checks
|
|
13
|
+
- Selected Step
|
|
14
|
+
- Success Criteria
|
|
15
|
+
allowed_write_roots:
|
|
16
|
+
- .prodify/artifacts/
|
|
17
|
+
- README.md
|
|
18
|
+
- assets/
|
|
19
|
+
- src/
|
|
20
|
+
- tests/
|
|
21
|
+
forbidden_writes:
|
|
22
|
+
- .prodify/contracts/
|
|
23
|
+
policy_rules:
|
|
24
|
+
- Execute exactly one selected step.
|
|
25
|
+
- Keep the diff minimal and behavior-preserving unless the plan says otherwise.
|
|
26
|
+
success_criteria:
|
|
27
|
+
- The selected plan step is implemented fully.
|
|
28
|
+
- Unrelated files remain untouched.
|
|
29
|
+
---
|
|
30
|
+
# Refactor Contract
|
|
31
|
+
|
|
32
|
+
Use this contract to record the single plan step executed, the files changed, and the guardrails that preserved behavior.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
contract_version: 1.0.0
|
|
4
|
+
stage: understand
|
|
5
|
+
task_id: 01-understand
|
|
6
|
+
required_artifacts:
|
|
7
|
+
- path: .prodify/artifacts/01-understand.md
|
|
8
|
+
format: markdown
|
|
9
|
+
required_sections:
|
|
10
|
+
- Current State
|
|
11
|
+
- Open Questions
|
|
12
|
+
- Policy Checks
|
|
13
|
+
- Repository Summary
|
|
14
|
+
- Success Criteria
|
|
15
|
+
allowed_write_roots:
|
|
16
|
+
- .prodify/artifacts/
|
|
17
|
+
forbidden_writes:
|
|
18
|
+
- src/
|
|
19
|
+
- tests/
|
|
20
|
+
policy_rules:
|
|
21
|
+
- Operate only on verified data.
|
|
22
|
+
- Preserve the existing behavior during understanding.
|
|
23
|
+
success_criteria:
|
|
24
|
+
- The repository intent is captured clearly.
|
|
25
|
+
- Known unknowns are listed explicitly.
|
|
26
|
+
---
|
|
27
|
+
# Understand Contract
|
|
28
|
+
|
|
29
|
+
Use this contract to describe the current repository, verified constraints, and open questions before diagnosis begins.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
contract_version: 1.0.0
|
|
4
|
+
stage: validate
|
|
5
|
+
task_id: 06-validate
|
|
6
|
+
required_artifacts:
|
|
7
|
+
- path: .prodify/artifacts/06-validate.md
|
|
8
|
+
format: markdown
|
|
9
|
+
required_sections:
|
|
10
|
+
- Policy Checks
|
|
11
|
+
- Regressions
|
|
12
|
+
- Success Criteria
|
|
13
|
+
- Validation Results
|
|
14
|
+
- path: .prodify/state.json
|
|
15
|
+
format: json
|
|
16
|
+
required_json_keys:
|
|
17
|
+
- preset_name
|
|
18
|
+
- preset_version
|
|
19
|
+
- runtime
|
|
20
|
+
- schema_version
|
|
21
|
+
allowed_write_roots:
|
|
22
|
+
- .prodify/artifacts/
|
|
23
|
+
- .prodify/metrics/
|
|
24
|
+
forbidden_writes:
|
|
25
|
+
- src/
|
|
26
|
+
policy_rules:
|
|
27
|
+
- Validation must follow every refactor step.
|
|
28
|
+
- Critical regressions block forward progress.
|
|
29
|
+
success_criteria:
|
|
30
|
+
- Validation records whether regressions were found.
|
|
31
|
+
- The result is strong enough to gate the next runtime transition.
|
|
32
|
+
---
|
|
33
|
+
# Validate Contract
|
|
34
|
+
|
|
35
|
+
Use this contract to record validation evidence, regression status, and final readiness for the next state transition.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Project
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Describe the repository purpose here.
|
|
6
|
+
|
|
7
|
+
## Goals
|
|
8
|
+
|
|
9
|
+
- Capture project goals.
|
|
10
|
+
- Record constraints and conventions.
|
|
11
|
+
|
|
12
|
+
## Agent Bootstrap
|
|
13
|
+
|
|
14
|
+
- The user starts by telling the agent to read `.prodify/AGENTS.md`.
|
|
15
|
+
- The main Prodify flow should stay inside `.prodify/`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Rule 01 — Global Operating Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define the baseline behavior for every Prodify task.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- Always follow the task sequence defined in `AGENTS.md` unless the user explicitly requests a single task.
|
|
8
|
+
- Treat previous task artifacts as source of truth unless repository changes invalidate them.
|
|
9
|
+
- Prefer evidence-based conclusions over assumptions.
|
|
10
|
+
- Be conservative when repository intent is unclear.
|
|
11
|
+
- Never widen scope silently.
|
|
12
|
+
- Always state uncertainty explicitly.
|
|
13
|
+
- Prefer minimal, reversible changes.
|
|
14
|
+
|
|
15
|
+
## Required Behavior
|
|
16
|
+
For every task execution, explicitly report:
|
|
17
|
+
- current task
|
|
18
|
+
- inputs used
|
|
19
|
+
- output artifact produced
|
|
20
|
+
- whether source code was modified
|
|
21
|
+
- next recommended step
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Rule 02 — Analysis Discipline
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Keep repository analysis deterministic and high-signal.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- During analysis tasks, do not modify code.
|
|
8
|
+
- Distinguish clearly between observed facts and inferred conclusions.
|
|
9
|
+
- When inferring architecture or module roles, tie conclusions to concrete repository evidence.
|
|
10
|
+
- Ignore generated, vendored, cache, and build-output directories unless directly relevant.
|
|
11
|
+
- Prefer shallow-wide scanning before deep local inspection.
|
|
12
|
+
- For monorepos, identify workspace/package boundaries before reasoning about architecture.
|
|
13
|
+
|
|
14
|
+
## Anti-Patterns to Avoid
|
|
15
|
+
- Inventing structure not present in the repository
|
|
16
|
+
- Treating naming conventions as proof without corroborating evidence
|
|
17
|
+
- Over-indexing on one file while ignoring surrounding module context
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Rule 03 — Diagnosis Severity Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Standardize issue severity so results remain actionable.
|
|
5
|
+
|
|
6
|
+
## Severity Definitions
|
|
7
|
+
|
|
8
|
+
### Critical
|
|
9
|
+
Use only when the issue materially threatens:
|
|
10
|
+
- correctness
|
|
11
|
+
- operability
|
|
12
|
+
- security
|
|
13
|
+
- architectural integrity
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
- circular dependencies in core execution paths
|
|
17
|
+
- unvalidated external input at critical boundaries
|
|
18
|
+
- direct mixing of core business logic with infrastructure in high-centrality modules
|
|
19
|
+
|
|
20
|
+
### High
|
|
21
|
+
Use when the issue significantly increases maintenance or failure risk.
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
- very large files in central modules
|
|
25
|
+
- core functions with missing error handling
|
|
26
|
+
- obvious mixed concerns across important boundaries
|
|
27
|
+
|
|
28
|
+
### Medium
|
|
29
|
+
Use when the issue is harmful but not immediately destabilizing.
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
- dense TODO/FIXME clusters
|
|
33
|
+
- duplicated logic in non-critical paths
|
|
34
|
+
- naming inconsistencies that reduce readability
|
|
35
|
+
|
|
36
|
+
### Low
|
|
37
|
+
Use for minor cleanliness or consistency issues.
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
- Prefer under-classifying over exaggerating.
|
|
41
|
+
- Every non-low issue must reference concrete files.
|
|
42
|
+
- Avoid noisy reports that overwhelm the plan.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Rule 04 — Architecture Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define the architectural posture Prodify should favor.
|
|
5
|
+
|
|
6
|
+
## Default Target
|
|
7
|
+
When feasible, prefer **Modular Clean Architecture** with these layers:
|
|
8
|
+
1. Domain
|
|
9
|
+
2. Application
|
|
10
|
+
3. Infrastructure
|
|
11
|
+
4. Interface
|
|
12
|
+
|
|
13
|
+
## Dependency Rules
|
|
14
|
+
- Dependencies should point inward toward Domain.
|
|
15
|
+
- Domain must not depend on Infrastructure or Interface.
|
|
16
|
+
- Application may depend on Domain.
|
|
17
|
+
- Infrastructure may depend on Application and Domain only when necessary for implementation.
|
|
18
|
+
- Interface may depend on Application and Domain-facing contracts, not infrastructure internals directly.
|
|
19
|
+
|
|
20
|
+
## Exceptions
|
|
21
|
+
- If the repository is a small CLI or utility library, avoid forcing heavyweight layering.
|
|
22
|
+
- Tailor the target architecture to the project type and tech stack.
|
|
23
|
+
|
|
24
|
+
## Violation Patterns
|
|
25
|
+
- controllers/routes calling repositories directly
|
|
26
|
+
- domain logic importing framework-specific modules
|
|
27
|
+
- infrastructure concerns embedded in UI or interface layer
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Rule 05 — Planning Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Ensure refactor plans are executable by coding agents.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- Plans must be atomic.
|
|
8
|
+
- Each step must have a single clear objective.
|
|
9
|
+
- Each step should leave the codebase in a buildable state.
|
|
10
|
+
- Do not combine unrelated concerns in one step.
|
|
11
|
+
- Order work from safest to riskiest unless dependencies require otherwise.
|
|
12
|
+
- Prefer scaffolding and boundary creation before deep core rewrites.
|
|
13
|
+
- Every step must define:
|
|
14
|
+
- description
|
|
15
|
+
- files affected
|
|
16
|
+
- risk
|
|
17
|
+
- expected outcome
|
|
18
|
+
- validation command or check
|
|
19
|
+
|
|
20
|
+
## Risk Weights
|
|
21
|
+
- low = 1
|
|
22
|
+
- med = 3
|
|
23
|
+
- high = 10
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Rule 06 — Refactor Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Control code modification behavior during implementation.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- Only Task 05 may modify source files.
|
|
8
|
+
- Execute exactly one plan step at a time unless explicitly told otherwise.
|
|
9
|
+
- Modify only necessary files.
|
|
10
|
+
- Preserve public behavior unless the selected step explicitly requires a contract change.
|
|
11
|
+
- Follow the project's existing naming and style conventions unless the plan step is specifically about normalization.
|
|
12
|
+
- Prefer surgical edits over broad rewrites.
|
|
13
|
+
- Avoid opportunistic cleanup unrelated to the selected step.
|
|
14
|
+
- If scope expansion becomes necessary, document why before changing additional files.
|
|
15
|
+
|
|
16
|
+
## Diff Policy
|
|
17
|
+
A good refactor diff is:
|
|
18
|
+
- minimal
|
|
19
|
+
- traceable
|
|
20
|
+
- justified by the selected plan step
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Rule 07 — Validation Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define how Prodify judges readiness after refactoring.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- Validation must happen after every Task 05 execution.
|
|
8
|
+
- Be strict and evidence-based.
|
|
9
|
+
- Re-check architecture boundaries against `architecture_spec.json`.
|
|
10
|
+
- Re-check for dependency cycles where relevant.
|
|
11
|
+
- Highlight regressions introduced during refactoring.
|
|
12
|
+
- Do not mark PASS when meaningful high-severity issues remain unresolved in the modified scope.
|
|
13
|
+
|
|
14
|
+
## Scoring Dimensions
|
|
15
|
+
Score 0-100 for:
|
|
16
|
+
- architecture
|
|
17
|
+
- maintainability
|
|
18
|
+
- reliability
|
|
19
|
+
- testability
|
|
20
|
+
|
|
21
|
+
## Pass Guidance
|
|
22
|
+
A pass should mean:
|
|
23
|
+
- no critical regressions
|
|
24
|
+
- no unresolved high-severity violations in the changed scope
|
|
25
|
+
- structure improved measurably relative to baseline
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Rule 08 — Output Format Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Keep artifacts and reports consistent across tasks.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- Use the exact artifact names defined in `AGENTS.md`.
|
|
8
|
+
- Keep markdown outputs structured, stable, and section-based.
|
|
9
|
+
- Use consistent heading names across tasks.
|
|
10
|
+
- Keep sections in the same order every time.
|
|
11
|
+
- If confidence or uncertainty exists, include it explicitly rather than hiding it in prose.
|
|
12
|
+
|
|
13
|
+
## Required Reporting Pattern
|
|
14
|
+
For each task response, include:
|
|
15
|
+
1. Current task
|
|
16
|
+
2. Inputs
|
|
17
|
+
3. Work performed
|
|
18
|
+
4. Output artifact
|
|
19
|
+
5. Code modified: yes/no
|
|
20
|
+
6. Next step
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Rule 09 — Template Usage Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Ensure every task artifact conforms to a shared markdown schema.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
- Before writing an artifact, consult the matching markdown template in `.prodify/templates/`.
|
|
8
|
+
- Preserve required headings and section order from the template.
|
|
9
|
+
- Prefer explicit empty sections or uncertainty notes over invented values.
|
|
10
|
+
- Add optional subsections only when they improve traceability and do not confuse downstream tasks.
|
|
11
|
+
- If a task cannot confidently populate a section, keep the section and mark uncertainty explicitly.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Rule 10 — Artifact Flow and Orchestration Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Define how outputs flow automatically between Prodify tasks.
|
|
5
|
+
|
|
6
|
+
## Artifact Location
|
|
7
|
+
All task artifacts live in `.prodify/artifacts/`.
|
|
8
|
+
|
|
9
|
+
## Handoff Rules
|
|
10
|
+
- Every task must read its declared inputs from `.prodify/artifacts/`.
|
|
11
|
+
- Every task must write exactly one primary output artifact declared in its frontmatter.
|
|
12
|
+
- Before starting a task, verify that all required input artifacts exist.
|
|
13
|
+
- After completing a task, validate the output structure against the matching template in `.prodify/templates/`.
|
|
14
|
+
- If output validation fails, do not advance workflow state.
|
|
15
|
+
- If an expected artifact is missing or stale, regenerate it before continuing.
|
|
16
|
+
|
|
17
|
+
## Workflow State
|
|
18
|
+
Use `.prodify/artifacts/run_state.json` as the source of truth for:
|
|
19
|
+
- current task
|
|
20
|
+
- last completed task
|
|
21
|
+
- next task
|
|
22
|
+
- selected refactor step
|
|
23
|
+
- overall status
|
|
24
|
+
|
|
25
|
+
Use `.prodify/artifacts/task_log.json` to append execution history.
|
|
26
|
+
|
|
27
|
+
## Loop Rules
|
|
28
|
+
- Tasks 01 through 04 are linear.
|
|
29
|
+
- Task 05 executes exactly one refactor step at a time unless explicitly told otherwise.
|
|
30
|
+
- Task 06 must run after every Task 05 execution.
|
|
31
|
+
- If Task 06 fails and more refactor steps remain, loop back to Task 05.
|
|
32
|
+
- If Task 06 passes or requested scope is complete, stop.
|
|
33
|
+
|
|
34
|
+
## Reporting Rules
|
|
35
|
+
Every task response must include:
|
|
36
|
+
1. Current task
|
|
37
|
+
2. Inputs
|
|
38
|
+
3. Output artifact
|
|
39
|
+
4. Code modified: yes/no
|
|
40
|
+
5. Next step
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Runtime Commands
|
|
2
|
+
|
|
3
|
+
Run these commands inside your coding agent after `prodify init`.
|
|
4
|
+
If this machine has not been prepared for that agent yet, run `prodify setup-agent <agent>` outside the repo first.
|
|
5
|
+
|
|
6
|
+
## Manual Bootstrap
|
|
7
|
+
|
|
8
|
+
- First tell the agent: `Read .prodify/AGENTS.md and bootstrap Prodify for this repository.`
|
|
9
|
+
- Keep the run anchored to `.prodify/AGENTS.md`, `.prodify/project.md`, `.prodify/planning.md`, `.prodify/contracts-src/`, `.prodify/contracts/`, `.prodify/skills/`, `.prodify/artifacts/`, `.prodify/metrics/`, `.prodify/tasks/`, and `.prodify/state.json`.
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
- `$prodify-init`
|
|
14
|
+
- inspect `.prodify/`
|
|
15
|
+
- detect or resolve the active agent/runtime mode
|
|
16
|
+
- initialize `.prodify/state.json`
|
|
17
|
+
- prepare the bootstrapped state and the `understand` contract without locking the repo to one agent
|
|
18
|
+
|
|
19
|
+
- `$prodify-execute`
|
|
20
|
+
- run one workflow stage
|
|
21
|
+
- write stage artifacts under `.prodify/artifacts/`
|
|
22
|
+
- validate the stage against the compiled contract JSON
|
|
23
|
+
- update runtime state after the validation result
|
|
24
|
+
- pause for validation checkpoints between stages in interactive mode
|
|
25
|
+
|
|
26
|
+
- `$prodify-execute --auto`
|
|
27
|
+
- continue across stages without pausing
|
|
28
|
+
- stop only on hard failure, policy block, required approval threshold, or invalid state
|
|
29
|
+
|
|
30
|
+
- `$prodify-resume`
|
|
31
|
+
- continue from `.prodify/state.json`
|
|
32
|
+
- preserve validation checkpoints
|
|
33
|
+
- fail clearly if the state is corrupt or non-resumable
|
|
34
|
+
|
|
35
|
+
## Supported Runtime Profiles
|
|
36
|
+
|
|
37
|
+
- Codex
|
|
38
|
+
- Claude
|
|
39
|
+
- Copilot
|
|
40
|
+
- OpenCode
|
|
41
|
+
|
|
42
|
+
## Stage Order
|
|
43
|
+
|
|
44
|
+
- `understand`
|
|
45
|
+
- `diagnose`
|
|
46
|
+
- `architecture`
|
|
47
|
+
- `plan`
|
|
48
|
+
- `refactor`
|
|
49
|
+
- `validate`
|
|
50
|
+
|
|
51
|
+
## Contract Rules
|
|
52
|
+
|
|
53
|
+
- Source contracts live under `.prodify/contracts-src/*.contract.md`.
|
|
54
|
+
- Runtime execution reads only `.prodify/contracts/*.contract.json`.
|
|
55
|
+
- Skill definitions live under `.prodify/skills/*.json`.
|
|
56
|
+
- Stage skill routing can activate bounded skills per stage, but contracts and validators remain authoritative.
|
|
57
|
+
- Stage completion is gated by compiled-contract validation, not by agent assertion alone.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Skills
|
|
2
|
+
|
|
3
|
+
This directory contains the product-owned skill registry for deterministic stage execution.
|
|
4
|
+
|
|
5
|
+
- `registry.json` is the manifest and source of truth for discoverable skills.
|
|
6
|
+
- Each `*.skill.json` file defines one bounded skill.
|
|
7
|
+
- Contracts may reference skills only through explicit `skill_routing`.
|
|
8
|
+
- Skills can improve execution quality, but they never override compiled contracts or validation.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1",
|
|
3
|
+
"id": "react-frontend",
|
|
4
|
+
"name": "React Frontend",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"category": "domain",
|
|
7
|
+
"description": "Provides React-specific implementation and review guidance when a React surface is detected.",
|
|
8
|
+
"intended_use": [
|
|
9
|
+
"Use in understand, architecture, refactor, and validate when the repo framework includes React."
|
|
10
|
+
],
|
|
11
|
+
"stage_compatibility": [
|
|
12
|
+
"architecture",
|
|
13
|
+
"refactor",
|
|
14
|
+
"understand",
|
|
15
|
+
"validate"
|
|
16
|
+
],
|
|
17
|
+
"activation_conditions": [
|
|
18
|
+
{
|
|
19
|
+
"all": [
|
|
20
|
+
{
|
|
21
|
+
"fact": "framework",
|
|
22
|
+
"includes": "react"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"execution_guidance": [
|
|
28
|
+
"Preserve component boundaries and data-flow clarity.",
|
|
29
|
+
"Keep framework-specific advice subordinate to stage contracts."
|
|
30
|
+
],
|
|
31
|
+
"caution_guidance": [
|
|
32
|
+
"Do not assume a frontend repo unless React evidence is present."
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1",
|
|
3
|
+
"id": "typescript-backend",
|
|
4
|
+
"name": "TypeScript Backend",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"category": "domain",
|
|
7
|
+
"description": "Applies TypeScript service and CLI implementation guidance when the repository is TypeScript-based.",
|
|
8
|
+
"intended_use": [
|
|
9
|
+
"Use in architecture, refactor, and validate when the repo language includes TypeScript."
|
|
10
|
+
],
|
|
11
|
+
"stage_compatibility": [
|
|
12
|
+
"architecture",
|
|
13
|
+
"refactor",
|
|
14
|
+
"understand",
|
|
15
|
+
"validate"
|
|
16
|
+
],
|
|
17
|
+
"activation_conditions": [
|
|
18
|
+
{
|
|
19
|
+
"all": [
|
|
20
|
+
{
|
|
21
|
+
"fact": "language",
|
|
22
|
+
"includes": "typescript"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"execution_guidance": [
|
|
28
|
+
"Prefer type-safe interfaces and explicit runtime-state normalization.",
|
|
29
|
+
"Keep generated JavaScript output aligned with TypeScript sources."
|
|
30
|
+
],
|
|
31
|
+
"caution_guidance": [
|
|
32
|
+
"Do not rely on implicit any-style assumptions when shaping refactors."
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1",
|
|
3
|
+
"id": "maintainability-review",
|
|
4
|
+
"name": "Maintainability Review",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"category": "quality-policy",
|
|
7
|
+
"description": "Highlights readability, ownership, and long-term support risks without redefining success criteria.",
|
|
8
|
+
"intended_use": [
|
|
9
|
+
"Use in diagnose, architecture, and plan when maintainability concerns are relevant."
|
|
10
|
+
],
|
|
11
|
+
"stage_compatibility": [
|
|
12
|
+
"architecture",
|
|
13
|
+
"diagnose",
|
|
14
|
+
"plan",
|
|
15
|
+
"understand"
|
|
16
|
+
],
|
|
17
|
+
"activation_conditions": [],
|
|
18
|
+
"execution_guidance": [
|
|
19
|
+
"Call out mixed concerns and unclear ownership paths.",
|
|
20
|
+
"Prefer small, explainable structure improvements."
|
|
21
|
+
],
|
|
22
|
+
"caution_guidance": [
|
|
23
|
+
"Do not replace contract validation with style preference."
|
|
24
|
+
]
|
|
25
|
+
}
|