@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,56 @@
|
|
|
1
|
+
# Prodify Agent Entry
|
|
2
|
+
|
|
3
|
+
## First Message
|
|
4
|
+
|
|
5
|
+
When the user opens a coding agent manually, the first instruction should be:
|
|
6
|
+
|
|
7
|
+
`Read .prodify/AGENTS.md and bootstrap Prodify for this repository.`
|
|
8
|
+
|
|
9
|
+
After the agent reads this file, it should continue with `$prodify-init` and keep the full workflow anchored to `.prodify/`.
|
|
10
|
+
|
|
11
|
+
## Core Rules
|
|
12
|
+
|
|
13
|
+
- `.prodify/` is the only source of truth.
|
|
14
|
+
- Humans edit `.prodify/contracts-src/`; runtime reads only `.prodify/contracts/*.contract.json`.
|
|
15
|
+
- No root-level `AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, or `.opencode/AGENTS.md` is required for the main flow.
|
|
16
|
+
- If this repository also contains a root `AGENTS.md`, treat it as repository-local contributor guidance unless explicitly documented otherwise.
|
|
17
|
+
- Repository initialization remains agent-agnostic. The active agent is resolved when `$prodify-init` runs, not when `prodify init` creates `.prodify/`.
|
|
18
|
+
- External CLI commands prepare and inspect the repo.
|
|
19
|
+
- Runtime commands are executed inside the chosen coding agent.
|
|
20
|
+
- Durable workflow state lives in `.prodify/state.json`.
|
|
21
|
+
|
|
22
|
+
## External CLI
|
|
23
|
+
|
|
24
|
+
- `prodify init`
|
|
25
|
+
- `prodify setup-agent`
|
|
26
|
+
- `prodify status`
|
|
27
|
+
- `prodify doctor`
|
|
28
|
+
- `prodify update`
|
|
29
|
+
|
|
30
|
+
## Runtime Files
|
|
31
|
+
|
|
32
|
+
- `.prodify/AGENTS.md`
|
|
33
|
+
- `.prodify/project.md`
|
|
34
|
+
- `.prodify/planning.md`
|
|
35
|
+
- `.prodify/contracts-src/`
|
|
36
|
+
- `.prodify/contracts/`
|
|
37
|
+
- `.prodify/artifacts/`
|
|
38
|
+
- `.prodify/metrics/`
|
|
39
|
+
- `.prodify/tasks/`
|
|
40
|
+
- `.prodify/state.json`
|
|
41
|
+
- `.prodify/runtime-commands.md`
|
|
42
|
+
|
|
43
|
+
Active stage outputs under `.prodify/artifacts/` use numbered filenames:
|
|
44
|
+
- `01-understand.md`
|
|
45
|
+
- `02-diagnose.md`
|
|
46
|
+
- `03-architecture.md`
|
|
47
|
+
- `04-plan.md`
|
|
48
|
+
- `05-refactor.md`
|
|
49
|
+
- `06-validate.md`
|
|
50
|
+
|
|
51
|
+
## Runtime Commands
|
|
52
|
+
|
|
53
|
+
- `$prodify-init`
|
|
54
|
+
- `$prodify-execute`
|
|
55
|
+
- `$prodify-execute --auto`
|
|
56
|
+
- `$prodify-resume`
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Self-Hosted Workspace
|
|
2
|
+
|
|
3
|
+
This checked-in `.prodify/` directory is the real self-hosting workspace used to evolve Prodify itself.
|
|
4
|
+
|
|
5
|
+
It contains two kinds of content:
|
|
6
|
+
|
|
7
|
+
- the canonical runtime layout that `prodify init` and `prodify update` generate
|
|
8
|
+
- additional repo-local artifacts, rules, tasks, and templates used while developing Prodify
|
|
9
|
+
|
|
10
|
+
Treat it as a real workspace, not as a second competing product model.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 01-understand
|
|
2
|
+
|
|
3
|
+
## Current State
|
|
4
|
+
- The repository is a TypeScript and Node.js CLI product centered on `prodify init`, `status`, `doctor`, and `update`, with runtime flow logic in `src/core/` and preset loading in `src/presets/`.
|
|
5
|
+
- The checked-in `.prodify/` directory is being used as a self-hosted runtime workspace for Prodify itself, while `assets/presets/default/canonical/` defines the generated default preset contents.
|
|
6
|
+
- The runtime contract layer, validation tests, and flow-state code use numbered stage artifacts such as `.prodify/artifacts/01-understand.md`, but the checked-in `.prodify/tasks/` and several design artifacts still reference legacy names such as `orientation_map.md` and `refactor_plan.md`.
|
|
7
|
+
- Repository guidance is inconsistent about root-level agent files: `README.md`, `.prodify/AGENTS.md`, and integration tests say the default lifecycle is `.prodify`-first with no required root-level agent files, while multiple docs under `docs/` still describe generated root-level compatibility files such as `AGENTS.md`.
|
|
8
|
+
|
|
9
|
+
## Open Questions
|
|
10
|
+
- Whether the checked-in root `AGENTS.md` should remain purely as repository-local contributor guidance or be removed entirely from the visible product story.
|
|
11
|
+
- Whether the self-hosted `.prodify/` workspace should continue to include repo-specific development artifacts beyond the generated default preset, or be trimmed closer to the preset footprint.
|
|
12
|
+
- Which documentation pages that still describe compatibility-file generation are still intentional future-design notes versus stale product claims that should now be corrected.
|
|
13
|
+
|
|
14
|
+
## Policy Checks
|
|
15
|
+
- Operate only on verified data.
|
|
16
|
+
- Preserve the existing behavior during understanding.
|
|
17
|
+
|
|
18
|
+
## Repository Summary
|
|
19
|
+
- Project name: Prodify.
|
|
20
|
+
- Primary stack: TypeScript, Node.js, npm, compiled `dist/` output from `src/`.
|
|
21
|
+
- Project type: CLI plus in-agent contract-driven runtime scaffolding.
|
|
22
|
+
- Primary entry points: `src/cli.ts`, `src/index.ts`, `src/commands/init.ts`, `src/commands/status.ts`, `src/commands/doctor.ts`, `src/commands/update.ts`.
|
|
23
|
+
- High-centrality modules for Task 65: `src/presets/loader.ts`, `src/core/preset-validation.ts`, `src/core/paths.ts`, `src/core/validation.ts`, `README.md`, `docs/`, `assets/presets/default/canonical/`, and the checked-in `.prodify/` workspace.
|
|
24
|
+
- Key architectural boundary for this task: generated preset assets, checked-in self-hosted `.prodify/`, runtime validation contracts, docs, and tests must communicate the same `.prodify`-first model.
|
|
25
|
+
|
|
26
|
+
## Success Criteria
|
|
27
|
+
- The repository intent is captured clearly.
|
|
28
|
+
- Known unknowns are listed explicitly.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 02-diagnose
|
|
2
|
+
|
|
3
|
+
## Constraints
|
|
4
|
+
- The runtime contract layer, tests, and flow-state code already treat numbered stage artifacts under `.prodify/artifacts/` as canonical behavior, so any repair must preserve that observable runtime model.
|
|
5
|
+
- `prodify init` and `prodify update` must continue to avoid creating root-level compatibility files in the default lifecycle, because existing tests assert those paths stay absent.
|
|
6
|
+
- The checked-in `.prodify/` directory is both a self-hosted workspace and a repository artifact set, so cleanup must distinguish product-owned runtime layout from repo-specific historical design documents.
|
|
7
|
+
|
|
8
|
+
## Observed Issues
|
|
9
|
+
- Critical: `.prodify/tasks/01-understand.md` through `.prodify/tasks/06-validate.md` still referenced legacy artifact names such as `orientation_map.md`, `diagnostic_report.md`, and `refactor_plan.md` while compiled contracts and validation tests require `.prodify/artifacts/01-understand.md` through `.prodify/artifacts/06-validate.md`.
|
|
10
|
+
- Critical: repository guidance is contradictory about root-level compatibility files. `README.md`, `.prodify/AGENTS.md`, and `tests/integration/cli-flows.test.js` describe a `.prodify`-first lifecycle with no required root-level files, but `docs/codex-support.md`, `docs/compatibility-targets.md`, `docs/claude-support.md`, `docs/opencode-support.md`, and `docs/generation-rules.md` still describe generated root-level compatibility outputs.
|
|
11
|
+
- High: the checked-in self-hosted `.prodify/artifacts/` directory still contains legacy artifact files such as `.prodify/artifacts/orientation_map.md`, `.prodify/artifacts/diagnostic_report.md`, `.prodify/artifacts/refactor_plan.md`, `.prodify/artifacts/implementation_summary.md`, and `.prodify/artifacts/validation_report.md`, which visually conflicts with the numbered runtime artifact model.
|
|
12
|
+
- High: the default preset under `assets/presets/default/canonical/` ships only a minimal canonical footprint, while docs such as `docs/canonical-prodify-layout.md` describe a broader canonical tree and the checked-in repo-root `.prodify/` workspace contains many additional runtime and design files.
|
|
13
|
+
- Medium: the repository root still contains `AGENTS.md`, which is valid for this development environment but is indistinguishable at a glance from the deprecated product story unless documented explicitly.
|
|
14
|
+
|
|
15
|
+
## Policy Checks
|
|
16
|
+
- Diagnose from repository evidence only.
|
|
17
|
+
- Do not propose implementation changes in the diagnosis stage.
|
|
18
|
+
|
|
19
|
+
## Root Causes
|
|
20
|
+
- The repository completed a `.prodify`-first product transition in runtime code and tests before all self-hosted task files, templates, artifacts, and design docs were migrated to the same terminology.
|
|
21
|
+
- Historical design documentation for compatibility-file generation was retained in `docs/` after the default lifecycle moved away from root-level generated agent files, leaving multiple incompatible narratives in the repo.
|
|
22
|
+
- The self-hosted `.prodify/` workspace mixes active runtime assets with archived design outputs, so stale legacy artifact names remain visible even after the runtime adopted numbered artifacts.
|
|
23
|
+
|
|
24
|
+
## Success Criteria
|
|
25
|
+
- Every critical issue is tied to evidence.
|
|
26
|
+
- Root causes are separated from symptoms.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# 03-architecture
|
|
2
|
+
|
|
3
|
+
## Dependency Rules
|
|
4
|
+
- Domain rules for the product lifecycle belong to compiled contracts, runtime state handling, and the canonical `.prodify` runtime model; documentation and examples must describe that behavior, not redefine it.
|
|
5
|
+
- Application-layer flow definitions such as `.prodify/tasks/` may depend on the contract model, but they must use the same artifact names, step order, and validation semantics as the compiled contracts.
|
|
6
|
+
- Infrastructure assets such as `assets/presets/default/canonical/` and the checked-in repo-root `.prodify/` workspace may extend the canonical runtime footprint, but they must not contradict the default lifecycle documented in `README.md` and enforced by tests.
|
|
7
|
+
- Interface-layer materials such as `README.md`, `.prodify/AGENTS.md`, and user-facing docs may explain contributor-only root files, but they must not present them as product-required runtime behavior when the default flow is `.prodify`-first.
|
|
8
|
+
|
|
9
|
+
## Policy Checks
|
|
10
|
+
- Flag mixed concerns explicitly.
|
|
11
|
+
- Keep Domain dependencies pointing inward only.
|
|
12
|
+
|
|
13
|
+
## Proposed Structure
|
|
14
|
+
- Current pattern classification: layered tooling architecture with clean-architecture intent, confidence `0.76`.
|
|
15
|
+
- Target structure for Task 65:
|
|
16
|
+
- Domain: compiled contracts, runtime state invariants, stage ordering, and artifact naming rules.
|
|
17
|
+
- Application: task execution protocol, preset loading, validation orchestration, and flow-state transitions.
|
|
18
|
+
- Infrastructure: preset asset trees, checked-in self-hosted `.prodify/`, filesystem layout, and test fixtures.
|
|
19
|
+
- Interface: CLI output, `README.md`, `.prodify/AGENTS.md`, and product-facing documentation.
|
|
20
|
+
- Required boundary rule: interface and infrastructure layers must conform to the domain-owned `.prodify`-first lifecycle instead of preserving legacy compatibility-file narratives.
|
|
21
|
+
- Required clarity rule: the repo-root `AGENTS.md` may remain only as repository-local contributor guidance, explicitly outside the default Prodify product lifecycle.
|
|
22
|
+
|
|
23
|
+
## Success Criteria
|
|
24
|
+
- The target structure is explicit.
|
|
25
|
+
- Architecture violations are listed clearly.
|
|
26
|
+
|
|
27
|
+
## Tradeoffs
|
|
28
|
+
- Keeping forward-looking compatibility-target docs is acceptable only if they are clearly marked as future or non-default behavior; otherwise they act as conflicting runtime guidance.
|
|
29
|
+
- Keeping the self-hosted repo-root `.prodify/` workspace is valuable for dogfooding, but it must be labeled as canonical runtime layout plus repo-specific artifacts rather than an exact mirror of `prodify init`.
|
|
30
|
+
- Removing every historical artifact immediately would reduce drift fastest, but targeted clarification and test coverage is safer where files still serve repository-development purposes.
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
- `step-01-clarify-default-lifecycle-docs`: medium risk because multiple visible entrypoints must stay internally consistent while preserving the current `.prodify`-first product behavior.
|
|
9
|
+
- `step-02-reframe-compatibility-docs`: medium risk because historical design docs still describe generated root-level compatibility files and need clear scope boundaries rather than accidental deletion of future design intent.
|
|
10
|
+
- `step-03-strengthen-consistency-tests`: low risk because the changes are additive but they must avoid asserting behavior the product does not currently implement.
|
|
11
|
+
|
|
12
|
+
## Step Breakdown
|
|
13
|
+
- Step ID: step-01-clarify-default-lifecycle-docs
|
|
14
|
+
- Description: clarify the current product story in canonical user-facing docs and contributor-facing guidance, including what the checked-in self-hosted `.prodify/` workspace and root `AGENTS.md` represent.
|
|
15
|
+
- Files: README.md, AGENTS.md, .prodify/AGENTS.md, .prodify/artifacts/README.md, docs/canonical-prodify-layout.md
|
|
16
|
+
- Risk: 3
|
|
17
|
+
- Validation: npm test
|
|
18
|
+
- Step ID: step-02-reframe-compatibility-docs
|
|
19
|
+
- Description: rewrite or relabel compatibility-target documentation so root-level generated agent files are clearly future, planned, or non-default rather than part of the current Prodify lifecycle.
|
|
20
|
+
- Files: docs/compatibility-targets.md, docs/codex-support.md, docs/claude-support.md, docs/opencode-support.md, docs/generation-rules.md
|
|
21
|
+
- Risk: 3
|
|
22
|
+
- Validation: npm test
|
|
23
|
+
- Step ID: step-03-strengthen-consistency-tests
|
|
24
|
+
- Description: add explicit tests that the documented default lifecycle remains `.prodify`-first, that the preset and repo-root self-hosted workspace are distinguished correctly, and that root-level product-owned agent files are not required.
|
|
25
|
+
- Files: tests/integration/cli-flows.test.js, tests/unit/self-hosted-workspace.test.js, tests/unit/preset-loader.test.js
|
|
26
|
+
- Risk: 1
|
|
27
|
+
- Validation: npm test
|
|
28
|
+
|
|
29
|
+
## Success Criteria
|
|
30
|
+
- The plan enumerates executable steps.
|
|
31
|
+
- Verification is defined before refactoring starts.
|
|
32
|
+
|
|
33
|
+
## Verification
|
|
34
|
+
- Run `npm test` after each step because the touched files span docs, preset assets, and runtime-adjacent consistency tests.
|
|
35
|
+
- Treat any regression in lifecycle messaging, preset loading, or workspace health assertions as a blocker before advancing to the next step.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 05-refactor
|
|
2
|
+
|
|
3
|
+
## Behavior Guardrails
|
|
4
|
+
- Kept the change set inside the three test files declared by `step-03-strengthen-consistency-tests`.
|
|
5
|
+
- Added assertions only for already-documented behavior and did not introduce new product features or CLI semantics.
|
|
6
|
+
- Reused existing integration and unit suites instead of creating broad new fixtures.
|
|
7
|
+
- After the first validation failure, repaired the same selected step by aligning one regex with the documented `repository-local` wording.
|
|
8
|
+
|
|
9
|
+
## Changed Files
|
|
10
|
+
- tests/integration/cli-flows.test.js
|
|
11
|
+
- tests/unit/self-hosted-workspace.test.js
|
|
12
|
+
- tests/unit/preset-loader.test.js
|
|
13
|
+
|
|
14
|
+
## Policy Checks
|
|
15
|
+
- Execute exactly one selected step.
|
|
16
|
+
- Keep the diff minimal and behavior-preserving unless the plan says otherwise.
|
|
17
|
+
|
|
18
|
+
## Selected Step
|
|
19
|
+
- Step ID: step-03-strengthen-consistency-tests
|
|
20
|
+
- Description: add explicit tests that the documented default lifecycle remains `.prodify`-first, that the preset and repo-root self-hosted workspace are distinguished correctly, and that root-level product-owned agent files are not required.
|
|
21
|
+
|
|
22
|
+
## Success Criteria
|
|
23
|
+
- The selected plan step is implemented fully.
|
|
24
|
+
- Unrelated files remain untouched.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 06-validate
|
|
2
|
+
|
|
3
|
+
## Policy Checks
|
|
4
|
+
- Validation must follow every refactor step.
|
|
5
|
+
- Critical regressions block forward progress.
|
|
6
|
+
|
|
7
|
+
## Regressions
|
|
8
|
+
- None detected for the repaired `step-03-strengthen-consistency-tests`.
|
|
9
|
+
- `npm test` passed with 38 tests and 0 failures after aligning the self-hosted-workspace assertion with the documented wording.
|
|
10
|
+
|
|
11
|
+
## Success Criteria
|
|
12
|
+
- Validation records whether regressions were found.
|
|
13
|
+
- The result is strong enough to gate the next runtime transition.
|
|
14
|
+
|
|
15
|
+
## Validation Results
|
|
16
|
+
- PASS/FAIL: PASS
|
|
17
|
+
- Evidence: `npm test` completed successfully after the repair to `tests/unit/self-hosted-workspace.test.js`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Stage Artifacts
|
|
2
|
+
|
|
3
|
+
Stage execution writes validated outputs into this directory.
|
|
4
|
+
Each stage contract declares the canonical artifact paths and required sections.
|
|
5
|
+
The active runtime stage outputs use numbered filenames such as `01-understand.md` through `06-validate.md`.
|
|
6
|
+
This self-hosted repository may also keep repository-local design or historical artifacts here when they are useful for developing Prodify itself.
|
|
@@ -0,0 +1,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,276 @@
|
|
|
1
|
+
# Artifact Validation Design
|
|
2
|
+
|
|
3
|
+
Date: 2026-03-28
|
|
4
|
+
Scope: `./.prodify/artifacts/*.md`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
Define the validation layer that checks produced markdown artifacts against their matching templates before workflow state may advance.
|
|
8
|
+
|
|
9
|
+
This layer is responsible for artifact-shape validation only. It must confirm that:
|
|
10
|
+
- the expected artifact exists
|
|
11
|
+
- the artifact is written to the declared path
|
|
12
|
+
- the artifact contains the required template headings
|
|
13
|
+
- the artifact is complete enough to be considered structurally valid
|
|
14
|
+
|
|
15
|
+
This layer is not responsible for:
|
|
16
|
+
- choosing which task runs next
|
|
17
|
+
- mutating workflow state directly
|
|
18
|
+
- judging deep semantic correctness of the content
|
|
19
|
+
- validating source-code diffs from Task `05-refactor`
|
|
20
|
+
|
|
21
|
+
## Validation Scope
|
|
22
|
+
The artifact-validation layer runs after a task writes its primary artifact and before workflow advancement.
|
|
23
|
+
|
|
24
|
+
Inputs:
|
|
25
|
+
- produced artifact path from the task frontmatter `writes`
|
|
26
|
+
- matching template path from the task output specification
|
|
27
|
+
- required heading set derived from the template
|
|
28
|
+
- task ID and task metadata
|
|
29
|
+
|
|
30
|
+
Output:
|
|
31
|
+
- a deterministic validation result with:
|
|
32
|
+
- `pass` or `fail`
|
|
33
|
+
- failure reason category
|
|
34
|
+
- missing or invalid sections
|
|
35
|
+
- recommended next action
|
|
36
|
+
|
|
37
|
+
## Core Validation Rules
|
|
38
|
+
|
|
39
|
+
### Rule 1 - Expected Artifact Must Exist
|
|
40
|
+
- The artifact file must exist at the exact path declared in task frontmatter.
|
|
41
|
+
- If the expected path is missing, validation fails immediately.
|
|
42
|
+
|
|
43
|
+
### Rule 2 - Artifact Must Be Markdown
|
|
44
|
+
- The primary artifact must be a Markdown document for Tasks `01` through `06`.
|
|
45
|
+
- If the produced file is not Markdown or cannot be parsed as structured markdown text, validation fails.
|
|
46
|
+
|
|
47
|
+
### Rule 3 - Template Heading Coverage
|
|
48
|
+
- Every required heading from the matching template must be present in the artifact.
|
|
49
|
+
- Heading order must follow the template order.
|
|
50
|
+
- Required headings may contain brief or uncertain content, but they may not be omitted.
|
|
51
|
+
|
|
52
|
+
### Rule 4 - No Critical Structural Drift
|
|
53
|
+
- The artifact may include small clarifying subsections only if they do not obscure the required template structure.
|
|
54
|
+
- If the artifact removes, renames, or reorders required headings in a way that breaks downstream parsing, validation fails.
|
|
55
|
+
|
|
56
|
+
### Rule 5 - Partial Output Is Invalid
|
|
57
|
+
- If the artifact stops partway through the required structure, validation fails.
|
|
58
|
+
- Empty artifacts, truncated artifacts, or artifacts missing required late sections are invalid.
|
|
59
|
+
|
|
60
|
+
### Rule 6 - Declared Output Path Wins
|
|
61
|
+
- If content was written to a different path than the task's declared `writes` path, validation fails even if the content is otherwise correct.
|
|
62
|
+
|
|
63
|
+
## Validation Rules Per Artifact
|
|
64
|
+
|
|
65
|
+
### `orientation_map.md`
|
|
66
|
+
- Template:
|
|
67
|
+
- `.prodify/templates/orientation_map.template.md`
|
|
68
|
+
- Required headings:
|
|
69
|
+
- `# Orientation Map`
|
|
70
|
+
- `## Project Summary`
|
|
71
|
+
- `## Entry Points`
|
|
72
|
+
- `## Module Map`
|
|
73
|
+
- `## Monorepo Metadata`
|
|
74
|
+
- `## Dependency Overview`
|
|
75
|
+
- `## Key Observations`
|
|
76
|
+
- `## Uncertainty`
|
|
77
|
+
- Pass rule:
|
|
78
|
+
- all headings exist in order and the file is non-empty
|
|
79
|
+
|
|
80
|
+
### `diagnostic_report.md`
|
|
81
|
+
- Template:
|
|
82
|
+
- `.prodify/templates/diagnostic_report.template.md`
|
|
83
|
+
- Required headings:
|
|
84
|
+
- `# Diagnostic Report`
|
|
85
|
+
- `## Top 5 Priorities`
|
|
86
|
+
- `## Critical Issues`
|
|
87
|
+
- `## High Issues`
|
|
88
|
+
- `## Medium Issues`
|
|
89
|
+
- `## Low Issues`
|
|
90
|
+
- `## Reliability Risks`
|
|
91
|
+
- `## Technical Debt Score`
|
|
92
|
+
- `## Notes`
|
|
93
|
+
- Pass rule:
|
|
94
|
+
- all headings exist in order and the report reaches the final `## Notes` section
|
|
95
|
+
|
|
96
|
+
### `architecture_spec.md`
|
|
97
|
+
- Template:
|
|
98
|
+
- `.prodify/templates/architecture_spec.template.md`
|
|
99
|
+
- Required headings:
|
|
100
|
+
- `# Architecture Spec`
|
|
101
|
+
- `## Detected Pattern`
|
|
102
|
+
- `## Target Style`
|
|
103
|
+
- `## Layer Definitions`
|
|
104
|
+
- `## Violations`
|
|
105
|
+
- `## Gap Analysis`
|
|
106
|
+
- `## Migration Notes`
|
|
107
|
+
- Pass rule:
|
|
108
|
+
- all headings exist in order and layer/violation sections are structurally present
|
|
109
|
+
|
|
110
|
+
### `refactor_plan.md`
|
|
111
|
+
- Template:
|
|
112
|
+
- `.prodify/templates/refactor_plan.template.md`
|
|
113
|
+
- Required headings:
|
|
114
|
+
- `# Refactor Plan`
|
|
115
|
+
- `## Summary`
|
|
116
|
+
- `## Phase Breakdown`
|
|
117
|
+
- `## Steps`
|
|
118
|
+
- `## Notes`
|
|
119
|
+
- Additional structural requirement:
|
|
120
|
+
- at least one `### Step ID:` block must appear under `## Steps`
|
|
121
|
+
- Pass rule:
|
|
122
|
+
- all headings exist in order and at least one step block is present
|
|
123
|
+
|
|
124
|
+
### `implementation_summary.md`
|
|
125
|
+
- Template:
|
|
126
|
+
- `.prodify/templates/implementation_summary.template.md`
|
|
127
|
+
- Required headings:
|
|
128
|
+
- `# Implementation Summary`
|
|
129
|
+
- `## Step Executed`
|
|
130
|
+
- `## Objective Achieved`
|
|
131
|
+
- `## Files Changed`
|
|
132
|
+
- `## Diff Summary`
|
|
133
|
+
- `## Behavior Change Expected`
|
|
134
|
+
- `## Notes`
|
|
135
|
+
- Pass rule:
|
|
136
|
+
- all headings exist in order
|
|
137
|
+
- Special rule:
|
|
138
|
+
- validate only the summary artifact, not the modified source files
|
|
139
|
+
|
|
140
|
+
### `validation_report.md`
|
|
141
|
+
- Template:
|
|
142
|
+
- `.prodify/templates/validation_report.template.md`
|
|
143
|
+
- Required headings:
|
|
144
|
+
- `# Validation Report`
|
|
145
|
+
- `## Readiness Status`
|
|
146
|
+
- `## Final Score`
|
|
147
|
+
- `## Category Scores`
|
|
148
|
+
- `## Remaining Issues`
|
|
149
|
+
- `## Regressions Detected`
|
|
150
|
+
- `## Recommended Next Step`
|
|
151
|
+
- Pass rule:
|
|
152
|
+
- all headings exist in order and the file reaches the final next-step section
|
|
153
|
+
|
|
154
|
+
## Error Handling
|
|
155
|
+
|
|
156
|
+
### Missing Artifact
|
|
157
|
+
Condition:
|
|
158
|
+
- the expected artifact path does not exist
|
|
159
|
+
|
|
160
|
+
Result:
|
|
161
|
+
- fail validation
|
|
162
|
+
- report `missing_artifact`
|
|
163
|
+
- do not advance workflow state
|
|
164
|
+
- require the task to regenerate the artifact
|
|
165
|
+
|
|
166
|
+
### Wrong Output Path
|
|
167
|
+
Condition:
|
|
168
|
+
- an artifact was produced, but not at the declared `writes` path
|
|
169
|
+
|
|
170
|
+
Result:
|
|
171
|
+
- fail validation
|
|
172
|
+
- report `wrong_output_path`
|
|
173
|
+
- require the artifact to be rewritten or moved to the declared path before continuing
|
|
174
|
+
|
|
175
|
+
### Missing Required Heading
|
|
176
|
+
Condition:
|
|
177
|
+
- one or more required template headings are absent
|
|
178
|
+
|
|
179
|
+
Result:
|
|
180
|
+
- fail validation
|
|
181
|
+
- report `missing_required_heading`
|
|
182
|
+
- list the missing headings explicitly
|
|
183
|
+
- require artifact correction before continuing
|
|
184
|
+
|
|
185
|
+
### Heading Order Drift
|
|
186
|
+
Condition:
|
|
187
|
+
- required headings exist but are reordered in a way that breaks the template contract
|
|
188
|
+
|
|
189
|
+
Result:
|
|
190
|
+
- fail validation
|
|
191
|
+
- report `invalid_heading_order`
|
|
192
|
+
- require the artifact to be rewritten to match template order
|
|
193
|
+
|
|
194
|
+
### Partial Artifact
|
|
195
|
+
Condition:
|
|
196
|
+
- the artifact contains some required headings but stops early or omits required trailing sections
|
|
197
|
+
|
|
198
|
+
Result:
|
|
199
|
+
- fail validation
|
|
200
|
+
- report `partial_artifact`
|
|
201
|
+
- require regeneration or completion of the artifact
|
|
202
|
+
|
|
203
|
+
### Structurally Empty Section
|
|
204
|
+
Condition:
|
|
205
|
+
- a required heading exists but the section is completely empty with no uncertainty note, placeholder, or minimal content
|
|
206
|
+
|
|
207
|
+
Result:
|
|
208
|
+
- fail validation
|
|
209
|
+
- report `empty_required_section`
|
|
210
|
+
- require the section to be populated or explicitly marked uncertain
|
|
211
|
+
|
|
212
|
+
## Pass/Fail Criteria
|
|
213
|
+
|
|
214
|
+
### PASS
|
|
215
|
+
Validation passes only when:
|
|
216
|
+
- the artifact exists at the declared path
|
|
217
|
+
- the artifact matches the expected Markdown shape
|
|
218
|
+
- all required headings are present
|
|
219
|
+
- required headings appear in template order
|
|
220
|
+
- no required section is structurally empty without explanation
|
|
221
|
+
|
|
222
|
+
### FAIL
|
|
223
|
+
Validation fails if any of the following are true:
|
|
224
|
+
- artifact missing
|
|
225
|
+
- artifact written to the wrong path
|
|
226
|
+
- missing required heading
|
|
227
|
+
- invalid heading order
|
|
228
|
+
- partial artifact
|
|
229
|
+
- structurally empty required section
|
|
230
|
+
|
|
231
|
+
## Workflow Impact When Validation Fails
|
|
232
|
+
- Do not advance workflow state.
|
|
233
|
+
- Do not update `last_completed_task` to the task being validated.
|
|
234
|
+
- Mark the task outcome as failed or blocked according to run-state rules:
|
|
235
|
+
- use `blocked` when a file/path/template precondition is missing
|
|
236
|
+
- use `failed` when the artifact was produced but is structurally invalid
|
|
237
|
+
- Record the failure reason in `run_state.json` notes.
|
|
238
|
+
- Append the failure to `task_log.json`.
|
|
239
|
+
- Require the artifact to be corrected and revalidated before the next task may run.
|
|
240
|
+
|
|
241
|
+
## Integration Notes
|
|
242
|
+
|
|
243
|
+
### Relationship To Self-Validation
|
|
244
|
+
- The self-validation layer checks task preconditions and broad post-run expectations.
|
|
245
|
+
- The artifact-validation layer is narrower and authoritative for final template-shape validation.
|
|
246
|
+
- Artifact validation should run after the task writes its artifact and before workflow state transitions.
|
|
247
|
+
|
|
248
|
+
### Relationship To Dispatcher
|
|
249
|
+
- The dispatcher chooses the task and expected output path.
|
|
250
|
+
- The artifact-validation layer verifies the produced artifact after execution.
|
|
251
|
+
- The dispatcher must not treat a task as successful until artifact validation passes.
|
|
252
|
+
|
|
253
|
+
### Relationship To Run-State Logic
|
|
254
|
+
- The run-state layer decides how PASS or FAIL changes workflow state.
|
|
255
|
+
- The artifact-validation layer returns structured results that the run-state updater consumes.
|
|
256
|
+
|
|
257
|
+
## Suggested Validation Result Shape
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"task_id": "02-diagnose",
|
|
261
|
+
"artifact_path": ".prodify/artifacts/diagnostic_report.md",
|
|
262
|
+
"template_path": ".prodify/templates/diagnostic_report.template.md",
|
|
263
|
+
"status": "fail",
|
|
264
|
+
"reason": "missing_required_heading",
|
|
265
|
+
"details": [
|
|
266
|
+
"Missing heading: ## Technical Debt Score"
|
|
267
|
+
],
|
|
268
|
+
"recommended_next_action": "Regenerate or correct the artifact before advancing workflow state."
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Implementation Notes
|
|
273
|
+
- Derive required heading lists directly from templates.
|
|
274
|
+
- Treat heading presence and order as deterministic checks.
|
|
275
|
+
- Prefer failing fast with explicit reasons over trying to auto-repair artifacts.
|
|
276
|
+
- Keep the validation layer reusable across all current primary artifacts.
|