@yandy-r/ycc-opencode 0.0.0-bootstrap.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +38 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/agents/ansible-automation-expert.md +115 -0
- package/agents/api-docs-expert.md +146 -0
- package/agents/api-documenter.md +105 -0
- package/agents/architect.md +264 -0
- package/agents/architecture-analyst.md +99 -0
- package/agents/backport-conflict-resolver.md +134 -0
- package/agents/cloudflare-architect.md +85 -0
- package/agents/cloudflare-developer.md +196 -0
- package/agents/code-architect.md +101 -0
- package/agents/code-documenter.md +114 -0
- package/agents/code-explorer.md +99 -0
- package/agents/code-finder.md +83 -0
- package/agents/code-researcher.md +102 -0
- package/agents/code-reviewer.md +268 -0
- package/agents/code-simplifier.md +77 -0
- package/agents/codebase-advisor.md +130 -0
- package/agents/db-modifier.md +235 -0
- package/agents/docs-git-committer.md +220 -0
- package/agents/documentation-writer.md +92 -0
- package/agents/feature-researcher.md +121 -0
- package/agents/feature-writer.md +89 -0
- package/agents/frontend-ui-developer.md +98 -0
- package/agents/git-cleanup.md +173 -0
- package/agents/go-api-architect.md +172 -0
- package/agents/go-expert-architect.md +147 -0
- package/agents/implementor.md +167 -0
- package/agents/library-docs-writer.md +128 -0
- package/agents/nextjs-ux-ui-expert.md +127 -0
- package/agents/nodejs-backend-architect.md +112 -0
- package/agents/nodejs-backend-developer.md +184 -0
- package/agents/planner.md +257 -0
- package/agents/pr-comment-fixer.md +284 -0
- package/agents/practices-researcher.md +80 -0
- package/agents/project-file-cleaner.md +140 -0
- package/agents/prp-researcher.md +231 -0
- package/agents/python-developer.md +171 -0
- package/agents/python-expert-architect.md +188 -0
- package/agents/readme-generator.md +100 -0
- package/agents/release-fix-applier.md +194 -0
- package/agents/releaser.md +147 -0
- package/agents/research-specialist.md +106 -0
- package/agents/reverse-proxy-architect.md +131 -0
- package/agents/review-fixer.md +264 -0
- package/agents/root-cause-analyzer.md +105 -0
- package/agents/rust-build-resolver.md +183 -0
- package/agents/rust-expert-architect.md +149 -0
- package/agents/rust-reviewer.md +126 -0
- package/agents/sql-database-developer.md +195 -0
- package/agents/systems-engineering-expert.md +203 -0
- package/agents/terraform-architect.md +109 -0
- package/agents/terraform-developer.md +229 -0
- package/agents/test-strategy-planner.md +126 -0
- package/agents/turso-database-architect.md +139 -0
- package/agents/typescript-developer.md +170 -0
- package/agents/typescript-expert-architect.md +167 -0
- package/index.js +260 -0
- package/package.json +33 -7
- package/registration.json +4384 -0
- package/shared/references/agent-native-setup.md +121 -0
- package/shared/references/branch-prep.md +31 -0
- package/shared/references/branching-model.md +162 -0
- package/shared/references/ci-monitoring.md +445 -0
- package/shared/references/forge-detection.md +162 -0
- package/shared/references/goal-pairing.md +53 -0
- package/shared/references/pr-base-and-backport.md +143 -0
- package/shared/references/review-artifact-format.md +141 -0
- package/shared/references/review-checklist.md +161 -0
- package/shared/references/review-dispatch.md +71 -0
- package/shared/references/session-state.md +159 -0
- package/shared/references/standalone-dispatch.md +298 -0
- package/shared/references/target-capability-matrix.md +325 -0
- package/shared/references/visual-mode.md +155 -0
- package/shared/references/worktree-strategy.md +310 -0
- package/shared/scripts/backport-audit.sh +283 -0
- package/shared/scripts/ci-monitor.sh +637 -0
- package/shared/scripts/lib/backport-lib.sh +47 -0
- package/shared/scripts/lib/ci-classify.sh +103 -0
- package/shared/scripts/lib/forge.sh +264 -0
- package/shared/scripts/lib/release-state-lib.sh +300 -0
- package/shared/scripts/list-worktrees.sh +178 -0
- package/shared/scripts/merge-children.sh +82 -0
- package/shared/scripts/move-plan-to-worktree.sh +231 -0
- package/shared/scripts/pr-guard.sh +283 -0
- package/shared/scripts/prepare-feature-branch.sh +326 -0
- package/shared/scripts/release-ci-monitor.sh +671 -0
- package/shared/scripts/release-state-update.sh +216 -0
- package/shared/scripts/release-state.sh +178 -0
- package/shared/scripts/report-bundle-drift.sh +343 -0
- package/shared/scripts/require-python.sh +17 -0
- package/shared/scripts/resolve-plans-dir.sh +262 -0
- package/shared/scripts/rules-pointer.sh +20 -0
- package/shared/scripts/rules_pointer.py +267 -0
- package/shared/scripts/setup-worktree.sh +288 -0
- package/shared/scripts/validate-file-paths.sh +249 -0
- package/shared/scripts/visual-egress-guard.sh +303 -0
- package/shared/scripts/visual-recap-collect.sh +247 -0
- package/shared/scripts/worktree-paths.sh +86 -0
- package/skills/backport/SKILL.md +291 -0
- package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
- package/skills/backport/scripts/find-pending.sh +199 -0
- package/skills/blueprint/SKILL.md +410 -0
- package/skills/blueprint/references/bootstrap-mapping.md +87 -0
- package/skills/bundle-author/SKILL.md +119 -0
- package/skills/bundle-author/references/surface-map.md +128 -0
- package/skills/bundle-author/references/templates/agent-template.md +21 -0
- package/skills/bundle-author/references/templates/skill-template.md +36 -0
- package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
- package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
- package/skills/bundle-release/SKILL.md +188 -0
- package/skills/bundle-release/references/release-checklist.md +196 -0
- package/skills/bundle-release/references/release-notes-template.md +48 -0
- package/skills/bundle-release/references/version-policy.md +150 -0
- package/skills/bundle-release/scripts/bump-version.sh +97 -0
- package/skills/bundle-release/scripts/draft-notes.sh +222 -0
- package/skills/bundle-release/scripts/preflight.sh +164 -0
- package/skills/bundle-release/scripts/release_versions.py +361 -0
- package/skills/clean/SKILL.md +107 -0
- package/skills/clean/references/agent-prompts.md +199 -0
- package/skills/clean/references/safety-config.md +125 -0
- package/skills/clean/scripts/detect-project-type.sh +423 -0
- package/skills/clean/scripts/generate-report.sh +245 -0
- package/skills/clean/scripts/validate-safety.sh +401 -0
- package/skills/code-report/SKILL.md +375 -0
- package/skills/code-report/scripts/check-prerequisites.sh +65 -0
- package/skills/code-report/templates/report-structure.md +202 -0
- package/skills/code-review/SKILL.md +153 -0
- package/skills/code-review/references/pr-procedure.md +311 -0
- package/skills/compatibility-audit/SKILL.md +226 -0
- package/skills/compatibility-audit/references/reading-the-report.md +159 -0
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +372 -0
- package/skills/compatibility-audit/scripts/audit-target-features.sh +558 -0
- package/skills/deep-research/SKILL.md +251 -0
- package/skills/deep-research/references/analysis-prompts.md +702 -0
- package/skills/deep-research/references/completion-summary-template.md +66 -0
- package/skills/deep-research/references/persona-analogical.md +159 -0
- package/skills/deep-research/references/persona-archaeological.md +69 -0
- package/skills/deep-research/references/persona-contrarian.md +155 -0
- package/skills/deep-research/references/persona-futurist.md +70 -0
- package/skills/deep-research/references/persona-historical.md +142 -0
- package/skills/deep-research/references/persona-journalistic.md +69 -0
- package/skills/deep-research/references/persona-negative-space.md +70 -0
- package/skills/deep-research/references/persona-systems.md +69 -0
- package/skills/deep-research/references/synthesis-template.md +569 -0
- package/skills/deep-research/references/verification-log-template.md +32 -0
- package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
- package/skills/deep-research/scripts/validate-research.sh +244 -0
- package/skills/feature-research/SKILL.md +292 -0
- package/skills/feature-research/scripts/validate-research.sh +159 -0
- package/skills/feature-research/scripts/validate-spec.sh +270 -0
- package/skills/feature-research/templates/research-agents.md +569 -0
- package/skills/feature-research/templates/spec-structure.md +437 -0
- package/skills/formatters/SKILL.md +207 -0
- package/skills/formatters/references/best-practices.md +78 -0
- package/skills/formatters/references/flag-reference.md +178 -0
- package/skills/formatters/references/stack-detection.md +119 -0
- package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
- package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
- package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
- package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
- package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
- package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
- package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
- package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
- package/skills/formatters/scripts/apply-aliases.sh +245 -0
- package/skills/formatters/scripts/apply-ci.sh +136 -0
- package/skills/formatters/scripts/apply-docs.sh +187 -0
- package/skills/formatters/scripts/apply-hooks.sh +261 -0
- package/skills/formatters/scripts/bundle/format.sh +15 -0
- package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
- package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
- package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
- package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
- package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
- package/skills/formatters/scripts/bundle/lint.sh +15 -0
- package/skills/formatters/scripts/bundle/style.sh +1410 -0
- package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
- package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
- package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
- package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
- package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
- package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
- package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
- package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
- package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
- package/skills/formatters/scripts/profile-style.sh +264 -0
- package/skills/frontend-design/SKILL.md +151 -0
- package/skills/frontend-patterns/SKILL.md +66 -0
- package/skills/frontend-patterns/references/animation.md +21 -0
- package/skills/frontend-patterns/references/components-and-state.md +40 -0
- package/skills/frontend-patterns/references/data-and-performance.md +34 -0
- package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
- package/skills/git-cleanup/SKILL.md +286 -0
- package/skills/git-cleanup/references/active-code-rules.md +318 -0
- package/skills/git-cleanup/references/host-detection.md +217 -0
- package/skills/git-workflow/SKILL.md +130 -0
- package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
- package/skills/git-workflow/references/commit-phases.md +247 -0
- package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
- package/skills/git-workflow/references/goal-pairing.md +23 -0
- package/skills/git-workflow/references/pr-creation.md +269 -0
- package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
- package/skills/git-workflow/scripts/create-pr.sh +464 -0
- package/skills/git-workflow/scripts/validate-commit.sh +235 -0
- package/skills/git-workflow/templates/agent-prompts.md +518 -0
- package/skills/git-workflow/templates/commit-types.md +504 -0
- package/skills/git-workflow/templates/documentation-decision.md +509 -0
- package/skills/git-workflow/templates/pr-template.md +772 -0
- package/skills/go-patterns/SKILL.md +89 -0
- package/skills/go-patterns/references/design-and-tooling.md +336 -0
- package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
- package/skills/go-testing/SKILL.md +133 -0
- package/skills/go-testing/references/advanced-testing.md +349 -0
- package/skills/go-testing/references/test-structure.md +277 -0
- package/skills/hooks-workflow/SKILL.md +232 -0
- package/skills/hooks-workflow/references/support-notes.md +134 -0
- package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
- package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
- package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
- package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
- package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
- package/skills/implement-plan/SKILL.md +221 -0
- package/skills/implement-plan/references/agent-task-prompt.md +214 -0
- package/skills/implement-plan/references/output-formats.md +150 -0
- package/skills/implement-plan/references/plan-inputs.md +126 -0
- package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
- package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
- package/skills/init/SKILL.md +272 -0
- package/skills/init/references/conventional-commits.md +114 -0
- package/skills/init/references/flag-reference.md +236 -0
- package/skills/init/references/label-taxonomy.md +115 -0
- package/skills/init/references/project-profile-heuristics.md +156 -0
- package/skills/init/references/template-library.md +129 -0
- package/skills/init/scripts/count-source-files.sh +60 -0
- package/skills/init/scripts/generate-agent-catalog.sh +193 -0
- package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
- package/skills/init/scripts/migrate-rules.py +459 -0
- package/skills/init/scripts/migrate-rules.sh +26 -0
- package/skills/init/scripts/profile-project.sh +453 -0
- package/skills/init/scripts/render-template.py +226 -0
- package/skills/init/scripts/render-template.sh +25 -0
- package/skills/init/scripts/rules-report.sh +31 -0
- package/skills/init/scripts/rules_file_lib.py +41 -0
- package/skills/init/templates/AGENTS.md.tmpl +38 -0
- package/skills/init/templates/CLAUDE.md.tmpl +7 -0
- package/skills/init/templates/ai-rule.md.tmpl +3 -0
- package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
- package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
- package/skills/init/templates/git/gitignore.tmpl +120 -0
- package/skills/init/templates/git/gitmessage.tmpl +27 -0
- package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
- package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
- package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
- package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
- package/skills/init/templates/github/config.yml.tmpl +5 -0
- package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
- package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
- package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
- package/skills/init/templates/github/labels.md.tmpl +75 -0
- package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
- package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
- package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
- package/skills/init/templates/workspace-report.md +83 -0
- package/skills/orchestrate/SKILL.md +165 -0
- package/skills/orchestrate/references/agent-catalog.md +601 -0
- package/skills/orchestrate/references/agent-prompts.md +495 -0
- package/skills/orchestrate/references/dispatch-playbook.md +333 -0
- package/skills/orchestrate/references/task-breakdown.md +410 -0
- package/skills/orchestrate/scripts/analyze-task.sh +139 -0
- package/skills/orchestrate/scripts/summarize-results.sh +160 -0
- package/skills/orchestrate/scripts/validate-agents.sh +92 -0
- package/skills/parallel-plan/SKILL.md +124 -0
- package/skills/plan/SKILL.md +134 -0
- package/skills/plan/references/enhanced-personas.md +131 -0
- package/skills/plan/references/personas-and-merge.md +77 -0
- package/skills/plan/references/plan-validation.md +65 -0
- package/skills/plan/references/planner-prompts.md +68 -0
- package/skills/plan/references/planning-tracks.md +73 -0
- package/skills/plan-workflow/SKILL.md +406 -0
- package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
- package/skills/plan-workflow/references/plan-structure.md +238 -0
- package/skills/plan-workflow/references/planning-agents.md +511 -0
- package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
- package/skills/plan-workflow/references/research-agents.md +436 -0
- package/skills/plan-workflow/references/shared-structure.md +152 -0
- package/skills/plan-workflow/references/validation-agents.md +363 -0
- package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
- package/skills/plan-workflow/scripts/check-state.sh +190 -0
- package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
- package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
- package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
- package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
- package/skills/pr-autofix/SKILL.md +307 -0
- package/skills/pr-autofix/references/ci-loop.md +64 -0
- package/skills/pr-autofix/references/comment-sources.md +197 -0
- package/skills/pr-autofix/references/data-shapes.md +87 -0
- package/skills/pr-autofix/references/goal-example.md +30 -0
- package/skills/pr-autofix/references/output-templates.md +162 -0
- package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
- package/skills/pr-autofix/references/related-skills.md +11 -0
- package/skills/pr-autofix/references/severity-mapping.md +146 -0
- package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
- package/skills/pr-autofix/scripts/post-summary.sh +226 -0
- package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
- package/skills/prp-commit/SKILL.md +128 -0
- package/skills/prp-implement/SKILL.md +177 -0
- package/skills/prp-implement/references/agent-task-prompt.md +36 -0
- package/skills/prp-implement/references/detection.md +49 -0
- package/skills/prp-implement/references/dry-run.md +0 -0
- package/skills/prp-implement/references/report-output.md +204 -0
- package/skills/prp-implement/references/validation-and-failures.md +118 -0
- package/skills/prp-plan/SKILL.md +323 -0
- package/skills/prp-plan/references/enhanced-researchers.md +425 -0
- package/skills/prp-plan/references/parallel-additions.md +56 -0
- package/skills/prp-plan/references/plan-template.md +264 -0
- package/skills/prp-plan/references/synthesis-map.md +25 -0
- package/skills/prp-plan/scripts/preflight-enhanced-agents.sh +111 -0
- package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
- package/skills/prp-pr/SKILL.md +402 -0
- package/skills/prp-prd/SKILL.md +442 -0
- package/skills/prp-spec/SKILL.md +274 -0
- package/skills/python-patterns/SKILL.md +103 -0
- package/skills/python-patterns/references/core-idioms.md +304 -0
- package/skills/python-patterns/references/design-and-tooling.md +407 -0
- package/skills/python-testing/SKILL.md +114 -0
- package/skills/python-testing/references/mocking-and-integration.md +395 -0
- package/skills/python-testing/references/pytest-core.md +366 -0
- package/skills/quick-fix/SKILL.md +246 -0
- package/skills/quick-review/SKILL.md +304 -0
- package/skills/release-model/SKILL.md +231 -0
- package/skills/release-model/references/pointer-and-labels.md +83 -0
- package/skills/release-model/references/signals-and-proposal.md +68 -0
- package/skills/release-model/references/template-placeholders.md +42 -0
- package/skills/release-model/references/upgrade-and-audit.md +131 -0
- package/skills/release-model/scripts/collect-signals.sh +459 -0
- package/skills/release-model/scripts/pointer-targets.sh +29 -0
- package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
- package/skills/releaser/SKILL.md +251 -0
- package/skills/releaser/references/ci-optimization-checklist.md +149 -0
- package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
- package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
- package/skills/releaser/references/ci-templates/go-release.yml +50 -0
- package/skills/releaser/references/ci-templates/node-release.yml +126 -0
- package/skills/releaser/references/ci-templates/python-release.yml +95 -0
- package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
- package/skills/releaser/references/ci-workflow-modes.md +42 -0
- package/skills/releaser/references/goal-pairing.md +37 -0
- package/skills/releaser/references/output-templates.md +143 -0
- package/skills/releaser/references/project-type-matrix.md +144 -0
- package/skills/releaser/references/release-branches.md +138 -0
- package/skills/releaser/references/release-ci-loop.md +249 -0
- package/skills/releaser/references/release-notes-template.md +42 -0
- package/skills/releaser/references/release-preparation.md +210 -0
- package/skills/releaser/scripts/check-release-branch.sh +235 -0
- package/skills/releaser/scripts/detect-project.sh +234 -0
- package/skills/releaser/scripts/draft-changelog.sh +387 -0
- package/skills/releaser/scripts/publish-release.sh +302 -0
- package/skills/research-to-issues/SKILL.md +285 -0
- package/skills/research-to-issues/references/label-taxonomy.md +48 -0
- package/skills/research-to-issues/references/parse-deep-research.md +86 -0
- package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
- package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
- package/skills/research-to-issues/references/parse-prd.md +184 -0
- package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
- package/skills/research-to-issues/references/plan-display-format.md +136 -0
- package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
- package/skills/research-to-issues/templates/feature-issue.md +131 -0
- package/skills/research-to-issues/templates/task-issue.md +104 -0
- package/skills/research-to-issues/templates/tracking-issue.md +126 -0
- package/skills/resume-session/SKILL.md +152 -0
- package/skills/review-fix/SKILL.md +229 -0
- package/skills/review-fix/references/fix-report.md +121 -0
- package/skills/review-fix/references/fixer-dispatch.md +79 -0
- package/skills/review-fix/references/plan.md +119 -0
- package/skills/rust-patterns/SKILL.md +85 -0
- package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
- package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
- package/skills/rust-testing/SKILL.md +99 -0
- package/skills/rust-testing/references/advanced-testing.md +247 -0
- package/skills/rust-testing/references/unit-and-integration.md +193 -0
- package/skills/save-session/SKILL.md +159 -0
- package/skills/shared-context/SKILL.md +101 -0
- package/skills/ts-patterns/SKILL.md +159 -0
- package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
- package/skills/ts-patterns/references/types-errors-modules.md +336 -0
- package/skills/ts-testing/SKILL.md +151 -0
- package/skills/ts-testing/references/advanced-testing.md +350 -0
- package/skills/ts-testing/references/vitest-core.md +318 -0
- package/skills/visual-plan/SKILL.md +221 -0
- package/skills/visual-plan/references/canvas.md +132 -0
- package/skills/visual-plan/references/document-quality.md +178 -0
- package/skills/visual-plan/references/exemplar.md +120 -0
- package/skills/visual-plan/references/wireframe.md +212 -0
- package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
- package/skills/visual-recap/SKILL.md +238 -0
- package/skills/visual-recap/references/wireframe.md +237 -0
- package/skills/write-docs/SKILL.md +354 -0
- package/skills/write-docs/scripts/audit-documentation.sh +190 -0
- package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
- package/skills/write-docs/scripts/verify-links.sh +81 -0
- package/skills/write-docs/templates/docs-readme.md +34 -0
- package/skills/write-docs/templates/documentation-strategy.md +91 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Pre-generation gate: blocks plan generation if analysis files are missing.
|
|
3
|
+
# Usage: persist-or-fail.sh <feature-dir> [--optimized]
|
|
4
|
+
#
|
|
5
|
+
# Modes:
|
|
6
|
+
# default Standard plan-workflow / parallel-plan: requires
|
|
7
|
+
# analysis-context.md, analysis-code.md, analysis-tasks.md.
|
|
8
|
+
# --optimized plan-workflow --optimized: requires the 5 unified analyst
|
|
9
|
+
# outputs — analysis-architecture.md, analysis-patterns.md,
|
|
10
|
+
# analysis-integration.md, analysis-docs.md, analysis-tasks.md.
|
|
11
|
+
#
|
|
12
|
+
# Exit 0 = all required analysis files present and non-empty, safe to generate plan
|
|
13
|
+
# Exit 1 = prints MISSING_FILES list and ACTION_REQUIRED message
|
|
14
|
+
#
|
|
15
|
+
# This is the critical chokepoint that runs immediately before plan generation.
|
|
16
|
+
# Unlike validate-analysis-artifacts.sh (which checks quality), this script
|
|
17
|
+
# is a binary pass/fail gate: files exist and are non-empty, or plan generation
|
|
18
|
+
# is blocked.
|
|
19
|
+
|
|
20
|
+
set -euo pipefail
|
|
21
|
+
|
|
22
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
23
|
+
RESOLVER="${SCRIPT_DIR}/../../../shared/scripts/resolve-plans-dir.sh"
|
|
24
|
+
|
|
25
|
+
# Source resolver to get PLANS_ROOT for path resolution
|
|
26
|
+
if [[ -f "$RESOLVER" ]]; then
|
|
27
|
+
# shellcheck source=../../../shared/scripts/resolve-plans-dir.sh
|
|
28
|
+
source "$RESOLVER"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
RED='\033[0;31m'
|
|
32
|
+
GREEN='\033[0;32m'
|
|
33
|
+
YELLOW='\033[1;33m'
|
|
34
|
+
NC='\033[0m'
|
|
35
|
+
|
|
36
|
+
if [[ $# -lt 1 ]]; then
|
|
37
|
+
echo "Usage: $0 <feature-dir> [--optimized]"
|
|
38
|
+
echo ""
|
|
39
|
+
echo "Pre-generation gate: ensures all analysis files exist before plan generation."
|
|
40
|
+
echo " default Standard 3-file set (analysis-context/code/tasks)"
|
|
41
|
+
echo " --optimized 5-file unified-analyst set (architecture/patterns/integration/docs/tasks)"
|
|
42
|
+
echo "Exit 0 = proceed to plan generation"
|
|
43
|
+
echo "Exit 1 = analysis files missing, plan generation blocked"
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
feature_dir=""
|
|
48
|
+
optimized="false"
|
|
49
|
+
|
|
50
|
+
while [[ $# -gt 0 ]]; do
|
|
51
|
+
case "$1" in
|
|
52
|
+
--optimized)
|
|
53
|
+
optimized="true"
|
|
54
|
+
shift
|
|
55
|
+
;;
|
|
56
|
+
*)
|
|
57
|
+
if [[ -z "$feature_dir" ]]; then
|
|
58
|
+
feature_dir="$1"
|
|
59
|
+
else
|
|
60
|
+
echo -e "${RED}ERROR${NC}: unexpected argument: $1" >&2
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
shift
|
|
64
|
+
;;
|
|
65
|
+
esac
|
|
66
|
+
done
|
|
67
|
+
|
|
68
|
+
if [[ -z "$feature_dir" ]]; then
|
|
69
|
+
echo -e "${RED}ERROR${NC}: feature-dir required" >&2
|
|
70
|
+
exit 1
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Resolve relative paths against PLANS_ROOT (from resolve-plans-dir.sh)
|
|
74
|
+
if [[ "$feature_dir" != /* && -n "${PLANS_ROOT:-}" ]]; then
|
|
75
|
+
feature_dir="${PLANS_ROOT}/${feature_dir}"
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
if [[ ! -d "$feature_dir" ]]; then
|
|
79
|
+
echo -e "${RED}GATE FAILED${NC}: Feature directory not found: $feature_dir"
|
|
80
|
+
exit 1
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
declare -a required_files
|
|
84
|
+
if [[ "$optimized" == "true" ]]; then
|
|
85
|
+
required_files=(
|
|
86
|
+
"analysis-architecture.md"
|
|
87
|
+
"analysis-patterns.md"
|
|
88
|
+
"analysis-integration.md"
|
|
89
|
+
"analysis-docs.md"
|
|
90
|
+
"analysis-tasks.md"
|
|
91
|
+
)
|
|
92
|
+
else
|
|
93
|
+
required_files=(
|
|
94
|
+
"analysis-context.md"
|
|
95
|
+
"analysis-code.md"
|
|
96
|
+
"analysis-tasks.md"
|
|
97
|
+
)
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
declare -a missing_files=()
|
|
101
|
+
|
|
102
|
+
for file in "${required_files[@]}"; do
|
|
103
|
+
path="${feature_dir}/${file}"
|
|
104
|
+
if [[ ! -f "$path" ]]; then
|
|
105
|
+
missing_files+=("$file")
|
|
106
|
+
elif [[ ! -s "$path" ]]; then
|
|
107
|
+
missing_files+=("$file (empty)")
|
|
108
|
+
fi
|
|
109
|
+
done
|
|
110
|
+
|
|
111
|
+
mode_label="standard"
|
|
112
|
+
if [[ "$optimized" == "true" ]]; then
|
|
113
|
+
mode_label="optimized"
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
if [[ ${#missing_files[@]} -eq 0 ]]; then
|
|
117
|
+
echo -e "${GREEN}GATE PASSED${NC} (${mode_label}): All analysis files present in ${feature_dir}"
|
|
118
|
+
for file in "${required_files[@]}"; do
|
|
119
|
+
size=$(wc -c < "${feature_dir}/${file}" | tr -d ' ')
|
|
120
|
+
echo -e " ${GREEN}OK${NC}: ${file} (${size} bytes)"
|
|
121
|
+
done
|
|
122
|
+
exit 0
|
|
123
|
+
else
|
|
124
|
+
echo -e "${RED}GATE FAILED${NC} (${mode_label}): Analysis files missing — plan generation BLOCKED"
|
|
125
|
+
echo ""
|
|
126
|
+
echo "MISSING_FILES:"
|
|
127
|
+
for file in "${missing_files[@]}"; do
|
|
128
|
+
echo -e " ${RED}-${NC} ${file}"
|
|
129
|
+
done
|
|
130
|
+
echo ""
|
|
131
|
+
echo -e "${YELLOW}ACTION_REQUIRED${NC}: Re-dispatch the failing agent(s) to write the missing files to ${feature_dir}/."
|
|
132
|
+
echo "Do NOT have the orchestrator write these files itself from captured agent summaries — that bypasses the contract."
|
|
133
|
+
echo "Do NOT proceed to plan generation until this gate passes (exit 0)."
|
|
134
|
+
exit 1
|
|
135
|
+
fi
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Validates analysis artifact files for parallel-plan
|
|
3
|
+
# Usage: validate-analysis-artifacts.sh <feature-dir> [--optimized]
|
|
4
|
+
#
|
|
5
|
+
# Modes:
|
|
6
|
+
# default Standard 3-file set:
|
|
7
|
+
# analysis-context.md, analysis-code.md, analysis-tasks.md
|
|
8
|
+
# --optimized 5-file unified-analyst set:
|
|
9
|
+
# analysis-architecture.md, analysis-patterns.md,
|
|
10
|
+
# analysis-integration.md, analysis-docs.md, analysis-tasks.md
|
|
11
|
+
#
|
|
12
|
+
# Checks that all required analysis agent outputs exist, are non-empty,
|
|
13
|
+
# meet minimum size, and contain expected headings.
|
|
14
|
+
# Exits non-zero if any file is missing or invalid.
|
|
15
|
+
|
|
16
|
+
set -euo pipefail
|
|
17
|
+
|
|
18
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
19
|
+
RESOLVER="${SCRIPT_DIR}/../../../shared/scripts/resolve-plans-dir.sh"
|
|
20
|
+
|
|
21
|
+
# Source resolver to get PLANS_ROOT for path resolution
|
|
22
|
+
if [[ -f "$RESOLVER" ]]; then
|
|
23
|
+
# shellcheck source=../../../shared/scripts/resolve-plans-dir.sh
|
|
24
|
+
source "$RESOLVER"
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
RED='\033[0;31m'
|
|
28
|
+
GREEN='\033[0;32m'
|
|
29
|
+
YELLOW='\033[1;33m'
|
|
30
|
+
NC='\033[0m'
|
|
31
|
+
|
|
32
|
+
errors=0
|
|
33
|
+
warnings=0
|
|
34
|
+
|
|
35
|
+
log_error() {
|
|
36
|
+
echo -e "${RED}ERROR:${NC} $1"
|
|
37
|
+
((errors++)) || true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
log_warning() {
|
|
41
|
+
echo -e "${YELLOW}WARNING:${NC} $1"
|
|
42
|
+
((warnings++)) || true
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
log_success() {
|
|
46
|
+
echo -e "${GREEN}OK:${NC} $1"
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
require_any_heading() {
|
|
50
|
+
local file="$1"
|
|
51
|
+
local label="$2"
|
|
52
|
+
shift 2
|
|
53
|
+
|
|
54
|
+
local found=false
|
|
55
|
+
local heading
|
|
56
|
+
for heading in "$@"; do
|
|
57
|
+
if grep -q "^${heading}" "$file"; then
|
|
58
|
+
found=true
|
|
59
|
+
break
|
|
60
|
+
fi
|
|
61
|
+
done
|
|
62
|
+
|
|
63
|
+
if [[ "$found" == true ]]; then
|
|
64
|
+
log_success "$(basename "$file"): found ${label}"
|
|
65
|
+
else
|
|
66
|
+
log_error "$(basename "$file"): missing ${label} (expected one of: $*)"
|
|
67
|
+
fi
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if [[ $# -lt 1 ]]; then
|
|
71
|
+
echo "Usage: $0 <feature-dir> [--optimized]"
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
feature_dir=""
|
|
76
|
+
optimized="false"
|
|
77
|
+
|
|
78
|
+
while [[ $# -gt 0 ]]; do
|
|
79
|
+
case "$1" in
|
|
80
|
+
--optimized)
|
|
81
|
+
optimized="true"
|
|
82
|
+
shift
|
|
83
|
+
;;
|
|
84
|
+
*)
|
|
85
|
+
if [[ -z "$feature_dir" ]]; then
|
|
86
|
+
feature_dir="$1"
|
|
87
|
+
else
|
|
88
|
+
echo -e "${RED}ERROR:${NC} unexpected argument: $1" >&2
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
shift
|
|
92
|
+
;;
|
|
93
|
+
esac
|
|
94
|
+
done
|
|
95
|
+
|
|
96
|
+
if [[ -z "$feature_dir" ]]; then
|
|
97
|
+
echo -e "${RED}ERROR:${NC} feature-dir required" >&2
|
|
98
|
+
exit 1
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
# Always resolve relative paths against PLANS_ROOT (from resolve-plans-dir.sh)
|
|
102
|
+
if [[ "$feature_dir" != /* && -n "${PLANS_ROOT:-}" ]]; then
|
|
103
|
+
feature_dir="${PLANS_ROOT}/${feature_dir}"
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
if [[ ! -d "$feature_dir" ]]; then
|
|
107
|
+
log_error "Feature directory not found: $feature_dir"
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
declare -a files
|
|
112
|
+
if [[ "$optimized" == "true" ]]; then
|
|
113
|
+
files=(
|
|
114
|
+
"analysis-architecture.md"
|
|
115
|
+
"analysis-patterns.md"
|
|
116
|
+
"analysis-integration.md"
|
|
117
|
+
"analysis-docs.md"
|
|
118
|
+
"analysis-tasks.md"
|
|
119
|
+
)
|
|
120
|
+
else
|
|
121
|
+
files=(
|
|
122
|
+
"analysis-context.md"
|
|
123
|
+
"analysis-code.md"
|
|
124
|
+
"analysis-tasks.md"
|
|
125
|
+
)
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
mode_label="standard"
|
|
129
|
+
if [[ "$optimized" == "true" ]]; then
|
|
130
|
+
mode_label="optimized"
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
echo "Validating analysis artifacts (${mode_label}) in: $feature_dir"
|
|
134
|
+
echo "=========================================="
|
|
135
|
+
|
|
136
|
+
for file in "${files[@]}"; do
|
|
137
|
+
path="${feature_dir}/${file}"
|
|
138
|
+
|
|
139
|
+
if [[ ! -f "$path" ]]; then
|
|
140
|
+
log_error "${file}: file not found"
|
|
141
|
+
continue
|
|
142
|
+
fi
|
|
143
|
+
|
|
144
|
+
if [[ ! -s "$path" ]]; then
|
|
145
|
+
log_error "${file}: file is empty"
|
|
146
|
+
continue
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
size_bytes="$(wc -c < "$path" | tr -d ' ')"
|
|
150
|
+
if [[ "$size_bytes" -lt 400 ]]; then
|
|
151
|
+
log_warning "${file}: content is short (${size_bytes} bytes)"
|
|
152
|
+
fi
|
|
153
|
+
|
|
154
|
+
# Check for title heading
|
|
155
|
+
if grep -q "^# " "$path"; then
|
|
156
|
+
log_success "${file}: has title heading"
|
|
157
|
+
else
|
|
158
|
+
log_warning "${file}: missing title heading"
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
# File-specific heading checks
|
|
162
|
+
case "$file" in
|
|
163
|
+
analysis-context.md)
|
|
164
|
+
require_any_heading "$path" "summary section" \
|
|
165
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
166
|
+
require_any_heading "$path" "architecture section" \
|
|
167
|
+
"## Architecture Context" "## Architecture" "## Critical Files Reference"
|
|
168
|
+
;;
|
|
169
|
+
analysis-code.md)
|
|
170
|
+
require_any_heading "$path" "summary section" \
|
|
171
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
172
|
+
require_any_heading "$path" "patterns section" \
|
|
173
|
+
"## Implementation Patterns" "## Existing Code Structure" "## Code Conventions"
|
|
174
|
+
;;
|
|
175
|
+
analysis-tasks.md)
|
|
176
|
+
require_any_heading "$path" "summary section" \
|
|
177
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
178
|
+
require_any_heading "$path" "phase/task section" \
|
|
179
|
+
"## Recommended Phase Structure" "## Task Granularity" "## Dependency Analysis"
|
|
180
|
+
;;
|
|
181
|
+
analysis-architecture.md)
|
|
182
|
+
require_any_heading "$path" "summary section" \
|
|
183
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
184
|
+
require_any_heading "$path" "architecture section" \
|
|
185
|
+
"## Architecture Context" "## Architecture" "## System Overview" "## Critical Files Reference"
|
|
186
|
+
;;
|
|
187
|
+
analysis-patterns.md)
|
|
188
|
+
require_any_heading "$path" "summary section" \
|
|
189
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
190
|
+
require_any_heading "$path" "patterns section" \
|
|
191
|
+
"## Implementation Patterns" "## Architectural Patterns" "## Existing Code Structure" "## Code Conventions"
|
|
192
|
+
;;
|
|
193
|
+
analysis-integration.md)
|
|
194
|
+
require_any_heading "$path" "summary section" \
|
|
195
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
196
|
+
require_any_heading "$path" "API/database section" \
|
|
197
|
+
"## API Endpoints" "## Database" "## External Services" "## Integration Points"
|
|
198
|
+
;;
|
|
199
|
+
analysis-docs.md)
|
|
200
|
+
require_any_heading "$path" "summary section" \
|
|
201
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
202
|
+
require_any_heading "$path" "documentation section" \
|
|
203
|
+
"## Must-Read Documents" "## Architecture Docs" "## Documentation Gaps" "## Reading List"
|
|
204
|
+
;;
|
|
205
|
+
esac
|
|
206
|
+
done
|
|
207
|
+
|
|
208
|
+
echo "=========================================="
|
|
209
|
+
echo "Errors: $errors"
|
|
210
|
+
echo "Warnings: $warnings"
|
|
211
|
+
|
|
212
|
+
if [[ $errors -gt 0 ]]; then
|
|
213
|
+
exit 1
|
|
214
|
+
fi
|
|
215
|
+
|
|
216
|
+
exit 0
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Validates research artifact files for shared-context
|
|
3
|
+
# Usage: validate-research-artifacts.sh <feature-dir> [--optimized]
|
|
4
|
+
#
|
|
5
|
+
# Modes:
|
|
6
|
+
# default Standard 4-file research set (research-architecture/patterns/integration/docs.md)
|
|
7
|
+
# --optimized plan-workflow --optimized: 5-file unified-analyst set
|
|
8
|
+
# (analysis-architecture/patterns/integration/docs/tasks.md).
|
|
9
|
+
# In optimized mode the workflow does not produce research-*.md;
|
|
10
|
+
# this validator delegates to the same 5-file set as
|
|
11
|
+
# validate-analysis-artifacts.sh --optimized so Phase 2 has a
|
|
12
|
+
# meaningful check to run.
|
|
13
|
+
#
|
|
14
|
+
# Checks that all required outputs exist, are non-empty, meet minimum size,
|
|
15
|
+
# and contain expected headings. Exits non-zero if any file is missing or invalid.
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
|
20
|
+
RESOLVER="${SCRIPT_DIR}/../../../shared/scripts/resolve-plans-dir.sh"
|
|
21
|
+
|
|
22
|
+
# Source resolver to get PLANS_ROOT for path resolution
|
|
23
|
+
if [[ -f "$RESOLVER" ]]; then
|
|
24
|
+
# shellcheck source=../../../shared/scripts/resolve-plans-dir.sh
|
|
25
|
+
source "$RESOLVER"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
RED='\033[0;31m'
|
|
29
|
+
GREEN='\033[0;32m'
|
|
30
|
+
YELLOW='\033[1;33m'
|
|
31
|
+
NC='\033[0m'
|
|
32
|
+
|
|
33
|
+
errors=0
|
|
34
|
+
warnings=0
|
|
35
|
+
|
|
36
|
+
log_error() {
|
|
37
|
+
echo -e "${RED}ERROR:${NC} $1"
|
|
38
|
+
((errors++)) || true
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
log_warning() {
|
|
42
|
+
echo -e "${YELLOW}WARNING:${NC} $1"
|
|
43
|
+
((warnings++)) || true
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
log_success() {
|
|
47
|
+
echo -e "${GREEN}OK:${NC} $1"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
require_any_heading() {
|
|
51
|
+
local file="$1"
|
|
52
|
+
local label="$2"
|
|
53
|
+
shift 2
|
|
54
|
+
|
|
55
|
+
local found=false
|
|
56
|
+
local heading
|
|
57
|
+
for heading in "$@"; do
|
|
58
|
+
if grep -q "^${heading}" "$file"; then
|
|
59
|
+
found=true
|
|
60
|
+
break
|
|
61
|
+
fi
|
|
62
|
+
done
|
|
63
|
+
|
|
64
|
+
if [[ "$found" == true ]]; then
|
|
65
|
+
log_success "$(basename "$file"): found ${label}"
|
|
66
|
+
else
|
|
67
|
+
log_error "$(basename "$file"): missing ${label} (expected one of: $*)"
|
|
68
|
+
fi
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if [[ $# -lt 1 ]]; then
|
|
72
|
+
echo "Usage: $0 <feature-dir> [--optimized]"
|
|
73
|
+
exit 1
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
feature_dir=""
|
|
77
|
+
optimized="false"
|
|
78
|
+
|
|
79
|
+
while [[ $# -gt 0 ]]; do
|
|
80
|
+
case "$1" in
|
|
81
|
+
--optimized)
|
|
82
|
+
optimized="true"
|
|
83
|
+
shift
|
|
84
|
+
;;
|
|
85
|
+
*)
|
|
86
|
+
if [[ -z "$feature_dir" ]]; then
|
|
87
|
+
feature_dir="$1"
|
|
88
|
+
else
|
|
89
|
+
echo -e "${RED}ERROR:${NC} unexpected argument: $1" >&2
|
|
90
|
+
exit 1
|
|
91
|
+
fi
|
|
92
|
+
shift
|
|
93
|
+
;;
|
|
94
|
+
esac
|
|
95
|
+
done
|
|
96
|
+
|
|
97
|
+
if [[ -z "$feature_dir" ]]; then
|
|
98
|
+
echo -e "${RED}ERROR:${NC} feature-dir required" >&2
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# Always resolve relative paths against PLANS_ROOT (from resolve-plans-dir.sh)
|
|
103
|
+
if [[ "$feature_dir" != /* && -n "${PLANS_ROOT:-}" ]]; then
|
|
104
|
+
feature_dir="${PLANS_ROOT}/${feature_dir}"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
if [[ ! -d "$feature_dir" ]]; then
|
|
108
|
+
log_error "Feature directory not found: $feature_dir"
|
|
109
|
+
exit 1
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
declare -a files
|
|
113
|
+
if [[ "$optimized" == "true" ]]; then
|
|
114
|
+
# Optimized mode: validate the 5 unified analyst outputs instead.
|
|
115
|
+
files=(
|
|
116
|
+
"analysis-architecture.md"
|
|
117
|
+
"analysis-patterns.md"
|
|
118
|
+
"analysis-integration.md"
|
|
119
|
+
"analysis-docs.md"
|
|
120
|
+
"analysis-tasks.md"
|
|
121
|
+
)
|
|
122
|
+
else
|
|
123
|
+
files=(
|
|
124
|
+
"research-architecture.md"
|
|
125
|
+
"research-patterns.md"
|
|
126
|
+
"research-integration.md"
|
|
127
|
+
"research-docs.md"
|
|
128
|
+
)
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
mode_label="standard"
|
|
132
|
+
if [[ "$optimized" == "true" ]]; then
|
|
133
|
+
mode_label="optimized"
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
echo "Validating research artifacts (${mode_label}) in: $feature_dir"
|
|
137
|
+
echo "=========================================="
|
|
138
|
+
|
|
139
|
+
for file in "${files[@]}"; do
|
|
140
|
+
path="${feature_dir}/${file}"
|
|
141
|
+
|
|
142
|
+
if [[ ! -f "$path" ]]; then
|
|
143
|
+
log_error "${file}: file not found"
|
|
144
|
+
continue
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
if [[ ! -s "$path" ]]; then
|
|
148
|
+
log_error "${file}: file is empty"
|
|
149
|
+
continue
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
size_bytes="$(wc -c < "$path" | tr -d ' ')"
|
|
153
|
+
if [[ "$size_bytes" -lt 400 ]]; then
|
|
154
|
+
log_warning "${file}: content is short (${size_bytes} bytes)"
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
# Check for title heading
|
|
158
|
+
if grep -q "^# " "$path"; then
|
|
159
|
+
log_success "${file}: has title heading"
|
|
160
|
+
else
|
|
161
|
+
log_warning "${file}: missing title heading"
|
|
162
|
+
fi
|
|
163
|
+
|
|
164
|
+
# File-specific heading checks
|
|
165
|
+
case "$file" in
|
|
166
|
+
research-architecture.md)
|
|
167
|
+
require_any_heading "$path" "system/components section" \
|
|
168
|
+
"## System Overview" "## Relevant Components" "## Architecture Overview"
|
|
169
|
+
require_any_heading "$path" "integration section" \
|
|
170
|
+
"## Integration Points" "## Data Flow" "## Key Dependencies"
|
|
171
|
+
;;
|
|
172
|
+
research-patterns.md)
|
|
173
|
+
require_any_heading "$path" "patterns section" \
|
|
174
|
+
"## Architectural Patterns" "## Patterns to Follow" "## Code Conventions"
|
|
175
|
+
;;
|
|
176
|
+
research-integration.md)
|
|
177
|
+
require_any_heading "$path" "API/database section" \
|
|
178
|
+
"## API Endpoints" "## Database" "## External Services"
|
|
179
|
+
;;
|
|
180
|
+
research-docs.md)
|
|
181
|
+
require_any_heading "$path" "documentation section" \
|
|
182
|
+
"## Must-Read Documents" "## Architecture Docs" "## Documentation Gaps"
|
|
183
|
+
;;
|
|
184
|
+
analysis-architecture.md)
|
|
185
|
+
require_any_heading "$path" "summary section" \
|
|
186
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
187
|
+
require_any_heading "$path" "architecture section" \
|
|
188
|
+
"## Architecture Context" "## Architecture" "## System Overview" "## Critical Files Reference"
|
|
189
|
+
;;
|
|
190
|
+
analysis-patterns.md)
|
|
191
|
+
require_any_heading "$path" "summary section" \
|
|
192
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
193
|
+
require_any_heading "$path" "patterns section" \
|
|
194
|
+
"## Implementation Patterns" "## Architectural Patterns" "## Existing Code Structure" "## Code Conventions"
|
|
195
|
+
;;
|
|
196
|
+
analysis-integration.md)
|
|
197
|
+
require_any_heading "$path" "summary section" \
|
|
198
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
199
|
+
require_any_heading "$path" "API/database section" \
|
|
200
|
+
"## API Endpoints" "## Database" "## External Services" "## Integration Points"
|
|
201
|
+
;;
|
|
202
|
+
analysis-docs.md)
|
|
203
|
+
require_any_heading "$path" "summary section" \
|
|
204
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
205
|
+
require_any_heading "$path" "documentation section" \
|
|
206
|
+
"## Must-Read Documents" "## Architecture Docs" "## Documentation Gaps" "## Reading List"
|
|
207
|
+
;;
|
|
208
|
+
analysis-tasks.md)
|
|
209
|
+
require_any_heading "$path" "summary section" \
|
|
210
|
+
"## Executive Summary" "## Summary" "## Overview"
|
|
211
|
+
require_any_heading "$path" "phase/task section" \
|
|
212
|
+
"## Recommended Phase Structure" "## Task Granularity" "## Dependency Analysis"
|
|
213
|
+
;;
|
|
214
|
+
esac
|
|
215
|
+
done
|
|
216
|
+
|
|
217
|
+
echo "=========================================="
|
|
218
|
+
echo "Errors: $errors"
|
|
219
|
+
echo "Warnings: $warnings"
|
|
220
|
+
|
|
221
|
+
if [[ $errors -gt 0 ]]; then
|
|
222
|
+
exit 1
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
exit 0
|