@soleur/opencode 0.0.0-stage → 3.354.2
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/.claude-plugin/agents.manifest.json +476 -0
- package/.claude-plugin/plugin.json +42 -0
- package/README.md +44 -2
- package/agents/community/.gitkeep +0 -0
- package/agents/engineering/cto.md +87 -0
- package/agents/engineering/design/ddd-architect.md +95 -0
- package/agents/engineering/discovery/agent-finder.md +214 -0
- package/agents/engineering/discovery/functional-discovery.md +182 -0
- package/agents/engineering/infra/infra-security.md +151 -0
- package/agents/engineering/infra/platform-strategist.md +109 -0
- package/agents/engineering/infra/terraform-architect.md +171 -0
- package/agents/engineering/prompt-engineer.md +37 -0
- package/agents/engineering/research/best-practices-researcher.md +115 -0
- package/agents/engineering/research/framework-docs-researcher.md +93 -0
- package/agents/engineering/research/git-history-analyzer.md +53 -0
- package/agents/engineering/research/learnings-researcher.md +285 -0
- package/agents/engineering/research/repo-research-analyst.md +118 -0
- package/agents/engineering/review/agent-native-reviewer.md +279 -0
- package/agents/engineering/review/architecture-strategist.md +61 -0
- package/agents/engineering/review/code-quality-analyst.md +92 -0
- package/agents/engineering/review/code-simplicity-reviewer.md +109 -0
- package/agents/engineering/review/data-integrity-guardian.md +82 -0
- package/agents/engineering/review/data-migration-expert.md +98 -0
- package/agents/engineering/review/deployment-verification-agent.md +183 -0
- package/agents/engineering/review/dhh-rails-reviewer.md +46 -0
- package/agents/engineering/review/kieran-rails-reviewer.md +87 -0
- package/agents/engineering/review/legacy-code-expert.md +55 -0
- package/agents/engineering/review/observability-coverage-reviewer.md +147 -0
- package/agents/engineering/review/pattern-recognition-specialist.md +59 -0
- package/agents/engineering/review/performance-oracle.md +130 -0
- package/agents/engineering/review/security-sentinel.md +167 -0
- package/agents/engineering/review/semgrep-sast.md +36 -0
- package/agents/engineering/review/test-design-reviewer.md +150 -0
- package/agents/engineering/review/user-impact-reviewer.md +70 -0
- package/agents/engineering/workflow/pr-comment-resolver.md +69 -0
- package/agents/finance/budget-analyst.md +29 -0
- package/agents/finance/cfo.md +44 -0
- package/agents/finance/financial-reporter.md +30 -0
- package/agents/finance/revenue-analyst.md +30 -0
- package/agents/legal/clo.md +115 -0
- package/agents/legal/legal-compliance-auditor.md +110 -0
- package/agents/legal/legal-document-generator.md +134 -0
- package/agents/marketing/analytics-analyst.md +25 -0
- package/agents/marketing/brand-architect.md +181 -0
- package/agents/marketing/cmo.md +76 -0
- package/agents/marketing/conversion-optimizer.md +19 -0
- package/agents/marketing/copywriter.md +20 -0
- package/agents/marketing/fact-checker.md +70 -0
- package/agents/marketing/growth-strategist.md +145 -0
- package/agents/marketing/paid-media-strategist.md +28 -0
- package/agents/marketing/pricing-strategist.md +17 -0
- package/agents/marketing/programmatic-seo-specialist.md +25 -0
- package/agents/marketing/retention-strategist.md +23 -0
- package/agents/marketing/seo-aeo-analyst.md +164 -0
- package/agents/operations/coo.md +50 -0
- package/agents/operations/ops-advisor.md +78 -0
- package/agents/operations/ops-provisioner.md +101 -0
- package/agents/operations/ops-research.md +52 -0
- package/agents/operations/service-automator.md +278 -0
- package/agents/product/business-validator.md +206 -0
- package/agents/product/competitive-intelligence.md +89 -0
- package/agents/product/cpo.md +63 -0
- package/agents/product/design/ux-design-lead.md +209 -0
- package/agents/product/spec-flow-analyzer.md +122 -0
- package/agents/sales/cro.md +44 -0
- package/agents/sales/deal-architect.md +29 -0
- package/agents/sales/outbound-strategist.md +29 -0
- package/agents/sales/pipeline-analyst.md +29 -0
- package/agents/support/cco.md +48 -0
- package/agents/support/community-manager.md +570 -0
- package/agents/support/ticket-triage.md +70 -0
- package/bin/soleur-opencode.js +29 -0
- package/commands/go.md +660 -0
- package/commands/help.md +273 -0
- package/commands/sync.md +977 -0
- package/commands/version.md +103 -0
- package/hooks/antigravity-hooks.json +84 -0
- package/hooks/antigravity-session-start.sh +15 -0
- package/hooks/bare-root-cwd-guard.sh +131 -0
- package/hooks/browser-snapshot-credential-guard.sh +200 -0
- package/hooks/codex-session-start.sh +9 -0
- package/hooks/compaction-state.sh +525 -0
- package/hooks/destructive-command-guard.sh +1387 -0
- package/hooks/devin-session-start.sh +90 -0
- package/hooks/ext-filter-detect.sh +171 -0
- package/hooks/hooks.json +133 -0
- package/hooks/lib/hook-tool-kind.sh +24 -0
- package/hooks/lib/log-rotation.sh +176 -0
- package/hooks/lib/shell-argv.pl +576 -0
- package/hooks/memory-backstop.sh +1114 -0
- package/hooks/operator-stage-approval.sh +391 -0
- package/hooks/stop-hook.sh +367 -0
- package/hooks/unkept-promise-hook.sh +383 -0
- package/hooks/version-banner.sh +127 -0
- package/hooks/welcome-hook.sh +50 -0
- package/install.js +29 -0
- package/lib/agent-registry.ts +154 -0
- package/lib/c4-canonical-cli.mjs +34 -0
- package/lib/c4-canonical.mjs +46 -0
- package/lib/c4-from-components.ts +554 -0
- package/lib/go-routing.ts +81 -0
- package/lib/grok-inspect-contract.ts +311 -0
- package/lib/harness-model-map.ts +101 -0
- package/lib/harness-parity.ts +726 -0
- package/lib/harness-tool-map.ts +180 -0
- package/lib/harness.ts +716 -0
- package/lib/heartbeat-live-reconcile.ts +1153 -0
- package/lib/heartbeat-manifest.ts +361 -0
- package/lib/kb-coverage.ts +252 -0
- package/lib/pr-merge-poll.ts +103 -0
- package/lib/workflow-fidelity.ts +388 -0
- package/opencode/INSTRUCTIONS.md +171 -0
- package/opencode/agents/engineering/cto.md +10 -0
- package/opencode/agents/engineering/design/ddd-architect.md +10 -0
- package/opencode/agents/engineering/discovery/agent-finder.md +10 -0
- package/opencode/agents/engineering/discovery/functional-discovery.md +10 -0
- package/opencode/agents/engineering/infra/infra-security.md +10 -0
- package/opencode/agents/engineering/infra/platform-strategist.md +10 -0
- package/opencode/agents/engineering/infra/terraform-architect.md +10 -0
- package/opencode/agents/engineering/prompt-engineer.md +10 -0
- package/opencode/agents/engineering/research/best-practices-researcher.md +10 -0
- package/opencode/agents/engineering/research/framework-docs-researcher.md +10 -0
- package/opencode/agents/engineering/research/git-history-analyzer.md +10 -0
- package/opencode/agents/engineering/research/learnings-researcher.md +10 -0
- package/opencode/agents/engineering/research/repo-research-analyst.md +10 -0
- package/opencode/agents/engineering/review/agent-native-reviewer.md +10 -0
- package/opencode/agents/engineering/review/architecture-strategist.md +10 -0
- package/opencode/agents/engineering/review/code-quality-analyst.md +10 -0
- package/opencode/agents/engineering/review/code-simplicity-reviewer.md +10 -0
- package/opencode/agents/engineering/review/data-integrity-guardian.md +10 -0
- package/opencode/agents/engineering/review/data-migration-expert.md +10 -0
- package/opencode/agents/engineering/review/deployment-verification-agent.md +10 -0
- package/opencode/agents/engineering/review/dhh-rails-reviewer.md +10 -0
- package/opencode/agents/engineering/review/kieran-rails-reviewer.md +10 -0
- package/opencode/agents/engineering/review/legacy-code-expert.md +10 -0
- package/opencode/agents/engineering/review/observability-coverage-reviewer.md +10 -0
- package/opencode/agents/engineering/review/pattern-recognition-specialist.md +10 -0
- package/opencode/agents/engineering/review/performance-oracle.md +10 -0
- package/opencode/agents/engineering/review/security-sentinel.md +10 -0
- package/opencode/agents/engineering/review/semgrep-sast.md +10 -0
- package/opencode/agents/engineering/review/test-design-reviewer.md +10 -0
- package/opencode/agents/engineering/review/user-impact-reviewer.md +10 -0
- package/opencode/agents/engineering/workflow/pr-comment-resolver.md +10 -0
- package/opencode/agents/finance/budget-analyst.md +10 -0
- package/opencode/agents/finance/cfo.md +10 -0
- package/opencode/agents/finance/financial-reporter.md +10 -0
- package/opencode/agents/finance/revenue-analyst.md +10 -0
- package/opencode/agents/legal/clo.md +10 -0
- package/opencode/agents/legal/legal-compliance-auditor.md +10 -0
- package/opencode/agents/legal/legal-document-generator.md +10 -0
- package/opencode/agents/marketing/analytics-analyst.md +10 -0
- package/opencode/agents/marketing/brand-architect.md +10 -0
- package/opencode/agents/marketing/cmo.md +10 -0
- package/opencode/agents/marketing/conversion-optimizer.md +10 -0
- package/opencode/agents/marketing/copywriter.md +10 -0
- package/opencode/agents/marketing/fact-checker.md +10 -0
- package/opencode/agents/marketing/growth-strategist.md +10 -0
- package/opencode/agents/marketing/paid-media-strategist.md +10 -0
- package/opencode/agents/marketing/pricing-strategist.md +10 -0
- package/opencode/agents/marketing/programmatic-seo-specialist.md +10 -0
- package/opencode/agents/marketing/retention-strategist.md +10 -0
- package/opencode/agents/marketing/seo-aeo-analyst.md +10 -0
- package/opencode/agents/operations/coo.md +10 -0
- package/opencode/agents/operations/ops-advisor.md +10 -0
- package/opencode/agents/operations/ops-provisioner.md +10 -0
- package/opencode/agents/operations/ops-research.md +10 -0
- package/opencode/agents/operations/service-automator.md +10 -0
- package/opencode/agents/product/business-validator.md +10 -0
- package/opencode/agents/product/competitive-intelligence.md +10 -0
- package/opencode/agents/product/cpo.md +10 -0
- package/opencode/agents/product/design/ux-design-lead.md +10 -0
- package/opencode/agents/product/spec-flow-analyzer.md +10 -0
- package/opencode/agents/sales/cro.md +10 -0
- package/opencode/agents/sales/deal-architect.md +10 -0
- package/opencode/agents/sales/outbound-strategist.md +10 -0
- package/opencode/agents/sales/pipeline-analyst.md +10 -0
- package/opencode/agents/support/cco.md +10 -0
- package/opencode/agents/support/community-manager.md +10 -0
- package/opencode/agents/support/ticket-triage.md +10 -0
- package/opencode/commands/go.md +10 -0
- package/opencode/commands/help.md +10 -0
- package/opencode/commands/sync.md +10 -0
- package/opencode/commands/version.md +11 -0
- package/opencode/opencode.json +8 -0
- package/opencode/plugin.ts +818 -0
- package/package.json +36 -4
- package/scripts/admin-merge-ready.sh +545 -0
- package/scripts/admin-merge-ready.test.sh +753 -0
- package/scripts/affected-tests.sh +908 -0
- package/scripts/affected-tests.test.sh +1797 -0
- package/scripts/alpha-metrics.sh +78 -0
- package/scripts/alpha-metrics.test.sh +115 -0
- package/scripts/ancestor-signal-helpers.baseline.txt +16 -0
- package/scripts/audit-flag-flip.sh +107 -0
- package/scripts/check-red-on-main.sh +316 -0
- package/scripts/ci-head-verdict.sh +411 -0
- package/scripts/cloud-detect.sh +193 -0
- package/scripts/delegation-verify.sh +657 -0
- package/scripts/delegation-verify.test.sh +1424 -0
- package/scripts/deploy-arm.sh +475 -0
- package/scripts/domain-model-drift.sh +419 -0
- package/scripts/emit-decision.sh +144 -0
- package/scripts/emit-decision.test.sh +144 -0
- package/scripts/ext-filter-divergence-corpus.txt +15 -0
- package/scripts/ext-filter-divergence.sh +189 -0
- package/scripts/generate-c4-from-components.ts +442 -0
- package/scripts/grok-fidelity-gate.sh +68 -0
- package/scripts/grok-pre-push-gate.sh +232 -0
- package/scripts/harness-discovery-smoke.ts +906 -0
- package/scripts/harness-parity-census.ts +92 -0
- package/scripts/inngest-luks-alert-armed-probe.ts +29 -0
- package/scripts/install-opencode-adapter.ts +509 -0
- package/scripts/lib/affected-tests/common.sh +365 -0
- package/scripts/lib/affected-tests/go.sh +157 -0
- package/scripts/lib/affected-tests/js.sh +188 -0
- package/scripts/lib/affected-tests/nx-turbo.sh +98 -0
- package/scripts/lib/affected-tests/python.sh +185 -0
- package/scripts/lib/context-sanitize.sh +49 -0
- package/scripts/lib/domain-model-lib.sh +180 -0
- package/scripts/lib/ext-filter-grammar.tsv +34 -0
- package/scripts/lib/operator-script.sh +1236 -0
- package/scripts/lib/proc.sh +580 -0
- package/scripts/lib/session-state.sh +748 -0
- package/scripts/lib/tmp-classify.sh +843 -0
- package/scripts/lib/wrapper-boundary.sh +47 -0
- package/scripts/lint-ratchet.py +1547 -0
- package/scripts/monitor-pr-checks.sh +441 -0
- package/scripts/pipeline-tally.sh +756 -0
- package/scripts/pipeline-tally.test.sh +740 -0
- package/scripts/plugin-version.sh +528 -0
- package/scripts/precommit-guard.sh +115 -0
- package/scripts/precommit-guard.test.sh +254 -0
- package/scripts/reconcile-live-heartbeats.ts +705 -0
- package/scripts/render-c4-model.sh +217 -0
- package/scripts/resolve-git-root.sh +55 -0
- package/scripts/resolve-regenerable-conflicts.sh +363 -0
- package/scripts/resolve-regenerable-conflicts.test.sh +780 -0
- package/scripts/ruff-requirements.txt +22 -0
- package/scripts/run-in-pid-namespace.sh +98 -0
- package/scripts/run-in-pid-namespace.test.sh +290 -0
- package/scripts/scan-ancestor-signal-helpers.py +556 -0
- package/scripts/scan-ancestor-signal-helpers.test.sh +670 -0
- package/scripts/setup-ralph-loop.sh +238 -0
- package/scripts/sync-cursor-name-map.ts +316 -0
- package/scripts/sync-grok-agent-compat.ts +188 -0
- package/scripts/sync-npm-package.ts +165 -0
- package/scripts/sync-opencode-adapter.ts +498 -0
- package/scripts/sync-pr-behind.sh +647 -0
- package/scripts/sync-pr-behind.test.sh +252 -0
- package/scripts/taste-profile-update.sh +180 -0
- package/scripts/taste-profile-update.test.sh +167 -0
- package/scripts/write-budget-marker.sh +23 -0
- package/scripts/write-kb-coverage.ts +113 -0
- package/skills/admin-ip-refresh/SKILL.md +81 -0
- package/skills/admin-ip-refresh/references/admin-ip-refresh-procedure.md +201 -0
- package/skills/agent-browser/SKILL.md +698 -0
- package/skills/agent-browser/scripts/playwright-mcp-profile-slot.sh +304 -0
- package/skills/agent-browser/scripts/playwright-mcp-redact-proxy.py +964 -0
- package/skills/agent-browser/scripts/redact-a11y-snapshot.py +443 -0
- package/skills/agent-browser/test/fixtures/capture-playwright-mcp-fixtures.py +217 -0
- package/skills/agent-browser/test/fixtures/fake-passthrough-proxy.py +24 -0
- package/skills/agent-browser/test/fixtures/fake-playwright-mcp.py +131 -0
- package/skills/agent-browser/test/fixtures/make-proxy-mutant.py +48 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/dialog-link-injection.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/empty-content.json +5 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-and-result.json +4 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-code-bool.json +6 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-code-string.json +6 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-message-tree.json +6 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-no-data.json +6 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-string.json +4 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/error-with-data.json +9 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/evaluate-escaped-object.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/invalid-utf8.json +4 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/link-result.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/list-two-results.json +6 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/meta-in-result.json +13 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/no-content.json +5 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/quoted-key.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/resource-block.json +18 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/result-and-method.json +11 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/result-string.json +3 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/run-code-escaped-one-row.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/run-code-escaped.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/structured-content.json +13 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/tools-list-no-tools.json +5 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/tree-no-credential.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/two-text-blocks.json +14 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/unparsable-line.json +3 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/value-contains-brace.json +10 -0
- package/skills/agent-browser/test/fixtures/odd-shapes/value-contains-link-substring.json +10 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/close.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/evaluate.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/find.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/framing.json +6 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/initialize.json +14 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/navigate-link.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/navigate.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/roots-list-request.json +5 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/screenshot.json +17 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/snapshot-filename.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/snapshot-meta-json.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/snapshot-meta-raw.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/snapshot.json +12 -0
- package/skills/agent-browser/test/fixtures/playwright-mcp-0.0.78/tools-list.json +827 -0
- package/skills/agent-browser/test/fixtures/proxy-session-driver.py +138 -0
- package/skills/agent-browser/test/fixtures/session-facts.py +102 -0
- package/skills/agent-browser/test/playwright-mcp-lifetime.test.sh +1620 -0
- package/skills/agent-browser/test/playwright-mcp-redact-proxy.test.sh +1599 -0
- package/skills/agent-browser/test/redact-a11y-snapshot.test.sh +527 -0
- package/skills/agent-native-architecture/SKILL.md +479 -0
- package/skills/agent-native-architecture/references/action-parity-discipline.md +430 -0
- package/skills/agent-native-architecture/references/agent-execution-patterns.md +483 -0
- package/skills/agent-native-architecture/references/agent-native-testing.md +605 -0
- package/skills/agent-native-architecture/references/architecture-patterns.md +493 -0
- package/skills/agent-native-architecture/references/dynamic-context-injection.md +358 -0
- package/skills/agent-native-architecture/references/files-universal-interface.md +314 -0
- package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +381 -0
- package/skills/agent-native-architecture/references/mcp-tool-design.md +524 -0
- package/skills/agent-native-architecture/references/mobile-patterns.md +897 -0
- package/skills/agent-native-architecture/references/product-implications.md +478 -0
- package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +342 -0
- package/skills/agent-native-architecture/references/self-modification.md +294 -0
- package/skills/agent-native-architecture/references/shared-workspace-architecture.md +700 -0
- package/skills/agent-native-architecture/references/system-prompt-design.md +263 -0
- package/skills/agent-native-audit/SKILL.md +300 -0
- package/skills/agent-native-audit/workflows/agent-native-audit.workflow.js +423 -0
- package/skills/andrew-kane-gem-writer/SKILL.md +189 -0
- package/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/skills/andrew-kane-gem-writer/references/resources.md +126 -0
- package/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/skills/architecture/SKILL.md +436 -0
- package/skills/architecture/references/adr-template.md +154 -0
- package/skills/architecture/references/likec4-reference.md +136 -0
- package/skills/architecture/references/nfr-reference.md +126 -0
- package/skills/archive-kb/SKILL.md +86 -0
- package/skills/archive-kb/scripts/archive-kb.sh +300 -0
- package/skills/archive-kb/test/archive-kb-partial-run.test.sh +276 -0
- package/skills/atdd-developer/SKILL.md +65 -0
- package/skills/brainstorm/SKILL.md +701 -0
- package/skills/brainstorm/references/brainstorm-brand-workshop.md +153 -0
- package/skills/brainstorm/references/brainstorm-domain-config.md +63 -0
- package/skills/brainstorm/references/brainstorm-validation-workshop.md +65 -0
- package/skills/brainstorm/references/ui-surface-terms.md +42 -0
- package/skills/brainstorm-techniques/SKILL.md +231 -0
- package/skills/brainstorm-techniques/references/decision-principles.md +150 -0
- package/skills/brainstorm-techniques/references/phase-boundaries.md +103 -0
- package/skills/brainstorm-techniques/references/standing-delegation.md +407 -0
- package/skills/brainstorm-techniques/references/technical-ruling-delegation.md +174 -0
- package/skills/campaign-calendar/SKILL.md +145 -0
- package/skills/cf-token-scope/SKILL.md +164 -0
- package/skills/cf-token-scope/references/widen-playbook.md +114 -0
- package/skills/cf-token-scope/scripts/cf-token-scope.sh +253 -0
- package/skills/changelog/SKILL.md +142 -0
- package/skills/code-to-prd/SKILL.md +66 -0
- package/skills/code-to-prd/references/banner-template.md +12 -0
- package/skills/code-to-prd/references/prd-template.md +41 -0
- package/skills/code-to-prd/scripts/code-to-prd.sh +634 -0
- package/skills/code-to-prd/test/code-to-prd.test.sh +447 -0
- package/skills/code-to-prd/test/fixture/.env.example +7 -0
- package/skills/code-to-prd/test/fixture/app/about/page.tsx +11 -0
- package/skills/code-to-prd/test/fixture/app/api/health/route.ts +10 -0
- package/skills/code-to-prd/test/fixture/app/page.tsx +14 -0
- package/skills/code-to-prd/test/fixture/next.config.mjs +3 -0
- package/skills/code-to-prd/test/fixture/package.json +6 -0
- package/skills/cohort-status/SKILL.md +62 -0
- package/skills/community/SKILL.md +210 -0
- package/skills/community/scripts/bsky-community.sh +644 -0
- package/skills/community/scripts/bsky-setup.sh +631 -0
- package/skills/community/scripts/community-router.sh +93 -0
- package/skills/community/scripts/discord-community.sh +487 -0
- package/skills/community/scripts/discord-setup.sh +784 -0
- package/skills/community/scripts/github-community.sh +706 -0
- package/skills/community/scripts/hn-community.sh +233 -0
- package/skills/community/scripts/lib/hmac-sha1-b64.sh +126 -0
- package/skills/community/scripts/linkedin-community.sh +750 -0
- package/skills/community/scripts/linkedin-setup.sh +758 -0
- package/skills/community/scripts/x-community.sh +890 -0
- package/skills/community/scripts/x-setup.sh +713 -0
- package/skills/community/test/community-argv.test.sh +2922 -0
- package/skills/community/test/github-community.test.sh +981 -0
- package/skills/competitive-analysis/SKILL.md +69 -0
- package/skills/competitive-analysis/references/peer-plugin-audit.md +218 -0
- package/skills/compound/SKILL.md +673 -0
- package/skills/compound/scripts/token-efficiency-report.sh +334 -0
- package/skills/compound/test/phase-16.test.sh +379 -0
- package/skills/compound-capture/SKILL.md +791 -0
- package/skills/compound-capture/assets/critical-pattern-template.md +37 -0
- package/skills/compound-capture/assets/resolution-template.md +116 -0
- package/skills/compound-capture/references/yaml-schema.md +67 -0
- package/skills/compound-capture/schema.yaml +181 -0
- package/skills/constraint-scaffold/SKILL.md +175 -0
- package/skills/constraint-scaffold/references/boundary-readme.template +35 -0
- package/skills/constraint-scaffold/references/constraint-gates-workflow.template +69 -0
- package/skills/constraint-scaffold/references/depcruise-config.template +230 -0
- package/skills/constraint-scaffold/references/fix-constraints-stage-a.template +240 -0
- package/skills/constraint-scaffold/references/fix-constraints-stage-b.template +313 -0
- package/skills/constraint-scaffold/references/shared-runner.template +135 -0
- package/skills/constraint-scaffold/scripts/constraint-scaffold.sh +589 -0
- package/skills/constraint-scaffold/test/bite-proof.test.sh +1338 -0
- package/skills/constraint-scaffold/test/boundary.test.sh +734 -0
- package/skills/constraint-scaffold/test/emit-fix-constraints.test.sh +193 -0
- package/skills/constraint-scaffold/test/generator.test.sh +93 -0
- package/skills/constraint-scaffold/test/parity.test.sh +285 -0
- package/skills/content-writer/SKILL.md +242 -0
- package/skills/content-writer/scripts/blog-jargon-scan.sh +42 -0
- package/skills/cron-delete/SKILL.md +56 -0
- package/skills/cron-list/SKILL.md +54 -0
- package/skills/deepen-plan/SKILL.md +937 -0
- package/skills/deepen-plan/workflows/deepen-plan.workflow.js +488 -0
- package/skills/deploy/SKILL.md +115 -0
- package/skills/deploy/references/hetzner-setup.md +67 -0
- package/skills/deploy/scripts/deploy.sh +37 -0
- package/skills/deploy-docs/SKILL.md +95 -0
- package/skills/dhh-rails-style/SKILL.md +203 -0
- package/skills/dhh-rails-style/references/architecture.md +717 -0
- package/skills/dhh-rails-style/references/controllers.md +323 -0
- package/skills/dhh-rails-style/references/frontend.md +556 -0
- package/skills/dhh-rails-style/references/gems.md +316 -0
- package/skills/dhh-rails-style/references/models.md +388 -0
- package/skills/dhh-rails-style/references/testing.md +354 -0
- package/skills/discord-content/SKILL.md +126 -0
- package/skills/docs-site/SKILL.md +214 -0
- package/skills/drain-labeled-backlog/SKILL.md +203 -0
- package/skills/drain-labeled-backlog/scripts/group-by-area.sh +208 -0
- package/skills/drain-labeled-backlog/workflows/drain-labeled-backlog.workflow.js +433 -0
- package/skills/drain-prs/SKILL.md +143 -0
- package/skills/drain-prs/scripts/triage-prs.sh +192 -0
- package/skills/drain-prs/test/argv-ceiling.test.sh +183 -0
- package/skills/dspy-ruby/SKILL.md +634 -0
- package/skills/dspy-ruby/assets/config-template.rb +359 -0
- package/skills/dspy-ruby/assets/module-template.rb +326 -0
- package/skills/dspy-ruby/assets/signature-template.rb +143 -0
- package/skills/dspy-ruby/references/core-concepts.md +268 -0
- package/skills/dspy-ruby/references/optimization.md +623 -0
- package/skills/dspy-ruby/references/providers.md +335 -0
- package/skills/eval-harness/README.md +194 -0
- package/skills/eval-harness/SKILL.md +157 -0
- package/skills/eval-harness/enums/go-routes.json +13 -0
- package/skills/eval-harness/enums/incident-threshold.json +5 -0
- package/skills/eval-harness/enums/lane.json +5 -0
- package/skills/eval-harness/enums/tool-selection.json +20 -0
- package/skills/eval-harness/enums/triage-levels.json +5 -0
- package/skills/eval-harness/gated-skills.json +34 -0
- package/skills/eval-harness/models.generated.json +5 -0
- package/skills/eval-harness/promptfooconfig-go-routing.yaml +35 -0
- package/skills/eval-harness/promptfooconfig-incident-threshold.yaml +32 -0
- package/skills/eval-harness/promptfooconfig-lane-inference.yaml +33 -0
- package/skills/eval-harness/promptfooconfig-ticket-triage.yaml +34 -0
- package/skills/eval-harness/promptfooconfig-tool-selection.yaml +33 -0
- package/skills/eval-harness/prompts/go-baseline.txt +6 -0
- package/skills/eval-harness/prompts/go-skill.txt +21 -0
- package/skills/eval-harness/prompts/incident-threshold-baseline.txt +6 -0
- package/skills/eval-harness/prompts/incident-threshold-skill.txt +12 -0
- package/skills/eval-harness/prompts/lane-inference-baseline.txt +6 -0
- package/skills/eval-harness/prompts/lane-inference-skill.txt +15 -0
- package/skills/eval-harness/prompts/tool-selection-baseline.txt +19 -0
- package/skills/eval-harness/prompts/tool-selection-skill.txt +22 -0
- package/skills/eval-harness/prompts/triage-baseline.txt +7 -0
- package/skills/eval-harness/prompts/triage-skill.txt +10 -0
- package/skills/eval-harness/scripts/eval-gate.cjs +318 -0
- package/skills/eval-harness/scripts/extract-block.cjs +87 -0
- package/skills/eval-harness/scripts/gate-classification.cjs +28 -0
- package/skills/eval-harness/scripts/gen-models.sh +41 -0
- package/skills/eval-harness/scripts/gen-skill-prompt.cjs +177 -0
- package/skills/eval-harness/scripts/measure-classification.cjs +30 -0
- package/skills/eval-harness/scripts/parse-label.cjs +93 -0
- package/skills/eval-harness/scripts/verdict.cjs +132 -0
- package/skills/eval-harness/tasks/go-routing.jsonl +8 -0
- package/skills/eval-harness/tasks/incident-threshold.jsonl +7 -0
- package/skills/eval-harness/tasks/lane-inference.jsonl +7 -0
- package/skills/eval-harness/tasks/ticket-triage.jsonl +6 -0
- package/skills/eval-harness/tasks/tool-selection.jsonl +15 -0
- package/skills/eval-harness/test/eval-gate.test.sh +132 -0
- package/skills/eval-harness/test/extract-block.test.sh +87 -0
- package/skills/eval-harness/test/gate-classification.test.sh +77 -0
- package/skills/eval-harness/test/gen-models.test.sh +75 -0
- package/skills/eval-harness/test/measure-classification.test.sh +74 -0
- package/skills/eval-harness/test/parse-label.test.sh +129 -0
- package/skills/eval-harness/test/registry-completeness.test.sh +109 -0
- package/skills/eval-harness/test/verdict.test.sh +123 -0
- package/skills/every-style-editor/SKILL.md +142 -0
- package/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/skills/feature-tweet/SKILL.md +199 -0
- package/skills/feature-video/SKILL.md +412 -0
- package/skills/feature-video/scripts/check_deps.sh +281 -0
- package/skills/file-todos/SKILL.md +267 -0
- package/skills/file-todos/assets/todo-template.md +166 -0
- package/skills/fix-issue/SKILL.md +278 -0
- package/skills/fix-issue/references/agent-authored-exclusion.md +120 -0
- package/skills/fix-issue/references/exclude-label-jq-snippet.md +97 -0
- package/skills/flag-bootstrap/SETUP.md +142 -0
- package/skills/flag-create/SKILL.md +145 -0
- package/skills/flag-create/scripts/create.sh +273 -0
- package/skills/flag-delete/SKILL.md +167 -0
- package/skills/flag-delete/scripts/delete.sh +288 -0
- package/skills/flag-list/SKILL.md +99 -0
- package/skills/flag-list/scripts/list.sh +275 -0
- package/skills/flag-set-role/SKILL.md +229 -0
- package/skills/flag-set-role/scripts/flip.sh +774 -0
- package/skills/frontend-anti-slop/SKILL.md +106 -0
- package/skills/frontend-anti-slop/references/anti-patterns.md +199 -0
- package/skills/frontend-anti-slop/references/slop-rules.md +65 -0
- package/skills/frontend-anti-slop/scripts/tier1-scan.ts +525 -0
- package/skills/frontend-design/SKILL.md +77 -0
- package/skills/gdpr-gate/NOTICE +136 -0
- package/skills/gdpr-gate/SKILL.md +341 -0
- package/skills/gdpr-gate/references/fields.md +160 -0
- package/skills/gdpr-gate/references/layers/api-layer.md +355 -0
- package/skills/gdpr-gate/references/layers/auth-sessions.md +290 -0
- package/skills/gdpr-gate/references/layers/data-in-transit.md +331 -0
- package/skills/gdpr-gate/references/layers/data-lifecycle.md +341 -0
- package/skills/gdpr-gate/references/layers/frontend.md +249 -0
- package/skills/gdpr-gate/references/layers/testing-seeding.md +256 -0
- package/skills/gdpr-gate/references/leakage-vectors.md +248 -0
- package/skills/gdpr-gate/references/legacy/legal-consent-v1-prose.md +48 -0
- package/skills/gdpr-gate/references/legal-consent.md +140 -0
- package/skills/gdpr-gate/references/non-negotiables.md +60 -0
- package/skills/gdpr-gate/scripts/gdpr-gate.sh +271 -0
- package/skills/gdpr-gate/scripts/notice-frontmatter.sh +337 -0
- package/skills/gdpr-gate/scripts/path-denylist.txt +39 -0
- package/skills/gdpr-gate/scripts/repo-scan.sh +158 -0
- package/skills/gdpr-gate/scripts/vendor-drift-classify.sh +120 -0
- package/skills/gdpr-gate/scripts/vendor-pin-integrity.sh +237 -0
- package/skills/gemini-imagegen/SKILL.md +283 -0
- package/skills/gemini-imagegen/requirements.txt +5 -0
- package/skills/gemini-imagegen/scripts/_error_handling.py +146 -0
- package/skills/gemini-imagegen/scripts/compose_images.py +150 -0
- package/skills/gemini-imagegen/scripts/edit_image.py +137 -0
- package/skills/gemini-imagegen/scripts/gemini_images.py +256 -0
- package/skills/gemini-imagegen/scripts/generate_image.py +147 -0
- package/skills/gemini-imagegen/scripts/multi_turn_chat.py +223 -0
- package/skills/gemini-imagegen/scripts/test_error_handling.py +179 -0
- package/skills/git-worktree/SKILL.md +534 -0
- package/skills/git-worktree/scripts/git-repo-readiness-diag.sh +98 -0
- package/skills/git-worktree/scripts/worktree-manager.sh +4773 -0
- package/skills/git-worktree/test/create-from-origin-main.test.sh +116 -0
- package/skills/git-worktree/test/lease-protects-active.test.sh +1056 -0
- package/skills/git-worktree/test/no-repo-fail-loud.test.sh +88 -0
- package/skills/git-worktree/test/orphan-reaper-honest-count.test.sh +379 -0
- package/skills/git-worktree/test/reap-archive-persistence.test.sh +725 -0
- package/skills/git-worktree/test/stale-lock-sweep.test.sh +176 -0
- package/skills/go/SKILL.md +54 -0
- package/skills/growth/SKILL.md +164 -0
- package/skills/harvest-debt/SKILL.md +78 -0
- package/skills/harvest-debt/scripts/harvest-debt.sh +114 -0
- package/skills/heal-skill/SKILL.md +173 -0
- package/skills/help/SKILL.md +46 -0
- package/skills/incident/NOTICE +39 -0
- package/skills/incident/SKILL.md +395 -0
- package/skills/incident/scripts/dry-run.sh +448 -0
- package/skills/incident/scripts/redact-engine.py +412 -0
- package/skills/incident/scripts/redact-sentinel.sh +44 -0
- package/skills/incident/templates/pir.md +139 -0
- package/skills/incident/test/fixtures/dry-run-incident.json +26 -0
- package/skills/incident/test/fixtures/dry-run-secret-leak.json +26 -0
- package/skills/incident/test/fixtures/legacy-bash-scanner.sh +82 -0
- package/skills/incident/test/fixtures/positive-corpus.md +87 -0
- package/skills/incident/test/redact-sentinel.test.sh +1420 -0
- package/skills/invoice/SKILL.md +206 -0
- package/skills/kb-glossary/SKILL.md +71 -0
- package/skills/kb-glossary/references/glossary-format.md +111 -0
- package/skills/kb-glossary/references/rejected-request-register.md +115 -0
- package/skills/kb-search/SKILL.md +276 -0
- package/skills/kb-search/scripts/kb-search-cache.sh +123 -0
- package/skills/legal-audit/SKILL.md +161 -0
- package/skills/legal-generate/NOTICE +242 -0
- package/skills/legal-generate/SKILL.md +244 -0
- package/skills/legal-generate/references/templates/advisor-agreement/template.md +12 -0
- package/skills/legal-generate/references/templates/business-associate-agreement/template.md +112 -0
- package/skills/legal-generate/references/templates/cookie-notice/template.md +82 -0
- package/skills/legal-generate/references/templates/dpa-global/template.md +439 -0
- package/skills/legal-generate/references/templates/dpa-us/template.md +222 -0
- package/skills/legal-generate/references/templates/employee-offer-letter/template.md +75 -0
- package/skills/legal-generate/references/templates/master-services-agreement/template.md +252 -0
- package/skills/legal-generate/references/templates/mutual-nda/template.md +66 -0
- package/skills/legal-generate/references/templates/one-way-nda/template.md +38 -0
- package/skills/legal-generate/references/templates/privacy-policy-gdpr/template.md +427 -0
- package/skills/legal-generate/references/templates/privacy-policy-us/template.md +313 -0
- package/skills/legal-generate/references/templates/terms-of-use/template.md +75 -0
- package/skills/legal-generate/scripts/strip-vendor-credit.sh +96 -0
- package/skills/linear-fetch/SKILL.md +247 -0
- package/skills/linear-fetch/scripts/assert-no-linear-telemetry.sh +66 -0
- package/skills/linear-fetch/scripts/redact-linear-urls.sh +51 -0
- package/skills/linear-fetch/scripts/render-caller-template.sh +36 -0
- package/skills/linear-fetch/test/assert-no-linear-telemetry.test.sh +113 -0
- package/skills/linear-fetch/test/parity.test.sh +112 -0
- package/skills/linear-fetch/test/persist-safe-integration.test.sh +191 -0
- package/skills/linear-fetch/test/redact-linear-urls.test.sh +226 -0
- package/skills/merge-pr/SKILL.md +670 -0
- package/skills/model-launch-review/SKILL.md +255 -0
- package/skills/model-launch-review/scripts/audit-models.sh +501 -0
- package/skills/one-shot/SKILL.md +316 -0
- package/skills/one-shot/references/token-discipline.md +74 -0
- package/skills/operator-bootstrap/SKILL.md +412 -0
- package/skills/operator-bootstrap/template.sh +439 -0
- package/skills/operator-digest/SKILL.md +287 -0
- package/skills/operator-digest/assets/operator-digest.workflow.yml +175 -0
- package/skills/operator-digest/scripts/digest-scrub.sh +119 -0
- package/skills/operator-digest/scripts/provision-operator-digest-repo.sh +147 -0
- package/skills/operator-rephrase/SKILL.md +98 -0
- package/skills/pencil-setup/SKILL.md +201 -0
- package/skills/pencil-setup/scripts/check_deps.sh +556 -0
- package/skills/pencil-setup/scripts/copy_adapter.sh +80 -0
- package/skills/pencil-setup/scripts/package-lock.json +1172 -0
- package/skills/pencil-setup/scripts/package.json +14 -0
- package/skills/pencil-setup/scripts/pencil-error-enrichment.mjs +21 -0
- package/skills/pencil-setup/scripts/pencil-mcp-adapter.mjs +733 -0
- package/skills/pencil-setup/scripts/pencil-response-classify.mjs +38 -0
- package/skills/pencil-setup/scripts/pencil-save-gate.mjs +26 -0
- package/skills/pencil-setup/scripts/sanitize-filename.mjs +25 -0
- package/skills/plan/SKILL.md +1140 -0
- package/skills/plan/references/differential-migration-testing.md +185 -0
- package/skills/plan/references/plan-community-discovery.md +42 -0
- package/skills/plan/references/plan-founder-check.md +137 -0
- package/skills/plan/references/plan-functional-overlap.md +25 -0
- package/skills/plan/references/plan-host-fanout.md +51 -0
- package/skills/plan/references/plan-issue-templates.md +779 -0
- package/skills/plan/references/plan-network-outage-checklist.md +131 -0
- package/skills/plan/references/plan-scope-check.md +126 -0
- package/skills/plan/references/plan-sharp-edges.md +331 -0
- package/skills/plan/references/plan-signoff-lifecycle.md +12 -0
- package/skills/plan/references/webapp-cwv-observability.md +143 -0
- package/skills/plan-review/SKILL.md +91 -0
- package/skills/plan-review/lib/named-panel.mjs +58 -0
- package/skills/plan-review/workflows/plan-review.workflow.js +477 -0
- package/skills/postmerge/SKILL.md +642 -0
- package/skills/postmerge/references/deploy-status-debugging.md +141 -0
- package/skills/postmerge/references/graceful-degradation.md +20 -0
- package/skills/postmerge/references/sentry-error-count-delta.md +137 -0
- package/skills/preflight/SKILL.md +1553 -0
- package/skills/preflight/references/check-13-founder-check.md +286 -0
- package/skills/preflight/scripts/founder-check.py +1640 -0
- package/skills/preflight/scripts/parse-form-a.awk +107 -0
- package/skills/preflight/scripts/probe-verb-gate.sh +108 -0
- package/skills/product-roadmap/SKILL.md +357 -0
- package/skills/product-roadmap/scripts/roadmap-reconcile.sh +327 -0
- package/skills/provision-cloudflare/SKILL.md +67 -0
- package/skills/provision-cloudflare/scripts/provision-cloudflare.sh +271 -0
- package/skills/provision-doppler/SKILL.md +58 -0
- package/skills/provision-doppler/scripts/provision-doppler.sh +358 -0
- package/skills/provision-github/SKILL.md +59 -0
- package/skills/provision-github/scripts/provision-github.sh +300 -0
- package/skills/provision-hetzner/SKILL.md +76 -0
- package/skills/provision-hetzner/scripts/provision-hetzner.sh +262 -0
- package/skills/provision-hetzner/test/fixture/knowledge-base/legal/tenant-dpa-register.md +26 -0
- package/skills/provision-hetzner/test/fixture/provision-hetzner-dry-run.golden +34 -0
- package/skills/provision-hetzner/test/provision-hetzner-characterization.test.sh +227 -0
- package/skills/qa/SKILL.md +263 -0
- package/skills/qa/references/browser-preflight.md +22 -0
- package/skills/questionnaire-generate/SKILL.md +328 -0
- package/skills/questionnaire-generate/references/questionnaire.template +60 -0
- package/skills/rclone/SKILL.md +162 -0
- package/skills/rclone/scripts/check_setup.sh +63 -0
- package/skills/release-announce/SKILL.md +65 -0
- package/skills/release-docs/SKILL.md +92 -0
- package/skills/reproduce-bug/SKILL.md +358 -0
- package/skills/resolve-debt/SKILL.md +85 -0
- package/skills/resolve-debt/scripts/resolve-debt.py +584 -0
- package/skills/resolve-parallel/SKILL.md +45 -0
- package/skills/resolve-parallel/workflows/resolve-parallel.workflow.js +415 -0
- package/skills/resolve-pr-parallel/SKILL.md +68 -0
- package/skills/resolve-pr-parallel/workflows/resolve-pr-parallel.workflow.js +419 -0
- package/skills/resolve-todo-parallel/SKILL.md +57 -0
- package/skills/resolve-todo-parallel/workflows/resolve-todo-parallel.workflow.js +398 -0
- package/skills/review/SKILL.md +1620 -0
- package/skills/review/references/anti-slop-scanner-hook.md +40 -0
- package/skills/review/references/defect-classes-migrations.md +9 -0
- package/skills/review/references/generated-input-oracle-surfaces.md +15 -0
- package/skills/review/references/review-e2e-testing.md +116 -0
- package/skills/review/references/review-evidence-comment.md +36 -0
- package/skills/review/references/review-todo-structure.md +165 -0
- package/skills/review/references/risk-tier-and-fix-rounds.md +97 -0
- package/skills/review/references/semgrep-custom-rules.yaml +174 -0
- package/skills/review/references/ultrathink-phases.md +98 -0
- package/skills/review/references/wfs.md +6 -0
- package/skills/review/scripts/emit-review-trailer.sh +499 -0
- package/skills/review/scripts/ensure-semgrep.sh +99 -0
- package/skills/review/scripts/fix-round-seats.sh +197 -0
- package/skills/review/test/emit-review-trailer.test.sh +387 -0
- package/skills/review/test/ensure-semgrep.test.sh +111 -0
- package/skills/review/test/fix-round-seats.test.sh +237 -0
- package/skills/review/workflows/README.md +147 -0
- package/skills/review/workflows/review.workflow.js +667 -0
- package/skills/schedule/SKILL.md +796 -0
- package/skills/seo-aeo/SKILL.md +139 -0
- package/skills/seo-aeo/scripts/validate-csp.sh +233 -0
- package/skills/seo-aeo/scripts/validate-seo.sh +262 -0
- package/skills/ship/SKILL.md +3023 -0
- package/skills/ship/references/adr-ordinal-collision.md +47 -0
- package/skills/ship/references/affected-gate-contract.md +115 -0
- package/skills/ship/references/ci-run-diagnosis.md +29 -0
- package/skills/ship/references/ci-workflow-authoring.md +68 -0
- package/skills/ship/references/cleanup-merged-archival.md +39 -0
- package/skills/ship/references/counsel-review-clo-attestation.md +38 -0
- package/skills/ship/references/cto-ruling-armed-push.md +5 -0
- package/skills/ship/references/decision-challenges-render.md +71 -0
- package/skills/ship/references/delegated-act-authoring-form.md +7 -0
- package/skills/ship/references/detached-battery-verdict.md +13 -0
- package/skills/ship/references/epic-close-sweep.md +62 -0
- package/skills/ship/references/feature-tweet-draft.md +42 -0
- package/skills/ship/references/followthrough-issue-body-template.md +47 -0
- package/skills/ship/references/followthrough-stub-template.sh +92 -0
- package/skills/ship/references/merge-queue-dequeue.md +39 -0
- package/skills/ship/references/operator-holds.md +179 -0
- package/skills/ship/references/pipeline-tally-render.md +43 -0
- package/skills/ship/references/pr-overlap.md +153 -0
- package/skills/ship/references/queue-mode.md +7 -0
- package/skills/ship/references/ready-run-wait.md +36 -0
- package/skills/ship/references/red-on-main-quarantine.md +110 -0
- package/skills/ship/references/register-update-pr-pattern.md +88 -0
- package/skills/ship/references/settle-then-admin-merge.md +130 -0
- package/skills/ship/references/supabase-column-probe.md +13 -0
- package/skills/ship/scripts/auto-close-scan.sh +76 -0
- package/skills/ship/scripts/battery-owed.sh +403 -0
- package/skills/ship/scripts/hold-gate-eval.sh +410 -0
- package/skills/ship/scripts/net-issue-flow.sh +665 -0
- package/skills/ship/scripts/pr-overlap-preflight.sh +483 -0
- package/skills/ship/scripts/ship-pir-action-items-gate.sh +246 -0
- package/skills/ship/scripts/technical-ruling-gate.sh +444 -0
- package/skills/skill-creator/SKILL.md +299 -0
- package/skills/skill-creator/references/api-security.md +248 -0
- package/skills/skill-creator/references/authoring-levers.md +110 -0
- package/skills/skill-creator/references/be-clear-and-direct.md +587 -0
- package/skills/skill-creator/references/best-practices.md +431 -0
- package/skills/skill-creator/references/common-patterns.md +639 -0
- package/skills/skill-creator/references/core-principles.md +193 -0
- package/skills/skill-creator/references/executable-code.md +188 -0
- package/skills/skill-creator/references/iteration-and-testing.md +509 -0
- package/skills/skill-creator/references/official-spec.md +193 -0
- package/skills/skill-creator/references/recommended-structure.md +180 -0
- package/skills/skill-creator/references/skill-structure.md +396 -0
- package/skills/skill-creator/references/using-scripts.md +122 -0
- package/skills/skill-creator/references/using-templates.md +120 -0
- package/skills/skill-creator/references/workflows-and-validation.md +541 -0
- package/skills/skill-creator/scripts/init_skill.py +322 -0
- package/skills/skill-creator/scripts/package_skill.py +110 -0
- package/skills/skill-creator/scripts/quick_validate.py +64 -0
- package/skills/skill-creator/templates/router-skill.md +73 -0
- package/skills/skill-creator/templates/simple-skill.md +34 -0
- package/skills/skill-creator/workflows/add-reference.md +96 -0
- package/skills/skill-creator/workflows/add-script.md +104 -0
- package/skills/skill-creator/workflows/add-template.md +83 -0
- package/skills/skill-creator/workflows/add-workflow.md +128 -0
- package/skills/skill-creator/workflows/audit-skill.md +159 -0
- package/skills/skill-creator/workflows/create-domain-expertise-skill.md +623 -0
- package/skills/skill-creator/workflows/create-new-skill.md +207 -0
- package/skills/skill-creator/workflows/get-guidance.md +134 -0
- package/skills/skill-creator/workflows/upgrade-to-router.md +170 -0
- package/skills/skill-creator/workflows/verify-skill.md +226 -0
- package/skills/skill-security-scan/SKILL.md +145 -0
- package/skills/skill-security-scan/references/disclaimer.md +21 -0
- package/skills/skill-security-scan/references/first-party-allowlist.yaml +38 -0
- package/skills/skill-security-scan/references/override-artifact-schema.json +68 -0
- package/skills/skill-security-scan/references/override-mechanism.md +171 -0
- package/skills/skill-security-scan/references/redirect-domains.yaml +27 -0
- package/skills/skill-security-scan/references/regex-patterns.md +136 -0
- package/skills/skill-security-scan/references/rules/code-exec.yaml +70 -0
- package/skills/skill-security-scan/references/rules/filesystem-boundary.yaml +29 -0
- package/skills/skill-security-scan/references/rules/manifest.yaml +44 -0
- package/skills/skill-security-scan/references/rules/supply-chain.yaml +36 -0
- package/skills/skill-security-scan/references/scan-meta-schema.json +63 -0
- package/skills/skill-security-scan/references/test-fixtures/clean-soleur-style.skill.md +23 -0
- package/skills/skill-security-scan/references/test-fixtures/clean-third-party.skill.md +26 -0
- package/skills/skill-security-scan/references/test-fixtures/malicious-codeexec.skill.md +23 -0
- package/skills/skill-security-scan/references/test-fixtures/malicious-curl-pipe-bash.skill.md +69 -0
- package/skills/skill-security-scan/references/test-fixtures/malicious-prompt-injection.skill.md +17 -0
- package/skills/skill-security-scan/references/test-fixtures/malicious-telemetry-beacon.skill.md +23 -0
- package/skills/skill-security-scan/references/typosquat-targets.yaml +65 -0
- package/skills/skill-security-scan/scripts/check-codeexec.sh +41 -0
- package/skills/skill-security-scan/scripts/check-filesystem-boundary.sh +19 -0
- package/skills/skill-security-scan/scripts/check-prompt-injection.sh +95 -0
- package/skills/skill-security-scan/scripts/check-supply-chain.sh +219 -0
- package/skills/skill-security-scan/scripts/check-telemetry-surface.sh +126 -0
- package/skills/skill-security-scan/scripts/lib.sh +197 -0
- package/skills/skill-security-scan/scripts/parse-override.sh +231 -0
- package/skills/skill-security-scan/scripts/run-scan.sh +342 -0
- package/skills/skill-security-scan/scripts/run-self-test.sh +95 -0
- package/skills/skill-security-scan/test/argv-ceiling.test.sh +180 -0
- package/skills/skill-security-scan/test/meta-dir-reap.test.sh +411 -0
- package/skills/skill-security-scan/test/parse-override.test.sh +607 -0
- package/skills/skill-security-scan/test/redact-pii-ghs-shape.test.sh +251 -0
- package/skills/social-distribute/SKILL.md +485 -0
- package/skills/spec-templates/SKILL.md +274 -0
- package/skills/sync/SKILL.md +49 -0
- package/skills/test-browser/SKILL.md +464 -0
- package/skills/test-browser/references/feature-map.md +161 -0
- package/skills/test-fix-loop/SKILL.md +159 -0
- package/skills/test-fix-loop/references/determinism-checklist.md +154 -0
- package/skills/triage/SKILL.md +402 -0
- package/skills/trigger-cron/SKILL.md +136 -0
- package/skills/trigger-cron/scripts/trigger.sh +198 -0
- package/skills/user-set-role/SKILL.md +147 -0
- package/skills/user-set-role/scripts/set-role.sh +218 -0
- package/skills/user-story-writer/SKILL.md +77 -0
- package/skills/ux-audit/SKILL.md +251 -0
- package/skills/ux-audit/references/finding.schema.json +62 -0
- package/skills/ux-audit/references/route-list.yaml +95 -0
- package/skills/ux-audit/scripts/bot-fixture.ts +270 -0
- package/skills/ux-audit/scripts/bot-signin.ts +135 -0
- package/skills/ux-audit/scripts/dedup-hash.ts +46 -0
- package/skills/verification-scaffold/SKILL.md +73 -0
- package/skills/verification-scaffold/references/gitleaks.toml.template +13 -0
- package/skills/verification-scaffold/references/guardrail-audit.md +156 -0
- package/skills/verification-scaffold/references/guards/block-stash-hook.sh.template +72 -0
- package/skills/verification-scaffold/references/guards/commit-on-main-hook.sh.template +82 -0
- package/skills/verification-scaffold/references/guards/orphan-test-check.sh.template +102 -0
- package/skills/verification-scaffold/references/guards/precommit-guard.sh.template +115 -0
- package/skills/verification-scaffold/references/guards/secret-scan-hook.sh.template +176 -0
- package/skills/verification-scaffold/references/guards/verification-gates.yml.template +49 -0
- package/skills/verification-scaffold/references/guards/wrapper-boundary.sh.template +47 -0
- package/skills/verification-scaffold/references/guards.tsv +21 -0
- package/skills/verification-scaffold/references/verification-readme.template +55 -0
- package/skills/verification-scaffold/scripts/verification-scaffold.sh +785 -0
- package/skills/verification-scaffold/test/bite-proof.test.sh +159 -0
- package/skills/verification-scaffold/test/generator.test.sh +319 -0
- package/skills/verification-scaffold/test/manifest.test.sh +144 -0
- package/skills/work/SKILL.md +1480 -0
- package/skills/work/references/end-of-work-resume.md +7 -0
- package/skills/work/references/hook-test-main-cwd.md +24 -0
- package/skills/work/references/key-principles.md +83 -0
- package/skills/work/references/property-testing.md +122 -0
- package/skills/work/references/sql-security-definer-rpc-scaffold.sql +78 -0
- package/skills/work/references/work-agent-teams.md +97 -0
- package/skills/work/references/work-lifecycle-parallel.md +147 -0
- package/skills/work/references/work-lockfile-bumps.md +97 -0
- package/skills/work/references/work-scratch-sandboxes.md +212 -0
- package/skills/work/references/work-subagent-fanout.md +61 -0
- package/skills/work/references/work-test-harness-sharp-edges.md +73 -0
- package/skills/xcode-test/SKILL.md +360 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# LikeC4 DSL — Syntax Reference
|
|
2
|
+
|
|
3
|
+
[LikeC4](https://likec4.dev/) describes a C4 model as code and renders it as
|
|
4
|
+
interactive, drill-down diagrams. Soleur keeps ONE consolidated model and scopes
|
|
5
|
+
it to each C4 level with views. A project is a directory of `.c4` files merged
|
|
6
|
+
together; Soleur splits it into `spec.c4`, `model.c4`, `views.c4`.
|
|
7
|
+
|
|
8
|
+
## Project shape
|
|
9
|
+
|
|
10
|
+
```likec4
|
|
11
|
+
// spec.c4 — declare element kinds + tags once
|
|
12
|
+
specification {
|
|
13
|
+
element actor { style { shape person } }
|
|
14
|
+
element system
|
|
15
|
+
element container
|
|
16
|
+
element database { style { shape storage } }
|
|
17
|
+
element component { style { shape component } }
|
|
18
|
+
tag external
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```likec4
|
|
23
|
+
// model.c4 — declare every element ONCE; nesting creates C4 boundaries
|
|
24
|
+
model {
|
|
25
|
+
customer = actor "Customer" {
|
|
26
|
+
description "Uses the product"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
platform = system "Acme Platform" {
|
|
30
|
+
web = system "Web App" {
|
|
31
|
+
ui = container "Dashboard" {
|
|
32
|
+
technology "React, Next.js"
|
|
33
|
+
description "UI and session management"
|
|
34
|
+
style { shape browser }
|
|
35
|
+
}
|
|
36
|
+
api = container "API Routes" {
|
|
37
|
+
technology "Next.js API"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
db = database "Primary DB" {
|
|
41
|
+
technology "PostgreSQL"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
stripe = system "Stripe" {
|
|
46
|
+
#external
|
|
47
|
+
description "Payments"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// relationships: from -> to "label" { technology "..." }
|
|
51
|
+
customer -> ui "Uses" { technology "HTTPS" }
|
|
52
|
+
ui -> api "Calls" { technology "HTTPS" }
|
|
53
|
+
api -> db "Reads/writes" { technology "SQL" }
|
|
54
|
+
api -> stripe "Charges" { technology "HTTPS" }
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```likec4
|
|
59
|
+
// views.c4 — one view per level; `view <id> of <el>` enables drill-down
|
|
60
|
+
views {
|
|
61
|
+
view context {
|
|
62
|
+
title "System Context (C4 L1)"
|
|
63
|
+
include customer, platform, stripe
|
|
64
|
+
style element.tag == #external { color muted }
|
|
65
|
+
autoLayout TopBottom
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// `of platform` → the `platform` box in `context` gets a drill-down button
|
|
69
|
+
view containers of platform {
|
|
70
|
+
title "Containers (C4 L2)"
|
|
71
|
+
include customer, platform.web, platform.web.ui, platform.web.api, platform.db, stripe
|
|
72
|
+
autoLayout TopBottom
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Rules that matter
|
|
78
|
+
|
|
79
|
+
| Concept | Mermaid C4 (old) | LikeC4 (now) |
|
|
80
|
+
|---------|------------------|--------------|
|
|
81
|
+
| Element | `System(id,"L","D")` | `id = system "L" { description "D" }` |
|
|
82
|
+
| Tech | 2nd arg of `Container(...)` | `technology "…"` property |
|
|
83
|
+
| External | `_Ext` suffix | `#external` tag |
|
|
84
|
+
| Boundary | `Container_Boundary(...) {}` | element **nesting** (parent `{ child }`) |
|
|
85
|
+
| Relationship | `Rel(a,b,"L","T")` | `a -> b "L" { technology "T" }` |
|
|
86
|
+
| Drill-down | not possible | `view X of <element>` + `navigateTo` |
|
|
87
|
+
|
|
88
|
+
- **Declare each element once.** Different views `include` subsets of the one
|
|
89
|
+
model — never redefine an element per view.
|
|
90
|
+
- **Reference nested elements by qualified path** in views and cross-boundary
|
|
91
|
+
relationships: `platform.web.ui`. Top-level ids may be used unqualified.
|
|
92
|
+
- **Nesting is the boundary.** A parent element with children renders as a
|
|
93
|
+
boundary box; there is no separate boundary keyword.
|
|
94
|
+
- **Descriptions / multi-line:** single quotes `'…'`, double quotes `"…"`, or
|
|
95
|
+
triple quotes `'''…'''` / `"""…"""` for multi-line.
|
|
96
|
+
- **Views:** `include *` pulls the element and its descendants (inside `view of
|
|
97
|
+
X`, scoped to X). Use explicit `include a, b, c` for precise level fidelity.
|
|
98
|
+
`autoLayout TopBottom | LeftRight`. Style by tag: `style element.tag == #external { color muted }`.
|
|
99
|
+
|
|
100
|
+
## Drill-down (the point of LikeC4)
|
|
101
|
+
|
|
102
|
+
Define a level-specific view `of` a parent element. LikeC4 adds a navigation
|
|
103
|
+
button on that element in any higher view, so the reader clicks Context →
|
|
104
|
+
Containers → Components. Relationships you draw to/from a parent element (e.g.
|
|
105
|
+
`customer -> platform`) coexist with finer-grained edges to its children
|
|
106
|
+
(`customer -> ui`) — both are kept; each view shows the ones whose endpoints it
|
|
107
|
+
includes.
|
|
108
|
+
|
|
109
|
+
## Validate
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npx -y likec4@1.50.0 validate --no-use-dot . # parse + check references
|
|
113
|
+
_c4_out=$(mktemp -p "$(mktemp -d -t soleur-run.$$.XXXXXXXX)")
|
|
114
|
+
npx -y likec4@1.50.0 export json --no-use-dot -o "$_c4_out" . # element/relation/view counts
|
|
115
|
+
# ... read the counts from "$_c4_out" (jq) — then `rm -f "$_c4_out"; rmdir "$(dirname "$_c4_out")"`; an
|
|
116
|
+
# anonymous `"$(mktemp)"` path can never be found again, so name it (#10017)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Pin the version every writer pins (`likec4@1.50.0`, the `LIKEC4_VERSION` constant) and always pass
|
|
120
|
+
`--no-use-dot`: inside a container likec4 defaults to the graphviz `dot` binary, which produces a
|
|
121
|
+
different layout than the server's wasm render — or, without graphviz, a zero-view model.
|
|
122
|
+
|
|
123
|
+
Export to a temp path, as above, never into the diagrams directory. Never write raw `export json`
|
|
124
|
+
output onto the committed `model.likec4.json`. Every writer publishes the canonical
|
|
125
|
+
one-value-per-line format with blank view hashes, which is what lets git merge two regenerations
|
|
126
|
+
(ADR-235, #8542):
|
|
127
|
+
|
|
128
|
+
- In any repo, run `bash <plugin-root>/scripts/render-c4-model.sh` (in a SKILL.md fence, `${CLAUDE_PLUGIN_ROOT}`) — the plugin's
|
|
129
|
+
renderer, which the merge resolver also runs (the Soleur repo keeps a
|
|
130
|
+
`scripts/regenerate-c4-model.sh` wrapper around it). `soleur:sync`'s C4 producer canonicalizes
|
|
131
|
+
too. To canonicalize by hand, go through a temp file so a failure never truncates the artifact:
|
|
132
|
+
`node <plugin-root>/lib/c4-canonical-cli.mjs "$raw" > "$tmp" && mv "$tmp" model.likec4.json`.
|
|
133
|
+
- To check a committed file, run `node <plugin-root>/lib/c4-canonical-cli.mjs --check model.likec4.json`.
|
|
134
|
+
It prints `canonical` (exit 0) or `not-canonical` (exit 1).
|
|
135
|
+
|
|
136
|
+
Full docs: <https://likec4.dev/>.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Non-Functional Requirements — Reference Guide
|
|
2
|
+
|
|
3
|
+
Non-Functional Requirements (NFRs) define how the system should behave rather than what it should do. Every architecture decision should consider its impact on NFRs.
|
|
4
|
+
|
|
5
|
+
## NFR Categories
|
|
6
|
+
|
|
7
|
+
| Category | Scope | Example NFRs |
|
|
8
|
+
|----------|-------|-------------|
|
|
9
|
+
| Observability | Can we see what the system is doing? | Logging, monitoring, tracing, dashboards |
|
|
10
|
+
| Resilience | Does the system recover from failures? | Circuit breakers, graceful shutdown, auto-healing |
|
|
11
|
+
| Testing | Can we verify the system works? | Functional tests, performance tests, synthetic monitoring |
|
|
12
|
+
| Configuration & Delivery | Can we deploy and configure safely? | Externalized config, CI/CD, canary upgrades |
|
|
13
|
+
| Scaling & Recovery | Can the system grow and recover? | Auto-scaling, readiness/liveness probes, backup |
|
|
14
|
+
| Security | Is the system protected? | Encryption, rate limiting, attack detection, image security |
|
|
15
|
+
| Data Quality | Is the data trustworthy? | Freshness, accuracy, LLM-readiness |
|
|
16
|
+
|
|
17
|
+
## NFR Register Structure
|
|
18
|
+
|
|
19
|
+
The canonical NFR register lives at `knowledge-base/engineering/architecture/nfr-register.md`. It contains all NFRs organized per-container and per-link with applicability matrices.
|
|
20
|
+
|
|
21
|
+
### Per-Container/Link Format
|
|
22
|
+
|
|
23
|
+
Each NFR has its own section with a table mapping to C4 containers and links:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
### NFR-NNN: Title
|
|
27
|
+
|
|
28
|
+
**Category:** X | **Scope:** Y | **System-Level Status:** Z
|
|
29
|
+
|
|
30
|
+
| Container/Link | Status | Enforced By | Evidence |
|
|
31
|
+
|----------------|--------|-------------|----------|
|
|
32
|
+
| Dashboard | Implemented | Cloudflare | WAF managed rulesets |
|
|
33
|
+
| Agent Runtime -> Anthropic | Not Implemented | — | No circuit breaker |
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### NFR Scope Classification
|
|
37
|
+
|
|
38
|
+
Each NFR has a scope that determines which rows appear in its table:
|
|
39
|
+
|
|
40
|
+
| Scope | Description | Rows to Include |
|
|
41
|
+
|-------|-------------|-----------------|
|
|
42
|
+
| Container-scoped | Applies to individual containers | Container rows only |
|
|
43
|
+
| Link-scoped | Applies to relationships between containers | Link rows only |
|
|
44
|
+
| Both | Applies to containers and links | Both container and link rows |
|
|
45
|
+
|
|
46
|
+
### System-Level Rollup
|
|
47
|
+
|
|
48
|
+
System-level status is derived from per-container/link statuses using explicit precedence:
|
|
49
|
+
|
|
50
|
+
1. If any applicable container/link is **Not Implemented** -> system-level is **Not Implemented**
|
|
51
|
+
2. Else if any is **Partial** -> system-level is **Partial**
|
|
52
|
+
3. Else if all are **Implemented** -> system-level is **Implemented**
|
|
53
|
+
4. **N/A** rows are excluded from rollup. An NFR where all rows are N/A has system-level **N/A**
|
|
54
|
+
|
|
55
|
+
## How to Reference NFRs in ADRs
|
|
56
|
+
|
|
57
|
+
When writing the `## NFR Impacts` section of an ADR, reference NFRs by their ID **and the specific container or link affected**:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
## NFR Impacts
|
|
61
|
+
|
|
62
|
+
- **NFR-014 (Externalized Configuration) on New Service container:** Maintained — uses Doppler for secrets (no change)
|
|
63
|
+
- **NFR-026 (Encryption In-Transit) on Agent Runtime -> New Service link:** Implemented — SDK enforces HTTPS
|
|
64
|
+
- **NFR-007 (Circuit Breaker) on Agent Runtime -> New Service link:** Risk introduced — no fallback; filed as follow-up
|
|
65
|
+
- **NFR-001 (Logging) on New Service container:** Needs attention — structured logging required
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Per-container references are more precise than system-level references. Use the format: `NFR-NNN (Name) on <Container/Link>`.
|
|
69
|
+
|
|
70
|
+
### Assessment Checklist
|
|
71
|
+
|
|
72
|
+
When evaluating NFR impacts for a decision, first identify which C4 containers and links the decision affects, then check each category for the affected containers/links:
|
|
73
|
+
|
|
74
|
+
1. **Observability:** Does this change add containers or links that need monitoring? Will existing logging capture the new behavior per container?
|
|
75
|
+
2. **Resilience:** Does this introduce new failure modes on specific links? Are there fallbacks for new external dependencies?
|
|
76
|
+
3. **Testing:** Can the change be tested per container? Does it need new test types (load, integration, E2E)?
|
|
77
|
+
4. **Configuration & Delivery:** Does this add new secrets or deployment steps for specific containers?
|
|
78
|
+
5. **Scaling & Recovery:** Does this change scaling for specific containers? Are there new stateful components or backup requirements?
|
|
79
|
+
6. **Security:** Does this expose new attack surfaces on specific links, handle sensitive data in new containers, or change access control?
|
|
80
|
+
7. **Data Quality:** Does this change how data is created, stored, or accessed per container? Are there new consistency requirements?
|
|
81
|
+
|
|
82
|
+
### When to Update the NFR Register
|
|
83
|
+
|
|
84
|
+
Update `knowledge-base/engineering/architecture/nfr-register.md` when:
|
|
85
|
+
|
|
86
|
+
- An ADR changes the status of an NFR on a specific container/link (e.g., Agent Runtime -> New Service: Not Implemented -> Implemented)
|
|
87
|
+
- A new NFR is identified that is not in the register
|
|
88
|
+
- The enforcement tool changes for a specific container/link
|
|
89
|
+
- An NFR becomes N/A or newly relevant for a container/link due to architecture changes
|
|
90
|
+
- A new container or link is added to the C4 diagram (see Maintenance Procedure below)
|
|
91
|
+
|
|
92
|
+
## NFR Status Definitions
|
|
93
|
+
|
|
94
|
+
| Status | Criteria |
|
|
95
|
+
|--------|----------|
|
|
96
|
+
| **Implemented** | Actively enforced by a tool or mechanism. Verified working. |
|
|
97
|
+
| **Partial** | Some coverage but known gaps. Document what is and is not covered. |
|
|
98
|
+
| **Not Implemented** | Acknowledged but no mechanism in place. May have a roadmap item. |
|
|
99
|
+
| **N/A** | Not applicable at current scale or architecture. Revisit when conditions change. |
|
|
100
|
+
|
|
101
|
+
## Common NFR Patterns by Decision Type
|
|
102
|
+
|
|
103
|
+
| Decision Type | Typically Affects |
|
|
104
|
+
|---------------|------------------|
|
|
105
|
+
| New external service integration | NFR-001 (Logging), NFR-007 (Circuit Breaker), NFR-026 (Encryption In-Transit), NFR-041 (Link Access Control) |
|
|
106
|
+
| Infrastructure change | NFR-002-004 (Monitoring), NFR-010 (Scalability), NFR-016 (CD), NFR-019 (Auto-scaling), NFR-038 (Least Privilege) |
|
|
107
|
+
| New user-facing feature | NFR-008 (Latency), NFR-011 (Functional Testing), NFR-025 (Rate Limiting), NFR-042 (LLM-Ready Docs) |
|
|
108
|
+
| Data model change | NFR-027 (Encryption At-Rest), NFR-029 (Data Freshness), NFR-030 (Data Accuracy), NFR-040 (Retention Policy) |
|
|
109
|
+
| Security change | NFR-023-028 (security category), NFR-038-041, NFR-047 |
|
|
110
|
+
| Deployment change | NFR-016-018 (CD, Graceful Shutdown, Canary), NFR-021-022 (Readiness/Liveness), NFR-032 (Auto Rollback), NFR-036 (Immutable Releases) |
|
|
111
|
+
| New container addition | See Maintenance Procedure below |
|
|
112
|
+
|
|
113
|
+
## Maintenance Procedure: Adding New Containers
|
|
114
|
+
|
|
115
|
+
When a new container is added to the C4 container diagram (`knowledge-base/engineering/architecture/diagrams/c4-model.md`):
|
|
116
|
+
|
|
117
|
+
1. **Classify the container** as runtime, passive, or infrastructure (see Container Classification in the register)
|
|
118
|
+
2. **Add the container** to the Container & Link Inventory table in the NFR register
|
|
119
|
+
3. **Add new links** involving this container to the Link Classification table
|
|
120
|
+
4. **Review each NFR section** and add rows for the new container/links where applicable:
|
|
121
|
+
- Runtime containers: check all container-scoped NFRs (Logging, Monitoring, Testing, Config, etc.)
|
|
122
|
+
- Passive containers: check only Documentation (NFR-015), LLM-Ready Documentation (NFR-042), and Encryption At-Rest (NFR-027) if containing sensitive data
|
|
123
|
+
- Infrastructure containers: check monitoring, security, and scaling categories
|
|
124
|
+
5. **For new links:** check all link-scoped NFRs (Circuit Breaker, Latency, Rate Limiting, Encryption In-Transit, Distributed Tracing, Access Control, Certificate Scope)
|
|
125
|
+
6. **Update the summary table** to reflect new rollup counts
|
|
126
|
+
7. **Verify** container/link names match the C4 diagram exactly
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archive-kb
|
|
3
|
+
description: "This skill should be used when archiving completed knowledge-base artifacts (brainstorms, plans, specs) to their archive/ subdirectories with timestamp prefixes and git history preservation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- grok-harness-invoke:start -->
|
|
7
|
+
**Grok Build (`plugins/soleur/lib/harness.ts` `invokeSkill()`):** Read this SKILL.md in this process and run it to completion. A one-segment `soleur:<name>` in this document names a SKILL — on Grok Build, Read `plugins/soleur/skills/<name>/SKILL.md` in this process; it is not a nested tool_use. A multi-segment id such as `soleur:<domain>:<name>` names an AGENT: spawn it, never Read it, and on Grok Build spawn_subagent takes the id with its colons replaced by hyphens (`agentIdToGrokSubagentType`). **Claude Code:** Skill tool for a skill (`soleur:<name>`), Task tool with `subagent_type` for an agent. Forbidden is executing a subset, not the Read.
|
|
8
|
+
<!-- grok-harness-invoke:end -->
|
|
9
|
+
|
|
10
|
+
# Archive Knowledge-Base Artifacts
|
|
11
|
+
|
|
12
|
+
Archive brainstorms, plans, and spec directories for a completed feature branch.
|
|
13
|
+
The script generates timestamps internally and uses `git mv` to preserve history.
|
|
14
|
+
|
|
15
|
+
> **Superseded in part (ADR-174, #7399).** Archival's only real benefit was removing
|
|
16
|
+
> rows from `knowledge-base/INDEX.md`, and that is now done at index-generation time:
|
|
17
|
+
> inside a spec directory only `spec.md` and `tasks.md` are indexed. A spec directory
|
|
18
|
+
> is live working state until `ship` Phase 6 step 2.5 reads `decision-challenges.md`
|
|
19
|
+
> from it (ADR-084 §5) — an earlier gate that forced archival before merge was built
|
|
20
|
+
> and reverted for that ordering reason. The constraint was ordering, not gating:
|
|
21
|
+
> ship `## Phase 6.45: KB Artifact Archival` runs after the last live-path reads, and
|
|
22
|
+
> the `ship-kb-archive-gate.sh` hook denies only a merge that would land live paths.
|
|
23
|
+
>
|
|
24
|
+
> Retiring its spec/plan discovery paths is tracked by **#7400**. Discovery is now
|
|
25
|
+
> three axes: the slug match (below) UNIONED with the branch diff — files added or
|
|
26
|
+
> modified on the branch under `knowledge-base/project/{plans,brainstorms,specs}`
|
|
27
|
+
> are this feature's artifacts by commit provenance, so a topic-named plan
|
|
28
|
+
> (`2026-10-08-...-plan.md` never matches the slug glob) and a non-`feat-*` spec
|
|
29
|
+
> dir are both found — UNIONED with untracked `??` paths under the same roots
|
|
30
|
+
> (the only class the branch diff can never see; an uncommitted spec dir
|
|
31
|
+
> collapses to `specs/<dir>` and a lone root-level file does not fire).
|
|
32
|
+
> The partial-run WARNING stays: it fires when exactly one
|
|
33
|
+
> class is found and the other is silent.
|
|
34
|
+
>
|
|
35
|
+
> **ship integration:** `ship` Phase 6.45 (KB Artifact Archival) invokes this
|
|
36
|
+
> script after its last live-artifact reads (decision-challenges render, `##
|
|
37
|
+
> Operator Holds`) and the `git mv` rides the feature PR — archival is part of
|
|
38
|
+
> ship, not a follow-up. The `ship-kb-archive-gate.sh` PreToolUse hook denies a
|
|
39
|
+
> `gh pr merge` while live additions remain under the three KB roots.
|
|
40
|
+
>
|
|
41
|
+
> Measured (kb-archive-gate, 2026-10-12): `--dry-run` on the feature worktree
|
|
42
|
+
> lists `plans/2026-10-12-feat-kb-archive-gate-plan.md` and `specs/kb-archive-gate`
|
|
43
|
+
> — and nothing under `learnings/`, which is never archived.
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
Run the archive script from the repository root. It derives the feature slug
|
|
48
|
+
from the current branch name automatically:
|
|
49
|
+
|
|
50
|
+
bash "${CLAUDE_PLUGIN_ROOT}/skills/archive-kb/scripts/archive-kb.sh"
|
|
51
|
+
|
|
52
|
+
To preview what would be archived without making changes:
|
|
53
|
+
|
|
54
|
+
bash "${CLAUDE_PLUGIN_ROOT}/skills/archive-kb/scripts/archive-kb.sh" --dry-run
|
|
55
|
+
|
|
56
|
+
To archive a specific slug (override branch detection):
|
|
57
|
+
|
|
58
|
+
bash "${CLAUDE_PLUGIN_ROOT}/skills/archive-kb/scripts/archive-kb.sh" my-feature-slug
|
|
59
|
+
|
|
60
|
+
## What It Archives
|
|
61
|
+
|
|
62
|
+
The script discovers artifacts matching the feature slug:
|
|
63
|
+
|
|
64
|
+
| Directory | Match Pattern | Type |
|
|
65
|
+
|-----------|--------------|------|
|
|
66
|
+
| `knowledge-base/project/brainstorms/` | Filename contains slug | File glob |
|
|
67
|
+
| `knowledge-base/project/plans/` | Filename contains slug | File glob |
|
|
68
|
+
| `knowledge-base/project/specs/feat-<slug>/` | Exact directory name | Directory match |
|
|
69
|
+
|
|
70
|
+
All `archive/` subdirectories are excluded from discovery.
|
|
71
|
+
|
|
72
|
+
## When to Use
|
|
73
|
+
|
|
74
|
+
- During the compound skill's archival step (Step E in compound-capture)
|
|
75
|
+
- After completing a feature when brainstorm/plan artifacts should be archived
|
|
76
|
+
- During the ship workflow to archive feature artifacts before merge
|
|
77
|
+
|
|
78
|
+
## Notes
|
|
79
|
+
|
|
80
|
+
**No `secret-scan-allow-rename` label is required for archival.** The destinations here (`knowledge-base/project/{plans,specs}/archive/`) match the gitleaks path allowlist — but so do the sources, so the `git mv` creates no new unscanned surface. `rename-guard` exempts allowlist -> allowlist renames per rename pair; see [secret-scanning.md](../../../../knowledge-base/engineering/operations/secret-scanning.md).
|
|
81
|
+
|
|
82
|
+
- The script calls `git add` before `git mv` to handle untracked files
|
|
83
|
+
- A single timestamp is generated per invocation for consistency
|
|
84
|
+
- Exit code 0 for success (including "no artifacts found")
|
|
85
|
+
- Exit code 1 for errors (not in git repo, invalid arguments)
|
|
86
|
+
- Spec directories are moved as a whole via `git mv` on the directory
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Archive knowledge-base artifacts for a feature branch.
|
|
5
|
+
# Moves brainstorms, plans, and specs to archive/ subdirectories
|
|
6
|
+
# with timestamped prefixes, preserving git history.
|
|
7
|
+
#
|
|
8
|
+
# Usage: archive-kb.sh [--dry-run] [slug]
|
|
9
|
+
# --dry-run Show what would be archived without executing
|
|
10
|
+
# slug Feature slug (default: derived from current branch)
|
|
11
|
+
|
|
12
|
+
readonly SCRIPT_NAME="archive-kb.sh"
|
|
13
|
+
|
|
14
|
+
# --- Argument Parsing ---
|
|
15
|
+
|
|
16
|
+
DRY_RUN=false
|
|
17
|
+
EXPLICIT_SLUG=""
|
|
18
|
+
|
|
19
|
+
usage() {
|
|
20
|
+
echo "Usage: ${SCRIPT_NAME} [--dry-run] [slug]" >&2
|
|
21
|
+
echo " --dry-run Show what would be archived without executing" >&2
|
|
22
|
+
echo " slug Feature slug (default: derived from current branch)" >&2
|
|
23
|
+
exit 1
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
while [[ $# -gt 0 ]]; do
|
|
27
|
+
case "$1" in
|
|
28
|
+
--dry-run)
|
|
29
|
+
DRY_RUN=true
|
|
30
|
+
shift
|
|
31
|
+
;;
|
|
32
|
+
--help|-h)
|
|
33
|
+
usage
|
|
34
|
+
;;
|
|
35
|
+
-*)
|
|
36
|
+
echo "Error: Unknown flag: $1" >&2
|
|
37
|
+
usage
|
|
38
|
+
;;
|
|
39
|
+
*)
|
|
40
|
+
if [[ -n "$EXPLICIT_SLUG" ]]; then
|
|
41
|
+
echo "Error: Multiple slug arguments provided" >&2
|
|
42
|
+
usage
|
|
43
|
+
fi
|
|
44
|
+
EXPLICIT_SLUG="$1"
|
|
45
|
+
shift
|
|
46
|
+
;;
|
|
47
|
+
esac
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
# --- Environment Checks ---
|
|
51
|
+
|
|
52
|
+
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
53
|
+
echo "Error: Not inside a git repository" >&2
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if [[ ! -d "knowledge-base" ]]; then
|
|
58
|
+
echo "No knowledge-base directory found"
|
|
59
|
+
exit 0
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# --- Slug Derivation ---
|
|
63
|
+
|
|
64
|
+
derive_slug() {
|
|
65
|
+
local branch safe slug
|
|
66
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
67
|
+
# Normalize slashes to hyphens
|
|
68
|
+
safe=$(echo "$branch" | tr '/' '-')
|
|
69
|
+
slug="$safe"
|
|
70
|
+
# Strip prefixes in sequence (order matters: feature- before feat-)
|
|
71
|
+
slug="${slug#feature-}"
|
|
72
|
+
slug="${slug#feat-}"
|
|
73
|
+
slug="${slug#fix-}"
|
|
74
|
+
echo "$slug"
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if [[ -n "$EXPLICIT_SLUG" ]]; then
|
|
78
|
+
SLUG="$EXPLICIT_SLUG"
|
|
79
|
+
else
|
|
80
|
+
SLUG=$(derive_slug)
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
if [[ -z "$SLUG" ]]; then
|
|
84
|
+
echo "Error: Could not derive feature slug from branch name" >&2
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# --- Discovery ---
|
|
89
|
+
|
|
90
|
+
discover_artifacts() {
|
|
91
|
+
local slug="$1"
|
|
92
|
+
local artifacts=()
|
|
93
|
+
|
|
94
|
+
# Enable nullglob so empty globs expand to nothing
|
|
95
|
+
shopt -s nullglob
|
|
96
|
+
|
|
97
|
+
# Brainstorms and plans
|
|
98
|
+
local file_dirs=(
|
|
99
|
+
"knowledge-base/project/brainstorms"
|
|
100
|
+
"knowledge-base/project/plans"
|
|
101
|
+
)
|
|
102
|
+
for dir in "${file_dirs[@]}"; do
|
|
103
|
+
for f in "$dir"/*"${slug}"*; do
|
|
104
|
+
[[ -f "$f" && "$f" != */archive/* ]] && artifacts+=("$f")
|
|
105
|
+
done
|
|
106
|
+
done
|
|
107
|
+
|
|
108
|
+
# Specs
|
|
109
|
+
if [[ -d "knowledge-base/project/specs/feat-${slug}" ]]; then
|
|
110
|
+
artifacts+=("knowledge-base/project/specs/feat-${slug}")
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
shopt -u nullglob
|
|
114
|
+
|
|
115
|
+
printf '%s\n' "${artifacts[@]}"
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
ARTIFACTS=()
|
|
119
|
+
while IFS= read -r line; do
|
|
120
|
+
[[ -n "$line" ]] && ARTIFACTS+=("$line")
|
|
121
|
+
done < <(discover_artifacts "$SLUG")
|
|
122
|
+
|
|
123
|
+
# Branch-diff discovery (#9803 follow-up): files ADDED or MODIFIED on this
|
|
124
|
+
# branch under the KB artifact roots are this feature's artifacts by commit
|
|
125
|
+
# provenance — no filename match needed. This is what catches a topic-named
|
|
126
|
+
# plan (`2026-10-08-fix-sandbox-hardening-cluster-plan.md` never matches the
|
|
127
|
+
# branch-derived slug) and a spec dir that is not `feat-<slug>` (the slug
|
|
128
|
+
# probe cannot reach `fix-*`/`chore-*` dirs). Spec FILES collapse to their
|
|
129
|
+
# spec DIR; archive/ paths are already archived and excluded. Unioned with
|
|
130
|
+
# the slug and untracked results — the three axes (name match, commit
|
|
131
|
+
# provenance, worktree state) cover what any one alone misses.
|
|
132
|
+
discover_branch_diff() {
|
|
133
|
+
local base st f sub
|
|
134
|
+
base=$(git merge-base HEAD origin/main 2>/dev/null | head -1) || return 0
|
|
135
|
+
[[ -z "$base" ]] && return 0
|
|
136
|
+
while IFS=$'\t' read -r st f; do
|
|
137
|
+
case "$f" in
|
|
138
|
+
*/archive/*) ;; # already archived
|
|
139
|
+
# Spec files collapse to their DIR — but only on A rows (the branch
|
|
140
|
+
# created the dir, so it is this feature's). An M row is a drive-by
|
|
141
|
+
# edit to a sibling feature's live spec — collapsing it would archive
|
|
142
|
+
# mid-flight work that is not ours.
|
|
143
|
+
knowledge-base/project/specs/*/*)
|
|
144
|
+
[[ "$st" == A* ]] || continue
|
|
145
|
+
sub=${f#knowledge-base/project/specs/}
|
|
146
|
+
printf 'knowledge-base/project/specs/%s\n' "${sub%%/*}" ;;
|
|
147
|
+
knowledge-base/project/plans/*|knowledge-base/project/brainstorms/*)
|
|
148
|
+
[[ -f "$f" ]] && printf '%s\n' "$f" ;;
|
|
149
|
+
esac
|
|
150
|
+
done < <(git diff --name-status --diff-filter=AM "$base"...HEAD -- \
|
|
151
|
+
knowledge-base/project/plans \
|
|
152
|
+
knowledge-base/project/brainstorms \
|
|
153
|
+
knowledge-base/project/specs 2>/dev/null)
|
|
154
|
+
}
|
|
155
|
+
while IFS= read -r line; do
|
|
156
|
+
[[ -n "$line" ]] && ARTIFACTS+=("$line")
|
|
157
|
+
done < <(discover_branch_diff | sort -u)
|
|
158
|
+
|
|
159
|
+
# Untracked-path discovery (#7383 residual): an UNCOMMITTED artifact is
|
|
160
|
+
# invisible to both axes above — the slug glob needs a filename match and
|
|
161
|
+
# branch-diff needs commit provenance, and a never-committed topic-named
|
|
162
|
+
# plan or non-`feat-*` spec dir has neither. `git status --porcelain` `??`
|
|
163
|
+
# rows are the only signal. `??` rows ONLY: staged/modified rows on tracked
|
|
164
|
+
# files are commit-provenance's job (a staged-but-never-committed file is
|
|
165
|
+
# #9172's class — noted, not fixed here). `--untracked-files=all` pins the
|
|
166
|
+
# `??` enumeration against `status.showUntrackedFiles` config (`no` would
|
|
167
|
+
# silently empty the axis; `normal` would collapse a fully-untracked dir to
|
|
168
|
+
# a bare `specs/` row the patterns below cannot reach). The `*/archive/*`
|
|
169
|
+
# exclusion and specs collapse mirror branch-diff: an untracked file inside
|
|
170
|
+
# `specs/<dir>/` emits `specs/<dir>`, while a lone ROOT-LEVEL file
|
|
171
|
+
# (`specs/.gitkeep`, `specs/notes.md`) has no second path component and does
|
|
172
|
+
# not fire. Plans/brainstorms root files DO fire — they are the artifacts.
|
|
173
|
+
discover_untracked() {
|
|
174
|
+
local st f sub
|
|
175
|
+
while IFS= read -r -d '' line; do
|
|
176
|
+
st=${line:0:2}
|
|
177
|
+
[[ "$st" == '??' ]] || continue
|
|
178
|
+
f=${line:3}
|
|
179
|
+
case "$f" in
|
|
180
|
+
*/archive/*) ;; # already archived
|
|
181
|
+
knowledge-base/project/specs/*/*)
|
|
182
|
+
sub=${f#knowledge-base/project/specs/}
|
|
183
|
+
sub=${sub%%/*}
|
|
184
|
+
# Collapse to the dir ONLY when the dir is wholly untracked —
|
|
185
|
+
# `??` carries no provenance, so a stray file inside a
|
|
186
|
+
# partially-tracked spec dir (a sibling feature's live work, the
|
|
187
|
+
# M-row rule's analog) must not pull the whole dir into the move.
|
|
188
|
+
if git ls-files --error-unmatch -- "knowledge-base/project/specs/${sub}" >/dev/null 2>&1; then
|
|
189
|
+
continue
|
|
190
|
+
fi
|
|
191
|
+
printf 'knowledge-base/project/specs/%s\n' "$sub" ;;
|
|
192
|
+
knowledge-base/project/plans/*|knowledge-base/project/brainstorms/*)
|
|
193
|
+
[[ -f "$f" ]] && printf '%s\n' "$f" ;;
|
|
194
|
+
esac
|
|
195
|
+
done < <(git status --porcelain -z --untracked-files=all -- \
|
|
196
|
+
knowledge-base/project/plans \
|
|
197
|
+
knowledge-base/project/brainstorms \
|
|
198
|
+
knowledge-base/project/specs 2>/dev/null || true)
|
|
199
|
+
}
|
|
200
|
+
while IFS= read -r line; do
|
|
201
|
+
[[ -n "$line" ]] && ARTIFACTS+=("$line")
|
|
202
|
+
done < <(discover_untracked | sort -u)
|
|
203
|
+
|
|
204
|
+
# Dedupe the union (an artifact reachable by more than one axis — e.g. an
|
|
205
|
+
# untracked slug-named file hits both the glob and `??` rows).
|
|
206
|
+
if [[ ${#ARTIFACTS[@]} -gt 0 ]]; then
|
|
207
|
+
mapfile -t ARTIFACTS < <(printf '%s\n' "${ARTIFACTS[@]}" | sort -u)
|
|
208
|
+
fi
|
|
209
|
+
|
|
210
|
+
# A PARTIAL run must not read as a complete one (#8416).
|
|
211
|
+
#
|
|
212
|
+
# `discover_artifacts` derives ONE slug per run, and a feature's plan and spec
|
|
213
|
+
# routinely carry DIFFERENT slugs -- the plan is named for its topic, the spec
|
|
214
|
+
# for its branch. The plan glob (`*${slug}*`) then matches nothing, the spec
|
|
215
|
+
# probe matches, and the run prints `Archived 1 artifact(s)` and exits 0 with
|
|
216
|
+
# the plan silently left behind. SKILL.md has documented that gap in prose since
|
|
217
|
+
# it was first hit; it was hit again on #8325, which is the signal that prose was
|
|
218
|
+
# not the fix (`wg-when-a-workflow-gap-causes-a-mistake-fix`).
|
|
219
|
+
#
|
|
220
|
+
# This deliberately adds NO new discovery: #7400 tracks retiring the spec/plan
|
|
221
|
+
# discovery paths entirely, so widening them would build on a mechanism slated
|
|
222
|
+
# for removal. It only makes the ASYMMETRY audible -- one class found, the other
|
|
223
|
+
# silent -- which is the state a reader mistakes for completeness. The operand is
|
|
224
|
+
# the classes DISCOVERED, never a count, because a count cannot distinguish "the
|
|
225
|
+
# feature has no plan" from "the plan is named something else".
|
|
226
|
+
_found_class() {
|
|
227
|
+
local want="$1" a
|
|
228
|
+
for a in "${ARTIFACTS[@]}"; do
|
|
229
|
+
[[ "$a" == knowledge-base/project/"${want}"/* ]] && return 0
|
|
230
|
+
done
|
|
231
|
+
return 1
|
|
232
|
+
}
|
|
233
|
+
if [[ ${#ARTIFACTS[@]} -gt 0 ]]; then
|
|
234
|
+
_have_plan=no; _have_spec=no
|
|
235
|
+
_found_class plans && _have_plan=yes
|
|
236
|
+
_found_class specs && _have_spec=yes
|
|
237
|
+
if [[ "$_have_plan" != "$_have_spec" ]]; then
|
|
238
|
+
if [[ "$_have_plan" == no ]]; then
|
|
239
|
+
_found="spec"; _missing="plan"; _hint="knowledge-base/project/plans/"
|
|
240
|
+
else
|
|
241
|
+
_found="plan"; _missing="spec"; _hint="knowledge-base/project/specs/feat-<slug>/"
|
|
242
|
+
fi
|
|
243
|
+
echo "WARNING: found a ${_found} for slug \"${SLUG}\" but NO ${_missing}." >&2
|
|
244
|
+
echo " A feature's plan and spec often carry different slugs, so this run may be" >&2
|
|
245
|
+
echo " incomplete. Check ${_hint} and re-run with the other slug if one exists." >&2
|
|
246
|
+
fi
|
|
247
|
+
fi
|
|
248
|
+
|
|
249
|
+
# --- No artifacts case ---
|
|
250
|
+
|
|
251
|
+
if [[ ${#ARTIFACTS[@]} -eq 0 ]]; then
|
|
252
|
+
echo "No artifacts found for slug \"${SLUG}\""
|
|
253
|
+
exit 0
|
|
254
|
+
fi
|
|
255
|
+
|
|
256
|
+
# --- Timestamp (generated once for consistency) ---
|
|
257
|
+
|
|
258
|
+
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
|
259
|
+
|
|
260
|
+
# --- Dry-run mode ---
|
|
261
|
+
|
|
262
|
+
print_archive_path() {
|
|
263
|
+
local artifact="$1"
|
|
264
|
+
local ts="$2"
|
|
265
|
+
local name dest_dir
|
|
266
|
+
name=$(basename "$artifact")
|
|
267
|
+
dest_dir=$(dirname "$artifact")
|
|
268
|
+
echo " ${artifact} -> ${dest_dir}/archive/${ts}-${name}"
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if [[ "$DRY_RUN" == true ]]; then
|
|
272
|
+
echo "Dry run -- would archive ${#ARTIFACTS[@]} artifact(s) for slug \"${SLUG}\":"
|
|
273
|
+
for artifact in "${ARTIFACTS[@]}"; do
|
|
274
|
+
print_archive_path "$artifact" "$TIMESTAMP"
|
|
275
|
+
done
|
|
276
|
+
exit 0
|
|
277
|
+
fi
|
|
278
|
+
|
|
279
|
+
# --- Archival Execution ---
|
|
280
|
+
|
|
281
|
+
archive_artifact() {
|
|
282
|
+
local artifact="$1"
|
|
283
|
+
local ts="$2"
|
|
284
|
+
local name dest_dir archive_dir
|
|
285
|
+
name=$(basename "$artifact")
|
|
286
|
+
dest_dir=$(dirname "$artifact")
|
|
287
|
+
archive_dir="${dest_dir}/archive"
|
|
288
|
+
|
|
289
|
+
mkdir -p "$archive_dir"
|
|
290
|
+
# git add handles both untracked files and already-tracked files (no-op)
|
|
291
|
+
git add "$artifact"
|
|
292
|
+
git mv "$artifact" "${archive_dir}/${ts}-${name}"
|
|
293
|
+
echo " ${archive_dir}/${ts}-${name}"
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
echo "Archived ${#ARTIFACTS[@]} artifact(s) for slug \"${SLUG}\":"
|
|
297
|
+
|
|
298
|
+
for artifact in "${ARTIFACTS[@]}"; do
|
|
299
|
+
archive_artifact "$artifact" "$TIMESTAMP"
|
|
300
|
+
done
|