@soleur/opencode 0.0.0-stage → 1.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/.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 +659 -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 +108 -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 +342 -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 +152 -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 +493 -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 +363 -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 +520 -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 +113 -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 +178 -0
- package/scripts/sync-opencode-adapter.ts +479 -0
- package/scripts/sync-pr-behind.sh +534 -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 +65 -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 +142 -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 +118 -0
- package/skills/fix-issue/references/exclude-label-jq-snippet.md +96 -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 +668 -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 +325 -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 +138 -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 +1621 -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-todo-structure.md +165 -0
- package/skills/review/references/risk-tier-and-fix-rounds.md +95 -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 +3022 -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/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/detached-battery-verdict.md +13 -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 +149 -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/work/SKILL.md +1479 -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,37 @@
|
|
|
1
|
+
# Critical Pattern Template
|
|
2
|
+
|
|
3
|
+
Use this template when adding a pattern to `knowledge-base/project/learnings/patterns/critical-patterns.md`:
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## N. [Pattern Name] (ALWAYS REQUIRED)
|
|
8
|
+
|
|
9
|
+
### ❌ WRONG ([Will cause X error])
|
|
10
|
+
|
|
11
|
+
```[language]
|
|
12
|
+
[code showing wrong approach]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### ✅ CORRECT
|
|
16
|
+
|
|
17
|
+
```[language]
|
|
18
|
+
[code showing correct approach]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Why:** [Technical explanation of why this is required]
|
|
22
|
+
|
|
23
|
+
**Placement/Context:** [When this applies]
|
|
24
|
+
|
|
25
|
+
**Documented in:** `knowledge-base/project/learnings/[category]/[filename].md`
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**Instructions:**
|
|
30
|
+
|
|
31
|
+
1. Replace N with the next pattern number
|
|
32
|
+
2. Replace [Pattern Name] with descriptive title
|
|
33
|
+
3. Fill in WRONG example with code that causes the problem
|
|
34
|
+
4. Fill in CORRECT example with the solution
|
|
35
|
+
5. Explain the technical reason in "Why"
|
|
36
|
+
6. Clarify when this pattern applies in "Placement/Context"
|
|
37
|
+
7. Link to the full troubleshooting doc where this was originally solved
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
module: [Module name or "System" for system-wide]
|
|
3
|
+
date: [YYYY-MM-DD]
|
|
4
|
+
problem_type: [build_error|test_failure|runtime_error|performance_issue|database_issue|security_issue|ui_bug|integration_issue|logic_error]
|
|
5
|
+
component: [rails_model|rails_controller|rails_view|service_object|background_job|database|frontend_stimulus|hotwire_turbo|email_processing|brief_system|assistant|authentication|payments]
|
|
6
|
+
symptoms:
|
|
7
|
+
- [Observable symptom 1 - specific error message or behavior]
|
|
8
|
+
- [Observable symptom 2 - what user actually saw/experienced]
|
|
9
|
+
root_cause: [missing_association|missing_include|missing_index|wrong_api|scope_issue|thread_violation|async_timing|memory_leak|config_error|logic_error|test_isolation|missing_validation|missing_permission]
|
|
10
|
+
rails_version: [7.1.2 - optional]
|
|
11
|
+
resolution_type: [code_fix|migration|config_change|test_fix|dependency_update|environment_setup]
|
|
12
|
+
severity: [critical|high|medium|low]
|
|
13
|
+
status: open # defaults to open — close via /soleur:resolve-debt
|
|
14
|
+
tags: [keyword1, keyword2, keyword3]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Troubleshooting: [Clear Problem Title]
|
|
18
|
+
|
|
19
|
+
## Problem
|
|
20
|
+
|
|
21
|
+
[1-2 sentence clear description of the issue and what the user experienced]
|
|
22
|
+
|
|
23
|
+
## Environment
|
|
24
|
+
|
|
25
|
+
- Module: [Name or "System-wide"]
|
|
26
|
+
- Rails Version: [e.g., 7.1.2]
|
|
27
|
+
- Affected Component: [e.g., "Email Processing model", "Brief System service", "Authentication controller"]
|
|
28
|
+
- Date: [YYYY-MM-DD when this was solved]
|
|
29
|
+
|
|
30
|
+
## Symptoms
|
|
31
|
+
|
|
32
|
+
- [Observable symptom 1 - what the user saw/experienced]
|
|
33
|
+
- [Observable symptom 2 - error messages, visual issues, unexpected behavior]
|
|
34
|
+
- [Continue as needed - be specific]
|
|
35
|
+
|
|
36
|
+
## What Didn't Work
|
|
37
|
+
|
|
38
|
+
**Attempted Solution 1:** [Description of what was tried]
|
|
39
|
+
|
|
40
|
+
- **Why it failed:** [Technical reason this didn't solve the problem]
|
|
41
|
+
|
|
42
|
+
**Attempted Solution 2:** [Description of second attempt]
|
|
43
|
+
|
|
44
|
+
- **Why it failed:** [Technical reason]
|
|
45
|
+
|
|
46
|
+
[Continue for all significant attempts that DIDN'T work]
|
|
47
|
+
|
|
48
|
+
[If nothing else was attempted first, write:]
|
|
49
|
+
**Direct solution:** The problem was identified and fixed on the first attempt.
|
|
50
|
+
|
|
51
|
+
## Session Errors
|
|
52
|
+
|
|
53
|
+
[Process mistakes and command failures encountered during this session, beyond the main problem investigation. Omit this section entirely if no session errors occurred.]
|
|
54
|
+
|
|
55
|
+
**[Brief error description]**
|
|
56
|
+
|
|
57
|
+
- **Recovery:** [What fixed it]
|
|
58
|
+
- **Prevention:** [How to avoid in future]
|
|
59
|
+
|
|
60
|
+
[Repeat for each session error]
|
|
61
|
+
|
|
62
|
+
## Solution
|
|
63
|
+
|
|
64
|
+
[The actual fix that worked - provide specific details]
|
|
65
|
+
|
|
66
|
+
**Code changes** (if applicable):
|
|
67
|
+
|
|
68
|
+
```ruby
|
|
69
|
+
# Before (broken):
|
|
70
|
+
[Show the problematic code]
|
|
71
|
+
|
|
72
|
+
# After (fixed):
|
|
73
|
+
[Show the corrected code with explanation]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Database migration** (if applicable):
|
|
77
|
+
|
|
78
|
+
```ruby
|
|
79
|
+
# Migration change:
|
|
80
|
+
[Show what was changed in the migration]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Commands run** (if applicable):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Steps taken to fix:
|
|
87
|
+
[Commands or actions]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Why This Works
|
|
91
|
+
|
|
92
|
+
[Technical explanation of:]
|
|
93
|
+
|
|
94
|
+
1. What was the ROOT CAUSE of the problem?
|
|
95
|
+
2. Why does the solution address this root cause?
|
|
96
|
+
3. What was the underlying issue (API misuse, configuration error, Rails version issue, etc.)?
|
|
97
|
+
|
|
98
|
+
[Be detailed enough that future developers understand the "why", not just the "what"]
|
|
99
|
+
|
|
100
|
+
## Prevention
|
|
101
|
+
|
|
102
|
+
[How to avoid this problem in future development:]
|
|
103
|
+
|
|
104
|
+
- [Specific coding practice, check, or pattern to follow]
|
|
105
|
+
- [What to watch out for]
|
|
106
|
+
- [How to catch this early]
|
|
107
|
+
|
|
108
|
+
## Related Issues
|
|
109
|
+
|
|
110
|
+
[If any similar problems exist in knowledge-base/project/learnings/, link to them:]
|
|
111
|
+
|
|
112
|
+
- See also: [another-related-issue.md](../category/another-related-issue.md)
|
|
113
|
+
- Similar to: [related-problem.md](../category/related-problem.md)
|
|
114
|
+
|
|
115
|
+
[If no related issues, write:]
|
|
116
|
+
No related issues documented yet.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# YAML Frontmatter Schema
|
|
2
|
+
|
|
3
|
+
**See `plugins/soleur/skills/compound-capture/schema.yaml` for the complete schema specification.**
|
|
4
|
+
|
|
5
|
+
## Required Fields
|
|
6
|
+
|
|
7
|
+
- **module** (string): Module name (e.g., "EmailProcessing") or "System" for system-wide issues
|
|
8
|
+
- **date** (string): ISO 8601 date (YYYY-MM-DD)
|
|
9
|
+
- **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]
|
|
10
|
+
- **component** (enum): One of [rails_model, rails_controller, rails_view, service_object, background_job, database, frontend_stimulus, hotwire_turbo, email_processing, brief_system, assistant, authentication, payments, development_workflow, testing_framework, documentation, tooling]
|
|
11
|
+
- **symptoms** (array): 1-5 specific observable symptoms
|
|
12
|
+
- **root_cause** (enum): One of [missing_association, missing_include, missing_index, wrong_api, scope_issue, thread_violation, async_timing, memory_leak, config_error, logic_error, test_isolation, missing_validation, missing_permission, missing_workflow_step, inadequate_documentation, missing_tooling, incomplete_setup]
|
|
13
|
+
- **resolution_type** (enum): One of [code_fix, migration, config_change, test_fix, dependency_update, environment_setup, workflow_improvement, documentation_update, tooling_addition, seed_data_update]
|
|
14
|
+
- **severity** (enum): One of [critical, high, medium, low]
|
|
15
|
+
|
|
16
|
+
## Optional Fields
|
|
17
|
+
|
|
18
|
+
- **rule_id** (string): AGENTS.md rule slug this learning relates to. Must match `^(hr|wg|cq|rf|pdr|cm)-[a-z0-9-]{3,40}$` (e.g., `hr-never-git-stash-in-worktrees`). Hit/bypass counters for rules live in `knowledge-base/project/rule-metrics.json`, not in the learning frontmatter (see plan ADR-1).
|
|
19
|
+
- **rails_version** (string): Rails version in X.Y.Z format
|
|
20
|
+
- **tags** (array): Searchable keywords (lowercase, hyphen-separated)
|
|
21
|
+
|
|
22
|
+
## Validation Rules
|
|
23
|
+
|
|
24
|
+
1. All required fields must be present
|
|
25
|
+
2. Enum fields must match allowed values exactly (case-sensitive)
|
|
26
|
+
3. symptoms must be YAML array with 1-5 items
|
|
27
|
+
4. date must match YYYY-MM-DD format
|
|
28
|
+
5. rails_version (if provided) must match X.Y.Z format
|
|
29
|
+
6. tags should be lowercase, hyphen-separated
|
|
30
|
+
7. rule_id (if provided) must match the six-section prefix pattern (hr, wg, cq, rf, pdr, cm)
|
|
31
|
+
|
|
32
|
+
## Example
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
---
|
|
36
|
+
module: Email Processing
|
|
37
|
+
date: 2025-11-12
|
|
38
|
+
problem_type: performance_issue
|
|
39
|
+
component: rails_model
|
|
40
|
+
symptoms:
|
|
41
|
+
- "N+1 query when loading email threads"
|
|
42
|
+
- "Brief generation taking >5 seconds"
|
|
43
|
+
root_cause: missing_include
|
|
44
|
+
rails_version: 7.1.2
|
|
45
|
+
resolution_type: code_fix
|
|
46
|
+
severity: high
|
|
47
|
+
tags: [n-plus-one, eager-loading, performance]
|
|
48
|
+
---
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Category Mapping
|
|
52
|
+
|
|
53
|
+
Based on `problem_type`, documentation is filed in:
|
|
54
|
+
|
|
55
|
+
- **build_error** → `knowledge-base/project/learnings/build-errors/`
|
|
56
|
+
- **test_failure** → `knowledge-base/project/learnings/test-failures/`
|
|
57
|
+
- **runtime_error** → `knowledge-base/project/learnings/runtime-errors/`
|
|
58
|
+
- **performance_issue** → `knowledge-base/project/learnings/performance-issues/`
|
|
59
|
+
- **database_issue** → `knowledge-base/project/learnings/database-issues/`
|
|
60
|
+
- **security_issue** → `knowledge-base/project/learnings/security-issues/`
|
|
61
|
+
- **ui_bug** → `knowledge-base/project/learnings/ui-bugs/`
|
|
62
|
+
- **integration_issue** → `knowledge-base/project/learnings/integration-issues/`
|
|
63
|
+
- **logic_error** → `knowledge-base/project/learnings/logic-errors/`
|
|
64
|
+
- **developer_experience** → `knowledge-base/project/learnings/developer-experience/`
|
|
65
|
+
- **workflow_issue** → `knowledge-base/project/learnings/workflow-issues/`
|
|
66
|
+
- **best_practice** → `knowledge-base/project/learnings/best-practices/`
|
|
67
|
+
- **documentation_gap** → `knowledge-base/project/learnings/documentation-gaps/`
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# CORA Documentation Schema
|
|
2
|
+
# This schema MUST be validated before writing any documentation file
|
|
3
|
+
|
|
4
|
+
required_fields:
|
|
5
|
+
module:
|
|
6
|
+
type: string
|
|
7
|
+
description: "Module/area of CORA (e.g., 'Email Processing', 'Brief System', 'Authentication')"
|
|
8
|
+
examples:
|
|
9
|
+
- "Email Processing"
|
|
10
|
+
- "Brief System"
|
|
11
|
+
- "Assistant"
|
|
12
|
+
- "Authentication"
|
|
13
|
+
|
|
14
|
+
date:
|
|
15
|
+
type: string
|
|
16
|
+
pattern: '^\d{4}-\d{2}-\d{2}$'
|
|
17
|
+
description: "Date when this problem was solved (YYYY-MM-DD)"
|
|
18
|
+
|
|
19
|
+
problem_type:
|
|
20
|
+
type: enum
|
|
21
|
+
values:
|
|
22
|
+
- build_error # Rails, bundle, compilation errors
|
|
23
|
+
- test_failure # Test failures, flaky tests
|
|
24
|
+
- runtime_error # Exceptions, crashes during execution
|
|
25
|
+
- performance_issue # Slow queries, memory issues, N+1 queries
|
|
26
|
+
- database_issue # Migration, query, schema problems
|
|
27
|
+
- security_issue # Authentication, authorization, XSS, SQL injection
|
|
28
|
+
- ui_bug # Frontend, Stimulus, Turbo issues
|
|
29
|
+
- integration_issue # External service, API integration problems
|
|
30
|
+
- logic_error # Business logic bugs
|
|
31
|
+
- developer_experience # DX issues: workflow, tooling, seed data, dev setup
|
|
32
|
+
- workflow_issue # Development process, missing steps, unclear practices
|
|
33
|
+
- best_practice # Documenting patterns and practices to follow
|
|
34
|
+
- documentation_gap # Missing or inadequate documentation
|
|
35
|
+
description: "Primary category of the problem"
|
|
36
|
+
|
|
37
|
+
component:
|
|
38
|
+
type: enum
|
|
39
|
+
values:
|
|
40
|
+
- rails_model # ActiveRecord models
|
|
41
|
+
- rails_controller # ActionController
|
|
42
|
+
- rails_view # ERB templates, ViewComponent
|
|
43
|
+
- service_object # Custom service classes
|
|
44
|
+
- background_job # Sidekiq, Active Job
|
|
45
|
+
- database # PostgreSQL, migrations, schema
|
|
46
|
+
- frontend_stimulus # Stimulus JS controllers
|
|
47
|
+
- hotwire_turbo # Turbo Streams, Turbo Drive
|
|
48
|
+
- email_processing # Email handling, mailers
|
|
49
|
+
- brief_system # Brief generation, summarization
|
|
50
|
+
- assistant # AI assistant, prompts
|
|
51
|
+
- authentication # Devise, user auth
|
|
52
|
+
- payments # Stripe, billing
|
|
53
|
+
- development_workflow # Dev process, seed data, tooling
|
|
54
|
+
- testing_framework # Test setup, fixtures, VCR
|
|
55
|
+
- documentation # README, guides, inline docs
|
|
56
|
+
- tooling # Scripts, generators, CLI tools
|
|
57
|
+
description: "CORA component involved"
|
|
58
|
+
|
|
59
|
+
symptoms:
|
|
60
|
+
type: array[string]
|
|
61
|
+
min_items: 1
|
|
62
|
+
max_items: 5
|
|
63
|
+
description: "Observable symptoms (error messages, visual issues, crashes)"
|
|
64
|
+
examples:
|
|
65
|
+
- "N+1 query detected in brief generation"
|
|
66
|
+
- "Brief emails not appearing in summary"
|
|
67
|
+
- "Turbo Stream response returns 404"
|
|
68
|
+
|
|
69
|
+
root_cause:
|
|
70
|
+
type: enum
|
|
71
|
+
values:
|
|
72
|
+
- missing_association # Incorrect Rails associations
|
|
73
|
+
- missing_include # Missing eager loading (N+1)
|
|
74
|
+
- missing_index # Database performance issue
|
|
75
|
+
- wrong_api # Using deprecated/incorrect Rails API
|
|
76
|
+
- scope_issue # Incorrect query scope or filtering
|
|
77
|
+
- thread_violation # Real-time unsafe operation
|
|
78
|
+
- async_timing # Async/background job timing
|
|
79
|
+
- memory_leak # Memory leak or excessive allocation
|
|
80
|
+
- config_error # Configuration or environment issue
|
|
81
|
+
- logic_error # Algorithm/business logic bug
|
|
82
|
+
- test_isolation # Test isolation or fixture issue
|
|
83
|
+
- missing_validation # Missing model validation
|
|
84
|
+
- missing_permission # Authorization check missing
|
|
85
|
+
- missing_workflow_step # Skipped or undocumented workflow step
|
|
86
|
+
- inadequate_documentation # Missing or unclear documentation
|
|
87
|
+
- missing_tooling # Lacking helper scripts or automation
|
|
88
|
+
- incomplete_setup # Missing seed data, fixtures, or config
|
|
89
|
+
description: "Fundamental cause of the problem"
|
|
90
|
+
|
|
91
|
+
resolution_type:
|
|
92
|
+
type: enum
|
|
93
|
+
values:
|
|
94
|
+
- code_fix # Fixed by changing source code
|
|
95
|
+
- migration # Fixed by database migration
|
|
96
|
+
- config_change # Fixed by changing configuration
|
|
97
|
+
- test_fix # Fixed by correcting tests
|
|
98
|
+
- dependency_update # Fixed by updating gem/dependency
|
|
99
|
+
- environment_setup # Fixed by environment configuration
|
|
100
|
+
- workflow_improvement # Improved development workflow or process
|
|
101
|
+
- documentation_update # Added or updated documentation
|
|
102
|
+
- tooling_addition # Added helper script or automation
|
|
103
|
+
- seed_data_update # Updated db/seeds.rb or fixtures
|
|
104
|
+
description: "Type of fix applied"
|
|
105
|
+
|
|
106
|
+
severity:
|
|
107
|
+
type: enum
|
|
108
|
+
values:
|
|
109
|
+
- critical # Blocks production or development (build fails, data loss)
|
|
110
|
+
- high # Impairs core functionality (feature broken, security issue)
|
|
111
|
+
- medium # Affects specific feature (UI broken, performance impact)
|
|
112
|
+
- low # Minor issue or edge case
|
|
113
|
+
description: "Impact severity"
|
|
114
|
+
|
|
115
|
+
optional_fields:
|
|
116
|
+
rule_id:
|
|
117
|
+
type: string
|
|
118
|
+
pattern: '^(hr|wg|cq|rf|pdr|cm)-[a-z0-9-]{3,40}$'
|
|
119
|
+
description: "AGENTS.md rule slug that motivated this learning (e.g., 'hr-never-git-stash-in-worktrees'). Counters live in knowledge-base/project/rule-metrics.json, not here (see plan ADR-1)."
|
|
120
|
+
|
|
121
|
+
rails_version:
|
|
122
|
+
type: string
|
|
123
|
+
pattern: '^\d+\.\d+\.\d+$'
|
|
124
|
+
description: "Rails version where this was encountered (e.g., '7.1.0')"
|
|
125
|
+
|
|
126
|
+
related_components:
|
|
127
|
+
type: array[string]
|
|
128
|
+
description: "Other components that interact with this issue"
|
|
129
|
+
|
|
130
|
+
tags:
|
|
131
|
+
type: array[string]
|
|
132
|
+
max_items: 8
|
|
133
|
+
description: "Searchable keywords (lowercase, hyphen-separated)"
|
|
134
|
+
examples:
|
|
135
|
+
- "n-plus-one"
|
|
136
|
+
- "eager-loading"
|
|
137
|
+
- "test-isolation"
|
|
138
|
+
- "turbo-stream"
|
|
139
|
+
|
|
140
|
+
validation_rules:
|
|
141
|
+
- "module must be a valid CORA module name"
|
|
142
|
+
- "date must be in YYYY-MM-DD format"
|
|
143
|
+
- "problem_type must match one of the enum values"
|
|
144
|
+
- "component must match one of the enum values"
|
|
145
|
+
- "symptoms must be specific and observable (not vague)"
|
|
146
|
+
- "root_cause must be the ACTUAL cause, not a symptom"
|
|
147
|
+
- "resolution_type must match one of the enum values"
|
|
148
|
+
- "severity must match one of the enum values"
|
|
149
|
+
- "tags should be lowercase, hyphen-separated"
|
|
150
|
+
|
|
151
|
+
# Example valid front matter:
|
|
152
|
+
# ---
|
|
153
|
+
# module: Email Processing
|
|
154
|
+
# date: 2025-11-12
|
|
155
|
+
# problem_type: performance_issue
|
|
156
|
+
# component: rails_model
|
|
157
|
+
# symptoms:
|
|
158
|
+
# - N+1 query when loading email threads
|
|
159
|
+
# - Brief generation taking >5 seconds
|
|
160
|
+
# root_cause: missing_include
|
|
161
|
+
# rails_version: 7.1.2
|
|
162
|
+
# resolution_type: code_fix
|
|
163
|
+
# severity: high
|
|
164
|
+
# tags: [n-plus-one, eager-loading, performance]
|
|
165
|
+
# ---
|
|
166
|
+
#
|
|
167
|
+
# Example DX issue front matter:
|
|
168
|
+
# ---
|
|
169
|
+
# module: Development Workflow
|
|
170
|
+
# date: 2025-11-13
|
|
171
|
+
# problem_type: developer_experience
|
|
172
|
+
# component: development_workflow
|
|
173
|
+
# symptoms:
|
|
174
|
+
# - No example data for new feature in development
|
|
175
|
+
# - Rails db:seed doesn't demonstrate new capabilities
|
|
176
|
+
# root_cause: incomplete_setup
|
|
177
|
+
# rails_version: 7.1.2
|
|
178
|
+
# resolution_type: seed_data_update
|
|
179
|
+
# severity: low
|
|
180
|
+
# tags: [seed-data, dx, workflow]
|
|
181
|
+
# ---
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: constraint-scaffold
|
|
3
|
+
description: "This skill should be used when generating the Layer 1 dependency-cruiser import-boundary gate (client modules importing server secrets) into a Next.js product codebase's CI."
|
|
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
|
+
<!-- Inspired by mattpocock/skills/skills/in-progress/setup-ts-deep-modules/SKILL.md (MIT, Copyright (c) 2026 Matt Pocock). -->
|
|
11
|
+
|
|
12
|
+
# constraint-scaffold
|
|
13
|
+
|
|
14
|
+
Generates **one** deterministic, no-LLM Layer-1 structural gate into a Next.js product
|
|
15
|
+
codebase: a [dependency-cruiser](https://github.com/sverweij/dependency-cruiser) **import-boundary
|
|
16
|
+
gate** that fails closed when a `"use client"` module takes a **value** (non-`type-only`) import on
|
|
17
|
+
the server-only tree (`server/**`) — i.e. a server secret leaking into the browser bundle. The gate
|
|
18
|
+
runs in CI and rejects the violation *before* the LLM-judged review layer (`soleur:review`). See
|
|
19
|
+
ADR-071 (mechanism = Option D) and `knowledge-base/project/plans/archive/20261013-032858-2026-06-30-feat-constraint-scaffold-l1-gate-generator-plan.md`.
|
|
20
|
+
|
|
21
|
+
This gate covers this one boundary only, CI-only, Next.js-only. It catches BOTH direct
|
|
22
|
+
client→server-secret value imports AND transitive ones (a `"use client"` module reaching a
|
|
23
|
+
server secret through a chain of value imports, e.g. a non-client `lib/` helper) — the transitive
|
|
24
|
+
`reachable` rule was added in the 2026-07-01 #5777 amendment (ADR-071 §Amendment). Naming /
|
|
25
|
+
contract / pre-commit / multi-stack coverage remain deferred (ADR-071 Consequences).
|
|
26
|
+
|
|
27
|
+
## Agent-owns-gates recovery model (load-bearing)
|
|
28
|
+
|
|
29
|
+
The gate is **fail-closed**, and the target user is a non-technical founder who can never hand-edit
|
|
30
|
+
a `.cjs` config, a baseline, or a workflow. So the agent — never the founder — owns gate
|
|
31
|
+
maintenance and recovery:
|
|
32
|
+
|
|
33
|
+
1. **The agent authors and maintains the gate.** The founder never touches `.dependency-cruiser.cjs`,
|
|
34
|
+
`.dependency-cruiser-known-violations.json`, the shared runner, or the workflow.
|
|
35
|
+
2. **When the agent's own change trips the gate:**
|
|
36
|
+
- real leak → the agent fixes the offending import;
|
|
37
|
+
- legitimate new cross-boundary import → the agent runs
|
|
38
|
+
`constraint-scaffold.sh --refresh-baseline` (clean-tree + `origin/main` merge-base capture, so a
|
|
39
|
+
same-PR violation is never grandfathered); the baseline diff is PR-reviewable.
|
|
40
|
+
3. **In-code escape hatch (agent-owned, used sparingly):** dependency-cruiser's native
|
|
41
|
+
`// dependency-cruiser-disable-next-line` comment on the importing line.
|
|
42
|
+
4. **Founder hotfix with no agent in the loop (the brand-survival deadlock).** A GitHub-web hotfix
|
|
43
|
+
or a machine without the repo tooling can trip the gate with no agent present. Recovery is
|
|
44
|
+
**automatic and zero-touch**: the two-stage auto-recovery dispatcher (`fix-constraints-stage-a`
|
|
45
|
+
→ `fix-constraints-stage-b`, **ADR-074**) fires on the PR, fixes the offending import, and opens
|
|
46
|
+
a **draft follow-up PR** the founder can merge — no comment, no command, no agent-in-the-loop
|
|
47
|
+
required. (A real leak the agent cannot fix is surfaced for a maintainer; auto-recovery is
|
|
48
|
+
fix-only and never grows the suppression baseline.) The gate stays **informational /
|
|
49
|
+
non-blocking** — it is NOT promoted to a required check (promotion is now blocked only on #5778;
|
|
50
|
+
the #5791 dispatcher half is satisfied by ADR-074), so it cannot deadlock a founder hotfix.
|
|
51
|
+
**No override label, no `.cjs` edit, no second human required.**
|
|
52
|
+
5. The founder is **never** required to read or unblock the gate.
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
Generate the gate into `apps/web-platform` (default mode — detect Next.js, require `app/`,
|
|
57
|
+
`components/` and `server/` to exist under the target, emit config + shared runner + CI workflow,
|
|
58
|
+
capture the initial baseline, **prove the gate bites** (see Bite-proof below), then write the
|
|
59
|
+
boundary README and the agent-instructions pointer last). Non-destructive: refuses to overwrite an
|
|
60
|
+
existing `.cjs`, runner, or workflow (there is no `--force`); the baseline JSON is the only
|
|
61
|
+
re-writable artifact, and only via `--refresh-baseline`; the README block and the pointer line are
|
|
62
|
+
append-once (marker-keyed, never rewritten):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bash "${CLAUDE_PLUGIN_ROOT}/skills/constraint-scaffold/scripts/constraint-scaffold.sh"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Refresh the baseline after a legitimate new cross-boundary import (agent-only; clean tree required;
|
|
69
|
+
captures against the `origin/main` merge-base). Refresh mode runs the bite-proof too — it catches
|
|
70
|
+
config/runner drift a baseline entry can never grandfather (a rule softened to `warn`, a mis-scoped
|
|
71
|
+
from-set, a runner that stopped failing on rc>0) — and it can exit **74** when HEAD carries a real
|
|
72
|
+
client→server-secret violation newer than the baseline; that is the gate being live, not a broken
|
|
73
|
+
gate, and the fix is the listed import, not a re-run. In refresh mode nothing is removed on failure
|
|
74
|
+
(the artifacts are committed); the rewritten baseline is reviewed with `git diff`:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bash "${CLAUDE_PLUGIN_ROOT}/skills/constraint-scaffold/scripts/constraint-scaffold.sh" --refresh-baseline
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## What it emits (into `apps/web-platform/`)
|
|
81
|
+
|
|
82
|
+
| Artifact | Role |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `.dependency-cruiser.cjs` | Executable CommonJS config. Computes the `"use client"` from-set at require-time (recomputed every run, **never** committed static), regex-escaping route-group paths. `tsConfig.fileName` + `tsPreCompilationDeps` give `@/*` alias resolution and the type-only/value distinction. |
|
|
85
|
+
| `.dependency-cruiser-known-violations.json` | dependency-cruiser native baseline (`--output-type baseline` / `--ignore-known`). Grandfathers only pre-existing violations. |
|
|
86
|
+
| `apps/web-platform/scripts/constraint-gates.sh` | Shared runner — owns the single pinned `depcruise --ignore-known … --output-type err` invocation. Fails closed on any non-zero depcruise rc; CI (and future pre-commit) both exec this. |
|
|
87
|
+
| `.github/workflows/constraint-gates.yml` | Always-runs + internal path-check (reports a real conclusion on every PR; no pending-forever deadlock). On failure the two-stage auto-recovery dispatcher (`fix-constraints-stage-a/b`, ADR-074) auto-opens a follow-up PR when the gate is auto-fixable. Informational/non-blocking until promoted (now blocked only on #5778; the #5791 dispatcher half is satisfied by ADR-074). |
|
|
88
|
+
| `.github/workflows/fix-constraints-stage-a.yml` | Untrusted `pull_request` producer (ADR-074): `contents: read` only. Runs the gate, dispatches the fix-only agent, re-verifies green, uploads the fix as a full-post-image-contents artifact (per-file sha256 + meta.json). No write token, no commit/push. |
|
|
89
|
+
| `.github/workflows/fix-constraints-stage-b.yml` | Privileged `workflow_run` consumer (ADR-074): validates the attacker-controlled artifact (isCrossRepository==false gate, event-sourced identity, charset+traversal+symlink+size allowlist, sha256 byte-verify) and applies it via the Git Data API (blob→tree with mandatory base_tree→commit→ref) — never checks out the untrusted tree, never git-applies. Delivers a draft follow-up PR. |
|
|
90
|
+
| `server/README.md` | Boundary README next to the governed path: what the boundary is, the two rule names, `import type` as the permitted shape, how to run the gate, the three-dirs requirement, what the founder sees when it trips (a red check and, when auto-fixable, an ADR-074 draft PR), that install proved pass → fail → pass, how to re-prove, and the agent-owns-recovery rule. **Append-once** between `<!-- constraint-scaffold:readme:start -->` / `:end -->` markers (existing content untouched; a symlink is refused); **written last**, after the bite-proof, so the clean-tree guard inside baseline capture never sees it. Soleur-authored; no peer sentence, no attribution line in the emission. Default mode only. |
|
|
91
|
+
| repo-root `CLAUDE.md` (else `AGENTS.md`, created if absent) | One plain, informational pointer line naming `apps/web-platform/server/README.md`, ending in `<!-- constraint-scaffold:pointer -->`; append-once; never an `@path` import (that would load the README into every session) and never an imperative "read X before Y". The first scaffold write outside the target directory (ADR-071 amendment). Written last, with the README. Default mode only. |
|
|
92
|
+
|
|
93
|
+
**Before editing either stage workflow (or its template), read ADR-074 + [[2026-07-01-two-stage-privileged-workflow-split-and-its-review-traps]].** The load-bearing invariants — trigger split (untrusted producer / privileged non-executing consumer), Stage B's `isCrossRepository==false` gate on the *fully attacker-controlled* artifact, event-sourced identity, mandatory `base_tree`, name-coupling (`workflow_run` matches Stage A's `name:`, not its filename), the give-up marker (no terminal state is silent), and `emit()` output-sanitization — are enforced by `test/emit-fix-constraints.test.sh` + `test/parity.test.sh` (which covers the repo-root dogfood copies, not just emitted fixtures). A change that greens those tests but breaks an invariant is the class the tests exist to catch.
|
|
94
|
+
|
|
95
|
+
## Bite-proof (every run)
|
|
96
|
+
|
|
97
|
+
A gate that cannot fail is not a gate. Both modes end by proving, on the committed tree, that the
|
|
98
|
+
emitted gate goes **pass → fail → pass**; the founder never sees a scaffold whose only evidence is
|
|
99
|
+
that it ran green once:
|
|
100
|
+
|
|
101
|
+
1. **Stage.** In a detached-HEAD worktree under `$TMPDIR` (a `TMPDIR` that resolves inside the
|
|
102
|
+
repository is refused, exit 69, before anything is written, so the worktree and its logs can never
|
|
103
|
+
land in the founder's tree as untracked files), copy the three artifacts that may be uncommitted —
|
|
104
|
+
config, runner, baseline — into the target path and symlink the target's `node_modules`, exactly
|
|
105
|
+
as baseline capture does. A symlinked `server/` or `components/` is refused (71): the probes are
|
|
106
|
+
never written through a link.
|
|
107
|
+
Every runner invocation is captured to a `bite-N.log` so a failure can show its evidence before
|
|
108
|
+
the worktree is removed.
|
|
109
|
+
2. **Pass.** The runner must exit 0 on the clean tree. `error <rule>:` lines in the log → exit
|
|
110
|
+
**74** (real violations on HEAD newer than the merge-base baseline — the gate is live; fix the
|
|
111
|
+
listed imports); any other non-zero → exit **71** (config or toolchain error; log tail shown).
|
|
112
|
+
3. **Inject — each rule on the edge it exists for.** Under
|
|
113
|
+
`components/__constraint_scaffold_bite_probe__/`: a `"use client"` module value-importing the
|
|
114
|
+
probe server module directly, a non-client hop that imports it, and a `"use client"` module that
|
|
115
|
+
imports the hop; plus `server/__constraint_scaffold_bite_probe__.ts` exporting one string that is
|
|
116
|
+
visibly not a secret.
|
|
117
|
+
4. **Fail, naming both rules on their own edges.** The runner must exit non-zero **and** the log must
|
|
118
|
+
carry `error no-client-to-server-secret: … direct.tsx` and
|
|
119
|
+
`error no-client-to-server-secret-transitive: … via-hop.tsx` — anchored on depcruise's call-form,
|
|
120
|
+
never a bare rule name. Otherwise exit **72**: the gate did NOT reject the injected import.
|
|
121
|
+
5. **Revert.** The four probe files are removed.
|
|
122
|
+
6. **Pass again.** The runner must exit 0, else exit **73** (non-deterministic gate).
|
|
123
|
+
7. The helper removes the worktree (also on INT/TERM — the handler exits 143 with the worktree gone).
|
|
124
|
+
One verdict line on stdout: `constraint-scaffold: bite-proof pass -> fail(no-client-to-server-secret@direct, no-client-to-server-secret-transitive@via-hop) -> pass depcruise=<version>`.
|
|
125
|
+
|
|
126
|
+
**Exit codes 71–74 and what the agent does next.** Every bite failure prints
|
|
127
|
+
`constraint-scaffold: bite-proof FAILED (<code>): <msg>` and the last 40 lines of the relevant log
|
|
128
|
+
on stdout. In **default mode** the self-cleanup is armed before the first artifact is written and
|
|
129
|
+
disarmed only after the bite has passed, so this holds for every failure in between — 66..74, an
|
|
130
|
+
unusable `TMPDIR`, a `set -e` abort, an INT/TERM (143), a runner interrupted by a terminal Ctrl-C
|
|
131
|
+
(130): the script removes every artifact this run emitted (config, runner, the three workflows, the
|
|
132
|
+
baseline; empty `scripts/` and `.github/workflows/` directories are removed too) and says so — the
|
|
133
|
+
README and pointer have not been written yet — so the repo is as it was and the next run is a clean
|
|
134
|
+
first install, never a 66 on a half-installed gate. Every failure message is on stdout first
|
|
135
|
+
(`constraint-scaffold: FAILED (<code>): …`). Only a SIGKILL can leave residue (the six files plus a
|
|
136
|
+
stale `.git/worktrees` registration); the 66 message names that recovery (`git clean -n`, `git
|
|
137
|
+
worktree prune`, re-run). The base ref is `origin/main`, else the remote's default branch
|
|
138
|
+
(`origin/HEAD` — a founder repo on `master`); neither present exits 69 before anything is written.
|
|
139
|
+
In refresh mode nothing is removed. One run per repository at a time: a `mkdir` lock in the git
|
|
140
|
+
common dir (owner pid inside) makes a concurrent run a 69 naming the pid; a stale lock is taken
|
|
141
|
+
over. The 68/69 messages carry git's / dependency-cruiser's own last lines (a failing
|
|
142
|
+
`post-checkout` hook, a parse error) and name a shallow clone. The generator uses POSIX tools only
|
|
143
|
+
(stock macOS included). A failure while writing the README or the pointer **after** a
|
|
144
|
+
successful bite is a warning on stdout, not a fatal: the gate is installed and proven; the message
|
|
145
|
+
names the file and the missing doc. **Hosted-runner deviation:** `plugins/soleur/` is vendored into
|
|
146
|
+
the production image, so this script can run where no human reads stdout; there a 71–74 is
|
|
147
|
+
transcript-only by design — no `SOLEUR_*` marker is emitted (AC13, the marker-population caution)
|
|
148
|
+
— and the mirrored-not-paged `SOLEUR_CONSTRAINT_SCAFFOLD_HALT` is #8381 (`deferred-scope-out`).
|
|
149
|
+
|
|
150
|
+
**Precondition (exit 65).** Default mode requires `app/`, `components/` and `server/` to exist under
|
|
151
|
+
the target before anything is emitted — the emitted runner cruises all three and would fail its own
|
|
152
|
+
CI otherwise; the message names the missing one. The README names the requirement.
|
|
153
|
+
|
|
154
|
+
The script carries **no test seams** (no `CONSTRAINT_SCAFFOLD_TEST_*` variable is honoured); the
|
|
155
|
+
suite drives every failure arm through a fixture-owned stub `depcruise` reached via the fixture's
|
|
156
|
+
`node_modules` symlink. Decision record: ADR-071 §Amendment 2026-09-19 (#8288).
|
|
157
|
+
|
|
158
|
+
## Self-tests
|
|
159
|
+
|
|
160
|
+
`test/bite-proof.test.sh` (scripts shard) pins the contract above: pass → fail → pass on the real
|
|
161
|
+
dependency-cruiser; every 71/72/73/74 arm through the stub; both rule names asserted on their own
|
|
162
|
+
probe files; worktree removal on success, on failure and on TERM; default-mode self-cleanup leaving
|
|
163
|
+
the fixture tree as it was; and the `TMPDIR`-inside-repo refusal.
|
|
164
|
+
|
|
165
|
+
`test/boundary.test.sh` (scripts shard) proves the gate is not vacuous: a value import of `server/**`
|
|
166
|
+
via the `@/server/…` alias FAILS, an `import type` of the same PASSES, route-group/metacharacter
|
|
167
|
+
paths are matched (regex-escaping), an empty from-set while `"use client"` files exist is a hard
|
|
168
|
+
error, and a broken `.cjs` fails the runner closed.
|
|
169
|
+
|
|
170
|
+
- **Sharp edge (transitive rule):** the "reachable baseline stays empty" guard MUST key on the
|
|
171
|
+
transitive rule NAME, never on `type:"reachability"` — dependency-cruiser softens the reachable
|
|
172
|
+
rule per-origin on `from`+`rule.name` IGNORING entry `type`, so a `type:"module"` baseline entry
|
|
173
|
+
naming the rule suppresses a real leak while a type-count reads 0 (a `--refresh-baseline` capture
|
|
174
|
+
never emits that shape, so the regression fixture must inject it by hand). See
|
|
175
|
+
`knowledge-base/project/learnings/security-issues/2026-07-01-depcruise-reachability-baseline-softens-per-rule-name-ignoring-type.md`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- Inspired by mattpocock/skills/skills/in-progress/setup-ts-deep-modules/SKILL.md (MIT, Copyright (c) 2026 Matt Pocock). -->
|
|
2
|
+
<!-- constraint-scaffold:readme:start -->
|
|
3
|
+
<!-- Generated by soleur:constraint-scaffold (ADR-071). The agent, never the founder, owns this block: it is appended once, keyed on the start/end markers, and not rewritten by later runs; when the skill's template changes, the agent replaces the block between the markers by hand. Edit the template, not this copy. -->
|
|
4
|
+
|
|
5
|
+
## Client/server import boundary
|
|
6
|
+
|
|
7
|
+
A `"use client"` module under `app/` or `components/` must never take a value import on `server/**`, whether directly or through a chain of other modules. A value import pulls the server module, and any secret it reads, into the browser bundle. Types are erased at build time, so `import type { Shape } from "@/server/config"` is the permitted shape for anything a client needs to know about a server module.
|
|
8
|
+
|
|
9
|
+
dependency-cruiser enforces this with two rules in `.dependency-cruiser.cjs`:
|
|
10
|
+
|
|
11
|
+
- `no-client-to-server-secret` flags a client module whose own import statement targets `server/**`.
|
|
12
|
+
- `no-client-to-server-secret-transitive` flags a client module that reaches `server/**` through one or more non-client helpers.
|
|
13
|
+
|
|
14
|
+
### Running the gate
|
|
15
|
+
|
|
16
|
+
From `__TARGET_DIR__`:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
bash scripts/constraint-gates.sh
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Exit 0 means no violation beyond the committed baseline (`.dependency-cruiser-known-violations.json`). Any other exit means either a real boundary violation or a broken toolchain, and both fail closed. The runner cruises `app/`, `components/` and `server/` and matches imports by their resolved path, so all three directories must exist and the `@/*` alias in `tsconfig.json` must resolve.
|
|
23
|
+
|
|
24
|
+
### What happens when it trips
|
|
25
|
+
|
|
26
|
+
The `constraint-gates` workflow runs on every pull request that touches `__TARGET_DIR__`. When the gate trips, the pull request shows a red check. When the offending import can be corrected mechanically, the two-stage recovery workflow (ADR-074) opens a draft follow-up pull request carrying the fix for review and merge. When it cannot, the check stays red until the import is changed (or, for a legitimate cross-boundary import, the agent adds the in-code exemption) — a refresh never clears a leak introduced on the current branch.
|
|
27
|
+
|
|
28
|
+
### Proven to bite
|
|
29
|
+
|
|
30
|
+
Installing this gate did not stop at writing files. The scaffold checked out the committed tree in a detached worktree, ran the gate (pass), injected a direct client import and a one-hop chain into `server/**`, confirmed the gate named each rule on its own edge (fail), removed the probes and ran the gate again (pass). The same proof runs on every `--refresh-baseline`, so a config edit that quietly disarms a rule is caught at the next refresh rather than at the next leak.
|
|
31
|
+
|
|
32
|
+
### Ownership and recovery
|
|
33
|
+
|
|
34
|
+
`.dependency-cruiser.cjs`, `scripts/constraint-gates.sh` and the baseline file are agent-owned; do not hand-edit them. To re-baseline after `main` has moved, or to re-run the bite proof, run the `soleur:constraint-scaffold` skill with `--refresh-baseline`. It refuses a dirty tree and captures the baseline against the `origin/main` merge-base, so a leak introduced on the current branch is never grandfathered.
|
|
35
|
+
<!-- constraint-scaffold:readme:end -->
|