@geraldmaron/construct 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/.env.example +69 -0
- package/LICENSE +21 -0
- package/README.md +344 -0
- package/agents/prompts/cx-accessibility.md +29 -0
- package/agents/prompts/cx-ai-engineer.md +31 -0
- package/agents/prompts/cx-architect.md +40 -0
- package/agents/prompts/cx-business-strategist.md +25 -0
- package/agents/prompts/cx-data-analyst.md +30 -0
- package/agents/prompts/cx-data-engineer.md +32 -0
- package/agents/prompts/cx-debugger.md +27 -0
- package/agents/prompts/cx-designer.md +33 -0
- package/agents/prompts/cx-devil-advocate.md +36 -0
- package/agents/prompts/cx-docs-keeper.md +50 -0
- package/agents/prompts/cx-engineer.md +36 -0
- package/agents/prompts/cx-evaluator.md +26 -0
- package/agents/prompts/cx-explorer.md +38 -0
- package/agents/prompts/cx-legal-compliance.md +25 -0
- package/agents/prompts/cx-operations.md +28 -0
- package/agents/prompts/cx-orchestrator.md +30 -0
- package/agents/prompts/cx-platform-engineer.md +25 -0
- package/agents/prompts/cx-product-manager.md +30 -0
- package/agents/prompts/cx-qa.md +42 -0
- package/agents/prompts/cx-rd-lead.md +25 -0
- package/agents/prompts/cx-release-manager.md +31 -0
- package/agents/prompts/cx-researcher.md +31 -0
- package/agents/prompts/cx-reviewer.md +36 -0
- package/agents/prompts/cx-security.md +37 -0
- package/agents/prompts/cx-sre.md +26 -0
- package/agents/prompts/cx-test-automation.md +35 -0
- package/agents/prompts/cx-trace-reviewer.md +76 -0
- package/agents/prompts/cx-ux-researcher.md +30 -0
- package/agents/registry.json +879 -0
- package/agents/teams.json +94 -0
- package/bin/construct +613 -0
- package/commands/build/feature.md +21 -0
- package/commands/build/fix.md +20 -0
- package/commands/design/access.md +19 -0
- package/commands/design/flow.md +16 -0
- package/commands/design/ui.md +18 -0
- package/commands/measure/experiment.md +18 -0
- package/commands/measure/metrics.md +18 -0
- package/commands/measure/results.md +18 -0
- package/commands/plan/api.md +19 -0
- package/commands/plan/challenge.md +18 -0
- package/commands/plan/decide.md +20 -0
- package/commands/plan/feature.md +49 -0
- package/commands/plan/requirements.md +24 -0
- package/commands/remember/context.md +26 -0
- package/commands/remember/handoff.md +19 -0
- package/commands/remember/runbook.md +20 -0
- package/commands/review/code.md +21 -0
- package/commands/review/quality.md +19 -0
- package/commands/review/security.md +16 -0
- package/commands/ship/ready.md +19 -0
- package/commands/ship/release.md +19 -0
- package/commands/ship/status.md +18 -0
- package/commands/understand/docs.md +22 -0
- package/commands/understand/research.md +22 -0
- package/commands/understand/this.md +23 -0
- package/commands/understand/why.md +18 -0
- package/commands/work/clean.md +32 -0
- package/commands/work/drive.md +69 -0
- package/commands/work/optimize-prompts.md +46 -0
- package/commands/work/parallel-review.md +40 -0
- package/db/migrations/001_init.sql +38 -0
- package/langfuse/docker-compose.yml +82 -0
- package/lib/audit-skills.mjs +118 -0
- package/lib/auto-docs.mjs +293 -0
- package/lib/cli-commands.mjs +409 -0
- package/lib/codex-config.mjs +114 -0
- package/lib/comment-lint.mjs +191 -0
- package/lib/completions.mjs +170 -0
- package/lib/context-state.mjs +99 -0
- package/lib/cost.mjs +213 -0
- package/lib/distill.mjs +403 -0
- package/lib/efficiency.mjs +139 -0
- package/lib/env-config.mjs +53 -0
- package/lib/eval-harness.mjs +59 -0
- package/lib/features.mjs +209 -0
- package/lib/headhunt.mjs +597 -0
- package/lib/hooks/adaptive-lint.mjs +112 -0
- package/lib/hooks/agent-tracker.mjs +50 -0
- package/lib/hooks/bootstrap-guard.mjs +90 -0
- package/lib/hooks/comment-lint.mjs +26 -0
- package/lib/hooks/config-protection.mjs +52 -0
- package/lib/hooks/console-warn.mjs +43 -0
- package/lib/hooks/context-window-recovery.mjs +90 -0
- package/lib/hooks/continuation-enforcer.mjs +72 -0
- package/lib/hooks/dep-audit.mjs +155 -0
- package/lib/hooks/drive-guard.mjs +89 -0
- package/lib/hooks/edit-accumulator.mjs +36 -0
- package/lib/hooks/edit-error-recovery.mjs +46 -0
- package/lib/hooks/edit-guard.mjs +109 -0
- package/lib/hooks/env-check.mjs +80 -0
- package/lib/hooks/guard-bash.mjs +83 -0
- package/lib/hooks/mcp-audit.mjs +57 -0
- package/lib/hooks/mcp-health-check.mjs +51 -0
- package/lib/hooks/mcp-task-scope.mjs +47 -0
- package/lib/hooks/model-fallback.mjs +105 -0
- package/lib/hooks/pre-compact.mjs +212 -0
- package/lib/hooks/pre-push-gate.mjs +129 -0
- package/lib/hooks/read-tracker.mjs +129 -0
- package/lib/hooks/registry-sync.mjs +23 -0
- package/lib/hooks/scan-secrets.mjs +76 -0
- package/lib/hooks/session-start.mjs +95 -0
- package/lib/hooks/stop-notify.mjs +191 -0
- package/lib/hooks/stop-typecheck.mjs +83 -0
- package/lib/hooks/task-completed-guard.mjs +43 -0
- package/lib/hooks/teammate-idle-guard.mjs +54 -0
- package/lib/hooks/workflow-guard.mjs +62 -0
- package/lib/host-capabilities.mjs +123 -0
- package/lib/init-docs.mjs +382 -0
- package/lib/mcp/server.mjs +1123 -0
- package/lib/mcp-catalog.json +243 -0
- package/lib/mcp-manager.mjs +433 -0
- package/lib/mcp-platform-config.mjs +104 -0
- package/lib/model-router.mjs +810 -0
- package/lib/opencode-config.mjs +44 -0
- package/lib/opencode-runtime-plugin.mjs +909 -0
- package/lib/opencode-telemetry.mjs +433 -0
- package/lib/orchestration-policy.mjs +258 -0
- package/lib/prompt-composer.mjs +196 -0
- package/lib/prompt-metadata.mjs +68 -0
- package/lib/review.mjs +429 -0
- package/lib/role-preload.mjs +52 -0
- package/lib/schemas/decision.json +50 -0
- package/lib/schemas/implementation.json +51 -0
- package/lib/schemas/review-report.json +32 -0
- package/lib/schemas/test-report.json +43 -0
- package/lib/server/index.mjs +334 -0
- package/lib/server/static/app.js +841 -0
- package/lib/server/static/index.html +820 -0
- package/lib/service-manager.mjs +225 -0
- package/lib/setup.mjs +319 -0
- package/lib/status.mjs +707 -0
- package/lib/storage/backend.mjs +44 -0
- package/lib/storage/embeddings.mjs +70 -0
- package/lib/storage/hybrid-query.mjs +184 -0
- package/lib/storage/sql-store.mjs +55 -0
- package/lib/storage/state-source.mjs +101 -0
- package/lib/storage/sync.mjs +164 -0
- package/lib/storage/vector-store.mjs +59 -0
- package/lib/telemetry/backends/langfuse.mjs +58 -0
- package/lib/telemetry/backends/noop.mjs +16 -0
- package/lib/telemetry/langfuse-ingest.mjs +108 -0
- package/lib/telemetry/langfuse-model-sync.mjs +270 -0
- package/lib/telemetry/team-rollup.mjs +143 -0
- package/lib/toolkit-env.mjs +30 -0
- package/lib/validator.mjs +181 -0
- package/lib/workflow-state.mjs +794 -0
- package/package.json +53 -0
- package/personas/construct.md +94 -0
- package/platforms/claude/CLAUDE.md +30 -0
- package/platforms/claude/settings.template.json +472 -0
- package/platforms/opencode/config.template.json +65 -0
- package/platforms/opencode/plugins/construct-fallback.js +5 -0
- package/platforms/opencode/sync-config.mjs +69 -0
- package/rules/common/agents.md +55 -0
- package/rules/common/code-review.md +129 -0
- package/rules/common/coding-style.md +95 -0
- package/rules/common/comments.md +139 -0
- package/rules/common/cx-agent-routing.md +61 -0
- package/rules/common/cx-skill-routing.md +11 -0
- package/rules/common/development-workflow.md +49 -0
- package/rules/common/git-workflow.md +29 -0
- package/rules/common/hooks.md +35 -0
- package/rules/common/patterns.md +36 -0
- package/rules/common/performance.md +71 -0
- package/rules/common/security.md +34 -0
- package/rules/common/testing.md +62 -0
- package/rules/golang/coding-style.md +37 -0
- package/rules/golang/hooks.md +22 -0
- package/rules/golang/patterns.md +50 -0
- package/rules/golang/security.md +39 -0
- package/rules/golang/testing.md +36 -0
- package/rules/python/coding-style.md +47 -0
- package/rules/python/hooks.md +24 -0
- package/rules/python/patterns.md +44 -0
- package/rules/python/security.md +35 -0
- package/rules/python/testing.md +43 -0
- package/rules/swift/coding-style.md +52 -0
- package/rules/swift/hooks.md +25 -0
- package/rules/swift/patterns.md +71 -0
- package/rules/swift/security.md +38 -0
- package/rules/swift/testing.md +50 -0
- package/rules/typescript/coding-style.md +204 -0
- package/rules/typescript/hooks.md +27 -0
- package/rules/typescript/patterns.md +57 -0
- package/rules/typescript/security.md +33 -0
- package/rules/typescript/testing.md +23 -0
- package/rules/web/coding-style.md +101 -0
- package/rules/web/design-quality.md +68 -0
- package/rules/web/hooks.md +125 -0
- package/rules/web/patterns.md +84 -0
- package/rules/web/performance.md +69 -0
- package/rules/web/security.md +62 -0
- package/rules/web/testing.md +60 -0
- package/rules/zh/README.md +113 -0
- package/rules/zh/agents.md +55 -0
- package/rules/zh/code-review.md +129 -0
- package/rules/zh/coding-style.md +53 -0
- package/rules/zh/development-workflow.md +49 -0
- package/rules/zh/git-workflow.md +29 -0
- package/rules/zh/hooks.md +35 -0
- package/rules/zh/patterns.md +36 -0
- package/rules/zh/performance.md +60 -0
- package/rules/zh/security.md +34 -0
- package/rules/zh/testing.md +34 -0
- package/skills/ai/agent-dev.md +102 -0
- package/skills/ai/llm-security.md +105 -0
- package/skills/ai/ml-ops.md +169 -0
- package/skills/ai/orchestration-workflow.md +87 -0
- package/skills/ai/prompt-and-eval.md +114 -0
- package/skills/ai/prompt-optimizer.md +114 -0
- package/skills/ai/rag-system.md +104 -0
- package/skills/architecture/api-design.md +100 -0
- package/skills/architecture/caching.md +101 -0
- package/skills/architecture/cloud-native.md +97 -0
- package/skills/architecture/message-queue.md +100 -0
- package/skills/architecture/security-arch.md +105 -0
- package/skills/development/cpp.md +127 -0
- package/skills/development/go.md +129 -0
- package/skills/development/java.md +134 -0
- package/skills/development/kotlin.md +140 -0
- package/skills/development/mobile-crossplatform.md +144 -0
- package/skills/development/python.md +109 -0
- package/skills/development/rust.md +127 -0
- package/skills/development/shell.md +127 -0
- package/skills/development/swift.md +129 -0
- package/skills/development/typescript.md +129 -0
- package/skills/devops/ci-cd.md +108 -0
- package/skills/devops/containerization.md +106 -0
- package/skills/devops/cost-optimization.md +105 -0
- package/skills/devops/data-engineering.md +181 -0
- package/skills/devops/database.md +95 -0
- package/skills/devops/dependency-management.md +91 -0
- package/skills/devops/devsecops.md +96 -0
- package/skills/devops/git-workflow.md +100 -0
- package/skills/devops/incident-response.md +167 -0
- package/skills/devops/monorepo.md +87 -0
- package/skills/devops/observability.md +103 -0
- package/skills/devops/performance.md +104 -0
- package/skills/devops/testing.md +104 -0
- package/skills/docs/adr-workflow.md +32 -0
- package/skills/docs/backlog-proposal-workflow.md +19 -0
- package/skills/docs/customer-profile-workflow.md +22 -0
- package/skills/docs/evidence-ingest-workflow.md +23 -0
- package/skills/docs/init-docs.md +160 -0
- package/skills/docs/init-project.md +50 -0
- package/skills/docs/prd-workflow.md +57 -0
- package/skills/docs/prfaq-workflow.md +25 -0
- package/skills/docs/product-intelligence-review.md +22 -0
- package/skills/docs/product-intelligence-workflow.md +62 -0
- package/skills/docs/product-signal-workflow.md +27 -0
- package/skills/docs/research-workflow.md +28 -0
- package/skills/docs/runbook-workflow.md +24 -0
- package/skills/exploration/repo-map.md +297 -0
- package/skills/frameworks/django.md +159 -0
- package/skills/frameworks/nextjs.md +148 -0
- package/skills/frameworks/react.md +132 -0
- package/skills/frameworks/spring-boot.md +165 -0
- package/skills/frontend-design/accessibility.md +153 -0
- package/skills/frontend-design/component-patterns.md +111 -0
- package/skills/frontend-design/engineering.md +122 -0
- package/skills/frontend-design/state-management.md +118 -0
- package/skills/frontend-design/ui-aesthetics.md +102 -0
- package/skills/frontend-design/ux-principles.md +126 -0
- package/skills/quality-gates/review-work.md +90 -0
- package/skills/quality-gates/verify-change.md +94 -0
- package/skills/quality-gates/verify-module.md +96 -0
- package/skills/quality-gates/verify-quality.md +93 -0
- package/skills/quality-gates/verify-security.md +95 -0
- package/skills/roles/architect.ai-systems.md +37 -0
- package/skills/roles/architect.data.md +37 -0
- package/skills/roles/architect.enterprise.md +37 -0
- package/skills/roles/architect.integration.md +37 -0
- package/skills/roles/architect.md +68 -0
- package/skills/roles/architect.platform.md +37 -0
- package/skills/roles/data-analyst.experiment.md +37 -0
- package/skills/roles/data-analyst.md +68 -0
- package/skills/roles/data-analyst.product-intelligence.md +37 -0
- package/skills/roles/data-analyst.product.md +37 -0
- package/skills/roles/data-analyst.telemetry.md +37 -0
- package/skills/roles/data-engineer.pipeline.md +37 -0
- package/skills/roles/data-engineer.vector-retrieval.md +37 -0
- package/skills/roles/data-engineer.warehouse.md +37 -0
- package/skills/roles/debugger.md +68 -0
- package/skills/roles/designer.accessibility.md +43 -0
- package/skills/roles/designer.md +68 -0
- package/skills/roles/engineer.ai.md +49 -0
- package/skills/roles/engineer.data.md +49 -0
- package/skills/roles/engineer.md +85 -0
- package/skills/roles/engineer.platform.md +49 -0
- package/skills/roles/operator.docs.md +43 -0
- package/skills/roles/operator.md +68 -0
- package/skills/roles/operator.release.md +43 -0
- package/skills/roles/operator.sre.md +43 -0
- package/skills/roles/orchestrator.md +66 -0
- package/skills/roles/product-manager.ai-product.md +37 -0
- package/skills/roles/product-manager.business-strategy.md +43 -0
- package/skills/roles/product-manager.enterprise.md +37 -0
- package/skills/roles/product-manager.growth.md +37 -0
- package/skills/roles/product-manager.md +67 -0
- package/skills/roles/product-manager.platform.md +37 -0
- package/skills/roles/product-manager.product.md +37 -0
- package/skills/roles/qa.ai-eval.md +37 -0
- package/skills/roles/qa.api-contract.md +37 -0
- package/skills/roles/qa.data-pipeline.md +37 -0
- package/skills/roles/qa.md +68 -0
- package/skills/roles/qa.test-automation.md +49 -0
- package/skills/roles/qa.web-ui.md +37 -0
- package/skills/roles/researcher.explorer.md +43 -0
- package/skills/roles/researcher.md +68 -0
- package/skills/roles/researcher.ux.md +43 -0
- package/skills/roles/reviewer.devil-advocate.md +43 -0
- package/skills/roles/reviewer.evaluator.md +43 -0
- package/skills/roles/reviewer.md +68 -0
- package/skills/roles/reviewer.trace.md +43 -0
- package/skills/roles/security.ai.md +37 -0
- package/skills/roles/security.appsec.md +37 -0
- package/skills/roles/security.cloud.md +37 -0
- package/skills/roles/security.legal-compliance.md +49 -0
- package/skills/roles/security.md +68 -0
- package/skills/roles/security.privacy.md +37 -0
- package/skills/roles/security.supply-chain.md +37 -0
- package/skills/routing.md +139 -0
- package/skills/security/blue-team.md +83 -0
- package/skills/security/code-audit.md +94 -0
- package/skills/security/pentest.md +84 -0
- package/skills/security/red-team.md +81 -0
- package/skills/security/threat-intel.md +89 -0
- package/skills/security/vuln-research.md +87 -0
- package/skills/utility/clean-code.md +165 -0
- package/sync-agents.mjs +899 -0
- package/templates/docs/adr.md +27 -0
- package/templates/docs/backlog-proposal.md +26 -0
- package/templates/docs/customer-profile.md +34 -0
- package/templates/docs/evidence-brief.md +37 -0
- package/templates/docs/incident-report.md +46 -0
- package/templates/docs/memo.md +27 -0
- package/templates/docs/meta-prd.md +56 -0
- package/templates/docs/one-pager.md +24 -0
- package/templates/docs/prd-business.md +61 -0
- package/templates/docs/prd-platform.md +62 -0
- package/templates/docs/prd.md +47 -0
- package/templates/docs/prfaq.md +31 -0
- package/templates/docs/product-intelligence-report.md +31 -0
- package/templates/docs/research-brief.md +29 -0
- package/templates/docs/rfc-platform.md +60 -0
- package/templates/docs/rfc.md +46 -0
- package/templates/docs/runbook.md +33 -0
- package/templates/docs/signal-brief.md +25 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/data-engineer.pipeline.md — Anti-pattern guidance for the Data-engineer.pipeline (pipeline) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the data-engineer.pipeline (pipeline) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-data-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: data-engineer.pipeline
|
|
10
|
+
applies_to: [cx-data-engineer]
|
|
11
|
+
inherits: engineer.data
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Data Pipeline Engineer Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the data engineer core.
|
|
17
|
+
|
|
18
|
+
### 1. Non-idempotent jobs
|
|
19
|
+
**Symptom**: reruns duplicate records, skip records, or mutate state unpredictably.
|
|
20
|
+
**Why it fails**: retries and backfills are normal operations, not edge cases.
|
|
21
|
+
**Counter-move**: design idempotency keys, checkpoints, replay windows, and deduplication rules.
|
|
22
|
+
|
|
23
|
+
### 2. Hidden failure states
|
|
24
|
+
**Symptom**: jobs fail silently or require manual log archaeology.
|
|
25
|
+
**Why it fails**: data consumers keep making decisions from stale or partial data.
|
|
26
|
+
**Counter-move**: add freshness, volume, schema, latency, and error-rate monitors with owners.
|
|
27
|
+
|
|
28
|
+
### 3. Contract drift
|
|
29
|
+
**Symptom**: upstream fields change without downstream tests failing.
|
|
30
|
+
**Why it fails**: data breaks at the consumer boundary.
|
|
31
|
+
**Counter-move**: publish contracts and run compatibility checks before deploy.
|
|
32
|
+
|
|
33
|
+
## Self-check before shipping
|
|
34
|
+
- [ ] Reruns, retries, and backfills are idempotent
|
|
35
|
+
- [ ] Freshness, volume, schema, latency, and error monitors exist
|
|
36
|
+
- [ ] Data contracts and compatibility tests are present
|
|
37
|
+
- [ ] Ownership and runbook are clear
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/data-engineer.vector-retrieval.md — Anti-pattern guidance for the Data-engineer.vector-retrieval (vector retrieval) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the data-engineer.vector-retrieval (vector retrieval) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-data-engineer, cx-ai-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: data-engineer.vector-retrieval
|
|
10
|
+
applies_to: [cx-data-engineer, cx-ai-engineer]
|
|
11
|
+
inherits: engineer.data
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Vector Retrieval Engineer Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the data engineer core.
|
|
17
|
+
|
|
18
|
+
### 1. Embeddings without lifecycle
|
|
19
|
+
**Symptom**: documents are embedded once with no freshness, deletion, or re-indexing policy.
|
|
20
|
+
**Why it fails**: retrieval serves stale or unauthorized context.
|
|
21
|
+
**Counter-move**: define ingestion, chunking, metadata, freshness, deletion, and re-indexing rules.
|
|
22
|
+
|
|
23
|
+
### 2. Similarity score as truth
|
|
24
|
+
**Symptom**: the system trusts nearest neighbors without source filtering or confidence thresholds.
|
|
25
|
+
**Why it fails**: plausible retrieval can be wrong, stale, or cross-tenant.
|
|
26
|
+
**Counter-move**: combine vector search with metadata filters, SQL/file provenance, score thresholds, and citations.
|
|
27
|
+
|
|
28
|
+
### 3. No retrieval evaluation
|
|
29
|
+
**Symptom**: retrieval is judged from a few manual searches.
|
|
30
|
+
**Why it fails**: recall and precision regress silently as the corpus changes.
|
|
31
|
+
**Counter-move**: maintain query sets, expected documents, precision/recall checks, and latency budgets.
|
|
32
|
+
|
|
33
|
+
## Self-check before shipping
|
|
34
|
+
- [ ] Ingestion, chunking, metadata, deletion, and re-indexing are specified
|
|
35
|
+
- [ ] Retrieval enforces ACL, tenant, and freshness filters
|
|
36
|
+
- [ ] Results include source provenance and confidence handling
|
|
37
|
+
- [ ] Retrieval evals cover precision, recall, and latency
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/data-engineer.warehouse.md — Anti-pattern guidance for the Data-engineer.warehouse (warehouse) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the data-engineer.warehouse (warehouse) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-data-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: data-engineer.warehouse
|
|
10
|
+
applies_to: [cx-data-engineer]
|
|
11
|
+
inherits: engineer.data
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Warehouse Engineer Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the data engineer core.
|
|
17
|
+
|
|
18
|
+
### 1. Modeling for the first question
|
|
19
|
+
**Symptom**: tables answer one dashboard but cannot support future slicing or audit.
|
|
20
|
+
**Why it fails**: warehouse models become brittle semantic traps.
|
|
21
|
+
**Counter-move**: define grains, dimensions, facts, slowly changing attributes, and ownership.
|
|
22
|
+
|
|
23
|
+
### 2. Semantic duplication
|
|
24
|
+
**Symptom**: the same metric exists in several SQL files with different filters.
|
|
25
|
+
**Why it fails**: teams argue over numbers instead of decisions.
|
|
26
|
+
**Counter-move**: centralize metric definitions and document denominator, exclusions, and freshness.
|
|
27
|
+
|
|
28
|
+
### 3. Cost ignored
|
|
29
|
+
**Symptom**: transformations are correct but expensive or slow at production volume.
|
|
30
|
+
**Why it fails**: analytics reliability includes cost and latency.
|
|
31
|
+
**Counter-move**: design partitions, clustering, incremental models, and retention explicitly.
|
|
32
|
+
|
|
33
|
+
## Self-check before shipping
|
|
34
|
+
- [ ] Grain, dimensions, facts, and ownership are documented
|
|
35
|
+
- [ ] Metrics are centralized with denominators and exclusions
|
|
36
|
+
- [ ] Incremental strategy, partitions, and retention are defined
|
|
37
|
+
- [ ] Cost and latency are acceptable at expected volume
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/debugger.md — Anti-pattern guidance for the Debugger role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the debugger domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-debugger.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: debugger
|
|
10
|
+
applies_to: [cx-debugger]
|
|
11
|
+
inherits: null
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Debugger — Role guidance
|
|
15
|
+
|
|
16
|
+
Load this before drafting. These are the failure modes that separate strong role output from weak role output — check your draft against each.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Fixing the symptom
|
|
20
|
+
**Symptom**: the patch makes the test pass or the error disappear without a clear statement of why it was happening.
|
|
21
|
+
**Why it fails**: the cause re-emerges elsewhere, often with more blast radius than the original.
|
|
22
|
+
**Counter-move**: explain the cause in one sentence before writing the fix. If you cannot, you are still debugging.
|
|
23
|
+
|
|
24
|
+
### 2. Untested assumption
|
|
25
|
+
**Symptom**: "it must be the cache" or "probably a race" stated as fact, never verified.
|
|
26
|
+
**Why it fails**: the investigation follows the assumption down a dead end; the real cause escapes notice.
|
|
27
|
+
**Counter-move**: for each hypothesis, name the experiment that would disprove it. Run the experiment before acting.
|
|
28
|
+
|
|
29
|
+
### 3. Skipping reproduction
|
|
30
|
+
**Symptom**: fix proposed based on a stack trace or a bug report, without reproducing the failure locally.
|
|
31
|
+
**Why it fails**: the fix targets the author's mental model, not the actual failure. Often does not fix the bug.
|
|
32
|
+
**Counter-move**: reproduce the failure. Confirm the fix makes the reproduction stop. Preserve the reproduction as a regression test.
|
|
33
|
+
|
|
34
|
+
### 4. Noise-driven debugging
|
|
35
|
+
**Symptom**: randomly adding logs, retries, or sleep() until the symptom goes away.
|
|
36
|
+
**Why it fails**: the bug is masked, not fixed. The masked bug resurfaces later, worse.
|
|
37
|
+
**Counter-move**: form a hypothesis. Add one targeted log or breakpoint that would confirm or deny it. Iterate.
|
|
38
|
+
|
|
39
|
+
### 5. Believing the first error
|
|
40
|
+
**Symptom**: acting on the first error in the log as the cause, when it is actually the downstream effect of something earlier.
|
|
41
|
+
**Why it fails**: fixes the surface failure; leaves the upstream bug intact.
|
|
42
|
+
**Counter-move**: read the log from the top. Find the earliest anomaly. Work forward from there.
|
|
43
|
+
|
|
44
|
+
### 6. Scope leakage
|
|
45
|
+
**Symptom**: the debugging session turns into a refactor, a cleanup, and a style pass.
|
|
46
|
+
**Why it fails**: the fix is bundled with unrelated changes; reviewers cannot isolate the bug fix; regressions become harder to bisect.
|
|
47
|
+
**Counter-move**: land the fix as a narrow diff. Bank any cleanup for a separate PR.
|
|
48
|
+
|
|
49
|
+
### 7. Giving up at "intermittent"
|
|
50
|
+
**Symptom**: a failure labeled "flaky" or "intermittent" and set aside without investigation.
|
|
51
|
+
**Why it fails**: intermittent failures signal race conditions, timing dependencies, or resource leaks that will eventually cause a production incident.
|
|
52
|
+
**Counter-move**: investigate every intermittent failure. Either find the race or isolate the environmental dependency.
|
|
53
|
+
|
|
54
|
+
### 8. No regression test
|
|
55
|
+
**Symptom**: the bug is fixed but no test is added that would have caught it.
|
|
56
|
+
**Why it fails**: the same bug returns in six months, silently.
|
|
57
|
+
**Counter-move**: add a test that fails against the broken code and passes against the fix. Keep it.
|
|
58
|
+
|
|
59
|
+
## Self-check before shipping
|
|
60
|
+
|
|
61
|
+
- [ ] Cause stated in one sentence before the fix
|
|
62
|
+
- [ ] Each hypothesis tested before acting on it
|
|
63
|
+
- [ ] Failure reproduced locally and reproduction preserved as a test
|
|
64
|
+
- [ ] No speculative logs, retries, or sleeps in the fix
|
|
65
|
+
- [ ] Earliest anomaly in the log is the starting point
|
|
66
|
+
- [ ] Diff is narrow — fix only, no drive-bys
|
|
67
|
+
- [ ] Intermittent failures investigated, not shelved
|
|
68
|
+
- [ ] Regression test added alongside the fix
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/designer.accessibility.md — Anti-pattern guidance for the Designer.accessibility (accessibility) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the designer.accessibility (accessibility) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-accessibility.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: designer.accessibility
|
|
10
|
+
applies_to: [cx-accessibility]
|
|
11
|
+
inherits: designer
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Accessibility Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the designer core.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Accessibility as visual-only
|
|
20
|
+
**Symptom**: focusing on color contrast and font size; ignoring keyboard navigation, screen readers, and motion.
|
|
21
|
+
**Why it fails**: many users are blocked on surfaces the designer never tested.
|
|
22
|
+
**Counter-move**: for every component, check keyboard-only path, screen-reader output, and reduced-motion behavior.
|
|
23
|
+
|
|
24
|
+
### 2. ARIA as patch
|
|
25
|
+
**Symptom**: sprinkling `aria-label`, `role=button` onto non-semantic markup to "make it accessible."
|
|
26
|
+
**Why it fails**: ARIA is a override for semantic HTML, not a replacement; mis-applied ARIA reduces accessibility.
|
|
27
|
+
**Counter-move**: use semantic elements first. Add ARIA only where semantics are insufficient and the override is correct.
|
|
28
|
+
|
|
29
|
+
### 3. Automated-only compliance
|
|
30
|
+
**Symptom**: passing axe/Lighthouse then declaring the surface accessible.
|
|
31
|
+
**Why it fails**: automated tools catch ~30% of WCAG issues. Real barriers (focus order, meaningful labels, logical flow) pass automated checks while being unusable.
|
|
32
|
+
**Counter-move**: combine automated scan with manual keyboard + screen-reader test. Document both.
|
|
33
|
+
|
|
34
|
+
### 4. Motion without controls
|
|
35
|
+
**Symptom**: scroll-triggered animations, auto-playing video, parallax effects with no reduce-motion path.
|
|
36
|
+
**Why it fails**: triggers vestibular disorders; drives users away.
|
|
37
|
+
**Counter-move**: honor `prefers-reduced-motion`. Provide pause controls for any auto-playing content.
|
|
38
|
+
|
|
39
|
+
## Self-check before shipping
|
|
40
|
+
- [ ] Keyboard-only path tested for every interactive element
|
|
41
|
+
- [ ] Screen-reader output verified
|
|
42
|
+
- [ ] Semantic HTML first; ARIA only where needed
|
|
43
|
+
- [ ] Reduced-motion path exists and is tested
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/designer.md — Anti-pattern guidance for the Designer role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the designer domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-designer, cx-accessibility.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: designer
|
|
10
|
+
applies_to: [cx-designer, cx-accessibility]
|
|
11
|
+
inherits: null
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Designer — Role guidance
|
|
15
|
+
|
|
16
|
+
Load this before drafting. These are the failure modes that separate strong role output from weak role output — check your draft against each.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Template defaults
|
|
20
|
+
**Symptom**: the design looks like an unmodified Tailwind, shadcn, or Material page — centered hero, gradient blob, uniform card grid, one accent color.
|
|
21
|
+
**Why it fails**: nothing about the output communicates product intent. It could be any app.
|
|
22
|
+
**Counter-move**: pick an explicit visual direction before designing. Commit to typography, color, and layout choices specific to the product.
|
|
23
|
+
|
|
24
|
+
### 2. Empty states as afterthought
|
|
25
|
+
**Symptom**: empty, loading, and error states are absent from the design or shown as a single spinner.
|
|
26
|
+
**Why it fails**: most users encounter the empty state first. A bad one signals the product is broken before it has started.
|
|
27
|
+
**Counter-move**: design empty, loading, error, and end-of-list states as first-class screens. Each should teach the user what to do next.
|
|
28
|
+
|
|
29
|
+
### 3. Hover-only affordances
|
|
30
|
+
**Symptom**: primary actions are revealed only on hover, with no touch equivalent and no visible cue before the user hovers.
|
|
31
|
+
**Why it fails**: unusable on touch devices; discoverability collapses on desktop too.
|
|
32
|
+
**Counter-move**: primary actions are visible at rest. Hover can enhance, never gate.
|
|
33
|
+
|
|
34
|
+
### 4. Accessibility bolted on
|
|
35
|
+
**Symptom**: contrast, focus rings, keyboard paths, screen reader labels addressed only when a reviewer flags them.
|
|
36
|
+
**Why it fails**: accessibility fixes late in the cycle are expensive and incomplete; some users get a worse product.
|
|
37
|
+
**Counter-move**: treat contrast ratios, keyboard navigation order, and semantic structure as acceptance criteria, not polish.
|
|
38
|
+
|
|
39
|
+
### 5. Uniform emphasis
|
|
40
|
+
**Symptom**: every card, section, and action is rendered at the same visual weight.
|
|
41
|
+
**Why it fails**: the user cannot tell what matters. Attention fails; scanning fails.
|
|
42
|
+
**Counter-move**: use hierarchy — scale, weight, color, spacing — to express importance. One primary action per view.
|
|
43
|
+
|
|
44
|
+
### 6. Motion for motion's sake
|
|
45
|
+
**Symptom**: decorative transitions, parallax, and animated backgrounds that do not clarify flow or state.
|
|
46
|
+
**Why it fails**: slows the interaction, distracts from content, fails reduced-motion preferences.
|
|
47
|
+
**Counter-move**: motion should clarify — state change, origin-destination, or loading progress. Respect `prefers-reduced-motion`.
|
|
48
|
+
|
|
49
|
+
### 7. Desktop-first, responsive later
|
|
50
|
+
**Symptom**: the design is mocked at 1440, then "responsive breakpoints" are annotated as an afterthought.
|
|
51
|
+
**Why it fails**: the mobile experience becomes a compressed desktop, not a designed experience.
|
|
52
|
+
**Counter-move**: design the constrained view first. Expansion to larger viewports is additive, not reductive.
|
|
53
|
+
|
|
54
|
+
### 8. Invisible system
|
|
55
|
+
**Symptom**: every screen reinvents spacing, radius, shadow, and color values.
|
|
56
|
+
**Why it fails**: the product feels inconsistent even when individual screens are fine. Engineering cannot implement cleanly.
|
|
57
|
+
**Counter-move**: name the tokens — space, color, type, radius, motion — before designing. Use them.
|
|
58
|
+
|
|
59
|
+
## Self-check before shipping
|
|
60
|
+
|
|
61
|
+
- [ ] Visual direction is explicit, not default
|
|
62
|
+
- [ ] Empty / loading / error states designed as first-class
|
|
63
|
+
- [ ] Primary actions visible at rest, not hover-gated
|
|
64
|
+
- [ ] Contrast, focus, keyboard order, semantic structure specified
|
|
65
|
+
- [ ] One primary action per view; hierarchy expresses importance
|
|
66
|
+
- [ ] Motion clarifies state; reduced-motion alternative specified
|
|
67
|
+
- [ ] Smallest viewport designed first
|
|
68
|
+
- [ ] Design tokens named and reused
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/engineer.ai.md — Anti-pattern guidance for the Engineer.ai (ai) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the engineer.ai (ai) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-ai-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: engineer.ai
|
|
10
|
+
applies_to: [cx-ai-engineer]
|
|
11
|
+
inherits: engineer
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# AI Engineer Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the engineer core. Check your draft against each.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Prompt tuning without evals
|
|
20
|
+
**Symptom**: iterating on system prompts by eyeballing a handful of outputs.
|
|
21
|
+
**Why it fails**: changes that look better on one example regress on three others you didn't look at.
|
|
22
|
+
**Counter-move**: build a minimum eval set (10+ cases with expected shape) before editing prompts. Diff eval scores, not vibes.
|
|
23
|
+
|
|
24
|
+
### 2. Silent model swaps
|
|
25
|
+
**Symptom**: changing the model name in config without re-running evals or updating the system prompt.
|
|
26
|
+
**Why it fails**: model families interpret instructions differently; what passed on Opus 4.7 may loop on Haiku 4.5.
|
|
27
|
+
**Counter-move**: re-run evals on any model change. Pin the model ID in code, not just config.
|
|
28
|
+
|
|
29
|
+
### 3. Context bloat
|
|
30
|
+
**Symptom**: stuffing everything retrievable into the prompt because "more context is better."
|
|
31
|
+
**Why it fails**: burns tokens, buries the instruction, and the model attends to noise. Cost scales linearly, quality does not.
|
|
32
|
+
**Counter-move**: measure tokens per turn. Cut anything that doesn't change the output.
|
|
33
|
+
|
|
34
|
+
### 4. Tool-use without guardrails
|
|
35
|
+
**Symptom**: giving the model access to a tool with no schema validation or output shape checks.
|
|
36
|
+
**Why it fails**: models produce plausible-but-malformed tool calls, which downstream code swallows or mis-routes.
|
|
37
|
+
**Counter-move**: validate tool inputs and outputs at the boundary. Fail loud on schema violation.
|
|
38
|
+
|
|
39
|
+
### 5. Treating the model as deterministic
|
|
40
|
+
**Symptom**: writing code that assumes a specific token, phrase, or structure will come back every time.
|
|
41
|
+
**Why it fails**: non-zero temperature varies; even temp=0 drifts across model versions.
|
|
42
|
+
**Counter-move**: parse liberally, validate strictly. Treat outputs as probabilistic and always have a fallback path.
|
|
43
|
+
|
|
44
|
+
## Self-check before shipping
|
|
45
|
+
- [ ] Eval set exists and regressions are checked
|
|
46
|
+
- [ ] Model ID is pinned; evals re-run on any model change
|
|
47
|
+
- [ ] Prompt token count is measured and justified
|
|
48
|
+
- [ ] Tool inputs/outputs validated at the boundary
|
|
49
|
+
- [ ] No code path assumes exact output strings
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/engineer.data.md — Anti-pattern guidance for the Engineer.data (data) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the engineer.data (data) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-data-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: engineer.data
|
|
10
|
+
applies_to: [cx-data-engineer]
|
|
11
|
+
inherits: engineer
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Data Engineer Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the engineer core.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Pipeline without data contracts
|
|
20
|
+
**Symptom**: producers and consumers agree only on column names, not on types, nullability, or semantics.
|
|
21
|
+
**Why it fails**: a silent upstream change corrupts everything downstream. Bad data is invisible until someone notices a broken dashboard.
|
|
22
|
+
**Counter-move**: define the contract (schema + nullability + units + primary-key semantics) and assert it at the pipeline boundary.
|
|
23
|
+
|
|
24
|
+
### 2. No idempotency
|
|
25
|
+
**Symptom**: re-running a job produces duplicates, double-counts, or partial-write corruption.
|
|
26
|
+
**Why it fails**: every retry or backfill becomes a data cleanup event. Oncall pages multiply.
|
|
27
|
+
**Counter-move**: design writes to be idempotent — upsert on natural key, or tag by run-id and replace.
|
|
28
|
+
|
|
29
|
+
### 3. Silent data loss
|
|
30
|
+
**Symptom**: ETL rows that fail validation get logged and dropped.
|
|
31
|
+
**Why it fails**: the consumer thinks the dataset is complete; decisions are made on a biased subset.
|
|
32
|
+
**Counter-move**: route rejects to a dead-letter table and alert on non-zero count. Never drop silently.
|
|
33
|
+
|
|
34
|
+
### 4. Point-in-time blindness
|
|
35
|
+
**Symptom**: joining dimension tables that mutate against a fact table without effective-dated logic.
|
|
36
|
+
**Why it fails**: historical queries rewrite themselves every time a dimension changes.
|
|
37
|
+
**Counter-move**: SCD type 2 (or equivalent) on anything that a fact joins to. Assert that a re-run of a historical window produces identical output.
|
|
38
|
+
|
|
39
|
+
### 5. Untested backfills
|
|
40
|
+
**Symptom**: writing a backfill script that "should work" and running it on production.
|
|
41
|
+
**Why it fails**: edge cases in historical data (timezones, schema drift, deleted upstream rows) destroy the run midway.
|
|
42
|
+
**Counter-move**: dry-run on a sampled window first. Assert row counts and a few spot-checks before the full backfill.
|
|
43
|
+
|
|
44
|
+
## Self-check before shipping
|
|
45
|
+
- [ ] Schema contract declared and enforced at the boundary
|
|
46
|
+
- [ ] All writes are idempotent
|
|
47
|
+
- [ ] Rejects go to a dead-letter path and alert on volume
|
|
48
|
+
- [ ] Point-in-time correctness preserved across dimension changes
|
|
49
|
+
- [ ] Backfills dry-run on a sample before full execution
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/engineer.md — Anti-pattern guidance for the Engineer role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the engineer domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-engineer, cx-ai-engineer, cx-data-engineer, cx-platform-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: engineer
|
|
10
|
+
applies_to: [cx-engineer, cx-ai-engineer, cx-data-engineer, cx-platform-engineer]
|
|
11
|
+
inherits: null
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Engineer — Role guidance
|
|
15
|
+
|
|
16
|
+
Load this before drafting. These are the failure modes that separate strong role output from weak role output — check your draft against each.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Writing before reading
|
|
20
|
+
**Symptom**: new code added to a file or module without first reading the surrounding code and its callers.
|
|
21
|
+
**Why it fails**: duplicates existing utilities, violates local conventions, and breaks invariants the author did not see.
|
|
22
|
+
**Counter-move**: read the file end-to-end and at least one caller before adding anything. Prefer reusing what is there.
|
|
23
|
+
|
|
24
|
+
### 2. Speculative abstraction
|
|
25
|
+
**Symptom**: interfaces, factories, or configuration options added for a future case that may never arrive.
|
|
26
|
+
**Why it fails**: creates surface area no one understands and no tests exercise. Adds cognitive load for every later reader.
|
|
27
|
+
**Counter-move**: write the simplest thing that solves the current case. Abstract only when a third instance demands it.
|
|
28
|
+
|
|
29
|
+
### 3. Silent API assumption
|
|
30
|
+
**Symptom**: using a library or endpoint based on a pattern seen elsewhere in the code, without checking the actual contract.
|
|
31
|
+
**Why it fails**: the assumption is usually close-but-wrong. Bugs surface in production, not in review.
|
|
32
|
+
**Counter-move**: read the library's docs or source for the specific function used. Verify the shape of the response.
|
|
33
|
+
|
|
34
|
+
### 4. Hidden coupling
|
|
35
|
+
**Symptom**: a change in module A silently depends on a behavior in module B that is not expressed in the interface.
|
|
36
|
+
**Why it fails**: any future refactor of B breaks A with no warning. The coupling is invisible until it fails.
|
|
37
|
+
**Counter-move**: either express the dependency in the type system or in a test that would fail if B changed.
|
|
38
|
+
|
|
39
|
+
### 5. Skipped verification
|
|
40
|
+
**Symptom**: marking work done without running the code, the tests, or the build.
|
|
41
|
+
**Why it fails**: type errors, broken imports, and runtime crashes ship to the next reviewer or to production.
|
|
42
|
+
**Counter-move**: run the build, run the tests, exercise the code path changed. Paste the evidence into the PR.
|
|
43
|
+
|
|
44
|
+
### 6. Oversized files and functions
|
|
45
|
+
**Symptom**: functions over 50 lines, files over 800 lines, or deep nesting over four levels.
|
|
46
|
+
**Why it fails**: the reader cannot hold the logic in their head; bugs hide in the middle third.
|
|
47
|
+
**Counter-move**: extract when a function does more than one thing. Split when a file mixes concerns.
|
|
48
|
+
|
|
49
|
+
### 7. Error swallowing
|
|
50
|
+
**Symptom**: `catch` blocks that log-and-continue, default fallbacks that mask upstream failures, empty `except:` clauses.
|
|
51
|
+
**Why it fails**: the system keeps running in a broken state; debugging later is impossible because the signal is gone.
|
|
52
|
+
**Counter-move**: handle errors explicitly at the boundary where you can make a decision. Re-raise or return a typed error otherwise.
|
|
53
|
+
|
|
54
|
+
### 8. Fixing the symptom
|
|
55
|
+
**Symptom**: a patch that makes the test pass or the error disappear without a clear statement of the underlying cause.
|
|
56
|
+
**Why it fails**: the root cause re-emerges in a different place, often worse.
|
|
57
|
+
**Counter-move**: explain the cause in one sentence before writing the fix. If you cannot, keep investigating.
|
|
58
|
+
|
|
59
|
+
### 9. Ignoring the diff
|
|
60
|
+
**Symptom**: the change includes unrelated edits — formatting churn, drive-by renames, comment cleanups.
|
|
61
|
+
**Why it fails**: drowns the real change in noise; reviewers cannot separate intent from accident.
|
|
62
|
+
**Counter-move**: one change per commit. Keep the diff narrow. Bank the drive-bys for a separate PR.
|
|
63
|
+
|
|
64
|
+
### 10. Speculating across thinking turns
|
|
65
|
+
**Symptom**: reasoning about which library, pattern, or abstraction to use across multiple thinking turns without reading code, calling docs, or asking.
|
|
66
|
+
**Why it fails**: guesses compound; the eventual choice is made from context the model built about itself, not from the codebase or the library.
|
|
67
|
+
**Counter-move**: two unproductive passes is the cap. Next step is a targeted read, a docs lookup (`context7_query-docs`/`WebFetch`), a NEEDS_MAIN_INPUT packet, or a default with a noted assumption.
|
|
68
|
+
|
|
69
|
+
### 11. Unbounded file reads
|
|
70
|
+
**Symptom**: reading files with large `limit` values without checking size first, or offset reads that fail with "out of range".
|
|
71
|
+
**Why it fails**: wastes context, and the failure reveals the file was smaller than assumed — a signal that the reading strategy was guess-driven.
|
|
72
|
+
**Counter-move**: before any `Read` over 200 lines, probe with `Glob`, `wc -l`, or a `limit: 50` read. Then request the right range.
|
|
73
|
+
|
|
74
|
+
## Self-check before shipping
|
|
75
|
+
|
|
76
|
+
- [ ] Read the surrounding file and at least one caller
|
|
77
|
+
- [ ] No new abstraction unless there are three concrete uses
|
|
78
|
+
- [ ] Library and API contracts verified from their source
|
|
79
|
+
- [ ] Build passes, tests pass, code path exercised
|
|
80
|
+
- [ ] No function over 50 lines, no file over 800, no nesting over four
|
|
81
|
+
- [ ] Errors handled explicitly, not swallowed
|
|
82
|
+
- [ ] Root cause of any bug fix is stated in one sentence
|
|
83
|
+
- [ ] Diff is narrow and on-topic
|
|
84
|
+
- [ ] No more than two consecutive thinking turns about the same decision without a tool call or input
|
|
85
|
+
- [ ] Any `Read` over 200 lines was preceded by a size probe
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/engineer.platform.md — Anti-pattern guidance for the Engineer.platform (platform) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the engineer.platform (platform) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-platform-engineer.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: engineer.platform
|
|
10
|
+
applies_to: [cx-platform-engineer]
|
|
11
|
+
inherits: engineer
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Platform Engineer Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the engineer core.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Tooling without adoption plan
|
|
20
|
+
**Symptom**: building an internal tool (CLI, framework, template) without a migration path or first consumer.
|
|
21
|
+
**Why it fails**: the tool rots unused; the original problem still gets solved by copy-paste in every repo.
|
|
22
|
+
**Counter-move**: pick one team as first consumer, migrate them before declaring done, and measure adoption afterward.
|
|
23
|
+
|
|
24
|
+
### 2. Breaking internal APIs without a deprecation window
|
|
25
|
+
**Symptom**: renaming a CLI flag, shipping a breaking change to a shared library, or removing a config option without notice.
|
|
26
|
+
**Why it fails**: every consumer hits a red build on Monday. Goodwill evaporates and future rollouts get resisted.
|
|
27
|
+
**Counter-move**: deprecation notice + parallel support window for one release cycle. Remove only after usage drops to zero.
|
|
28
|
+
|
|
29
|
+
### 3. Optimizing for the happy path
|
|
30
|
+
**Symptom**: build/CI pipeline is fast when everything works but impossible to debug when it breaks.
|
|
31
|
+
**Why it fails**: platform engineers see green; consumers are stuck in a multi-hour flake loop with no diagnostic output.
|
|
32
|
+
**Counter-move**: log loudly on failure. Cache artifacts for reproduction. Measure failure-recovery time, not just success time.
|
|
33
|
+
|
|
34
|
+
### 4. Invisible costs
|
|
35
|
+
**Symptom**: a platform change (new base image, new log shipper, new CI step) that adds minutes or dollars per build.
|
|
36
|
+
**Why it fails**: compounds across thousands of runs; FinOps catches it three months later.
|
|
37
|
+
**Counter-move**: measure before/after on build time, CI minutes, and per-run cost. Flag any regression over 5%.
|
|
38
|
+
|
|
39
|
+
### 5. Security as afterthought
|
|
40
|
+
**Symptom**: CI secrets in plaintext env, broad GitHub tokens, no SBOM, no dependency audit in the pipeline.
|
|
41
|
+
**Why it fails**: platform surface area compounds blast radius — one leaked token touches every repo.
|
|
42
|
+
**Counter-move**: treat platform secrets as production secrets. Rotate, scope-minimize, and audit.
|
|
43
|
+
|
|
44
|
+
## Self-check before shipping
|
|
45
|
+
- [ ] First consumer migrated and measured
|
|
46
|
+
- [ ] Deprecation window respected for any breaking change
|
|
47
|
+
- [ ] Failure diagnostics and artifacts preserved
|
|
48
|
+
- [ ] Build-time and cost deltas measured
|
|
49
|
+
- [ ] Secrets scoped minimally and auditable
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/operator.docs.md — Anti-pattern guidance for the Operator.docs (docs) role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the operator.docs (docs) domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-docs-keeper.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: operator.docs
|
|
10
|
+
applies_to: [cx-docs-keeper]
|
|
11
|
+
inherits: operator
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Docs Keeper Overlay
|
|
15
|
+
|
|
16
|
+
Additional failure modes on top of the operator core.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Docs as write-once artifacts
|
|
20
|
+
**Symptom**: a decision record or runbook is created, then never revisited as the system evolves.
|
|
21
|
+
**Why it fails**: stale docs are worse than no docs — they mislead with authority.
|
|
22
|
+
**Counter-move**: every doc has a `last-reviewed` date. Flag anything older than the agreed review cadence.
|
|
23
|
+
|
|
24
|
+
### 2. Parallel sources of truth
|
|
25
|
+
**Symptom**: the same concept explained in README, wiki, CLAUDE.md, and onboarding deck — all slightly different.
|
|
26
|
+
**Why it fails**: readers find one, act on it, hit contradictions later; trust erodes.
|
|
27
|
+
**Counter-move**: one canonical source per concept. Link to it from all surfaces.
|
|
28
|
+
|
|
29
|
+
### 3. Descriptive, not prescriptive
|
|
30
|
+
**Symptom**: docs describe what the system does but not what to do when it breaks.
|
|
31
|
+
**Why it fails**: the reader has to invent the action path themselves under pressure.
|
|
32
|
+
**Counter-move**: for operational surfaces, lead with "if X, do Y." Reference architecture only as support.
|
|
33
|
+
|
|
34
|
+
### 4. No owner
|
|
35
|
+
**Symptom**: a doc that nobody updates because nobody owns it.
|
|
36
|
+
**Why it fails**: rot is guaranteed; questions route to Slack instead of the doc.
|
|
37
|
+
**Counter-move**: every doc declares an owner (person or role). Ownership appears in the header.
|
|
38
|
+
|
|
39
|
+
## Self-check before shipping
|
|
40
|
+
- [ ] Last-reviewed date present and fresh
|
|
41
|
+
- [ ] One canonical source per concept; duplicates redirect
|
|
42
|
+
- [ ] Operational docs are prescriptive, not just descriptive
|
|
43
|
+
- [ ] Owner declared in the header
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
skills/roles/operator.md — Anti-pattern guidance for the Operator role.
|
|
3
|
+
|
|
4
|
+
Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
|
|
5
|
+
Covers common failure modes for the operator domain and counter-moves to avoid them.
|
|
6
|
+
Applies to: cx-sre, cx-operations, cx-release-manager, cx-docs-keeper.
|
|
7
|
+
-->
|
|
8
|
+
---
|
|
9
|
+
role: operator
|
|
10
|
+
applies_to: [cx-sre, cx-operations, cx-release-manager, cx-docs-keeper]
|
|
11
|
+
inherits: null
|
|
12
|
+
version: 1
|
|
13
|
+
---
|
|
14
|
+
# Operator — Role guidance
|
|
15
|
+
|
|
16
|
+
Load this before producing operator output — SRE, ops, release, and durable-knowledge work.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### 1. Runbook by incantation
|
|
20
|
+
**Symptom**: the runbook tells the on-call what to type but not what the commands do or what their output means.
|
|
21
|
+
**Why it fails**: when the commands fail or return unexpected output, the on-call has no foundation for improvising.
|
|
22
|
+
**Counter-move**: each step names its purpose, its expected output, and what "wrong" looks like.
|
|
23
|
+
|
|
24
|
+
### 2. Rollback as afterthought
|
|
25
|
+
**Symptom**: the deployment plan describes the forward path in detail but rollback in one line: "revert if needed".
|
|
26
|
+
**Why it fails**: rollback is attempted at 3am under pressure. Untested rollback paths fail or make things worse.
|
|
27
|
+
**Counter-move**: rollback is a first-class plan. Tested. With criteria for when to trigger it.
|
|
28
|
+
|
|
29
|
+
### 3. Alert noise
|
|
30
|
+
**Symptom**: the on-call receives dozens of alerts per shift; most are ignored.
|
|
31
|
+
**Why it fails**: real alerts drown in noise. On-call health erodes. Teams learn to ignore paging.
|
|
32
|
+
**Counter-move**: every alert is actionable or it should not page. Move non-actionable signals to dashboards. Review alert rate every month.
|
|
33
|
+
|
|
34
|
+
### 4. No observability before launch
|
|
35
|
+
**Symptom**: a service ships without dashboards, logs, or traces wired in; observability is added after the first incident.
|
|
36
|
+
**Why it fails**: the first incident is solved in the dark. Recovery takes far longer than it needed to.
|
|
37
|
+
**Counter-move**: no service launches without its SLO, its dashboard, and its three golden signals instrumented.
|
|
38
|
+
|
|
39
|
+
### 5. Post-incident blame
|
|
40
|
+
**Symptom**: the incident report names individuals and their mistakes; corrective actions are "be more careful".
|
|
41
|
+
**Why it fails**: nobody learns. Mistakes recur. Reporting culture degrades.
|
|
42
|
+
**Counter-move**: blameless tone. Corrective actions target the system, not the person. "Be more careful" is not a control.
|
|
43
|
+
|
|
44
|
+
### 6. Documentation drift
|
|
45
|
+
**Symptom**: runbooks, architecture docs, and decision records last updated two years ago.
|
|
46
|
+
**Why it fails**: new on-calls follow stale instructions; decisions get re-debated because the rationale was lost.
|
|
47
|
+
**Counter-move**: every operational doc has a "last tested" or "last reviewed" date. Stale docs are flagged, not silently trusted.
|
|
48
|
+
|
|
49
|
+
### 7. Silent release
|
|
50
|
+
**Symptom**: a change ships without a changelog, comms, or stakeholder awareness.
|
|
51
|
+
**Why it fails**: users are surprised. Support is unprepared. Incidents take longer because responders do not know what changed.
|
|
52
|
+
**Counter-move**: every non-trivial release has a changelog entry, a rollback plan, and a comms channel notified.
|
|
53
|
+
|
|
54
|
+
### 8. Unbounded retries
|
|
55
|
+
**Symptom**: failures retried forever or with naive backoff; retries hide underlying capacity issues.
|
|
56
|
+
**Why it fails**: retry storms amplify outages. A transient failure becomes a full incident.
|
|
57
|
+
**Counter-move**: bounded retries. Exponential backoff with jitter. Circuit breakers on downstream dependencies.
|
|
58
|
+
|
|
59
|
+
## Self-check before shipping
|
|
60
|
+
|
|
61
|
+
- [ ] Each runbook step names its purpose and expected output
|
|
62
|
+
- [ ] Rollback is a tested, first-class plan with trigger criteria
|
|
63
|
+
- [ ] Every alert is actionable; non-actionable signals moved to dashboards
|
|
64
|
+
- [ ] SLO, dashboard, and golden signals in place before launch
|
|
65
|
+
- [ ] Incident reports are blameless; corrective actions target the system
|
|
66
|
+
- [ ] Operational docs have a last-tested or last-reviewed date
|
|
67
|
+
- [ ] Every release has a changelog, rollback, and comms plan
|
|
68
|
+
- [ ] Retries are bounded; circuit breakers protect dependencies
|