freeharness 0.4.1
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/NOTICE +108 -0
- package/README.md +134 -0
- package/canonical/HARVEST.yaml +858 -0
- package/canonical/PROVENANCE.yaml +740 -0
- package/canonical/agents/README.md +95 -0
- package/canonical/agents/agentic-architect.md +18 -0
- package/canonical/agents/database-reviewer.md +41 -0
- package/canonical/agents/explorer-ai-engineer-analyst.md +65 -0
- package/canonical/agents/pr-reviewer.md +96 -0
- package/canonical/agents/python-reviewer.md +55 -0
- package/canonical/agents/report-formatter.md +19 -0
- package/canonical/agents/security-reviewer.md +53 -0
- package/canonical/agents/test-writer.md +34 -0
- package/canonical/commands/fh-context.md +37 -0
- package/canonical/evals/promptfoo.redteam.yaml +108 -0
- package/canonical/hooks/cost-prices.json +14 -0
- package/canonical/hooks/freeharness-auto-memory.mjs +158 -0
- package/canonical/hooks/freeharness-config-guard.mjs +162 -0
- package/canonical/hooks/freeharness-context-monitor.mjs +198 -0
- package/canonical/hooks/freeharness-converge.mjs +227 -0
- package/canonical/hooks/freeharness-cost-tracker.mjs +1027 -0
- package/canonical/hooks/freeharness-memory-guard.mjs +57 -0
- package/canonical/hooks/freeharness-output-pruner.mjs +333 -0
- package/canonical/hooks/freeharness-precompact.mjs +323 -0
- package/canonical/hooks/freeharness-repeat-tool.mjs +208 -0
- package/canonical/hooks/freeharness-security-guidance.mjs +164 -0
- package/canonical/hooks/freeharness-session-start +583 -0
- package/canonical/hooks/hooks.auto-memory.claude-code.json +16 -0
- package/canonical/hooks/hooks.claude-code.json +17 -0
- package/canonical/hooks/hooks.config-guard.claude-code.json +16 -0
- package/canonical/hooks/hooks.context-monitor.claude-code.json +15 -0
- package/canonical/hooks/hooks.converge.claude-code.json +15 -0
- package/canonical/hooks/hooks.cost-tracker.claude-code.json +37 -0
- package/canonical/hooks/hooks.memory-guard.claude-code.json +16 -0
- package/canonical/hooks/hooks.output-pruner.claude-code.json +16 -0
- package/canonical/hooks/hooks.precompact.claude-code.json +15 -0
- package/canonical/hooks/hooks.repeat-tool.claude-code.json +25 -0
- package/canonical/hooks/hooks.security-guidance.claude-code.json +16 -0
- package/canonical/mcp/servers.json +20 -0
- package/canonical/openspec/config.base.yaml +89 -0
- package/canonical/openspec/schema.spec-driven.yaml +277 -0
- package/canonical/openspec/templates/data-contract.md +36 -0
- package/canonical/openspec/templates/design.md +84 -0
- package/canonical/openspec/templates/eval-plan.md +33 -0
- package/canonical/openspec/templates/follow-ups.md +2 -0
- package/canonical/openspec/templates/proposal.md +45 -0
- package/canonical/openspec/templates/spec.md +42 -0
- package/canonical/openspec/templates/tasks.md +38 -0
- package/canonical/profiles/local-llamacpp.LOCAL-MODELS.md +47 -0
- package/canonical/profiles/local-llamacpp.json +27 -0
- package/canonical/profiles/local-ollama.json +20 -0
- package/canonical/profiles/mcp.json +91 -0
- package/canonical/rules/CLAUDE.md +78 -0
- package/canonical/rules/project-CLAUDE.template.md +62 -0
- package/canonical/rules/routing.md +20 -0
- package/canonical/rules/safety.md +41 -0
- package/canonical/settings/settings.cache-hygiene.claude-code.json +5 -0
- package/canonical/skills/agent-evaluation/SKILL.md +102 -0
- package/canonical/skills/agent-evaluation/assets/evaluation_report_template.md +206 -0
- package/canonical/skills/agent-evaluation/evals/cases.yaml +106 -0
- package/canonical/skills/agent-evaluation/references/dataset-preparation.md +351 -0
- package/canonical/skills/agent-evaluation/references/scorers-constraints.md +165 -0
- package/canonical/skills/agent-evaluation/references/scorers.md +431 -0
- package/canonical/skills/agent-evaluation/references/setup-guide.md +252 -0
- package/canonical/skills/agent-evaluation/references/tracing-integration.md +164 -0
- package/canonical/skills/agent-evaluation/references/troubleshooting.md +514 -0
- package/canonical/skills/agent-evaluation/scripts/analyze_results.py +462 -0
- package/canonical/skills/agent-evaluation/scripts/create_dataset_template.py +382 -0
- package/canonical/skills/agent-evaluation/scripts/list_datasets.py +273 -0
- package/canonical/skills/agent-evaluation/scripts/run_evaluation_template.py +309 -0
- package/canonical/skills/agent-evaluation/scripts/setup_mlflow.py +353 -0
- package/canonical/skills/agent-evaluation/scripts/utils/__init__.py +27 -0
- package/canonical/skills/agent-evaluation/scripts/utils/env_validation.py +123 -0
- package/canonical/skills/agent-evaluation/scripts/utils/tracing_utils.py +108 -0
- package/canonical/skills/agent-evaluation/scripts/validate_agent_tracing.py +148 -0
- package/canonical/skills/agent-evaluation/scripts/validate_auth.py +240 -0
- package/canonical/skills/agent-evaluation/scripts/validate_environment.py +185 -0
- package/canonical/skills/agent-evaluation/scripts/validate_tracing_runtime.py +318 -0
- package/canonical/skills/agentic-architecture/SKILL.md +41 -0
- package/canonical/skills/agentic-architecture/evals/cases.yaml +94 -0
- package/canonical/skills/agentic-architecture/reference/context-engineering.md +75 -0
- package/canonical/skills/agentic-architecture/reference/patterns.md +76 -0
- package/canonical/skills/agentic-architecture/reference/reliability-observability.md +94 -0
- package/canonical/skills/agentic-architecture/reference/review-framework.md +59 -0
- package/canonical/skills/code-review/SKILL.md +52 -0
- package/canonical/skills/code-review/evals/cases.yaml +197 -0
- package/canonical/skills/git-workflow/SKILL.md +41 -0
- package/canonical/skills/git-workflow/evals/cases.yaml +92 -0
- package/canonical/skills/local-code/SKILL.md +24 -0
- package/canonical/skills/local-code/evals/cases.yaml +85 -0
- package/canonical/skills/local-code/scripts/query_llama.py +68 -0
- package/canonical/skills/report-formatting/SKILL.md +62 -0
- package/canonical/skills/report-formatting/evals/cases.yaml +83 -0
- package/canonical/skills/report-formatting/reference/ARCHITECTURE.md +135 -0
- package/canonical/skills/report-formatting/reference/HELPERS.md +120 -0
- package/canonical/skills/report-formatting/reference/PPTX.md +136 -0
- package/canonical/skills/report-formatting/reference/RELEASE.md +99 -0
- package/canonical/skills/report-formatting/reference/TEMPLATES.md +48 -0
- package/canonical/skills/report-formatting/reference/authoring.md +66 -0
- package/canonical/skills/report-formatting/scripts/architecture-template.md +271 -0
- package/canonical/skills/report-formatting/scripts/assets/claro-logo.png +0 -0
- package/canonical/skills/report-formatting/scripts/assets/claro-wordmark.svg +1 -0
- package/canonical/skills/report-formatting/scripts/build-architecture.js +57 -0
- package/canonical/skills/report-formatting/scripts/build-md-claro.js +224 -0
- package/canonical/skills/report-formatting/scripts/build-release.js +51 -0
- package/canonical/skills/report-formatting/scripts/check-env.js +58 -0
- package/canonical/skills/report-formatting/scripts/docmodel.js +283 -0
- package/canonical/skills/report-formatting/scripts/example-build.js +119 -0
- package/canonical/skills/report-formatting/scripts/example_build_ArchitectureReview_docx.js +195 -0
- package/canonical/skills/report-formatting/scripts/example_build_ExecutiveReport_docx.js +114 -0
- package/canonical/skills/report-formatting/scripts/package.json +17 -0
- package/canonical/skills/report-formatting/scripts/pptx/example_build_StatusReport_pptx.py +223 -0
- package/canonical/skills/report-formatting/scripts/pptx/example_build_WeeklyStatus_pptx.py +245 -0
- package/canonical/skills/report-formatting/scripts/pptx/pptx_office.py +144 -0
- package/canonical/skills/report-formatting/scripts/pptx/requirements.txt +7 -0
- package/canonical/skills/report-formatting/scripts/pptx/status_report_blocks.py +193 -0
- package/canonical/skills/report-formatting/scripts/pptx/theme_claro_pptx.py +473 -0
- package/canonical/skills/report-formatting/scripts/release-template.md +80 -0
- package/canonical/skills/report-formatting/scripts/render-mermaid.js +105 -0
- package/canonical/skills/report-formatting/scripts/theme-claro.js +403 -0
- package/canonical/skills/subagent-driven-development/SKILL.md +60 -0
- package/canonical/skills/subagent-driven-development/evals/cases.yaml +208 -0
- package/canonical/skills/subagent-driven-development/reference/brief.md +91 -0
- package/canonical/skills/subagent-driven-development/reference/handoff.md +118 -0
- package/canonical/skills/subagent-driven-development/scripts/validate-handoff.mjs +850 -0
- package/canonical/skills/systematic-debugging/SKILL.md +44 -0
- package/canonical/skills/systematic-debugging/evals/cases.yaml +90 -0
- package/canonical/skills/test-driven-development/SKILL.md +42 -0
- package/canonical/skills/test-driven-development/evals/cases.yaml +86 -0
- package/canonical/skills/test-driven-development/reference/writing-good-tests.md +52 -0
- package/canonical/skills/verification-before-completion/SKILL.md +53 -0
- package/canonical/skills/verification-before-completion/evals/cases.yaml +107 -0
- package/dist/adapters/content/language-lint.d.ts +46 -0
- package/dist/adapters/content/language-lint.js +191 -0
- package/dist/adapters/harness/claude-code.d.ts +57 -0
- package/dist/adapters/harness/claude-code.js +385 -0
- package/dist/adapters/harness/index.d.ts +3 -0
- package/dist/adapters/harness/index.js +17 -0
- package/dist/adapters/harness/opencode.d.ts +7 -0
- package/dist/adapters/harness/opencode.js +166 -0
- package/dist/adapters/harness/plugin.d.ts +22 -0
- package/dist/adapters/harness/plugin.js +257 -0
- package/dist/adapters/memory/doctor.d.ts +480 -0
- package/dist/adapters/memory/doctor.js +1217 -0
- package/dist/adapters/memory/vendored.d.ts +150 -0
- package/dist/adapters/memory/vendored.js +487 -0
- package/dist/adapters/package/node.d.ts +9 -0
- package/dist/adapters/package/node.js +20 -0
- package/dist/adapters/prompt/readline.d.ts +19 -0
- package/dist/adapters/prompt/readline.js +53 -0
- package/dist/adapters/sync/diff.d.ts +43 -0
- package/dist/adapters/sync/diff.js +380 -0
- package/dist/cli/cleanup.d.ts +86 -0
- package/dist/cli/cleanup.js +382 -0
- package/dist/cli/cost.d.ts +304 -0
- package/dist/cli/cost.js +501 -0
- package/dist/cli/doctor.d.ts +205 -0
- package/dist/cli/doctor.js +654 -0
- package/dist/cli/executor.d.ts +5 -0
- package/dist/cli/executor.js +48 -0
- package/dist/cli/plugin-validate.d.ts +37 -0
- package/dist/cli/plugin-validate.js +256 -0
- package/dist/cli/prefix.d.ts +68 -0
- package/dist/cli/prefix.js +218 -0
- package/dist/cli/profile.d.ts +170 -0
- package/dist/cli/profile.js +285 -0
- package/dist/cli/runner.d.ts +10 -0
- package/dist/cli/runner.js +27 -0
- package/dist/cli/uninstall.d.ts +65 -0
- package/dist/cli/uninstall.js +147 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +989 -0
- package/dist/infra/dogfood.d.ts +31 -0
- package/dist/infra/dogfood.js +51 -0
- package/dist/infra/fsutil.d.ts +40 -0
- package/dist/infra/fsutil.js +143 -0
- package/dist/infra/manifest.d.ts +76 -0
- package/dist/infra/manifest.js +92 -0
- package/dist/infra/paths.d.ts +19 -0
- package/dist/infra/paths.js +74 -0
- package/dist/infra/routing.d.ts +4 -0
- package/dist/infra/routing.js +7 -0
- package/node_modules/@freeharness/core/dist/context.d.ts +30 -0
- package/node_modules/@freeharness/core/dist/context.js +1 -0
- package/node_modules/@freeharness/core/dist/index.d.ts +5 -0
- package/node_modules/@freeharness/core/dist/index.js +6 -0
- package/node_modules/@freeharness/core/dist/planner.d.ts +13 -0
- package/node_modules/@freeharness/core/dist/planner.js +18 -0
- package/node_modules/@freeharness/core/dist/ports.d.ts +90 -0
- package/node_modules/@freeharness/core/dist/ports.js +1 -0
- package/node_modules/@freeharness/core/dist/registry.d.ts +41 -0
- package/node_modules/@freeharness/core/dist/registry.js +124 -0
- package/node_modules/@freeharness/core/dist/tiers.d.ts +30 -0
- package/node_modules/@freeharness/core/dist/tiers.js +99 -0
- package/node_modules/@freeharness/core/package.json +34 -0
- package/node_modules/@freeharness/sdd/PROVENANCE.yaml +175 -0
- package/node_modules/@freeharness/sdd/dist/src/bin/openspec.d.ts +2 -0
- package/node_modules/@freeharness/sdd/dist/src/bin/openspec.js +166 -0
- package/node_modules/@freeharness/sdd/dist/src/index.d.ts +14 -0
- package/node_modules/@freeharness/sdd/dist/src/index.js +11 -0
- package/node_modules/@freeharness/sdd/dist/src/init.d.ts +39 -0
- package/node_modules/@freeharness/sdd/dist/src/init.js +190 -0
- package/node_modules/@freeharness/sdd/dist/src/root-resolver.d.ts +8 -0
- package/node_modules/@freeharness/sdd/dist/src/root-resolver.js +32 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/archive.d.ts +81 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/archive.js +483 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/context.d.ts +4 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/context.js +48 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/follow-up.d.ts +57 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/follow-up.js +279 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/instructions.d.ts +67 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/instructions.js +460 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/list.d.ts +5 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/list.js +95 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/new-change.d.ts +6 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/new-change.js +150 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/schemas.d.ts +4 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/schemas.js +23 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/shared.d.ts +56 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/shared.js +140 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/status.d.ts +8 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/status.js +85 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/validate.d.ts +6 -0
- package/node_modules/@freeharness/sdd/dist/src/shim/validate.js +229 -0
- package/node_modules/@freeharness/sdd/dist/src/validate-change.d.ts +40 -0
- package/node_modules/@freeharness/sdd/dist/src/validate-change.js +114 -0
- package/node_modules/@freeharness/sdd/dist/src/validate.d.ts +24 -0
- package/node_modules/@freeharness/sdd/dist/src/validate.js +72 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/apply/specs-apply.d.ts +130 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/apply/specs-apply.js +981 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-metadata.d.ts +46 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-metadata.js +128 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-status-policy.d.ts +26 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/change-status-policy.js +32 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/file-system.d.ts +50 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/file-system.js +394 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/global-config.d.ts +15 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/global-config.js +49 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/graph.d.ts +71 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/graph.js +164 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/index.d.ts +11 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/index.js +21 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/instruction-loader.d.ts +102 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/instruction-loader.js +230 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/outputs.d.ts +18 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/outputs.js +138 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/resolver.d.ts +82 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/resolver.js +333 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/schema.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/schema.js +110 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/state.d.ts +11 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/state.js +32 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/task-progress.d.ts +33 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/task-progress.js +149 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/types.d.ts +39 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/engine/types.js +49 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/claude.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/claude.js +31 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/index.d.ts +10 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/index.js +10 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/opencode.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/adapters/opencode.js +26 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/generator.d.ts +28 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/generator.js +41 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/index.d.ts +23 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/index.js +25 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/invocation.d.ts +72 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/invocation.js +76 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/registry.d.ts +39 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/registry.js +53 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/types.d.ts +62 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/types.js +7 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/yaml.d.ts +35 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-generation/yaml.js +47 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-references.d.ts +33 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/command-references.js +55 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/allowed-tools.d.ts +11 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/allowed-tools.js +11 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/skill-generation.d.ts +48 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/shared/skill-generation.js +99 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/skill-templates.d.ts +19 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/skill-templates.js +18 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/types.d.ts +18 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/types.js +4 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/apply-change.d.ts +19 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/apply-change.js +207 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/archive-change.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/archive-change.js +409 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/bulk-archive-change.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/bulk-archive-change.js +673 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/continue-change.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/continue-change.js +230 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/explore.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/explore.js +550 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/feedback.d.ts +8 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/feedback.js +107 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/ff-change.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/ff-change.js +228 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/new-change.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/new-change.js +147 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/onboard.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/onboard.js +571 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/propose.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/propose.js +322 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/store-selection.d.ts +7 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/store-selection.js +7 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/sync-specs.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/sync-specs.js +518 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/update-change.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/update-change.js +176 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/verify-change.d.ts +9 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/generation/templates/workflows/verify-change.js +344 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/constants.d.ts +39 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/constants.js +54 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/delta-resolution.d.ts +35 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/delta-resolution.js +171 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/change-parser.d.ts +27 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/change-parser.js +210 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/code-fence.d.ts +14 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/code-fence.js +48 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/markdown-parser.d.ts +22 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/markdown-parser.js +186 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-blocks.d.ts +65 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-blocks.js +409 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-text.d.ts +55 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/requirement-text.js +98 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/spec-structure.d.ts +8 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/parsers/spec-structure.js +77 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/purpose-placeholder.d.ts +44 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/purpose-placeholder.js +116 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/base.schema.d.ts +12 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/base.schema.js +17 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/change.schema.d.ts +72 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/change.schema.js +30 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/index.d.ts +3 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/index.js +3 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/spec.schema.d.ts +17 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/schemas/spec.schema.js +14 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/spec-discovery.d.ts +39 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/spec-discovery.js +114 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-lines.d.ts +45 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-lines.js +105 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-numbering.d.ts +15 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/task-numbering.js +56 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/types.d.ts +17 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/types.js +1 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/validator.d.ts +94 -0
- package/node_modules/@freeharness/sdd/dist/vendor/openspec/validation/validator.js +756 -0
- package/node_modules/@freeharness/sdd/package.json +57 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/LICENSE.upstream +22 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/schema.upstream.yaml +232 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/README.md +19 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-apply-change/SKILL.md +187 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-archive-change/SKILL.md +181 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-bulk-archive-change/SKILL.md +338 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-continue-change/SKILL.md +117 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-explore/SKILL.md +342 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-ff-change/SKILL.md +116 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-new-change/SKILL.md +76 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-onboard/SKILL.md +560 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-propose/SKILL.md +162 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-sync-specs/SKILL.md +261 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-update-change/SKILL.md +90 -0
- package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-verify-change/SKILL.md +174 -0
- package/package.json +70 -0
- package/provenance/canonical.PROVENANCE.yaml +740 -0
- package/provenance/claude-mem.LICENSE.upstream +202 -0
- package/provenance/memory.PROVENANCE.yaml +399 -0
- package/provenance/sdd.PROVENANCE.yaml +175 -0
- package/vendor-licenses/caveman.LICENSE +27 -0
- package/vendor-licenses/deepseek-harness.LICENSE +21 -0
- package/vendor-licenses/ecc.LICENSE +21 -0
- package/vendor-licenses/pi.LICENSE +21 -0
- package/vendor-licenses/superpowers.LICENSE +21 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@freeharness/sdd",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Vendored, store-free slice of OpenSpec (schema validation + project init) that runs with no global openspec on PATH.",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"openspec": "dist/src/bin/openspec.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/src/index.d.ts",
|
|
15
|
+
"default": "./dist/src/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./init": {
|
|
18
|
+
"types": "./dist/src/init.d.ts",
|
|
19
|
+
"default": "./dist/src/init.js"
|
|
20
|
+
},
|
|
21
|
+
"./validate": {
|
|
22
|
+
"types": "./dist/src/validate.d.ts",
|
|
23
|
+
"default": "./dist/src/validate.js"
|
|
24
|
+
},
|
|
25
|
+
"./validate-change": {
|
|
26
|
+
"types": "./dist/src/validate-change.d.ts",
|
|
27
|
+
"default": "./dist/src/validate-change.js"
|
|
28
|
+
},
|
|
29
|
+
"./root-resolver": {
|
|
30
|
+
"types": "./dist/src/root-resolver.d.ts",
|
|
31
|
+
"default": "./dist/src/root-resolver.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc -p tsconfig.json",
|
|
36
|
+
"validate:smoke": "rm -rf /tmp/uschemas && mkdir -p /tmp/uschemas/spec-driven && cp ../../canonical/openspec/schema.spec-driven.yaml /tmp/uschemas/spec-driven/schema.yaml && node dist/src/validate.js spec-driven /tmp/uschemas",
|
|
37
|
+
"init:smoke": "rm -rf /tmp/opsxc /tmp/opsxo && node scripts/init-smoke.mjs claude /tmp/opsxc && node scripts/init-smoke.mjs opencode /tmp/opsxo",
|
|
38
|
+
"test": "node --import tsx --test test/*.test.ts"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"yaml": "^2",
|
|
42
|
+
"zod": "^4"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^20",
|
|
46
|
+
"typescript": "^5.5",
|
|
47
|
+
"tsx": "^4.16.0"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist",
|
|
51
|
+
"vendor/openspec/assets",
|
|
52
|
+
"vendor/openspec/LICENSE.upstream",
|
|
53
|
+
"PROVENANCE.yaml"
|
|
54
|
+
],
|
|
55
|
+
"license": "MIT",
|
|
56
|
+
"author": "André Negrelli"
|
|
57
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 OpenSpec Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
name: spec-driven
|
|
2
|
+
version: 1
|
|
3
|
+
description: Default OpenSpec workflow - proposal → specs → design → tasks
|
|
4
|
+
artifacts:
|
|
5
|
+
- id: proposal
|
|
6
|
+
generates: proposal.md
|
|
7
|
+
description: Initial proposal document outlining the change
|
|
8
|
+
template: proposal.md
|
|
9
|
+
instruction: |
|
|
10
|
+
Create the proposal document that establishes WHY this change is needed.
|
|
11
|
+
|
|
12
|
+
Sections:
|
|
13
|
+
- **Why**: 1-2 sentences on the problem or opportunity. What problem does this solve? Why now?
|
|
14
|
+
- **What Changes**: Bullet list of changes. Be specific about new capabilities, modifications, or removals. Mark breaking changes with **BREAKING**.
|
|
15
|
+
- **Capabilities**: Identify which specs will be created or modified:
|
|
16
|
+
- **New Capabilities**: List capabilities being introduced. Each becomes a new `specs/<capability-path>/spec.md`. Use kebab-case for path segments you introduce (e.g., `user-auth` or `identity/user-auth`) and follow the project's existing spec organization.
|
|
17
|
+
- **Modified Capabilities**: List existing capabilities whose REQUIREMENTS are changing. Only include if spec-level behavior changes (not just implementation details). Each needs a delta spec file. Use the exact existing path under `openspec/specs/`. Leave empty if no requirement changes.
|
|
18
|
+
- **Impact**: Affected code, APIs, dependencies, or systems.
|
|
19
|
+
|
|
20
|
+
IMPORTANT: The Capabilities section is critical. It creates the contract between
|
|
21
|
+
proposal and specs phases. Research existing specs before filling this in:
|
|
22
|
+
run `openspec list --specs` for the project's capability inventory, then
|
|
23
|
+
`openspec show "<spec-id>" --type spec --json --no-scenarios` for any that
|
|
24
|
+
look related - that returns a capability's purpose and requirement texts
|
|
25
|
+
without pulling whole spec files into context. Append `--store "<id>"` to
|
|
26
|
+
both commands only for a registered standalone store, and keep `--type
|
|
27
|
+
spec`: a change and a spec sharing a name is otherwise an ambiguous-item
|
|
28
|
+
error. `openspec list` without `--specs` lists in-flight changes, not
|
|
29
|
+
specs - it never shows what the project already covers. Reuse an existing
|
|
30
|
+
capability's exact path instead of introducing a near-duplicate name.
|
|
31
|
+
The filtered read is only an overview. Before deciding what is already
|
|
32
|
+
covered or what should change, read each relevant spec in full, including
|
|
33
|
+
scenarios, with `openspec show "<spec-id>" --type spec` (same `--store` rule).
|
|
34
|
+
Each capability listed here will need a corresponding spec file.
|
|
35
|
+
|
|
36
|
+
Every change must either declare at least one capability (new or
|
|
37
|
+
modified) or explicitly opt out of specs: `openspec validate` rejects a
|
|
38
|
+
change with zero deltas unless the change's `.openspec.yaml` sets
|
|
39
|
+
`skip_specs: true`. Use `skip_specs: true` only when no spec-level
|
|
40
|
+
behavior changes (pure refactor, tooling, docs) - specs describe
|
|
41
|
+
behavior, so if behavior does not change, no spec should change either.
|
|
42
|
+
Do not invent a requirement just to satisfy validation.
|
|
43
|
+
|
|
44
|
+
Keep it concise (1-2 pages). Focus on the "why" not the "how" -
|
|
45
|
+
implementation details belong in design.md.
|
|
46
|
+
|
|
47
|
+
This is the foundation - specs, design, and tasks all build on this.
|
|
48
|
+
requires: []
|
|
49
|
+
|
|
50
|
+
- id: specs
|
|
51
|
+
generates: "specs/**/*.md"
|
|
52
|
+
description: Detailed specifications for the change
|
|
53
|
+
template: spec.md
|
|
54
|
+
instruction: |
|
|
55
|
+
Create specification files that define WHAT the system should do.
|
|
56
|
+
|
|
57
|
+
A spec is a behavior contract, not an implementation plan.
|
|
58
|
+
|
|
59
|
+
Good spec content:
|
|
60
|
+
- Observable behavior users or downstream systems rely on
|
|
61
|
+
- Inputs, outputs, and error conditions
|
|
62
|
+
- External constraints (security, privacy, reliability, compatibility)
|
|
63
|
+
- Scenarios that can be tested or explicitly validated
|
|
64
|
+
|
|
65
|
+
Avoid in specs:
|
|
66
|
+
- Internal class/function names
|
|
67
|
+
- Library or framework choices
|
|
68
|
+
- Step-by-step implementation details
|
|
69
|
+
- Detailed execution plans (those belong in design.md or tasks.md)
|
|
70
|
+
|
|
71
|
+
Quick test: if the implementation can change without changing externally
|
|
72
|
+
visible behavior, it likely does not belong in the spec.
|
|
73
|
+
|
|
74
|
+
Create one spec file per capability listed in the proposal's Capabilities section.
|
|
75
|
+
`<capability-path>` is the spec directory relative to `specs/` (for example,
|
|
76
|
+
`user-auth` or `identity/user-auth`). Preserve the full path:
|
|
77
|
+
- New capabilities: use the exact path from the proposal at `specs/<capability-path>/spec.md`. Any path segment newly introduced in the proposal must be kebab-case. Follow the project's existing organization; do not add a new domain level when the project uses a flat layout.
|
|
78
|
+
- Modified capabilities: use the exact existing path from `openspec/specs/<capability-path>/` when creating the delta at `specs/<capability-path>/spec.md`. Run `openspec list --specs` to confirm that path before writing the delta, appending `--store "<id>"` only for a registered standalone store - a mistyped or invented path targets a capability that does not exist rather than the one you meant. Do not move or rename the capability.
|
|
79
|
+
|
|
80
|
+
There must be at least one spec file unless the change's `.openspec.yaml`
|
|
81
|
+
sets `skip_specs: true` (no spec-level behavior change) - `openspec validate`
|
|
82
|
+
rejects a zero-delta change without that marker. If the proposal lists no
|
|
83
|
+
capabilities and `skip_specs` is not set, revisit the proposal first.
|
|
84
|
+
|
|
85
|
+
Delta operations (use ## headers):
|
|
86
|
+
- **ADDED Requirements**: New capabilities
|
|
87
|
+
- **MODIFIED Requirements**: Changed behavior - MUST include full updated content
|
|
88
|
+
- **REMOVED Requirements**: Deprecated features - MUST include **Reason** and **Migration**
|
|
89
|
+
- **RENAMED Requirements**: Name changes only - use FROM:/TO: format
|
|
90
|
+
|
|
91
|
+
Format requirements:
|
|
92
|
+
- Each requirement: `### Requirement: <name>` followed by description
|
|
93
|
+
- Use SHALL/MUST for normative requirements (avoid should/may)
|
|
94
|
+
- Each scenario: `#### Scenario: <name>` with WHEN/THEN format
|
|
95
|
+
- **CRITICAL**: Scenarios MUST use exactly 4 hashtags (`####`). Using 3 hashtags or bullets will fail silently.
|
|
96
|
+
- Every requirement MUST have at least one scenario.
|
|
97
|
+
|
|
98
|
+
New capabilities only: start the delta spec with a `## Purpose` section -
|
|
99
|
+
one or two sentences (50+ characters, or `openspec validate --strict`
|
|
100
|
+
reports it as too brief) describing what the capability is for. Archive
|
|
101
|
+
copies it into the main spec it creates; without it the new main spec is
|
|
102
|
+
left with a `TBD ... Update Purpose after archive` placeholder to fill in
|
|
103
|
+
by hand. Do NOT add `## Purpose` to a delta for an existing capability -
|
|
104
|
+
that spec already has one and the delta's is ignored. To change an
|
|
105
|
+
existing capability's Purpose - including a leftover `TBD` placeholder -
|
|
106
|
+
edit `<planningHome.root>/openspec/specs/<capability-path>/spec.md`
|
|
107
|
+
directly. `planningHome.root` comes from the `openspec instructions ...
|
|
108
|
+
--json` response. Always use it rather than a repo-relative path: it
|
|
109
|
+
resolves to the store whenever the change lives in one - whether that
|
|
110
|
+
came from `--store`, a project `store:` pointer, or a global default
|
|
111
|
+
store - and to the current repository otherwise. Do not try to work out
|
|
112
|
+
which case applies; the field already has.
|
|
113
|
+
|
|
114
|
+
MODIFIED requirements workflow:
|
|
115
|
+
1. Locate the existing requirement in `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (the same store-aware root as above)
|
|
116
|
+
2. Copy the ENTIRE requirement block (from `### Requirement:` through all scenarios)
|
|
117
|
+
3. Paste under `## MODIFIED Requirements` and edit to reflect new behavior
|
|
118
|
+
4. Ensure header text matches exactly (whitespace-insensitive)
|
|
119
|
+
|
|
120
|
+
Common pitfall: Using MODIFIED with partial content loses detail at archive time.
|
|
121
|
+
If adding new concerns without changing existing behavior, use ADDED instead.
|
|
122
|
+
|
|
123
|
+
Example (a new capability, so it opens with `## Purpose`):
|
|
124
|
+
```
|
|
125
|
+
## Purpose
|
|
126
|
+
|
|
127
|
+
Lets users take their data out of the product in a portable format.
|
|
128
|
+
|
|
129
|
+
## ADDED Requirements
|
|
130
|
+
|
|
131
|
+
### Requirement: User can export data
|
|
132
|
+
The system SHALL allow users to export their data in CSV format.
|
|
133
|
+
|
|
134
|
+
#### Scenario: Successful export
|
|
135
|
+
- **WHEN** user clicks "Export" button
|
|
136
|
+
- **THEN** system downloads a CSV file with all user data
|
|
137
|
+
|
|
138
|
+
## REMOVED Requirements
|
|
139
|
+
|
|
140
|
+
### Requirement: Legacy export
|
|
141
|
+
**Reason**: Replaced by new export system
|
|
142
|
+
**Migration**: Use new export endpoint at /api/v2/export
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Specs should be testable - each scenario is a potential test case.
|
|
146
|
+
requires:
|
|
147
|
+
- proposal
|
|
148
|
+
|
|
149
|
+
- id: design
|
|
150
|
+
generates: design.md
|
|
151
|
+
description: Technical design document with implementation details
|
|
152
|
+
template: design.md
|
|
153
|
+
instruction: |
|
|
154
|
+
Create the design document that explains HOW to implement the change.
|
|
155
|
+
|
|
156
|
+
When to include design.md (create only if any apply):
|
|
157
|
+
- Cross-cutting change (multiple services/modules) or new architectural pattern
|
|
158
|
+
- New external dependency or significant data model changes
|
|
159
|
+
- Security, performance, or migration complexity
|
|
160
|
+
- Ambiguity that benefits from technical decisions before coding
|
|
161
|
+
|
|
162
|
+
Sections:
|
|
163
|
+
- **Context**: Only the current state and constraints needed to explain the approach. Reference the proposal for motivation instead of restating it (e.g., "See proposal.md - Why").
|
|
164
|
+
- **Goals / Non-Goals**: What this design achieves and explicitly excludes. Don't restate the proposal's scope - add only design-level boundaries.
|
|
165
|
+
- **Decisions**: Key technical choices with rationale (why X over Y?). Include alternatives considered for each decision.
|
|
166
|
+
- **Risks / Trade-offs**: Known limitations, things that could go wrong. Format: [Risk] → Mitigation
|
|
167
|
+
- **Migration Plan**: Steps to deploy, rollback strategy (if applicable)
|
|
168
|
+
- **Open Questions**: Unknowns that can safely be answered later without
|
|
169
|
+
changing the specs, the approach, or the task breakdown. Omit if none.
|
|
170
|
+
|
|
171
|
+
Open questions are for genuinely deferrable unknowns, not decisions you
|
|
172
|
+
skipped. If a question would change the specs, the chosen approach, or
|
|
173
|
+
the task breakdown, resolve it now - ask the user instead of guessing.
|
|
174
|
+
|
|
175
|
+
Focus on architecture and approach, not line-by-line implementation.
|
|
176
|
+
The proposal covers why and what; design covers how. Reference the
|
|
177
|
+
proposal for motivation and, once written, the specs for requirements -
|
|
178
|
+
if a section would only restate them, point to them instead.
|
|
179
|
+
|
|
180
|
+
Good design docs explain the "why" behind technical decisions.
|
|
181
|
+
requires:
|
|
182
|
+
- proposal
|
|
183
|
+
|
|
184
|
+
- id: tasks
|
|
185
|
+
generates: tasks.md
|
|
186
|
+
description: Implementation checklist with trackable tasks
|
|
187
|
+
template: tasks.md
|
|
188
|
+
instruction: |
|
|
189
|
+
Create the task list that breaks down the implementation work.
|
|
190
|
+
|
|
191
|
+
Before writing tasks, check design.md for Open Questions. If any of them
|
|
192
|
+
would change what gets built, resolve them with the user first - do not
|
|
193
|
+
bake an unstated assumption into the task list.
|
|
194
|
+
|
|
195
|
+
**IMPORTANT: Follow the template below exactly.** The apply phase parses
|
|
196
|
+
checkbox format to track progress. Tasks not using `- [ ]` won't be tracked.
|
|
197
|
+
|
|
198
|
+
Guidelines:
|
|
199
|
+
- Group related tasks under ## numbered headings
|
|
200
|
+
- Each task MUST be a checkbox: `- [ ] X.Y Task description`
|
|
201
|
+
- Tasks should be small enough to complete in one session
|
|
202
|
+
- Order tasks by dependency (what must be done first?)
|
|
203
|
+
- Each task MUST state how to verify completion (a test, command,
|
|
204
|
+
observable behavior, or delivered artifact). Put the verification in
|
|
205
|
+
that task's checkbox description. Use a separate verification task only
|
|
206
|
+
when it checks broader integration or system behavior that spans
|
|
207
|
+
multiple implementation tasks.
|
|
208
|
+
|
|
209
|
+
Example:
|
|
210
|
+
```
|
|
211
|
+
## 1. Setup
|
|
212
|
+
|
|
213
|
+
- [ ] 1.1 Create new module structure and verify expected files are present
|
|
214
|
+
- [ ] 1.2 Add dependencies to package.json and verify package installation succeeds
|
|
215
|
+
|
|
216
|
+
## 2. Core Implementation
|
|
217
|
+
|
|
218
|
+
- [ ] 2.1 Implement data export function and verify the export test passes
|
|
219
|
+
- [ ] 2.2 Add CSV formatting utilities and verify unit tests cover quoting and delimiters
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Reference specs for what needs to be built, design for how to build it.
|
|
223
|
+
requires:
|
|
224
|
+
- specs
|
|
225
|
+
- design
|
|
226
|
+
|
|
227
|
+
apply:
|
|
228
|
+
requires: [tasks]
|
|
229
|
+
tracks: tasks.md
|
|
230
|
+
instruction: |
|
|
231
|
+
Read context files, work through pending tasks, mark complete as you go.
|
|
232
|
+
Pause if you hit blockers or need clarification.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# OpenSpec skills for skills.sh
|
|
2
|
+
|
|
3
|
+
Install the OpenSpec workflow skills into any [skills.sh](https://skills.sh)-compatible agent:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx skills add Fission-AI/OpenSpec
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Each `openspec-*/SKILL.md` here is the same skill `openspec init` writes into a
|
|
10
|
+
project. The skills drive the `openspec` CLI, so for the full setup (CLI +
|
|
11
|
+
`openspec/` project scaffolding + slash commands) run:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx openspec@latest init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> These files are generated from the skill templates — do not edit by hand. Run
|
|
18
|
+
> `pnpm build && pnpm generate:skills` after changing a template;
|
|
19
|
+
> `skillssh-parity.test.ts` fails if they drift.
|
package/node_modules/@freeharness/sdd/vendor/openspec/assets/skills/openspec-apply-change/SKILL.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-apply-change
|
|
3
|
+
description: Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.
|
|
4
|
+
allowed-tools: Bash(openspec:*)
|
|
5
|
+
license: MIT
|
|
6
|
+
compatibility: Requires openspec CLI.
|
|
7
|
+
metadata:
|
|
8
|
+
author: openspec
|
|
9
|
+
version: "1.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Implement tasks from an OpenSpec change.
|
|
13
|
+
|
|
14
|
+
**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
|
|
15
|
+
|
|
16
|
+
**Input**: Optionally specify a change name (e.g., `/openspec-apply-change add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
17
|
+
|
|
18
|
+
**Steps**
|
|
19
|
+
|
|
20
|
+
1. **Select the change**
|
|
21
|
+
|
|
22
|
+
If a name is provided, use it. Otherwise:
|
|
23
|
+
- Infer from conversation context if the user mentioned a change
|
|
24
|
+
- Auto-select if only one active change exists
|
|
25
|
+
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
|
|
26
|
+
|
|
27
|
+
Always announce: "Using change: <name>" and how to override (e.g., `/openspec-apply-change <other>`).
|
|
28
|
+
|
|
29
|
+
2. **Check status to understand the schema**
|
|
30
|
+
```bash
|
|
31
|
+
openspec status --change "<name>" --json
|
|
32
|
+
```
|
|
33
|
+
Parse the JSON to understand:
|
|
34
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
35
|
+
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
|
|
36
|
+
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
|
|
37
|
+
|
|
38
|
+
3. **Get apply instructions**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
openspec instructions apply --change "<name>" --json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This returns:
|
|
45
|
+
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
|
|
46
|
+
- Progress (total, complete, remaining)
|
|
47
|
+
- Task list with status
|
|
48
|
+
- Dynamic instruction based on current state
|
|
49
|
+
- Optional `context`: current required project instruction input from the selected root
|
|
50
|
+
- Optional `operationGuidance`: current advisory guidance for apply
|
|
51
|
+
|
|
52
|
+
**Handle states:**
|
|
53
|
+
- If `state: "blocked"` (missing artifacts): show message, suggest using `/openspec-continue-change` (if it is not installed, run `openspec status --change "<name>" --json` to see the next artifact and `openspec instructions <artifact-id> --change "<name>" --json` for how to create it)
|
|
54
|
+
- If `state: "all_done"`: congratulate, suggest archive
|
|
55
|
+
- Otherwise: proceed to implementation
|
|
56
|
+
|
|
57
|
+
Treat `context` as a required prompt-level input. Read and consider it, and
|
|
58
|
+
apply relevant project facts, conventions, and constraints while implementing.
|
|
59
|
+
Treat `operationGuidance` as optional additive advice. Read and consider every
|
|
60
|
+
entry, and follow entries that are applicable and compatible with the built-in
|
|
61
|
+
workflow.
|
|
62
|
+
|
|
63
|
+
Keep both fields separate from CLI-returned state, missing artifacts, tasks,
|
|
64
|
+
progress, `contextFiles`, and the built-in `instruction`. They are not
|
|
65
|
+
evidence of task completion, do not replace the built-in instruction, and do
|
|
66
|
+
not permit bypassing a blocked state. If context conflicts with the built-in
|
|
67
|
+
instruction, an explicit user choice, or a CLI-controlled value, report the
|
|
68
|
+
conflict and preserve the controlling value. If guidance is inapplicable or
|
|
69
|
+
conflicts with those controlling inputs, do not follow it and explain why.
|
|
70
|
+
These are prompt-level behavior contracts, not enforceable checks.
|
|
71
|
+
|
|
72
|
+
4. **Read context files**
|
|
73
|
+
|
|
74
|
+
Read every file path listed under `contextFiles` from the apply instructions output.
|
|
75
|
+
The files depend on the schema being used:
|
|
76
|
+
- **spec-driven**: proposal, specs, design, tasks
|
|
77
|
+
- Other schemas: follow the contextFiles from CLI output
|
|
78
|
+
|
|
79
|
+
Do not copy `context` or `operationGuidance` verbatim into implementation
|
|
80
|
+
files or planning artifacts unless the user separately asks for that content.
|
|
81
|
+
|
|
82
|
+
5. **Show current progress**
|
|
83
|
+
|
|
84
|
+
Display:
|
|
85
|
+
- Schema being used
|
|
86
|
+
- Progress: "N/M tasks complete"
|
|
87
|
+
- Remaining tasks overview
|
|
88
|
+
- Dynamic instruction from CLI
|
|
89
|
+
|
|
90
|
+
6. **Implement tasks (loop until done or blocked)**
|
|
91
|
+
|
|
92
|
+
For each pending task:
|
|
93
|
+
- Show which task is being worked on
|
|
94
|
+
- Make the code changes required
|
|
95
|
+
- Keep changes minimal and focused
|
|
96
|
+
- Mark task complete in the tasks file: `- [ ]` → `- [x]`
|
|
97
|
+
- Continue to next task
|
|
98
|
+
|
|
99
|
+
**Pause if:**
|
|
100
|
+
- Task is unclear → ask for clarification
|
|
101
|
+
- Implementation reveals a design issue → suggest updating artifacts
|
|
102
|
+
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
|
|
103
|
+
- Error or blocker encountered → report and wait for guidance
|
|
104
|
+
- User interrupts
|
|
105
|
+
|
|
106
|
+
7. **On completion or pause, show status**
|
|
107
|
+
|
|
108
|
+
Display:
|
|
109
|
+
- Tasks completed this session
|
|
110
|
+
- Overall progress: "N/M tasks complete"
|
|
111
|
+
- If all done: suggest archive
|
|
112
|
+
- If paused: explain why and wait for guidance
|
|
113
|
+
|
|
114
|
+
**Output During Implementation**
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
## Implementing: <change-name> (schema: <schema-name>)
|
|
118
|
+
|
|
119
|
+
Working on task 3/7: <task description>
|
|
120
|
+
[...implementation happening...]
|
|
121
|
+
✓ Task complete
|
|
122
|
+
|
|
123
|
+
Working on task 4/7: <task description>
|
|
124
|
+
[...implementation happening...]
|
|
125
|
+
✓ Task complete
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Output On Completion**
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
## Implementation Complete
|
|
132
|
+
|
|
133
|
+
**Change:** <change-name>
|
|
134
|
+
**Schema:** <schema-name>
|
|
135
|
+
**Progress:** 7/7 tasks complete ✓
|
|
136
|
+
|
|
137
|
+
### Completed This Session
|
|
138
|
+
- [x] Task 1
|
|
139
|
+
- [x] Task 2
|
|
140
|
+
...
|
|
141
|
+
|
|
142
|
+
All tasks complete! You can archive this change with `/openspec-archive-change`.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Output On Pause (Issue Encountered)**
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
## Implementation Paused
|
|
149
|
+
|
|
150
|
+
**Change:** <change-name>
|
|
151
|
+
**Schema:** <schema-name>
|
|
152
|
+
**Progress:** 4/7 tasks complete
|
|
153
|
+
|
|
154
|
+
### Issue Encountered
|
|
155
|
+
<description of the issue>
|
|
156
|
+
|
|
157
|
+
**Options:**
|
|
158
|
+
1. <option 1>
|
|
159
|
+
2. <option 2>
|
|
160
|
+
3. Other approach
|
|
161
|
+
|
|
162
|
+
What would you like to do?
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Guardrails**
|
|
166
|
+
- Keep going through tasks until done or blocked
|
|
167
|
+
- Always read context files before starting (from the apply instructions output)
|
|
168
|
+
- If task is ambiguous, pause and ask before implementing
|
|
169
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
170
|
+
- Keep code changes minimal and scoped to each task
|
|
171
|
+
- Update task checkbox immediately after completing each task
|
|
172
|
+
- Pause on errors, blockers, or unclear requirements - don't guess
|
|
173
|
+
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
|
|
174
|
+
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred
|
|
175
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
176
|
+
- Do not use context or operation guidance as proof that a task is complete
|
|
177
|
+
- Apply relevant project context; report conflicts with controlling workflow inputs
|
|
178
|
+
- Consider every guidance entry; explain any inapplicable or conflicting advice
|
|
179
|
+
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
|
|
180
|
+
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
|
|
181
|
+
|
|
182
|
+
**Fluid Workflow Integration**
|
|
183
|
+
|
|
184
|
+
This skill supports the "actions on a change" model:
|
|
185
|
+
|
|
186
|
+
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
|
|
187
|
+
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
|