@khoavu882/doflow 0.0.0-stage → 2.0.0-beta.3
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/LICENSE +21 -0
- package/README.md +132 -2
- package/bin/doflow.js +44 -0
- package/core/.antigravity-plugin/hooks.json +39 -0
- package/core/.antigravity-plugin/mcp_config.json +18 -0
- package/core/.antigravity-plugin/plugin.json +31 -0
- package/core/.claude-plugin/marketplace.json +20 -0
- package/core/.claude-plugin/plugin.json +21 -0
- package/core/.codex-plugin/marketplace.json +20 -0
- package/core/.codex-plugin/plugin.json +35 -0
- package/core/.plugin/plugin.json +19 -0
- package/core/harnesses/antigravity/hooks/pre-implementation-gate.sh +9 -0
- package/core/harnesses/antigravity/hooks/stop-check.sh +10 -0
- package/core/harnesses/claude/hooks/lib.sh +304 -0
- package/core/harnesses/claude/hooks/mcp-tool-guard.sh +20 -0
- package/core/harnesses/claude/hooks/permission-audit.sh +47 -0
- package/core/harnesses/claude/hooks/post-compact.sh +74 -0
- package/core/harnesses/claude/hooks/post-edit-lint.sh +36 -0
- package/core/harnesses/claude/hooks/post-tool-failure.sh +47 -0
- package/core/harnesses/claude/hooks/pre-bash-guard.sh +20 -0
- package/core/harnesses/claude/hooks/pre-compact.sh +43 -0
- package/core/harnesses/claude/hooks/pre-implement-gate.sh +21 -0
- package/core/harnesses/claude/hooks/session-end.sh +89 -0
- package/core/harnesses/claude/hooks/session-start.sh +5 -0
- package/core/harnesses/claude/hooks/skill-config-audit.sh +39 -0
- package/core/harnesses/claude/hooks/stop-check.sh +5 -0
- package/core/harnesses/claude/hooks/subagent-audit.sh +7 -0
- package/core/harnesses/claude/hooks/user-prompt-submit.sh +5 -0
- package/core/harnesses/claude/settings/keybindings.json +20 -0
- package/core/harnesses/claude/settings/settings.json +201 -0
- package/core/harnesses/claude/statusline/doflow-statusline.sh +49 -0
- package/core/harnesses/codex/agents/core-implementer.toml +7 -0
- package/core/harnesses/codex/agents/quality-guardian.toml +8 -0
- package/core/harnesses/codex/agents/research-writer.toml +8 -0
- package/core/harnesses/codex/agents/spec-analyst.toml +8 -0
- package/core/harnesses/codex/agents/system-architect.toml +9 -0
- package/core/harnesses/codex/config/config.toml +10 -0
- package/core/harnesses/codex/hooks/hooks.json +122 -0
- package/core/harnesses/codex/hooks/lib.sh +335 -0
- package/core/harnesses/codex/hooks/mcp-tool-guard.sh +18 -0
- package/core/harnesses/codex/hooks/post-edit-lint.impl.sh +52 -0
- package/core/harnesses/codex/hooks/post-edit-lint.sh +6 -0
- package/core/harnesses/codex/hooks/pre-bash-guard.sh +18 -0
- package/core/harnesses/codex/hooks/pre-compact.impl.sh +46 -0
- package/core/harnesses/codex/hooks/pre-compact.sh +9 -0
- package/core/harnesses/codex/hooks/pre-implement-gate.sh +19 -0
- package/core/harnesses/codex/hooks/session-end.impl.sh +92 -0
- package/core/harnesses/codex/hooks/session-end.sh +5 -0
- package/core/harnesses/codex/hooks/session-start.sh +5 -0
- package/core/harnesses/codex/hooks/stop-check.sh +8 -0
- package/core/harnesses/codex/hooks/subagent-audit.sh +8 -0
- package/core/harnesses/codex/hooks/user-prompt-submit.sh +6 -0
- package/core/harnesses/gemini/hooks/hooks.json +77 -0
- package/core/harnesses/gemini/hooks/lib.sh +302 -0
- package/core/harnesses/gemini/hooks/mcp-tool-guard.sh +21 -0
- package/core/harnesses/gemini/hooks/post-edit-lint.sh +39 -0
- package/core/harnesses/gemini/hooks/pre-bash-guard.sh +21 -0
- package/core/harnesses/gemini/hooks/pre-compact.sh +38 -0
- package/core/harnesses/gemini/hooks/pre-implement-gate.sh +22 -0
- package/core/harnesses/gemini/hooks/session-end.impl.sh +89 -0
- package/core/harnesses/gemini/hooks/session-end.sh +5 -0
- package/core/harnesses/gemini/hooks/session-start.sh +5 -0
- package/core/harnesses/gemini/settings/adapter-defaults.json +4 -0
- package/core/harnesses/kiro/agents/doflow.json +58 -0
- package/core/harnesses/kiro/hooks/doflow.json +53 -0
- package/core/harnesses/kiro/hooks/lib.sh +324 -0
- package/core/harnesses/kiro/hooks/mcp-tool-guard.sh +9 -0
- package/core/harnesses/kiro/hooks/pre-bash-guard.sh +9 -0
- package/core/harnesses/kiro/hooks/pre-implement-gate.sh +9 -0
- package/core/harnesses/kiro/hooks/session-start.sh +9 -0
- package/core/harnesses/kiro/hooks/stop-check.sh +43 -0
- package/core/harnesses/shared/hooks/ENVELOPE_MIGRATION.md +39 -0
- package/core/harnesses/shared/hooks/adapters/antigravity.js +111 -0
- package/core/harnesses/shared/hooks/adapters/arg-fields.js +19 -0
- package/core/harnesses/shared/hooks/adapters/gemini.js +114 -0
- package/core/harnesses/shared/hooks/hooks.json +47 -0
- package/core/harnesses/shared/hooks/policies/blocked-patterns.conf +91 -0
- package/core/harnesses/shared/hooks/policies/capture-failure.sh +97 -0
- package/core/harnesses/shared/hooks/policies/deny-json.sh +29 -0
- package/core/harnesses/shared/hooks/policies/lib.sh +501 -0
- package/core/harnesses/shared/hooks/policies/mcp-policy.conf +21 -0
- package/core/harnesses/shared/hooks/policies/mcp-tool-guard.sh +91 -0
- package/core/harnesses/shared/hooks/policies/pre-bash-guard.sh +328 -0
- package/core/harnesses/shared/hooks/policies/pre-implementation-gate.sh +496 -0
- package/core/harnesses/shared/hooks/policies/prompt-nudge.jq +131 -0
- package/core/harnesses/shared/hooks/policies/session-context.sh +141 -0
- package/core/harnesses/shared/hooks/policies/stop-check.sh +264 -0
- package/core/harnesses/shared/hooks/policies/subagent-audit.sh +46 -0
- package/core/harnesses/shared/hooks/policies/user-prompt-submit.sh +235 -0
- package/core/harnesses/shared/hooks/stream-hook-runner.js +590 -0
- package/core/harnesses/shared/locator/doflow-run +87 -0
- package/core/registry/advice.json +101 -0
- package/core/registry/assets.json +792 -0
- package/core/registry/capabilities.json +120 -0
- package/core/registry/contracts.json +189 -0
- package/core/registry/external-tools.json +191 -0
- package/core/registry/harnesses.json +2062 -0
- package/core/registry/lifecycle.json +231 -0
- package/core/registry/mcp.json +18 -0
- package/core/registry/models.json +79 -0
- package/core/registry/readiness-templates.json +118 -0
- package/core/registry/routes.json +47 -0
- package/core/registry/storage.json +1057 -0
- package/core/registry/verification.json +258 -0
- package/core/registry/workflows.json +790 -0
- package/core/shared/agent-specs/core-implementer.md +73 -0
- package/core/shared/agent-specs/quality-guardian.md +28 -0
- package/core/shared/agent-specs/research-writer.md +31 -0
- package/core/shared/agent-specs/spec-analyst.md +33 -0
- package/core/shared/agent-specs/system-architect.md +29 -0
- package/core/shared/guidance/DOFLOW_CORE.md +8 -0
- package/core/shared/guidance/FLAGS.md +25 -0
- package/core/shared/guidance/PRINCIPLES.md +61 -0
- package/core/shared/guidance/VERSION +1 -0
- package/core/shared/guidance/mcp/MCP_Context7.md +18 -0
- package/core/shared/guidance/mcp/MCP_Sequential.md +17 -0
- package/core/shared/guidance/modes/MODE_Brainstorming.md +46 -0
- package/core/shared/guidance/modes/MODE_DeepResearch.md +69 -0
- package/core/shared/guidance/modes/MODE_Introspection.md +33 -0
- package/core/shared/guidance/modes/MODE_Orchestration.md +57 -0
- package/core/shared/guidance/modes/MODE_Task_Management.md +74 -0
- package/core/shared/guidance/pointers/claude-gemini.md +2 -0
- package/core/shared/guidance/pointers/codex.md +6 -0
- package/core/shared/guidance/references/ARTIFACT_FORMAT.md +373 -0
- package/core/shared/guidance/references/ARTIFACT_VOICE.md +104 -0
- package/core/shared/guidance/references/CONSTITUTION_BASE.md +47 -0
- package/core/shared/guidance/references/DIAGRAM_GUIDE.md +161 -0
- package/core/shared/guidance/references/DOFLOW_CHAIN.md +87 -0
- package/core/shared/guidance/references/EVIDENCE_LEDGER.md +93 -0
- package/core/shared/guidance/references/MODEL_SELECTION.md +74 -0
- package/core/shared/guidance/references/ORCHESTRATION.md +36 -0
- package/core/shared/guidance/references/RESEARCH_CONFIG.md +21 -0
- package/core/shared/guidance/references/WORKFLOW_HANDOFF.md +81 -0
- package/core/shared/guidance/rules/RULE_01_SAFETY.md +25 -0
- package/core/shared/guidance/rules/RULE_02_WORKFLOW.md +23 -0
- package/core/shared/guidance/rules/RULE_03_QUALITY.md +14 -0
- package/core/shared/guidance/rules/RULE_04_QUESTIONS.md +46 -0
- package/core/shared/scripts/doflow/assets/mermaid-theme.json +46 -0
- package/core/shared/scripts/doflow/bash/do-exec-paths.sh +167 -0
- package/core/shared/scripts/doflow/bash/do-git-state.sh +546 -0
- package/core/shared/scripts/doflow/bash/do-parallel-check.sh +208 -0
- package/core/shared/scripts/doflow/bash/do-paths.sh +347 -0
- package/core/shared/scripts/doflow/bash/do-prereqs.sh +66 -0
- package/core/shared/scripts/doflow/bash/do-review-package.sh +127 -0
- package/core/shared/scripts/doflow/bash/do-task-brief.sh +698 -0
- package/core/shared/scripts/doflow/bash/render-audit.sh +224 -0
- package/core/shared/scripts/doflow/bash/render-diagrams.sh +177 -0
- package/core/shared/scripts/doflow/bash/render-puml.sh +223 -0
- package/core/shared/scripts/doflow/bash/sync-context.sh +66 -0
- package/core/shared/scripts/doflow/bash/validate-artifacts.sh +526 -0
- package/core/shared/scripts/doflow/bin/doflow-run +592 -0
- package/core/shared/skills/do/SKILL.md +128 -0
- package/core/shared/skills/do/references/estimation.md +13 -0
- package/core/shared/skills/do/references/pm_routing.md +25 -0
- package/core/shared/skills/do/references/tool_matrix.md +52 -0
- package/core/shared/skills/do-brainstorm/SKILL.md +252 -0
- package/core/shared/skills/do-code-review/README.md +49 -0
- package/core/shared/skills/do-code-review/SKILL.md +333 -0
- package/core/shared/skills/do-code-review/assets/sample_c_clean.c +71 -0
- package/core/shared/skills/do-code-review/assets/sample_c_smells.c +66 -0
- package/core/shared/skills/do-code-review/assets/sample_cpp_shift.cpp +19 -0
- package/core/shared/skills/do-code-review/assets/sample_csharp_clean.cs +100 -0
- package/core/shared/skills/do-code-review/assets/sample_csharp_smells.cs +78 -0
- package/core/shared/skills/do-code-review/assets/sample_java_clean.java +55 -0
- package/core/shared/skills/do-code-review/assets/sample_java_smells.java +56 -0
- package/core/shared/skills/do-code-review/assets/sample_json_clean.json +7 -0
- package/core/shared/skills/do-code-review/assets/sample_markdown_clean.md +30 -0
- package/core/shared/skills/do-code-review/assets/sample_markdown_smells.md +29 -0
- package/core/shared/skills/do-code-review/assets/sample_shell_heredoc.sh +38 -0
- package/core/shared/skills/do-code-review/assets/sample_shell_smells.sh +15 -0
- package/core/shared/skills/do-code-review/assets/sample_typescript_strings.ts +36 -0
- package/core/shared/skills/do-code-review/assets/sample_yaml_smells.yaml +6 -0
- package/core/shared/skills/do-code-review/content-types/config.md +83 -0
- package/core/shared/skills/do-code-review/content-types/markdown.md +132 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_c_clean_quality.json +79 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_c_smells_quality.json +169 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_cpp_shift_quality.json +49 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_csharp_clean_quality.json +149 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_csharp_smells_quality.json +157 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_java_clean_quality.json +67 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_java_smells_quality.json +97 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_json_clean_quality.json +33 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_markdown_clean_quality.json +1 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_markdown_smells_quality.json +16 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_shell_heredoc_quality.json +54 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_shell_smells_quality.json +91 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_typescript_strings_quality.json +60 -0
- package/core/shared/skills/do-code-review/expected_outputs/sample_yaml_smells_quality.json +46 -0
- package/core/shared/skills/do-code-review/languages/c.md +103 -0
- package/core/shared/skills/do-code-review/languages/cpp.md +103 -0
- package/core/shared/skills/do-code-review/languages/csharp.md +97 -0
- package/core/shared/skills/do-code-review/languages/dart.md +108 -0
- package/core/shared/skills/do-code-review/languages/go.md +92 -0
- package/core/shared/skills/do-code-review/languages/java.md +103 -0
- package/core/shared/skills/do-code-review/languages/kotlin.md +88 -0
- package/core/shared/skills/do-code-review/languages/php.md +109 -0
- package/core/shared/skills/do-code-review/languages/python.md +94 -0
- package/core/shared/skills/do-code-review/languages/ruby.md +105 -0
- package/core/shared/skills/do-code-review/languages/rust.md +99 -0
- package/core/shared/skills/do-code-review/languages/shell.md +90 -0
- package/core/shared/skills/do-code-review/languages/swift.md +88 -0
- package/core/shared/skills/do-code-review/languages/typescript.md +97 -0
- package/core/shared/skills/do-code-review/review-policy.json +47 -0
- package/core/shared/skills/do-code-review/rules/universal.md +49 -0
- package/core/shared/skills/do-code-review/scripts/code_quality_checker.py +1696 -0
- package/core/shared/skills/do-code-review/scripts/doc_quality_checker.py +532 -0
- package/core/shared/skills/do-code-review/scripts/pr_analyzer.py +620 -0
- package/core/shared/skills/do-code-review/scripts/review_report_generator.py +505 -0
- package/core/shared/skills/do-constitution/SKILL.md +72 -0
- package/core/shared/skills/do-design/SKILL.md +212 -0
- package/core/shared/skills/do-diagnose/SKILL.md +156 -0
- package/core/shared/skills/do-diagnose/references/code_audit.md +15 -0
- package/core/shared/skills/do-diagnose/references/refactoring.md +12 -0
- package/core/shared/skills/do-diagnose/references/root_cause.md +17 -0
- package/core/shared/skills/do-document/SKILL.md +81 -0
- package/core/shared/skills/do-document/references/api-reference.md +42 -0
- package/core/shared/skills/do-document/references/deep_research.md +18 -0
- package/core/shared/skills/do-document/references/embedded-research.md +11 -0
- package/core/shared/skills/do-document/references/implementation-flow.md +105 -0
- package/core/shared/skills/do-document/references/index_generator.md +9 -0
- package/core/shared/skills/do-document/references/user-guide.md +22 -0
- package/core/shared/skills/do-execute-plan/SKILL.md +261 -0
- package/core/shared/skills/do-execute-plan/references/handoff_record.md +57 -0
- package/core/shared/skills/do-execute-plan/references/parallel_dispatch.md +92 -0
- package/core/shared/skills/do-execute-plan/references/readiness_gate.md +155 -0
- package/core/shared/skills/do-execute-plan/references/run_position.md +63 -0
- package/core/shared/skills/do-execute-plan/references/scaffold.md +441 -0
- package/core/shared/skills/do-execute-plan/references/task_attempts.md +41 -0
- package/core/shared/skills/do-flow/SKILL.md +186 -0
- package/core/shared/skills/do-flow/references/task_classes.md +134 -0
- package/core/shared/skills/do-git/SKILL.md +115 -0
- package/core/shared/skills/do-git/references/hotfix-ritual.md +44 -0
- package/core/shared/skills/do-git/references/lifecycle-policy.md +54 -0
- package/core/shared/skills/do-git/references/release-ritual.md +64 -0
- package/core/shared/skills/do-implement/SKILL.md +222 -0
- package/core/shared/skills/do-plan/SKILL.md +219 -0
- package/core/shared/skills/do-test/SKILL.md +113 -0
- package/core/shared/templates/doflow/constitution-template.md +28 -0
- package/core/shared/templates/doflow/data-model-template.md +169 -0
- package/core/shared/templates/doflow/design-template.md +193 -0
- package/core/shared/templates/doflow/external-contract-template.md +35 -0
- package/core/shared/templates/doflow/intent-template.md +45 -0
- package/core/shared/templates/doflow/plan-template.md +151 -0
- package/core/shared/templates/doflow/question-log-template.md +51 -0
- package/core/shared/templates/doflow/requirement-template.md +126 -0
- package/core/shared/templates/doflow/specs-template.md +55 -0
- package/core/shared/templates/doflow/state-template.md +59 -0
- package/core/shared/workflows/do-flow-chain.md +17 -0
- package/package.json +46 -4
- package/src/adapters/antigravity/index.ts +631 -0
- package/src/adapters/claude/index.ts +548 -0
- package/src/adapters/claude/mcp.ts +94 -0
- package/src/adapters/codex/agents.ts +208 -0
- package/src/adapters/codex/config.ts +272 -0
- package/src/adapters/codex/hooks.ts +203 -0
- package/src/adapters/codex/index.ts +707 -0
- package/src/adapters/codex/mcp.ts +271 -0
- package/src/adapters/codex/native-projection.ts +34 -0
- package/src/adapters/copilot/index.ts +413 -0
- package/src/adapters/copy-tree.ts +620 -0
- package/src/adapters/gemini/hooks.ts +210 -0
- package/src/adapters/gemini/index.ts +390 -0
- package/src/adapters/hook-commands.ts +60 -0
- package/src/adapters/index.ts +106 -0
- package/src/adapters/kiro/index.ts +310 -0
- package/src/adapters/mcp-entries.ts +331 -0
- package/src/adapters/opencode/index.ts +466 -0
- package/src/adapters/pi/index.ts +279 -0
- package/src/adapters/pi/json-members.ts +185 -0
- package/src/adapters/pi/mcp.ts +373 -0
- package/src/adapters/resolve-source.ts +19 -0
- package/src/cli/commands/install.ts +218 -0
- package/src/cli/commands/list-backups.ts +21 -0
- package/src/cli/commands/reconcile.ts +120 -0
- package/src/cli/commands/remove.ts +82 -0
- package/src/cli/commands/rollback.ts +172 -0
- package/src/cli/commands/self-update.ts +33 -0
- package/src/cli/commands/status.ts +138 -0
- package/src/cli/commands/tools.ts +92 -0
- package/src/cli/commands/update.ts +162 -0
- package/src/cli/index.ts +568 -0
- package/src/cli/runtime-commands.ts +281 -0
- package/src/cli/shared.ts +218 -0
- package/src/helper/bash-helper.ts +34 -0
- package/src/helper/git.ts +24 -0
- package/src/helper/guardrails.ts +49 -0
- package/src/helper/harness-paths.ts +140 -0
- package/src/helper/marker-merge.ts +116 -0
- package/src/helper/prompt.ts +61 -0
- package/src/helper/repo-root.ts +29 -0
- package/src/helper/settings-merge.ts +151 -0
- package/src/helper/settings-scope.ts +33 -0
- package/src/helper/toml.ts +244 -0
- package/src/install/backup-set.ts +149 -0
- package/src/install/backup.ts +724 -0
- package/src/install/context.ts +58 -0
- package/src/install/manifest.ts +145 -0
- package/src/install/mcp.ts +254 -0
- package/src/install/paths.ts +84 -0
- package/src/install/targets.ts +90 -0
- package/src/install/tool-lifecycle.ts +151 -0
- package/src/lifecycle/bash-availability.ts +25 -0
- package/src/lifecycle/index.ts +812 -0
- package/src/lifecycle/mcp-index.ts +28 -0
- package/src/lifecycle/policies.ts +73 -0
- package/src/lifecycle/view.ts +175 -0
- package/src/registry/index.ts +611 -0
- package/src/release/sync-plugin-versions.ts +66 -0
- package/src/runtime/advice/cli.ts +283 -0
- package/src/runtime/advice/client.ts +324 -0
- package/src/runtime/advice/config.ts +189 -0
- package/src/runtime/advice/doctor.ts +169 -0
- package/src/runtime/advice/endpoint-guard.ts +134 -0
- package/src/runtime/advice/kinds.ts +154 -0
- package/src/runtime/advice/providers/ollama-systemone.ts +209 -0
- package/src/runtime/advice/record.ts +166 -0
- package/src/runtime/advice/registry.ts +170 -0
- package/src/runtime/advice/strength.ts +66 -0
- package/src/runtime/brief-tools.ts +342 -0
- package/src/runtime/c4-project.ts +371 -0
- package/src/runtime/capability-router.ts +484 -0
- package/src/runtime/checkouts.ts +170 -0
- package/src/runtime/claims.ts +468 -0
- package/src/runtime/cli-result.ts +55 -0
- package/src/runtime/cli.ts +678 -0
- package/src/runtime/command-detect.ts +516 -0
- package/src/runtime/context-pack.ts +492 -0
- package/src/runtime/decision-register.ts +493 -0
- package/src/runtime/evidence-ledger.ts +338 -0
- package/src/runtime/failure/capture.ts +272 -0
- package/src/runtime/failure/classifier.ts +68 -0
- package/src/runtime/failure/cli.ts +178 -0
- package/src/runtime/failure/home.ts +64 -0
- package/src/runtime/failure/store.ts +226 -0
- package/src/runtime/feature-resolve.ts +79 -0
- package/src/runtime/freshness.ts +177 -0
- package/src/runtime/health.ts +863 -0
- package/src/runtime/history-compactor.ts +237 -0
- package/src/runtime/implementation-gate.ts +321 -0
- package/src/runtime/inventory/coverage.ts +218 -0
- package/src/runtime/inventory/identity.ts +65 -0
- package/src/runtime/inventory/index.ts +705 -0
- package/src/runtime/inventory/precedence.ts +134 -0
- package/src/runtime/inventory/read-scopes.ts +131 -0
- package/src/runtime/inventory/siblings.ts +192 -0
- package/src/runtime/knowledge/chunker.ts +124 -0
- package/src/runtime/knowledge/hybrid.ts +149 -0
- package/src/runtime/knowledge/index-store.ts +145 -0
- package/src/runtime/knowledge/retrieval.ts +194 -0
- package/src/runtime/leak-scan.ts +185 -0
- package/src/runtime/lifecycle/cli.ts +276 -0
- package/src/runtime/lifecycle/event-store.ts +340 -0
- package/src/runtime/lifecycle/fold.ts +353 -0
- package/src/runtime/lifecycle/followup.ts +432 -0
- package/src/runtime/lifecycle/goal.ts +249 -0
- package/src/runtime/lifecycle/intent-writer.ts +86 -0
- package/src/runtime/lifecycle/overview.ts +292 -0
- package/src/runtime/lifecycle/release.ts +241 -0
- package/src/runtime/lifecycle/report-store.ts +221 -0
- package/src/runtime/lifecycle/retention.ts +212 -0
- package/src/runtime/lifecycle/root.ts +71 -0
- package/src/runtime/lifecycle/status.ts +353 -0
- package/src/runtime/lifecycle/store-upkeep.ts +393 -0
- package/src/runtime/locator-resolve.ts +158 -0
- package/src/runtime/mask.ts +210 -0
- package/src/runtime/mcp-consultations.ts +412 -0
- package/src/runtime/mcp-reach.ts +157 -0
- package/src/runtime/model-router.ts +153 -0
- package/src/runtime/outcome.ts +467 -0
- package/src/runtime/reach.ts +148 -0
- package/src/runtime/readiness-record.ts +150 -0
- package/src/runtime/readiness.ts +435 -0
- package/src/runtime/recovery.ts +282 -0
- package/src/runtime/research-request.ts +231 -0
- package/src/runtime/retrieval-plan.ts +578 -0
- package/src/runtime/scaffold/artifacts.ts +217 -0
- package/src/runtime/scaffold/fingerprint.ts +56 -0
- package/src/runtime/scaffold/generate.ts +911 -0
- package/src/runtime/scaffold/languages.ts +245 -0
- package/src/runtime/storage/cli.ts +64 -0
- package/src/runtime/storage/engine.ts +249 -0
- package/src/runtime/storage/registry.ts +130 -0
- package/src/runtime/storage/roots.ts +63 -0
- package/src/runtime/storage/rules.ts +282 -0
- package/src/runtime/storage/upkeep.ts +243 -0
- package/src/runtime/storage/work-status.ts +326 -0
- package/src/runtime/task-attempts.ts +415 -0
- package/src/runtime/task-classifier.ts +550 -0
- package/src/runtime/task-scope.ts +130 -0
- package/src/runtime/task-state.ts +176 -0
- package/src/runtime/trace/indicators.ts +235 -0
- package/src/runtime/trace/ledger.ts +626 -0
- package/src/runtime/trace/render.ts +76 -0
- package/src/runtime/trace/views.ts +459 -0
- package/src/runtime/verification/contract-runner.ts +341 -0
- package/src/runtime/verification/engine.ts +1461 -0
- package/src/runtime/verification/registry.ts +130 -0
- package/src/runtime/verification/scope-bound.ts +418 -0
- package/src/runtime/verification/test-selection.ts +172 -0
- package/src/runtime/workflow-engine.ts +588 -0
- package/src/runtime/workflow-orchestrator.ts +953 -0
- package/src/runtime/worktree.ts +340 -0
- package/src/state/index.ts +193 -0
- package/src/state/lockfile.ts +136 -0
- package/src/state/run-lock.ts +408 -0
- package/types/node-commonjs.d.ts +68 -0
- package/types/runtime.d.ts +91 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: do-implement
|
|
3
|
+
description: "Direct, standalone code implementation from a description, /do-code-review findings, or an existing task — no DoFlow chain artifacts required. Use when the user names /do-implement, says 'now implement that', 'fix what the review found' or 'address these comments', or /do routed a bug, refactor, dependency change or small edit here. A plain change request that names no /do-* skill goes to /do first, which classifies it and routes it back here when it fits. Skip it for questions, reviews, and new features that need the full chain."
|
|
4
|
+
argument-hint: "[description of the change] [--from-review]"
|
|
5
|
+
effort: medium
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# do-implement
|
|
9
|
+
|
|
10
|
+
A standalone extension skill, not a numbered phase of the DoFlow chain (`do-brainstorm → do-design
|
|
11
|
+
→ do-plan → do-execute-plan → do-test → do-code-review`). Implements directly from whatever
|
|
12
|
+
context is fed to it — a plain-language description, `/do-code-review`'s findings, or a pointer to
|
|
13
|
+
an existing `requirement.md` / `design.md` / `plan.md` — without requiring any of those artifacts
|
|
14
|
+
to exist first. `/do-execute-plan` is the chain's own implementation phase, built for orchestrating
|
|
15
|
+
a full `plan.md` task checklist through specialist subagents with prerequisite gates; reach for
|
|
16
|
+
this skill instead when there is no task checklist to orchestrate — a one-off fix, a described
|
|
17
|
+
feature, or a batch of review comments to work through right now.
|
|
18
|
+
|
|
19
|
+
## Invocation
|
|
20
|
+
```text
|
|
21
|
+
/do-implement [description of the change] [--from-review]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- With no arguments, and a `/do-code-review` (or `/code-review`) run earlier in the conversation:
|
|
25
|
+
`--from-review` is implied — work through that review's findings.
|
|
26
|
+
- With a description: implement exactly what is described.
|
|
27
|
+
- Either form may also name an existing artifact (`requirement.md`, `design.md`, a linked issue, a
|
|
28
|
+
specific `plan.md` task) as extra context. Reading it is welcome; it is never required.
|
|
29
|
+
|
|
30
|
+
## Behavioral Flow
|
|
31
|
+
|
|
32
|
+
Every DoFlow runtime call in this skill goes through the runtime seam. Resolve it **once** here and
|
|
33
|
+
reuse `$DOFLOW` for every later call in this skill:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Resolve the DoFlow runtime: nearest project install wins, then the global one.
|
|
37
|
+
D=$PWD; while [ "$D" != / ] && [ ! -x "$D/.doflow/scripts/doflow/bin/doflow-run" ]; do D=$(dirname "$D"); done
|
|
38
|
+
DOFLOW="$D/.doflow/scripts/doflow/bin/doflow-run"
|
|
39
|
+
[ -x "$DOFLOW" ] || DOFLOW="$HOME/.doflow/scripts/doflow/bin/doflow-run"
|
|
40
|
+
[ -x "$DOFLOW" ] || { echo "doflow: no runtime found in any .doflow/ above $PWD, nor at $HOME/.doflow. Run: npx @khoavu882/doflow install -t <harness>" >&2; exit 2; }
|
|
41
|
+
```
|
|
42
|
+
Run every command below from the project root — the walk-up starts at `$PWD`. On exit 2, print the message verbatim and stop; it names every path searched.
|
|
43
|
+
|
|
44
|
+
1. **Gather context — don't demand it**:
|
|
45
|
+
- Invoked after `/do-code-review` or `/code-review` in this conversation, or with
|
|
46
|
+
`--from-review`: treat that review's findings as the work list, most-severe first, in the
|
|
47
|
+
order the review itself ranked them.
|
|
48
|
+
- Invoked with a description: treat that as the work list directly.
|
|
49
|
+
- If the current branch has an active DoFlow feature (`"$DOFLOW" paths --json` resolves a
|
|
50
|
+
`feature_dir`) and its `plan.md` already has a task matching the request, say so and offer
|
|
51
|
+
`/do-execute-plan` instead — that machinery exists for exactly this case, and duplicating it
|
|
52
|
+
here would just be a second, worse orchestrator. Proceed directly only if the user confirms
|
|
53
|
+
the lighter path, or if no such plan or matching task exists.
|
|
54
|
+
- Never block on a missing `requirement.md` / `design.md` / `plan.md`. Those artifacts are the
|
|
55
|
+
chain's business, not a precondition of this skill.
|
|
56
|
+
|
|
57
|
+
**Stop when** every work-list finding the contract names has an answer or a stated gap, **and** the last round produced no new work-list finding. A round that only restates what you already have is the last round. Report the remaining gaps rather than continuing.
|
|
58
|
+
|
|
59
|
+
2. **Resolve the task id, then evaluate readiness — skip only when standalone**:
|
|
60
|
+
- `<task id>` is the same unit every recording stage keys on: the plan task id when one exists,
|
|
61
|
+
otherwise the feature slug that step 1's `"$DOFLOW" paths --json` resolved, or the issue id you
|
|
62
|
+
were given. When none of those exist, there is nothing to look up — treat this run as standalone
|
|
63
|
+
and go straight to the exemption below.
|
|
64
|
+
- Check what is recorded against that id before touching anything:
|
|
65
|
+
```bash
|
|
66
|
+
"$DOFLOW" evidence --task-id "<task id>" --json
|
|
67
|
+
```
|
|
68
|
+
- **`evidenceCount` is 0 — standalone.** Nothing is recorded for this id, which is exactly the
|
|
69
|
+
no-chain-artifacts case this skill exists to serve (FR-002). Proceed to step 3 without
|
|
70
|
+
evaluating readiness and without compiling a context pack. State the exemption in step 6's
|
|
71
|
+
report as prominently as a block would be stated — a skipped gate the report never mentions
|
|
72
|
+
reads as a passed gate, and that silence is the failure this exemption must not become
|
|
73
|
+
(NFR-004).
|
|
74
|
+
- **`evidenceCount` is nonzero — not standalone.** An earlier stage already recorded work against
|
|
75
|
+
this task, so resolve its class the same way every classifying stage does — proposing whichever
|
|
76
|
+
of `bug`, `refactor`, `dependency-change` or `trivial-edit` the recorded work already fits.
|
|
77
|
+
`do-implement` never serves `feature`; that class's implementation stage is `/do-execute-plan`.
|
|
78
|
+
```bash
|
|
79
|
+
"$DOFLOW" classify --task-class "<proposed>" --calling-skill do-implement --json
|
|
80
|
+
```
|
|
81
|
+
Branch on the returned `outcome`, not the exit code. `ACCEPTED` — the returned `workflow` names
|
|
82
|
+
the validated class to evaluate readiness against. `REJECTED` — stop, print `message` verbatim
|
|
83
|
+
(it names `validClasses`), ask the user to choose from that set, then re-validate; never
|
|
84
|
+
substitute `feature` for the class that was rejected.
|
|
85
|
+
- Evaluate readiness before modifying anything. `do-implement` is the declared one-off path, so
|
|
86
|
+
it states that mode explicitly — the exemption is a flag, never an inference:
|
|
87
|
+
```bash
|
|
88
|
+
"$DOFLOW" readiness --task-class "<validated class>" --task-id "<task id>" --mode standalone \
|
|
89
|
+
--verification-plan "<one line: how this change is verified>" --scope "<comma-separated paths this change touches>" --json
|
|
90
|
+
```
|
|
91
|
+
Every call records its evaluation; `verify` bounds the change by a `--scope` path list, so a
|
|
92
|
+
change with no plan states its paths here. Both are inputs you state, reported back as
|
|
93
|
+
`Caller-stated`. Add `--slug=<feature slug>` when the task id is not the feature's slug.
|
|
94
|
+
Both `--task-class` and `--task-id` are required — omitting either exits 2 and names the valid
|
|
95
|
+
set. Branch on the returned `stageEntry.decision`, never the exit code or your own reading of
|
|
96
|
+
`state`: the entry policy is owned by the runtime, and this verb exits 0 for every state it
|
|
97
|
+
computes, so a zero exit is not a green light.
|
|
98
|
+
- **`STOP`** — refuse to modify source. Report which claim is conflicted and what evidence
|
|
99
|
+
disagrees, then stop. Do not edit anyway.
|
|
100
|
+
- **`ASK_USER`** — a decision is owed by the user. Ask it through the `RULE_04_QUESTIONS.md`
|
|
101
|
+
mechanism and wait; editing first would decide it silently on their behalf.
|
|
102
|
+
- **`ENTER`** — proceed to the context-pack call below. In standalone mode this includes
|
|
103
|
+
`NEEDS_EVIDENCE`: the unmet contract is reported, not enforced — relay the missing
|
|
104
|
+
requirements in step 6's report rather than presenting the edit as fully evidenced. When a
|
|
105
|
+
run for this task has its implementation stage pending, `NEEDS_EVIDENCE` is not enough:
|
|
106
|
+
gather what the report lists and call `readiness` again until it reports `READY`, before
|
|
107
|
+
the first source edit.
|
|
108
|
+
(`GATHER_FIRST` is the workflow-mode answer and does not arise under `--mode standalone`.)
|
|
109
|
+
- Once readiness has cleared (or been confirmed non-blocking), compile the prior context:
|
|
110
|
+
```bash
|
|
111
|
+
"$DOFLOW" context-pack --task-id "<task id>" --json
|
|
112
|
+
```
|
|
113
|
+
This verb exits 1 on an empty pack by design — nothing recorded is not the same as nothing
|
|
114
|
+
needed — and that non-zero exit is never read as success. Because this call only runs after the
|
|
115
|
+
evidence check above already found something recorded for this task id, an exit 1 here means
|
|
116
|
+
the compiled pack still held nothing usable (evidence with no linked claims, most likely):
|
|
117
|
+
treat that as a mismatch worth naming in step 6's report, not as license to proceed as though
|
|
118
|
+
there were no prior context to look for. On a normal, non-empty pack, carry its evidence and
|
|
119
|
+
claims into step 4's change set instead of re-deriving what an earlier stage already
|
|
120
|
+
established.
|
|
121
|
+
- The repository's `pre-implement-gate` hook checks file existence (`requirement.md` /
|
|
122
|
+
`design.md` / `plan.md`) on every `Edit`/`Write` call regardless of which skill is editing. On
|
|
123
|
+
a harness with an edit hook it also denies the edit of a task held to a readiness record that
|
|
124
|
+
is not `READY`; this step writes that record, and is not a way around the hook.
|
|
125
|
+
|
|
126
|
+
3. **Understand before writing**:
|
|
127
|
+
- Read the files the change touches and their immediate neighbors — naming conventions, error
|
|
128
|
+
handling style, test structure — before writing anything. Evidence over assumption applies
|
|
129
|
+
here exactly as everywhere else in DoFlow: match what the codebase already does rather than
|
|
130
|
+
importing an unrelated house style.
|
|
131
|
+
|
|
132
|
+
4. **Name the change set, then continue**:
|
|
133
|
+
- Before touching anything, write the change set out file by file: each file to be edited, the
|
|
134
|
+
change it takes, and what that change is for. Name what you are deliberately leaving alone.
|
|
135
|
+
The pass that decides what to change is still not the pass that makes it — deciding and
|
|
136
|
+
typing in one move is how the first plausible shape becomes the design — but the separation
|
|
137
|
+
is an ORDERING inside this run, not a turn boundary.
|
|
138
|
+
- The user asking to implement IS the authorization to implement: proceed to step 5 in the same
|
|
139
|
+
run. Ending the turn here to await approval the user already gave costs a round-trip and
|
|
140
|
+
duplicates the host's own edit-approval mechanisms.
|
|
141
|
+
- Stop after the change set only when one of two things is true: the user asked for the plan
|
|
142
|
+
rather than the change ("show me what you'd change first"), or naming the change set surfaced
|
|
143
|
+
a genuine user-owned decision — then ask it per `RULE_04_QUESTIONS.md` and wait, because
|
|
144
|
+
editing first would decide it silently.
|
|
145
|
+
|
|
146
|
+
5. **Implement**:
|
|
147
|
+
- Make the complete change end-to-end. Never leave placeholder stubs (e.g. `// TODO: implement`),
|
|
148
|
+
unimplemented mock functions, or `throw new Error('Not implemented')` placeholders in the
|
|
149
|
+
produced change. Every changed component must be fully wired and functional.
|
|
150
|
+
- Before the first source edit, a run for this task needs step 2's recorded readiness to be
|
|
151
|
+
`READY`: the hook denies the edit otherwise where there is one, and elsewhere step 7's handoff
|
|
152
|
+
is refused after the edits are made. A standalone `NEEDS_EVIDENCE` does not pass it.
|
|
153
|
+
- Keep it scoped to what was asked — no bonus refactors, no speculative abstractions (the same
|
|
154
|
+
scope-discipline rule the chain's own artifacts would otherwise remind you of; here, hold
|
|
155
|
+
yourself to it directly).
|
|
156
|
+
- Add or update tests when the codebase already has a test convention to extend; skip it when
|
|
157
|
+
there is not one, rather than inventing a test harness the project doesn't otherwise use.
|
|
158
|
+
- When `paths --json` reports `has_decisions: true`, follow steps 1-4 of the decision step in
|
|
159
|
+
the guidance tree's `references/WORKFLOW_HANDOFF.md` once the change is made, whether or not
|
|
160
|
+
step 7 records a handoff, and before any handoff call.
|
|
161
|
+
|
|
162
|
+
6. **Verify — name the check set before running it**:
|
|
163
|
+
- First, list the build/test/lint commands you found and where each came from (`package.json`
|
|
164
|
+
scripts, a `Makefile`, an obvious test runner config). That list is the contract for this
|
|
165
|
+
step; state it before running anything.
|
|
166
|
+
- Then run each one and report its result against that list. A command the list named and the
|
|
167
|
+
run did not reach is reported as not run, and a command the project does not have is reported
|
|
168
|
+
as absent — neither is dropped from the report. Never mark something done against a failing
|
|
169
|
+
suite.
|
|
170
|
+
|
|
171
|
+
7. **Record the handoff — skip only when step 2 took the standalone exemption**:
|
|
172
|
+
- Step 2's standalone exemption (`evidenceCount` 0) means there was never a task id to begin
|
|
173
|
+
with — skip this step entirely; there is nothing to record against.
|
|
174
|
+
- Otherwise, `<task id>` and the validated class are the same ones step 2 already resolved.
|
|
175
|
+
Record this skill's completion of the implementation stage:
|
|
176
|
+
```bash
|
|
177
|
+
"$DOFLOW" orchestrate --action handoff --task-id "<task id>" --calling-skill do-implement --note "<one line: what was implemented>" --result <passed|failed> --json
|
|
178
|
+
```
|
|
179
|
+
Name the `DEC-###` ids step 5 registered in `--note`.
|
|
180
|
+
A handoff on a run whose implementation stage has a readiness template is refused unless
|
|
181
|
+
step 2's recorded readiness is `READY`.
|
|
182
|
+
Use step 6's verification outcome for `--result`: `passed` when every check in the named set
|
|
183
|
+
passed, `failed` when one did not — never omit it to imply a pass step 6 did not establish.
|
|
184
|
+
The runtime selects this class's implementation stage — the only mutating stage a caller may
|
|
185
|
+
complete — and returns `disposition`. `deferred` means a gate, an unfinished mutating stage
|
|
186
|
+
elsewhere, or a rejected run prevented it; report `reason` and stop, this skill resolves no
|
|
187
|
+
gate. Render the trail after a recorded completion:
|
|
188
|
+
```bash
|
|
189
|
+
"$DOFLOW" render-audit --slug="<task id>" --json
|
|
190
|
+
```
|
|
191
|
+
- Without this call, the orchestrator's cursor never advances past `implementation` for any
|
|
192
|
+
class that routes here — `bug`, `refactor`, `dependency-change`, `trivial-edit` all do — and
|
|
193
|
+
every later stage's own handoff call is refused with `blocked-on-mutating-stage:implementation`
|
|
194
|
+
until this one runs.
|
|
195
|
+
|
|
196
|
+
8. **Report and hand off**:
|
|
197
|
+
- Summarize what changed, file by file, and why — not a restatement of the diff.
|
|
198
|
+
- If step 2 took the standalone exemption, state that plainly here — as visible as a block would
|
|
199
|
+
be, per NFR-004 — rather than only mentioning it in passing back in step 2. If step 2 evaluated
|
|
200
|
+
readiness instead, name the state it returned, whether the context pack held usable prior
|
|
201
|
+
context or came back mismatched-empty, and the handoff `disposition` step 7 recorded (or that
|
|
202
|
+
step 7 was skipped as standalone).
|
|
203
|
+
- Suggest `/do-code-review` as the natural next step, mirroring the pointer that skill's own
|
|
204
|
+
"Next Step" section already sends back here. If a chain feature's `plan.md` task happened to
|
|
205
|
+
get addressed along the way, say so explicitly rather than silently — `plan.md` bookkeeping
|
|
206
|
+
itself stays `/do-execute-plan`'s responsibility, not this skill's.
|
|
207
|
+
|
|
208
|
+
## Boundaries
|
|
209
|
+
|
|
210
|
+
**Will:** Implement directly from a description, review findings, or a named task; read and match
|
|
211
|
+
existing repo conventions before writing; run whatever test/lint suite the project already has;
|
|
212
|
+
work in any repo, whether or not it uses the DoFlow chain at all; record the stage handoff through
|
|
213
|
+
`orchestrate`/`render-audit` when this run is not standalone, so the orchestrator's cursor can
|
|
214
|
+
advance past the mutating stage only this skill may complete.
|
|
215
|
+
|
|
216
|
+
**Will Not:** Require or generate `requirement.md` / `design.md` / `plan.md`; orchestrate a
|
|
217
|
+
multi-task checklist through specialist subagents — that is `/do-execute-plan`'s job once a real
|
|
218
|
+
plan exists; silently override the repository's own `pre-implement-gate` hook. That hook triggers
|
|
219
|
+
on any `Edit`/`Write` call, not on which skill made it — a branch mid-chain with a started feature
|
|
220
|
+
but no `design.md` still gets blocked here exactly as it would anywhere else, and that is by
|
|
221
|
+
design, not a gap this skill works around. Resolve a workflow gate, or start a workflow run for a
|
|
222
|
+
standalone implementation.
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: do-plan
|
|
3
|
+
description: "Generate the implementation plan (HOW) and dependency-ordered task checklist from requirement.md + design.md (plus design/specs.md's IC-### interface contracts when the feature has one), with a Constitution Check gate, as Phase 3 of the doflow chain. Use whenever requirement.md and design.md exist and the next step is creating an actionable, owner-and-file-scoped task breakdown before implementation, or when the user says 'create an implementation plan', 'break this down into tasks', 'plan the work', or 'plan Phase 3'. Always activate this skill before executing feature implementation."
|
|
4
|
+
argument-hint: "[--depth shallow|normal|deep]"
|
|
5
|
+
effort: high
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# do-plan
|
|
9
|
+
|
|
10
|
+
Phase 3 of the doflow chain. Turns `requirement.md` (WHAT/WHY) + `design.md` (system shape) — and
|
|
11
|
+
`design/specs.md`'s `IC-###` interface contracts when `/do-design` wrote one — into `plan.md` (HOW to
|
|
12
|
+
implement, plus the dependency-ordered task checklist).
|
|
13
|
+
|
|
14
|
+
## Invocation
|
|
15
|
+
```text
|
|
16
|
+
/do-plan [--depth shallow|normal|deep]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Behavioral Flow
|
|
20
|
+
|
|
21
|
+
1. **Resolve** — run the resolver, parse JSON. Every DoFlow runtime call in this skill goes through
|
|
22
|
+
the runtime seam. Resolve it **once** here and reuse `$DOFLOW` for every later call in this skill:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Resolve the DoFlow runtime: nearest project install wins, then the global one.
|
|
26
|
+
D=$PWD; while [ "$D" != / ] && [ ! -x "$D/.doflow/scripts/doflow/bin/doflow-run" ]; do D=$(dirname "$D"); done
|
|
27
|
+
DOFLOW="$D/.doflow/scripts/doflow/bin/doflow-run"
|
|
28
|
+
[ -x "$DOFLOW" ] || DOFLOW="$HOME/.doflow/scripts/doflow/bin/doflow-run"
|
|
29
|
+
[ -x "$DOFLOW" ] || { echo "doflow: no runtime found in any .doflow/ above $PWD, nor at $HOME/.doflow. Run: npx @khoavu882/doflow install -t <harness>" >&2; exit 2; }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run every command below from the project root — the walk-up starts at `$PWD`. On exit 2, print the message verbatim and stop; it names every path searched.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
"$DOFLOW" paths --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`feature_slug` `null` with a non-empty `candidate_slugs` is an unresolved choice, not "no active feature": ask one option per entry, re-resolve with `"$DOFLOW" paths --json --slug="<chosen>"`, and use that slug for the rest of this flow. `/do-flow` passing `--slug` already resolves it — no prompt then.
|
|
39
|
+
|
|
40
|
+
2. **Propose one task class; the runtime validates it** — name exactly one class id for the work
|
|
41
|
+
being planned. `/do-flow` passes one when it invoked this skill; a user who named one settles it;
|
|
42
|
+
otherwise derive it from `requirement.md` and `design.md`, not from their mere existence.
|
|
43
|
+
```bash
|
|
44
|
+
"$DOFLOW" classify --task-class "<proposed>" --calling-skill do-plan --json
|
|
45
|
+
```
|
|
46
|
+
Branch on the returned `outcome` field, not the exit code.
|
|
47
|
+
- **`ACCEPTED`** — the returned `workflow` is this run's plan of record; read `stages`, `gates` and `handoff` off it rather than from memory.
|
|
48
|
+
- **`REJECTED`** — **stop.** Print `message` verbatim (it already names `validClasses` and any `suggestions`), ask the user to choose from `validClasses`, then re-validate. Never substitute `feature`.
|
|
49
|
+
A rejection may be about **you** rather than the class (`reason: caller-not-a-stage`). Then the fix is to propose one of the classes in `fit.hostingClasses`, or to hand the work to the skill this class names for the stage you meant — not to re-propose the same class.
|
|
50
|
+
- **Exit 2** — surface the message verbatim and stop.
|
|
51
|
+
|
|
52
|
+
This skill is the accepted workflow's `planning` stage: state the class and the signal it rests on
|
|
53
|
+
in one line. Its `stageIds` are also what §8's phases must decompose toward, and its implementation
|
|
54
|
+
stage's `readinessTemplate` names the contract `/do-execute-plan` will be graded against — read them
|
|
55
|
+
off the returned object rather than assuming the six-stage feature chain. If the accepted `stageIds`
|
|
56
|
+
contain no `planning` stage, say so and hand off to the first stage they do name. Only `feature`
|
|
57
|
+
plans; `bug`, `refactor`, `dependency-change` and `trivial-edit` go straight from their analysis
|
|
58
|
+
stages to implementation, and writing them a `plan.md` adds a gate their workflow deliberately does
|
|
59
|
+
not have.
|
|
60
|
+
|
|
61
|
+
3. **Precondition (advisory)** — if `has_requirement` or `has_design` is false, warn and offer to
|
|
62
|
+
run `/do-brainstorm` / `/do-design` first. This gate is **advisory** (skippable), not the hard
|
|
63
|
+
hook gate.
|
|
64
|
+
4. **Read inputs** — compile the recorded prior context first, using the same task id rule step 10
|
|
65
|
+
uses below (the plan task id for anything already scoped to a single `- [ ]` task, otherwise the
|
|
66
|
+
feature slug):
|
|
67
|
+
```bash
|
|
68
|
+
"$DOFLOW" context-pack --task-id "<task id>" --json
|
|
69
|
+
```
|
|
70
|
+
**Exit 1 means the pack came back empty.** By this point `do-design` should already have batched
|
|
71
|
+
its own stage-boundary evidence and claims (its step 8), so an empty pack here carries more
|
|
72
|
+
weight than it does at design time: either that batch never ran, or this task id doesn't match
|
|
73
|
+
the one design used. Treat it as advisory rather than blocking — plan's hard gate is artifact
|
|
74
|
+
existence only — but say so plainly in this stage's report, and in `plan.md`'s own §3 "Research &
|
|
75
|
+
Decisions": a decision written straight from `requirement.md`/`design.md` prose, with no compiled
|
|
76
|
+
pack behind it, must not be recorded as if it traced to prior evidence it doesn't have. When the
|
|
77
|
+
pack is non-empty, read it alongside `requirement.md`, `design.md`, and the constitution.
|
|
78
|
+
**Also read `specs.md` when step 1's `has_specs` is true** — use that flag, never a filesystem
|
|
79
|
+
check of your own, and read the `specs` path the resolver returned. `/do-design` moves the
|
|
80
|
+
interface and data-model contracts out of `design.md` into `specs.md` §1 as numbered `IC-###`
|
|
81
|
+
entries, so on a feature that has one, `design.md`'s §4/§5 are a pointer and the contracts this
|
|
82
|
+
plan must decompose toward live only in `specs.md`. Planning from `design.md` alone on such a
|
|
83
|
+
feature plans against a pointer. When `has_specs` is false (an old-layout feature dir, which never
|
|
84
|
+
had a `specs.md`), the contracts are still in `design.md` §4/§5 and there is nothing extra to
|
|
85
|
+
read. Read
|
|
86
|
+
`constitution_base`,
|
|
87
|
+
then read `constitution_local` **only when `has_constitution_local` is true** — use that flag,
|
|
88
|
+
never a filesystem check of your own (path math belongs to the resolver). You then reconcile the
|
|
89
|
+
two tiers yourself, tier-2 taking precedence: nothing hands you a merged set. See
|
|
90
|
+
the guidance tree's `references/DOFLOW_CHAIN.md` → "Two-tier constitution" for what is computed
|
|
91
|
+
and what is convention.
|
|
92
|
+
5. **Write `plan.md`, sections 1–7** — copy the plan template to the `plan` path step 1 resolved
|
|
93
|
+
(`<feature_dir>/plan.md`, the same flat location under both the structured and legacy layouts),
|
|
94
|
+
`mkdir -p`-ing its parent directory first.
|
|
95
|
+
The template is `templates/doflow/plan-template.md` in the install step 1 resolved: take `constitution_base` from that JSON and swap its trailing `guidance/references/CONSTITUTION_BASE.md` for that path.
|
|
96
|
+
Fill `[REQUIREMENT_PATH]`/`[DESIGN_PATH]` with that same step 1 resolution's `requirement`/`design`
|
|
97
|
+
fields, verbatim (repo-root-relative, exactly as the resolver returns them) — never hand-written
|
|
98
|
+
`./` links, which assume the artifact sits next to `plan.md`; under `layout: structured` it
|
|
99
|
+
instead sits in a sibling subdirectory, and only the resolver's own field says which.
|
|
100
|
+
Fill it: approach, research/decisions that resolve every `[NEEDS CLARIFICATION]` from the
|
|
101
|
+
requirement, components, data/contracts, risks, validation strategy.
|
|
102
|
+
§5 "Data / Contracts" cites contracts by id, not by pointer: when step 4 read a `specs.md`, name
|
|
103
|
+
the `IC-###` ids that this plan's tasks implement or consume, one per contract, so a task can be
|
|
104
|
+
traced to the contract it satisfies. Pointing §5 at `design.md` is only correct when `has_specs`
|
|
105
|
+
is false and the contracts genuinely still live there.
|
|
106
|
+
When the feature has a `data-model.md` (check the resolver's `has_data_model` flag, the same way
|
|
107
|
+
`has_specs` is already checked), also name any entities/tables from its schema catalog that this
|
|
108
|
+
plan's tasks touch, citing them by the name the schema catalog already gives them — never
|
|
109
|
+
inventing a new id scheme, since `data-model.md` carries no `ID`-bearing index the way `specs.md`
|
|
110
|
+
does.
|
|
111
|
+
**Stop when** every `[NEEDS CLARIFICATION]` marker / open decision the contract names has an answer or a stated gap, **and** the last round produced no new `[NEEDS CLARIFICATION]` marker / open decision. A round that only restates what you already have is the last round. Report the remaining gaps rather than continuing.
|
|
112
|
+
Structure the artifact per the guidance tree's `references/ARTIFACT_FORMAT.md` — read it before filling the template; it names which of this artifact's sections take an index-then-detail table.
|
|
113
|
+
Filling §8's task dependency graph, read the guidance tree's `references/DIAGRAM_GUIDE.md` first — §4 above names the slot, that file governs what goes in it: the `flowchart` node and edge ceilings, the direction convention, and the rule for splitting a graph that outgrows them.
|
|
114
|
+
Its §5 governs §8's `### Task Summary` rollup — the per-task `- [ ]` checklist stays the single
|
|
115
|
+
source of truth and is never mirrored into a per-task index.
|
|
116
|
+
Read `references/ARTIFACT_VOICE.md` at the same point: it carries the prose rules the artifact's sentences follow, and the carve-outs where one of those rules meets a construct the checker parses.
|
|
117
|
+
This stage fills the plan from requirement + design + constitution rather than by eliciting, so
|
|
118
|
+
it writes no dialogue log — its sibling stages' `intention/`/`design/` question files have no
|
|
119
|
+
counterpart here. Should a future revision of this skill add an `AskUserQuestion` clarification
|
|
120
|
+
loop, each of its rounds logs to `plan-<NN>-question.md` at the feature root exactly as
|
|
121
|
+
`/do-brainstorm` and `/do-design` log theirs to their own subdirectories, numbered from step 1's
|
|
122
|
+
`plan_next_round`.
|
|
123
|
+
6. **Constitution Check (advisory gate)** — evaluate the plan against both tiers as reconciled in
|
|
124
|
+
step 4. On a violation, STOP and revise the approach before continuing, then record PASS/FAIL in
|
|
125
|
+
the plan. The verdict is **advisory**: it is recorded in `plan.md` §2 "Constitution Check" and nothing downstream
|
|
126
|
+
blocks on it — the chain's one hard gate covers artifact existence only. Stopping on a violation
|
|
127
|
+
is a discipline this skill observes, not something a hook enforces.
|
|
128
|
+
7. **Decompose into Tasks (section 8)** — dependency-ordered, `[US#]`-traced to the requirement's
|
|
129
|
+
user stories, owner+files named per task, with checkpoints and completion criteria.
|
|
130
|
+
Read the guidance tree's `references/ORCHESTRATION.md` and
|
|
131
|
+
`references/MODEL_SELECTION.md` before assigning agent owners and write sets.
|
|
132
|
+
`--depth shallow|normal|deep` is the single granularity knob: it sets how finely a phase is
|
|
133
|
+
split into tasks and how much detail each task carries. Default `normal`.
|
|
134
|
+
**Why explicit task scoping and `[P]` markers**: Specifying concrete file paths (`files: [...]`)
|
|
135
|
+
and named specialist owners (`system-architect`, `core-implementer`, `quality-guardian`) per task
|
|
136
|
+
enables `/do-execute-plan` to compute write-set isolation (`parallel-check`). Tasks with disjoint
|
|
137
|
+
file sets run concurrently without merge conflicts, while overlapping tasks are safely serialized.
|
|
138
|
+
**Mark `[P]` by default:** parallel execution is the framework default, so apply `[P]` to every
|
|
139
|
+
task whose `files:` set is disjoint from its phase siblings' and leave it off only where a real
|
|
140
|
+
dependency forces the order — an unmarked task is the exception that owes a reason, not the norm.
|
|
141
|
+
Siblings that write any path in common are not parallel-safe however independent they otherwise
|
|
142
|
+
look, so compare the actual `files:` sets rather than judging by description. Do not change the
|
|
143
|
+
marker's syntax or meaning: unmarked still means sequential, which is what keeps plans written
|
|
144
|
+
before this rule behaving as they always did.
|
|
145
|
+
Set `depends-on:` on a task when it references a service (via its
|
|
146
|
+
`files:` or description) that has no owning task in this plan and is external to what the plan
|
|
147
|
+
builds. When such a dependency has no local repo at all (a vendor API, a SaaS integration) but
|
|
148
|
+
*does* have a documented contract, also set `external-contract:` pointing to a doc built from
|
|
149
|
+
`templates/doflow/external-contract-template.md` — `/do-execute-plan --scaffold` generates a real
|
|
150
|
+
frame from it instead of silently skipping the dependency (its default when `external-contract:` is
|
|
151
|
+
absent). The `- [ ]` checkboxes are the execution contract `/do-execute-plan`
|
|
152
|
+
parses — keep the marker syntax intact, don't reflow it into prose.
|
|
153
|
+
8. **Derive branch plan** — read `requirement.md`'s `**Ticket:**` field (absent/`none` → no
|
|
154
|
+
ticket). Branch name: `feat/<TICKET>-<slug-description>` (ticket present, slug's leading
|
|
155
|
+
`NNN-` stripped) or `feat/<slug>` (no ticket). Resolve a repo for each task's `files:` path
|
|
156
|
+
*and* each task's `depends-on:` value the same way — walk up to the nearest `.git`; if a
|
|
157
|
+
`depends-on:` value doesn't resolve to a `.git` (not a real local path), skip that row rather
|
|
158
|
+
than guessing. `external-contract:` never participates in this derivation — it names a doc in this
|
|
159
|
+
same repo, not an external service repo. Write one row per repo to `plan.md`'s Repo Branch Plan
|
|
160
|
+
table: `primary` if it owns a task via `files:`, `dependency-only` if it's only ever reached via
|
|
161
|
+
`depends-on:`. A single-repo result → `N/A: single-repo feature`. Derivation only — no branch is
|
|
162
|
+
created here (`/do-execute-plan`'s job, lazily, per repo).
|
|
163
|
+
9. **Validate** — run the advisory consistency check and surface any findings verbatim:
|
|
164
|
+
```bash
|
|
165
|
+
"$DOFLOW" validate "<plan path>"
|
|
166
|
+
```
|
|
167
|
+
This also verifies each `### Task Summary` rollup row against the `- [ ]` lines under its
|
|
168
|
+
`### Phase <X>` heading. Surface findings verbatim; a non-zero exit is advisory and does not halt
|
|
169
|
+
the chain.
|
|
170
|
+
10. **Batch this stage's evidence** — one pass here at the stage boundary, never one call per fact.
|
|
171
|
+
`<task id>` is the unit these stores key on: the plan task id for anything scoped to a single
|
|
172
|
+
`- [ ]` task, otherwise the feature slug. Use the same id for every `evidence`, `claim` and
|
|
173
|
+
`readiness` call that concerns it — a different id reads a different task's record.
|
|
174
|
+
```bash
|
|
175
|
+
"$DOFLOW" evidence --task-id "<task id>" --action add --batch <batch>.json --json
|
|
176
|
+
"$DOFLOW" claim --task-id "<task id>" --action add --statement "<one conclusion>"
|
|
177
|
+
```
|
|
178
|
+
Item schema, provenance rules, and the refused-field list: the guidance tree's `references/EVIDENCE_LEDGER.md`. Read it before writing the batch.
|
|
179
|
+
This stage's items are §3 "Research & Decisions" of the `plan.md` you just wrote: per decision,
|
|
180
|
+
what was found, where it came from, and its locator. Add each §3 decision as a claim in the same pass: by `D#`, or, with a register, new
|
|
181
|
+
planning decisions by statement (their `DEC-###` IDs are written back at the handoff step).
|
|
182
|
+
11. **Record the handoff** — read the guidance tree's `references/WORKFLOW_HANDOFF.md`.
|
|
183
|
+
Use the feature slug as `<task id>`; if no feature is active, this is standalone and there is
|
|
184
|
+
no workflow handoff. After completing this skill's work:
|
|
185
|
+
```bash
|
|
186
|
+
"$DOFLOW" orchestrate --action handoff --task-id "<task id>" --calling-skill do-plan --task-class "<validated class>" --note "<work completed and verification result>" --json
|
|
187
|
+
```
|
|
188
|
+
The runtime selects this skill's stage, records completion or a rerun annotation, and returns
|
|
189
|
+
`disposition`. Report `deferred` with its `reason`; resolve no gate in this skill.
|
|
190
|
+
`standalone` means no run was created. Render the trail after a recorded handoff:
|
|
191
|
+
```bash
|
|
192
|
+
"$DOFLOW" render-audit --slug="<task id>" --json
|
|
193
|
+
```
|
|
194
|
+
Leave any returned approval gate for `/do-flow` or `/do-execute-plan` to present.
|
|
195
|
+
|
|
196
|
+
12. **Stop** — report the plan path, Constitution Check result, the task count (`[P]`/sequential),
|
|
197
|
+
and the derived branch name/repo count when the Repo Branch Plan is populated.
|
|
198
|
+
|
|
199
|
+
## Embedded feature research
|
|
200
|
+
|
|
201
|
+
For an external fact gap or explicit request, follow the conditional protocol in `../do-document/references/embedded-research.md` before stage completion.
|
|
202
|
+
|
|
203
|
+
## Boundaries
|
|
204
|
+
**Will:** propose a task class and have the runtime validate it, read requirement + design + specs
|
|
205
|
+
(when `has_specs`) + constitution, cite `specs.md`'s `IC-###` contracts in §5, write `plan.md`
|
|
206
|
+
including its embedded task checklist and Repo Branch Plan, run the
|
|
207
|
+
Constitution Check, resolve clarifications, batch the stage's evidence and claims at the boundary,
|
|
208
|
+
and record the stage handoff through `orchestrate`/`render-audit`.
|
|
209
|
+
**Will Not:** write `design.md` or `specs.md` (that's `/do-design`) — it cites their contracts, it
|
|
210
|
+
does not author or amend them — write code, execute the plan, decide the
|
|
211
|
+
approval gate its own handoff opens, create any
|
|
212
|
+
git branch (derivation only), plan under a class the runtime rejected or replaced with `feature`,
|
|
213
|
+
call `readiness` for a stage that declares no template; or express evidence, an estimate or readiness as a number, a percentage or a confidence.
|
|
214
|
+
|
|
215
|
+
## CRITICAL BOUNDARIES
|
|
216
|
+
**STOP AFTER PLAN CREATION.** Output: `agent-docs/doflow/<slug>/plan.md` (HOW + tasks).
|
|
217
|
+
|
|
218
|
+
**Next Step:** `/do-execute-plan` to execute the tasks. The implement phase is gated: it requires
|
|
219
|
+
`requirement.md`, `design.md`, and `plan.md` to all exist.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: do-test
|
|
3
|
+
description: "Execute project builds, automated test suites, and coverage verification with intelligent error reporting across whatever toolchain the repo already uses. Use whenever the user wants to run existing tests, execute test suites, verify builds, check test coverage, or check compile status (e.g., 'run the tests', 'execute test suite', 'check coverage', 'verify build', 'does this still build'). Always activate this skill when verifying test suites or running builds without writing new application code."
|
|
4
|
+
argument-hint: "[target] [--clean] [--watch]"
|
|
5
|
+
effort: medium
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# do-test
|
|
9
|
+
|
|
10
|
+
Unified build verification and test runner for DoFlow projects.
|
|
11
|
+
|
|
12
|
+
## Invocation
|
|
13
|
+
```text
|
|
14
|
+
/do-test [target] [--clean] [--watch]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Behavioral Flow
|
|
18
|
+
|
|
19
|
+
1. **Resolve the runtime** — every DoFlow runtime call in this skill goes through the runtime seam.
|
|
20
|
+
Resolve it **once** here and reuse `$DOFLOW` for every later call in this skill:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Resolve the DoFlow runtime: nearest project install wins, then the global one.
|
|
24
|
+
D=$PWD; while [ "$D" != / ] && [ ! -x "$D/.doflow/scripts/doflow/bin/doflow-run" ]; do D=$(dirname "$D"); done
|
|
25
|
+
DOFLOW="$D/.doflow/scripts/doflow/bin/doflow-run"
|
|
26
|
+
[ -x "$DOFLOW" ] || DOFLOW="$HOME/.doflow/scripts/doflow/bin/doflow-run"
|
|
27
|
+
[ -x "$DOFLOW" ] || { echo "doflow: no runtime found in any .doflow/ above $PWD, nor at $HOME/.doflow. Run: npx @khoavu882/doflow install -t <harness>" >&2; exit 2; }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run every command below from the project root — the walk-up starts at `$PWD`. On exit 2, print the message verbatim and stop; it names every path searched.
|
|
31
|
+
|
|
32
|
+
2. **State the contract before running anything** — compile it, do not recall it:
|
|
33
|
+
|
|
34
|
+
`<task id>` is the plan task id when the run is scoped to one task, otherwise the feature slug —
|
|
35
|
+
the same id every other stage used for it. `--risk` is an input the caller supplies: omitted, the
|
|
36
|
+
contract compiles at the registry's default; a change touching security, auth, payments or data
|
|
37
|
+
migration is what `HIGH` is for, and the level also sets `maxRecoveryIterations`.
|
|
38
|
+
|
|
39
|
+
Optionally ask for a decision-model second opinion before compiling the contract:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
"$DOFLOW" advise --kind verify-risk --state "<what the change touches, one paragraph>" --static "<the level you chose>" --task-id "<task id>" --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
When `status` is `answered` and `agrees` is `false`, say so in one line and keep or change the level
|
|
46
|
+
by your own judgement. Record the level used with `"$DOFLOW" advise --action outcome --pick-id
|
|
47
|
+
"<pickId>" --actual "<level>"`. Skip both calls when `status` is not `answered`.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
"$DOFLOW" verify --task-id "<task id>" --risk "<LOW|MEDIUM|HIGH|CRITICAL>" --action contract --json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Report, before a single tier runs:
|
|
54
|
+
- the compiled `tiers[]` in the order returned — that list, and nothing else, is what will run;
|
|
55
|
+
- the `riskLevel` it compiled at and the `maxRecoveryIterations` it carries;
|
|
56
|
+
- `detection.absent` — the command roles the runtime could not find in this repo's manifests
|
|
57
|
+
(`detection.manifests` names what it read). Those are the tiers most likely to come back
|
|
58
|
+
unresolved, and naming them up front is the difference between a gap and a surprise.
|
|
59
|
+
|
|
60
|
+
Detection belongs to the verb. Do not re-derive the toolchain by hand, and do not substitute a
|
|
61
|
+
runner the contract did not compile.
|
|
62
|
+
|
|
63
|
+
3. **Run the contract and report against it**:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
"$DOFLOW" verify --task-id "<task id>" --risk "<the same level>" --action report --json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
When an explicit manifest and pinned ancestor baseline are provided, pass `--verification-input <file> --verification-phase postimplementation --baseline-ref <ref>`; the verdict proves current checks under postimplementation chronology without claiming preimplementation compilation.
|
|
70
|
+
|
|
71
|
+
Every tier step 2 listed gets a status in the report — `PASS`, `FAIL`, `UNRESOLVED`, `SUBSUMED`,
|
|
72
|
+
`NOT_APPLICABLE`, `SKIPPED` or `NOT_RUN`. Report all of them. A tier the contract named and the
|
|
73
|
+
run did not reach is reported as unreached, never omitted.
|
|
74
|
+
**Stop when** every required tier the contract names has an answer or a stated gap, **and** the last round produced no new required tier. A round that only restates what you already have is the last round. Report the remaining gaps rather than continuing.
|
|
75
|
+
|
|
76
|
+
4. **Read the verdict as it stands**:
|
|
77
|
+
- A tier whose command cannot be detected is `UNRESOLVED`, and one unresolved required tier makes
|
|
78
|
+
the whole run `INCONCLUSIVE`. The verb computes that and returns it in `status` with a `reason`
|
|
79
|
+
naming the tiers — report it as it stands. Never call a check passed that was not run, and
|
|
80
|
+
never narrow the set to make the report green.
|
|
81
|
+
- Coverage comes with the test tiers and with what the detected runner already emits, not from a
|
|
82
|
+
separate request: report line and branch numbers when the runner produces them, and say
|
|
83
|
+
plainly that it does not when it does not.
|
|
84
|
+
- `--clean` forces a clean compile before the deterministic tiers run.
|
|
85
|
+
- `--watch` launches interactive watcher mode when the detected runner supports it. It is an
|
|
86
|
+
interactive session, not a verification run: it produces no contract verdict.
|
|
87
|
+
|
|
88
|
+
5. **Diagnostics & Reporting**:
|
|
89
|
+
- Report pass/fail summaries, exact failure traces, and affected requirements.
|
|
90
|
+
- Never skip or delete failing tests to force passing status.
|
|
91
|
+
|
|
92
|
+
6. **Record the handoff** — read the guidance tree's `references/WORKFLOW_HANDOFF.md`.
|
|
93
|
+
Use the feature slug as `<task id>`; if no feature is active, this is standalone and there is
|
|
94
|
+
no workflow handoff. After completing this skill's work:
|
|
95
|
+
```bash
|
|
96
|
+
"$DOFLOW" orchestrate --action handoff --task-id "<task id>" --calling-skill do-test --note "<work completed and verification result>" --result <passed|failed> --json
|
|
97
|
+
```
|
|
98
|
+
The runtime selects this skill's stage, records completion or a rerun annotation, and returns
|
|
99
|
+
`disposition`. Report `deferred` with its `reason`; resolve no gate in this skill.
|
|
100
|
+
`standalone` means no run was created. Render the trail after a recorded handoff:
|
|
101
|
+
```bash
|
|
102
|
+
"$DOFLOW" render-audit --slug="<task id>" --json
|
|
103
|
+
```
|
|
104
|
+
`passed` means the contract was met, including an expected failure in a reproduction stage.
|
|
105
|
+
Use `failed` when it was not met; missing verification is `unverified`, never an implied pass.
|
|
106
|
+
|
|
107
|
+
## Embedded feature research
|
|
108
|
+
|
|
109
|
+
For an external fact gap or explicit request, follow the conditional protocol in `../do-document/references/embedded-research.md` before stage completion.
|
|
110
|
+
|
|
111
|
+
## Boundaries
|
|
112
|
+
**Will:** Run the compiled tiers, report every status (including unreached), coverage, and failure traces; hand off the current stage in a chain.
|
|
113
|
+
**Will Not:** Write tests or build config, narrow tiers, invent a verdict, resolve gates, or start a standalone run.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# [PROJECT NAME] Constitution
|
|
2
|
+
|
|
3
|
+
**Version:** 0.1.0 · **Ratified:** [DATE] · **Last amended:** [DATE]
|
|
4
|
+
|
|
5
|
+
<!-- SYNC IMPACT REPORT (filled by /do-constitution on each change):
|
|
6
|
+
version: [old] → [new] · changed: [...] · propagated to: [...] -->
|
|
7
|
+
|
|
8
|
+
> Persistent, cross-feature rules every phase and agent inherits. This is the **tier-2**
|
|
9
|
+
> per-repo overlay on top of `CONSTITUTION_BASE.md`; these rules take precedence on conflict.
|
|
10
|
+
> The overlay is performed by the chain skill reading both files — see `DOFLOW_CHAIN.md` →
|
|
11
|
+
> "Two-tier constitution" for what is computed and what is convention. Bump the version (semver)
|
|
12
|
+
> on any change and fill the Sync Impact Report above.
|
|
13
|
+
|
|
14
|
+
## Principles
|
|
15
|
+
|
|
16
|
+
### [PRINCIPLE_1_NAME]
|
|
17
|
+
[PRINCIPLE_1_STATEMENT — testable and non-negotiable.]
|
|
18
|
+
|
|
19
|
+
### [PRINCIPLE_2_NAME]
|
|
20
|
+
[PRINCIPLE_2_STATEMENT.]
|
|
21
|
+
|
|
22
|
+
## Constraints
|
|
23
|
+
- [stack / tooling / process constraint specific to this repo].
|
|
24
|
+
|
|
25
|
+
## Governance
|
|
26
|
+
- Amendments: bump semver, fill the Sync Impact Report, re-run dependent gates.
|
|
27
|
+
- `/do-plan`'s Constitution Check MUST evaluate against both tiers together (these rules taking
|
|
28
|
+
precedence). Its verdict is advisory — recorded, not blocking.
|