@geraldmaron/construct 1.0.4 → 1.0.6
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/README.md +57 -44
- package/agents/prompts/cx-accessibility.md +3 -3
- package/agents/prompts/cx-ai-engineer.md +7 -7
- package/agents/prompts/cx-architect.md +6 -6
- package/agents/prompts/cx-business-strategist.md +6 -6
- package/agents/prompts/cx-data-analyst.md +7 -7
- package/agents/prompts/cx-data-engineer.md +3 -3
- package/agents/prompts/cx-debugger.md +6 -6
- package/agents/prompts/cx-designer.md +5 -5
- package/agents/prompts/cx-devil-advocate.md +4 -4
- package/agents/prompts/cx-docs-keeper.md +5 -5
- package/agents/prompts/cx-engineer.md +5 -5
- package/agents/prompts/cx-evaluator.md +2 -2
- package/agents/prompts/cx-explorer.md +8 -8
- package/agents/prompts/cx-legal-compliance.md +2 -2
- package/agents/prompts/cx-operations.md +5 -5
- package/agents/prompts/cx-orchestrator.md +10 -10
- package/agents/prompts/cx-platform-engineer.md +5 -5
- package/agents/prompts/cx-product-manager.md +4 -4
- package/agents/prompts/cx-qa.md +8 -8
- package/agents/prompts/cx-rd-lead.md +9 -9
- package/agents/prompts/cx-release-manager.md +5 -5
- package/agents/prompts/cx-researcher.md +22 -22
- package/agents/prompts/cx-reviewer.md +7 -7
- package/agents/prompts/cx-security.md +10 -10
- package/agents/prompts/cx-sre.md +7 -7
- package/agents/prompts/cx-test-automation.md +3 -3
- package/agents/prompts/cx-trace-reviewer.md +8 -8
- package/agents/prompts/cx-ux-researcher.md +3 -3
- package/bin/construct +470 -4
- package/commands/build/feature.md +4 -4
- package/commands/build/fix.md +8 -8
- package/commands/design/access.md +3 -3
- package/commands/design/flow.md +3 -3
- package/commands/design/ui.md +4 -4
- package/commands/measure/experiment.md +5 -5
- package/commands/measure/metrics.md +3 -3
- package/commands/measure/results.md +4 -4
- package/commands/plan/api.md +3 -3
- package/commands/plan/challenge.md +3 -3
- package/commands/plan/decide.md +3 -3
- package/commands/plan/feature.md +7 -7
- package/commands/plan/requirements.md +3 -3
- package/commands/remember/context.md +5 -5
- package/commands/remember/handoff.md +3 -3
- package/commands/remember/runbook.md +3 -3
- package/commands/review/code.md +8 -8
- package/commands/review/quality.md +4 -4
- package/commands/review/security.md +3 -3
- package/commands/ship/ready.md +3 -3
- package/commands/ship/release.md +3 -3
- package/commands/ship/status.md +4 -4
- package/commands/understand/docs.md +3 -3
- package/commands/understand/research.md +5 -3
- package/commands/understand/this.md +4 -4
- package/commands/understand/why.md +8 -8
- package/commands/work/clean.md +14 -14
- package/commands/work/drive.md +10 -10
- package/commands/work/optimize-prompts.md +9 -9
- package/commands/work/parallel-review.md +8 -8
- package/db/schema/006_graph.sql +24 -0
- package/examples/provider-plugin/README.md +7 -7
- package/examples/seed-observations/README.md +6 -6
- package/examples/seed-observations/anti-patterns.md +14 -14
- package/examples/seed-observations/decisions.md +4 -4
- package/examples/seed-observations/patterns.md +14 -14
- package/lib/auto-docs.mjs +10 -5
- package/lib/cli-commands.mjs +45 -1
- package/lib/comment-lint.mjs +7 -1
- package/lib/config/schema.mjs +3 -0
- package/lib/flavors/loader.mjs +136 -0
- package/lib/hooks/agent-tracker.mjs +22 -3
- package/lib/hooks/pre-push-gate.mjs +14 -1
- package/lib/hooks/session-optimize.mjs +3 -2
- package/lib/hooks/session-reflect.mjs +68 -0
- package/lib/init-unified.mjs +25 -2
- package/lib/intake/classify.mjs +61 -183
- package/lib/intake/prepare.mjs +7 -0
- package/lib/intake/tables/creative.mjs +94 -0
- package/lib/intake/tables/operations.mjs +85 -0
- package/lib/intake/tables/research.mjs +85 -0
- package/lib/intake/tables/rnd.mjs +175 -0
- package/lib/knowledge/graph.mjs +213 -0
- package/lib/knowledge/research-store.mjs +109 -0
- package/lib/mcp/server.mjs +187 -1
- package/lib/mcp/tools/profile.mjs +270 -0
- package/lib/observation-store.mjs +19 -0
- package/lib/outcomes/aggregate.mjs +104 -0
- package/lib/outcomes/record.mjs +115 -0
- package/lib/parity.mjs +6 -9
- package/lib/profiles/lifecycle.mjs +388 -0
- package/lib/profiles/loader.mjs +123 -0
- package/lib/profiles/validate-custom.mjs +114 -0
- package/lib/reflect/extractor.mjs +193 -0
- package/lib/reflect.mjs +89 -2
- package/lib/sandbox.mjs +102 -0
- package/package.json +6 -1
- package/personas/construct.md +20 -20
- package/platforms/claude/CLAUDE.md +6 -6
- package/platforms/claude/settings.template.json +13 -0
- package/rules/common/agents.md +2 -2
- package/rules/common/beads-hygiene.md +11 -11
- package/rules/common/code-review.md +1 -1
- package/rules/common/coding-style.md +1 -1
- package/rules/common/comments.md +8 -8
- package/rules/common/commit-approval.md +4 -4
- package/rules/common/cx-agent-routing.md +2 -2
- package/rules/common/cx-skill-routing.md +2 -2
- package/rules/common/development-workflow.md +1 -1
- package/rules/common/doc-ownership.md +2 -2
- package/rules/common/efficiency.md +3 -3
- package/rules/common/framing.md +1 -1
- package/rules/common/git-workflow.md +1 -1
- package/rules/common/patterns.md +1 -1
- package/rules/common/performance.md +1 -1
- package/rules/common/release-gates.md +7 -7
- package/rules/common/research.md +4 -4
- package/rules/common/security.md +1 -1
- package/rules/common/skill-composition.md +8 -8
- package/rules/common/testing.md +1 -1
- package/rules/golang/coding-style.md +2 -2
- package/rules/golang/hooks.md +1 -1
- package/rules/golang/patterns.md +1 -1
- package/rules/golang/security.md +1 -1
- package/rules/golang/testing.md +1 -1
- package/rules/python/coding-style.md +1 -1
- package/rules/python/hooks.md +1 -1
- package/rules/python/patterns.md +1 -1
- package/rules/python/security.md +1 -1
- package/rules/python/testing.md +1 -1
- package/rules/swift/coding-style.md +3 -3
- package/rules/swift/hooks.md +2 -2
- package/rules/swift/patterns.md +2 -2
- package/rules/swift/security.md +4 -4
- package/rules/swift/testing.md +2 -2
- package/rules/typescript/coding-style.md +1 -1
- package/rules/typescript/hooks.md +1 -1
- package/rules/typescript/patterns.md +1 -1
- package/rules/typescript/security.md +1 -1
- package/rules/typescript/testing.md +1 -1
- package/rules/web/coding-style.md +1 -1
- package/rules/web/design-quality.md +1 -1
- package/rules/web/hooks.md +1 -1
- package/rules/web/patterns.md +1 -1
- package/rules/web/performance.md +1 -1
- package/rules/web/security.md +1 -1
- package/rules/web/testing.md +1 -1
- package/scripts/sync-agents.mjs +11 -0
- package/skills/ai/agent-dev.md +1 -1
- package/skills/ai/llm-security.md +1 -1
- package/skills/ai/ml-ops.md +6 -6
- package/skills/ai/orchestration-workflow.md +1 -1
- package/skills/ai/prompt-and-eval.md +1 -1
- package/skills/ai/prompt-optimizer.md +13 -13
- package/skills/ai/rag-system.md +1 -1
- package/skills/architecture/api-design.md +1 -1
- package/skills/architecture/caching.md +1 -1
- package/skills/architecture/cloud-native.md +1 -1
- package/skills/architecture/message-queue.md +1 -1
- package/skills/architecture/security-arch.md +1 -1
- package/skills/compliance/ai-disclosure.md +1 -1
- package/skills/compliance/data-privacy.md +1 -1
- package/skills/compliance/license-audit.md +2 -2
- package/skills/compliance/regulatory-review.md +1 -1
- package/skills/development/cpp.md +1 -1
- package/skills/development/go.md +1 -1
- package/skills/development/java.md +1 -1
- package/skills/development/kotlin.md +9 -9
- package/skills/development/mobile-crossplatform.md +13 -13
- package/skills/development/python.md +1 -1
- package/skills/development/rust.md +1 -1
- package/skills/development/shell.md +1 -1
- package/skills/development/swift.md +6 -6
- package/skills/development/typescript.md +1 -1
- package/skills/devops/ci-cd.md +5 -5
- package/skills/devops/containerization.md +9 -9
- package/skills/devops/cost-optimization.md +1 -1
- package/skills/devops/data-engineering.md +2 -2
- package/skills/devops/database.md +1 -1
- package/skills/devops/dependency-management.md +3 -3
- package/skills/devops/devsecops.md +1 -1
- package/skills/devops/git-workflow.md +1 -1
- package/skills/devops/incident-response.md +18 -18
- package/skills/devops/monorepo.md +5 -5
- package/skills/devops/observability.md +1 -1
- package/skills/devops/performance.md +1 -1
- package/skills/devops/testing.md +1 -1
- package/skills/docs/adr-workflow.md +2 -2
- package/skills/docs/backlog-proposal-workflow.md +1 -1
- package/skills/docs/customer-profile-workflow.md +1 -1
- package/skills/docs/document-ingest-workflow.md +1 -1
- package/skills/docs/evidence-ingest-workflow.md +1 -1
- package/skills/docs/init-docs.md +15 -15
- package/skills/docs/init-project.md +1 -1
- package/skills/docs/prd-workflow.md +3 -3
- package/skills/docs/prfaq-workflow.md +1 -1
- package/skills/docs/product-intelligence-review.md +1 -1
- package/skills/docs/product-intelligence-workflow.md +1 -1
- package/skills/docs/product-signal-workflow.md +9 -9
- package/skills/docs/research-workflow.md +10 -10
- package/skills/docs/runbook-workflow.md +2 -2
- package/skills/docs/strategy-workflow.md +3 -3
- package/skills/exploration/repo-map.md +11 -11
- package/skills/frameworks/django.md +15 -15
- package/skills/frameworks/nextjs.md +16 -16
- package/skills/frameworks/react.md +12 -12
- package/skills/frameworks/spring-boot.md +12 -12
- package/skills/frontend-design/accessibility.md +6 -6
- package/skills/frontend-design/component-patterns.md +1 -1
- package/skills/frontend-design/engineering.md +1 -1
- package/skills/frontend-design/state-management.md +1 -1
- package/skills/frontend-design/ui-aesthetics.md +1 -1
- package/skills/frontend-design/ux-principles.md +1 -1
- package/skills/operating/orchestration-reference.md +27 -27
- package/skills/quality-gates/review-work.md +3 -3
- package/skills/quality-gates/verify-change.md +1 -1
- package/skills/quality-gates/verify-module.md +1 -1
- package/skills/quality-gates/verify-quality.md +1 -1
- package/skills/quality-gates/verify-security.md +1 -1
- package/skills/roles/architect.ai-systems.md +4 -2
- package/skills/roles/architect.data.md +4 -2
- package/skills/roles/architect.enterprise.md +4 -2
- package/skills/roles/architect.integration.md +4 -2
- package/skills/roles/architect.md +7 -5
- package/skills/roles/architect.platform.md +4 -2
- package/skills/roles/data-analyst.experiment.md +4 -2
- package/skills/roles/data-analyst.md +9 -7
- package/skills/roles/data-analyst.product-intelligence.md +4 -2
- package/skills/roles/data-analyst.product.md +4 -2
- package/skills/roles/data-analyst.telemetry.md +4 -2
- package/skills/roles/data-engineer.pipeline.md +4 -2
- package/skills/roles/data-engineer.vector-retrieval.md +4 -2
- package/skills/roles/data-engineer.warehouse.md +4 -2
- package/skills/roles/debugger.md +7 -5
- package/skills/roles/designer.accessibility.md +4 -2
- package/skills/roles/designer.md +10 -8
- package/skills/roles/engineer.ai.md +4 -2
- package/skills/roles/engineer.data.md +5 -3
- package/skills/roles/engineer.md +14 -12
- package/skills/roles/engineer.platform.md +5 -3
- package/skills/roles/operator.docs.md +6 -4
- package/skills/roles/operator.md +6 -4
- package/skills/roles/operator.release.md +4 -2
- package/skills/roles/operator.sre.md +5 -3
- package/skills/roles/orchestrator.md +5 -3
- package/skills/roles/product-manager.ai-product.md +4 -2
- package/skills/roles/product-manager.business-strategy.md +4 -2
- package/skills/roles/product-manager.enterprise.md +4 -2
- package/skills/roles/product-manager.growth.md +4 -2
- package/skills/roles/product-manager.md +6 -4
- package/skills/roles/product-manager.platform.md +4 -2
- package/skills/roles/product-manager.product.md +4 -2
- package/skills/roles/qa.ai-eval.md +4 -2
- package/skills/roles/qa.api-contract.md +4 -2
- package/skills/roles/qa.data-pipeline.md +4 -2
- package/skills/roles/qa.md +7 -5
- package/skills/roles/qa.test-automation.md +5 -3
- package/skills/roles/qa.web-ui.md +4 -2
- package/skills/roles/researcher.explorer.md +4 -2
- package/skills/roles/researcher.md +11 -9
- package/skills/roles/researcher.ux.md +4 -2
- package/skills/roles/reviewer.devil-advocate.md +4 -2
- package/skills/roles/reviewer.evaluator.md +4 -2
- package/skills/roles/reviewer.md +14 -12
- package/skills/roles/reviewer.trace.md +4 -2
- package/skills/roles/security.ai.md +4 -2
- package/skills/roles/security.appsec.md +4 -2
- package/skills/roles/security.cloud.md +4 -2
- package/skills/roles/security.legal-compliance.md +4 -2
- package/skills/roles/security.md +7 -5
- package/skills/roles/security.privacy.md +4 -2
- package/skills/roles/security.supply-chain.md +4 -2
- package/skills/routing.md +14 -14
- package/skills/security/blue-team.md +1 -1
- package/skills/security/code-audit.md +1 -1
- package/skills/security/pentest.md +1 -1
- package/skills/security/red-team.md +1 -1
- package/skills/security/threat-intel.md +1 -1
- package/skills/security/vuln-research.md +1 -1
- package/skills/utility/clean-code.md +2 -2
- package/templates/docs/changelog-entry.md +1 -1
- package/templates/docs/construct_guide.md +13 -13
- package/templates/docs/meta-prd.md +16 -16
- package/templates/docs/one-pager.md +1 -1
- package/templates/docs/persona-artifact.md +36 -0
- package/templates/docs/prd-business.md +1 -1
- package/templates/docs/prd-platform.md +1 -1
- package/templates/docs/prd.md +17 -17
- package/templates/docs/research-brief.md +8 -8
- package/templates/docs/research-finding.md +26 -0
- package/templates/docs/rfc.md +1 -1
- package/templates/docs/skill-artifact.md +27 -0
- package/templates/docs/strategy.md +1 -1
package/rules/web/hooks.md
CHANGED
package/rules/web/patterns.md
CHANGED
package/rules/web/performance.md
CHANGED
package/rules/web/security.md
CHANGED
package/rules/web/testing.md
CHANGED
package/scripts/sync-agents.mjs
CHANGED
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
} from "../lib/mcp-platform-config.mjs";
|
|
39
39
|
import { loadConstructEnv } from "../lib/env-config.mjs";
|
|
40
40
|
import { inlineRoleAntiPatterns, PROMPT_WORD_CAP } from "../lib/role-preload.mjs";
|
|
41
|
+
import { resolveActiveProfile } from "../lib/profiles/loader.mjs";
|
|
41
42
|
import { resolveTiersForPrimary } from "../lib/model-router.mjs";
|
|
42
43
|
import { stampFrontmatter } from "../lib/doc-stamp.mjs";
|
|
43
44
|
|
|
@@ -499,7 +500,17 @@ function buildEntries() {
|
|
|
499
500
|
});
|
|
500
501
|
}
|
|
501
502
|
|
|
503
|
+
// Filter agents by the active profile's role set. RND lists every specialist
|
|
504
|
+
// so behavior is unchanged for the default; non-RND profiles emit only the
|
|
505
|
+
// specialists they declare. Profiles whose role list is empty (legacy/test)
|
|
506
|
+
// fall through to no filter so callers don't get a silent empty registry.
|
|
507
|
+
const activeProfile = resolveActiveProfile(process.cwd());
|
|
508
|
+
const profileRoles = Array.isArray(activeProfile?.roles) && activeProfile.roles.length > 0
|
|
509
|
+
? new Set(activeProfile.roles)
|
|
510
|
+
: null;
|
|
511
|
+
|
|
502
512
|
for (const agent of registry.agents ?? []) {
|
|
513
|
+
if (profileRoles && !profileRoles.has(agent.name)) continue;
|
|
503
514
|
entries.push({
|
|
504
515
|
...agent,
|
|
505
516
|
isPersona: false,
|
package/skills/ai/agent-dev.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/agent-dev.md
|
|
2
|
+
skills/ai/agent-dev.md (AI Agent Development) Use this skill when building AI agents, tool-use systems, or multi-agent workflo
|
|
3
3
|
|
|
4
4
|
Use this skill when building AI agents, tool-use systems, or multi-agent workflows. ## Agent Architecture
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/llm-security.md
|
|
2
|
+
skills/ai/llm-security.md (LLM Security) Use this skill when securing LLM-powered applications against prompt injection,
|
|
3
3
|
|
|
4
4
|
Use this skill when securing LLM-powered applications against prompt injection, data leakage, and misuse. ## Prompt Injection
|
|
5
5
|
-->
|
package/skills/ai/ml-ops.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/ml-ops.md
|
|
2
|
+
skills/ai/ml-ops.md (ML Operations (MLOps)) ```
|
|
3
3
|
|
|
4
4
|
## The MLOps Lifecycle ```
|
|
5
5
|
-->
|
|
@@ -86,7 +86,7 @@ Central store for model versions and deployment state:
|
|
|
86
86
|
|
|
87
87
|
| Stage | Meaning |
|
|
88
88
|
|---|---|
|
|
89
|
-
| Staging | Candidate
|
|
89
|
+
| Staging | Candidate: passes evaluation, not yet in production |
|
|
90
90
|
| Production | Currently serving |
|
|
91
91
|
| Archived | Superseded |
|
|
92
92
|
|
|
@@ -117,7 +117,7 @@ async def predict(req: PredictRequest) -> PredictResponse:
|
|
|
117
117
|
|
|
118
118
|
### A/B testing / Shadow mode
|
|
119
119
|
|
|
120
|
-
- **Shadow mode**: new model receives traffic and logs predictions but does not serve users
|
|
120
|
+
- **Shadow mode**: new model receives traffic and logs predictions but does not serve users: validate before switching
|
|
121
121
|
- **A/B test**: split traffic (e.g., 10% new model) and measure business metrics, not just accuracy
|
|
122
122
|
- Use a feature flag system to control routing
|
|
123
123
|
|
|
@@ -162,8 +162,8 @@ Trigger retraining when:
|
|
|
162
162
|
|
|
163
163
|
## Common Pitfalls
|
|
164
164
|
|
|
165
|
-
- **Training-serving skew**: feature engineering in training differs from serving
|
|
166
|
-
- **Data leakage**: future information in training features inflates metrics
|
|
165
|
+
- **Training-serving skew**: feature engineering in training differs from serving: solve with a shared feature pipeline
|
|
166
|
+
- **Data leakage**: future information in training features inflates metrics: use strict temporal splits
|
|
167
167
|
- **Model staleness without detection**: set up drift monitoring day 1, not after the model degrades
|
|
168
168
|
- **No rollback plan**: always keep N-1 model version in registry and test rollback procedure
|
|
169
|
-
- **GPU waste**: jobs that could run on CPU scheduled on GPU
|
|
169
|
+
- **GPU waste**: jobs that could run on CPU scheduled on GPU: profile resource usage
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/orchestration-workflow.md
|
|
2
|
+
skills/ai/orchestration-workflow.md (Construct Orchestration Workflow) Use this skill when the request involves agent orchestration, phase transitions,
|
|
3
3
|
|
|
4
4
|
Use this skill when the request involves agent orchestration, phase transitions, task keys, handoff quality, workflow state, or project alignment. ## Core Model
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/prompt-and-eval.md
|
|
2
|
+
skills/ai/prompt-and-eval.md (Prompt Engineering and Evaluation) Use this skill when designing prompts, evaluating model performance, or optimizi
|
|
3
3
|
|
|
4
4
|
Use this skill when designing prompts, evaluating model performance, or optimizing LLM behavior. ## Prompt Structure
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/prompt-optimizer.md
|
|
2
|
+
skills/ai/prompt-optimizer.md: Closed-loop prompt auto-optimization guide.
|
|
3
3
|
|
|
4
4
|
Uses telemetry traces and quality scores as the feedback signal, Claude as the optimizer,
|
|
5
5
|
and the agent registry + construct sync as the deployment layer.
|
|
@@ -24,15 +24,15 @@ construct optimize --list
|
|
|
24
24
|
construct optimize cx-debugger --threshold=0.65 --days=14 --min-traces=15
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
The optimizer requires Python 3.12+ (`pip3` must be available). It will auto-install `dspy-ai` and `requests` on first run. Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` in `.env`. DSPy uses the same LLM key Construct uses
|
|
27
|
+
The optimizer requires Python 3.12+ (`pip3` must be available). It will auto-install `dspy-ai` and `requests` on first run. Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` in `.env`. DSPy uses the same LLM key Construct uses: no separate setup.
|
|
28
28
|
|
|
29
29
|
## When to run
|
|
30
30
|
|
|
31
31
|
- Triggered by `/work:optimize-prompts` (manual) or the scheduled task `prompt-optimization-weekly`
|
|
32
32
|
- Automatically suggested when `cx-trace-reviewer` finds an agent with median quality score below 0.65 over the past 7 days
|
|
33
|
-
- Never run optimization on prompts with fewer than 20 scored traces
|
|
33
|
+
- Never run optimization on prompts with fewer than 20 scored traces: insufficient signal
|
|
34
34
|
|
|
35
|
-
## Step 1
|
|
35
|
+
## Step 1: Gather signal
|
|
36
36
|
|
|
37
37
|
Retrieve the current production prompt for the target agent from `agents/registry.json` (or the corresponding `promptFile` if using extracted prompts).
|
|
38
38
|
|
|
@@ -50,7 +50,7 @@ GET {CONSTRUCT_TELEMETRY_URL}/api/public/scores?traceId={id}&name=quality
|
|
|
50
50
|
|
|
51
51
|
Filter to scores where `value < 0.7`. For each low-scoring trace, extract: the prompt used, the user input, the model output, the quality score, and any human comments.
|
|
52
52
|
|
|
53
|
-
## Step 2
|
|
53
|
+
## Step 2: Diagnose failure patterns
|
|
54
54
|
|
|
55
55
|
Analyze the low-scoring traces as a batch. Identify recurring failure modes. Common patterns:
|
|
56
56
|
|
|
@@ -65,16 +65,16 @@ Analyze the low-scoring traces as a batch. Identify recurring failure modes. Com
|
|
|
65
65
|
|
|
66
66
|
Write a failure summary: top 3 patterns with supporting trace count and representative examples.
|
|
67
67
|
|
|
68
|
-
## Step 3
|
|
68
|
+
## Step 3: Generate improved prompt
|
|
69
69
|
|
|
70
70
|
Write an improved prompt that directly addresses the diagnosed failures. Rules:
|
|
71
71
|
|
|
72
|
-
1. **Keep what works
|
|
73
|
-
2. **Surgical edits, not rewrites
|
|
74
|
-
3. **Be explicit, not vague
|
|
75
|
-
4. **Add a self-check instruction
|
|
72
|
+
1. **Keep what works**: compare high-scoring traces (>0.8) to low-scoring ones. Only change what's associated with failures.
|
|
73
|
+
2. **Surgical edits, not rewrites**: changing everything risks breaking current strengths. Identify the specific clauses that correlate with failures.
|
|
74
|
+
3. **Be explicit, not vague**: if the failure is "too verbose", add a concrete rule ("respond in under 150 words for questions that fit on one line") not a general note ("be concise").
|
|
75
|
+
4. **Add a self-check instruction**: append a brief checklist the agent runs before responding, derived from the top failure patterns.
|
|
76
76
|
|
|
77
|
-
## Step 4
|
|
77
|
+
## Step 4: Push to staging
|
|
78
78
|
|
|
79
79
|
Update the agent's prompt in `agents/registry.json` (or the corresponding `promptFile`) with a staging marker comment. Tag the version by writing to `.cx/decisions/prompt-staging-{agent}-{date}.md`.
|
|
80
80
|
|
|
@@ -82,7 +82,7 @@ Log the candidate prompt as a span attribute on a test run batch using `cx_trace
|
|
|
82
82
|
|
|
83
83
|
Do not overwrite the production prompt in the registry until promotion is confirmed.
|
|
84
84
|
|
|
85
|
-
## Step 5
|
|
85
|
+
## Step 5: Monitor staging
|
|
86
86
|
|
|
87
87
|
After at least 20 scored traces on the staging version:
|
|
88
88
|
- Compare median quality score: staging vs production
|
|
@@ -91,7 +91,7 @@ After at least 20 scored traces on the staging version:
|
|
|
91
91
|
|
|
92
92
|
To promote: update the agent registry with the accepted prompt and run `construct sync`.
|
|
93
93
|
|
|
94
|
-
## Step 6
|
|
94
|
+
## Step 6: Document the optimization
|
|
95
95
|
|
|
96
96
|
Write to `.cx/decisions/` with:
|
|
97
97
|
- Which agent was optimized
|
package/skills/ai/rag-system.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/ai/rag-system.md
|
|
2
|
+
skills/ai/rag-system.md (RAG System Design) Use this skill when building retrieval-augmented generation pipelines, vector se
|
|
3
3
|
|
|
4
4
|
Use this skill when building retrieval-augmented generation pipelines, vector search, or knowledge-grounded AI systems. ## Document Processing
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/architecture/api-design.md
|
|
2
|
+
skills/architecture/api-design.md (API Design) Use this skill when designing REST, GraphQL, or gRPC APIs.
|
|
3
3
|
|
|
4
4
|
Use this skill when designing REST, GraphQL, or gRPC APIs. ## REST Design Principles
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/architecture/caching.md
|
|
2
|
+
skills/architecture/caching.md (Caching) Use this skill when designing caching strategies for applications, APIs, or infr
|
|
3
3
|
|
|
4
4
|
Use this skill when designing caching strategies for applications, APIs, or infrastructure. ## Cache Layers
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/architecture/cloud-native.md
|
|
2
|
+
skills/architecture/cloud-native.md (Cloud-Native Architecture) Use this skill when designing containerized, orchestrated, or microservice-based
|
|
3
3
|
|
|
4
4
|
Use this skill when designing containerized, orchestrated, or microservice-based systems. ## Container Best Practices
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/architecture/message-queue.md
|
|
2
|
+
skills/architecture/message-queue.md (Message Queues and Event-Driven Architecture) Use this skill when designing asynchronous communication, event-driven systems,
|
|
3
3
|
|
|
4
4
|
Use this skill when designing asynchronous communication, event-driven systems, or message-based integrations. ## When to Use Message Queues
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/architecture/security-arch.md
|
|
2
|
+
skills/architecture/security-arch.md (Security Architecture) Use this skill when designing authentication, authorization, network security, o
|
|
3
3
|
|
|
4
4
|
Use this skill when designing authentication, authorization, network security, or zero-trust architectures. ## Zero Trust Principles
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/compliance/ai-disclosure.md
|
|
2
|
+
skills/compliance/ai-disclosure.md (AI Disclosure) AI transparency, disclosure, and regulatory compliance.
|
|
3
3
|
|
|
4
4
|
Use this skill when reviewing AI features for disclosure requirements, transparency obligations, or emerging AI regulation compliance.
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/compliance/data-privacy.md
|
|
2
|
+
skills/compliance/data-privacy.md (Data Privacy) GDPR, CCPA, and data protection compliance patterns.
|
|
3
3
|
|
|
4
4
|
Use this skill when reviewing data collection, storage, processing, or retention for privacy regulation compliance.
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/compliance/license-audit.md
|
|
2
|
+
skills/compliance/license-audit.md (License Audit) Dependency license review and open-source compliance.
|
|
3
3
|
|
|
4
4
|
Use this skill when auditing dependency licenses, evaluating OSS compliance risk, or preparing license inventories for legal review.
|
|
5
5
|
-->
|
|
@@ -24,7 +24,7 @@ Use this skill when auditing dependency licenses, evaluating OSS compliance risk
|
|
|
24
24
|
3. Map each dependency to its SPDX license identifier
|
|
25
25
|
4. Flag any dependency without a clear license file as unknown-risk
|
|
26
26
|
5. Check for license changes between pinned versions and latest
|
|
27
|
-
6. Look past layer one
|
|
27
|
+
6. Look past layer one: transitive copyleft taints the whole tree
|
|
28
28
|
|
|
29
29
|
## Red Flags
|
|
30
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/compliance/regulatory-review.md
|
|
2
|
+
skills/compliance/regulatory-review.md (Regulatory Review) Pre-ship compliance review checklist and process.
|
|
3
3
|
|
|
4
4
|
Use this skill when conducting a compliance review before shipping features that handle user data, financial transactions, AI decisions, or regulated content.
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/cpp.md
|
|
2
|
+
skills/development/cpp.md (C/C++ Best Practices) Use this skill when writing, reviewing, or debugging C or C++ code.
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging C or C++ code. ## Project Structure
|
|
5
5
|
-->
|
package/skills/development/go.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/go.md
|
|
2
|
+
skills/development/go.md (Go Best Practices) Use this skill when writing, reviewing, or debugging Go code.
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging Go code. ## Project Structure
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/java.md
|
|
2
|
+
skills/development/java.md (Java Best Practices) Use this skill when writing, reviewing, or debugging Java or Kotlin code on the
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging Java or Kotlin code on the JVM. ## Project Structure
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/kotlin.md
|
|
2
|
+
skills/development/kotlin.md (Kotlin / Android Development) | Scope | Use when |
|
|
3
3
|
|
|
4
4
|
## Coroutines & Flows ### Coroutine scope discipline
|
|
5
5
|
-->
|
|
@@ -14,7 +14,7 @@ skills/development/kotlin.md — Kotlin / Android Development — | Scope | Use
|
|
|
14
14
|
| `viewModelScope` | ViewModel-bound work; auto-cancelled on clear |
|
|
15
15
|
| `lifecycleScope` | Fragment/Activity-bound; cancelled on destroy |
|
|
16
16
|
| `rememberCoroutineScope()` | Compose-scoped; cancelled on composition exit |
|
|
17
|
-
| `GlobalScope` | Never
|
|
17
|
+
| `GlobalScope` | Never: uncontrolled lifetime |
|
|
18
18
|
|
|
19
19
|
```kotlin
|
|
20
20
|
class ItemViewModel(private val repo: ItemRepository) : ViewModel() {
|
|
@@ -31,7 +31,7 @@ class ItemViewModel(private val repo: ItemRepository) : ViewModel() {
|
|
|
31
31
|
|
|
32
32
|
### Flow operators
|
|
33
33
|
|
|
34
|
-
- `stateIn(scope, SharingStarted.WhileSubscribed(5_000), initial)
|
|
34
|
+
- `stateIn(scope, SharingStarted.WhileSubscribed(5_000), initial)`: converts cold flow to hot StateFlow for UI consumption
|
|
35
35
|
- `map`, `filter`, `distinctUntilChanged`, `debounce` for transform chains
|
|
36
36
|
- `combine` for merging multiple flows
|
|
37
37
|
- Use `flowOn(Dispatchers.IO)` for upstream CPU/IO work; do not switch dispatchers in the collector
|
|
@@ -43,7 +43,7 @@ class ItemViewModel(private val repo: ItemRepository) : ViewModel() {
|
|
|
43
43
|
| `Dispatchers.Main` | UI updates |
|
|
44
44
|
| `Dispatchers.IO` | Network, disk, database |
|
|
45
45
|
| `Dispatchers.Default` | CPU-intensive work |
|
|
46
|
-
| `Dispatchers.Unconfined` | Rarely
|
|
46
|
+
| `Dispatchers.Unconfined` | Rarely: only in tests |
|
|
47
47
|
|
|
48
48
|
## Jetpack Compose
|
|
49
49
|
|
|
@@ -69,7 +69,7 @@ fun ItemList(items: List<Item>, onDelete: (Item) -> Unit) { ... }
|
|
|
69
69
|
|
|
70
70
|
- `remember` expensive computations with stable keys
|
|
71
71
|
- `key(id) { ... }` in lazy lists to preserve item identity
|
|
72
|
-
- Avoid unstable lambdas
|
|
72
|
+
- Avoid unstable lambdas: use `remember { { ... } }` or stable function references
|
|
73
73
|
- Enable Compose compiler metrics to detect recomposition hot spots
|
|
74
74
|
- Prefer `LazyColumn` over `Column` for variable-length lists
|
|
75
75
|
|
|
@@ -134,7 +134,7 @@ Scoping: `@Singleton` for app-scoped, `@ActivityRetainedScoped` for ViewModel-li
|
|
|
134
134
|
|
|
135
135
|
## Common Pitfalls
|
|
136
136
|
|
|
137
|
-
- `collect` in `Fragment.onViewCreated` without `repeatOnLifecycle(STARTED)
|
|
138
|
-
- `StateFlow.value` reads in tests without collecting
|
|
139
|
-
- Leaking `Activity` context into long-lived objects
|
|
140
|
-
- `LazyColumn` with `items(list)` where `list` is `State<List<...>>` causing full recomposition
|
|
137
|
+
- `collect` in `Fragment.onViewCreated` without `repeatOnLifecycle(STARTED)`: causes collection after view destruction
|
|
138
|
+
- `StateFlow.value` reads in tests without collecting: use `turbine` or `runTest { first() }`
|
|
139
|
+
- Leaking `Activity` context into long-lived objects: use `applicationContext`
|
|
140
|
+
- `LazyColumn` with `items(list)` where `list` is `State<List<...>>` causing full recomposition: use `key` param
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/mobile-crossplatform.md
|
|
2
|
+
skills/development/mobile-crossplatform.md (Mobile Cross-Platform Development) Before choosing a framework, answer:
|
|
3
3
|
|
|
4
4
|
## Decision Framework: Native vs Cross-Platform Before choosing a framework, answer:
|
|
5
5
|
-->
|
|
@@ -13,11 +13,11 @@ Before choosing a framework, answer:
|
|
|
13
13
|
|---|---|---|
|
|
14
14
|
| Platform-specific APIs needed (ARKit, Health, NFC)? | Yes | No |
|
|
15
15
|
| Animation fidelity is a differentiator? | Yes | Partial |
|
|
16
|
-
| Single team, both platforms?
|
|
16
|
+
| Single team, both platforms? |: | Yes |
|
|
17
17
|
| Heavy use of platform OS widgets? | Yes | No |
|
|
18
|
-
| App is primarily data-display / CRUD?
|
|
19
|
-
| Existing web team?
|
|
20
|
-
| Existing Kotlin/Swift team? | Native
|
|
18
|
+
| App is primarily data-display / CRUD? |: | Yes |
|
|
19
|
+
| Existing web team? |: | React Native |
|
|
20
|
+
| Existing Kotlin/Swift team? | Native |: |
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -42,7 +42,7 @@ Future<List<Item>> items(ItemsRef ref) async {
|
|
|
42
42
|
|
|
43
43
|
### Performance
|
|
44
44
|
|
|
45
|
-
- `const` constructors everywhere possible
|
|
45
|
+
- `const` constructors everywhere possible: eliminates widget rebuilds
|
|
46
46
|
- `RepaintBoundary` around independently-animated subtrees
|
|
47
47
|
- Profile with Flutter DevTools → CPU flame chart + widget rebuild tracker
|
|
48
48
|
- `ListView.builder` for lazy lists; never `ListView(children: [...])` for long lists
|
|
@@ -78,8 +78,8 @@ testWidgets('shows items on load', (tester) async {
|
|
|
78
78
|
### New Architecture (React Native 0.74+)
|
|
79
79
|
|
|
80
80
|
Enable the New Architecture by default on new projects. Key changes:
|
|
81
|
-
- JSI replaces the async bridge
|
|
82
|
-
- Fabric replaces the native renderer
|
|
81
|
+
- JSI replaces the async bridge: sync native calls
|
|
82
|
+
- Fabric replaces the native renderer: concurrent React features work correctly
|
|
83
83
|
- TurboModules replace native modules
|
|
84
84
|
|
|
85
85
|
### State & logic sharing with web
|
|
@@ -130,11 +130,11 @@ export default function ItemScreen() { ... }
|
|
|
130
130
|
|
|
131
131
|
## Common Pitfalls (both frameworks)
|
|
132
132
|
|
|
133
|
-
- **Deep linking not tested until late
|
|
134
|
-
- **Push notifications complexity
|
|
135
|
-
- **Over-the-air update strategy
|
|
136
|
-
- **Platform capability divergence
|
|
137
|
-
- **Code signing automation
|
|
133
|
+
- **Deep linking not tested until late**: set up universal links / app links in week 1
|
|
134
|
+
- **Push notifications complexity**: Expo Notifications or Firebase Cloud Messaging; plan for permission states
|
|
135
|
+
- **Over-the-air update strategy**: define what can be OTA vs what requires App Store review
|
|
136
|
+
- **Platform capability divergence**: features available on iOS 17+ may be absent on Android 12; maintain a capability matrix
|
|
137
|
+
- **Code signing automation**: `fastlane match` (iOS) and keystore management (Android) require upfront investment; do it early
|
|
138
138
|
|
|
139
139
|
## When to go native anyway
|
|
140
140
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/python.md
|
|
2
|
+
skills/development/python.md (Python Best Practices) Use this skill when writing, reviewing, or debugging Python code.
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging Python code. ## Project Structure
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/rust.md
|
|
2
|
+
skills/development/rust.md (Rust Best Practices) Use this skill when writing, reviewing, or debugging Rust code.
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging Rust code. ## Project Structure
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/shell.md
|
|
2
|
+
skills/development/shell.md (Shell Scripting Best Practices) Use this skill when writing, reviewing, or debugging Bash, Zsh, or POSIX shell s
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging Bash, Zsh, or POSIX shell scripts. ## Script Header
|
|
5
5
|
-->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/swift.md
|
|
2
|
+
skills/development/swift.md (Swift / iOS Development) Swift 6 enforces data-race safety at compile time. Annotate isolation boundary e
|
|
3
3
|
|
|
4
4
|
## Concurrency (Swift 6 Strict Concurrency) Swift 6 enforces data-race safety at compile time. Annotate isolation boundary explicitly:
|
|
5
5
|
-->
|
|
@@ -26,7 +26,7 @@ Key rules:
|
|
|
26
26
|
- `Sendable` conformance on types crossing isolation boundaries
|
|
27
27
|
- Prefer `async/await` over completion handlers; avoid mixing the two
|
|
28
28
|
|
|
29
|
-
Common pitfall: `Task { }` inherits the actor context of its caller
|
|
29
|
+
Common pitfall: `Task { }` inherits the actor context of its caller: do not assume it runs on a background thread.
|
|
30
30
|
|
|
31
31
|
## SwiftUI Patterns
|
|
32
32
|
|
|
@@ -80,7 +80,7 @@ func testFetchReturnsItems() async throws {
|
|
|
80
80
|
|
|
81
81
|
### UI tests
|
|
82
82
|
|
|
83
|
-
Prefer `XCUITest` for critical flows only
|
|
83
|
+
Prefer `XCUITest` for critical flows only: it is slow and flaky. Supplement with snapshot tests (`swift-snapshot-testing`) for visual regression.
|
|
84
84
|
|
|
85
85
|
### Test doubles
|
|
86
86
|
|
|
@@ -119,11 +119,11 @@ View → ViewModel (@MainActor) → Repository (actor) → Network/DB
|
|
|
119
119
|
|
|
120
120
|
### The Composable Architecture (TCA)
|
|
121
121
|
|
|
122
|
-
Use TCA when state fan-out is complex or testability of reducers is a priority. Adds boilerplate
|
|
122
|
+
Use TCA when state fan-out is complex or testability of reducers is a priority. Adds boilerplate: evaluate against team familiarity.
|
|
123
123
|
|
|
124
124
|
## Common Pitfalls
|
|
125
125
|
|
|
126
|
-
- Do not call `@MainActor` methods from synchronous non-main contexts
|
|
126
|
+
- Do not call `@MainActor` methods from synchronous non-main contexts: use `Task { @MainActor in ... }`
|
|
127
127
|
- Avoid `DispatchQueue.main.async` in new code; use `await MainActor.run { }` instead
|
|
128
|
-
- `@StateObject` vs `@ObservedObject` confusion causes double-initialization bugs
|
|
128
|
+
- `@StateObject` vs `@ObservedObject` confusion causes double-initialization bugs: `@StateObject` only at the owner
|
|
129
129
|
- `List` with large datasets: use `lazy` loading or pagination; do not load everything into `@State`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/development/typescript.md
|
|
2
|
+
skills/development/typescript.md (TypeScript Best Practices) Use this skill when writing, reviewing, or debugging TypeScript or JavaScript co
|
|
3
3
|
|
|
4
4
|
Use this skill when writing, reviewing, or debugging TypeScript or JavaScript code. ## Project Structure
|
|
5
5
|
-->
|
package/skills/devops/ci-cd.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
skills/devops/ci-cd.md
|
|
2
|
+
skills/devops/ci-cd.md (CI/CD) Use this skill when designing, debugging, or optimizing CI/CD pipelines.
|
|
3
3
|
|
|
4
4
|
Use this skill when designing, debugging, or optimizing CI/CD pipelines. ## Pipeline Stages
|
|
5
5
|
-->
|
|
@@ -11,12 +11,12 @@ Use this skill when designing, debugging, or optimizing CI/CD pipelines.
|
|
|
11
11
|
|
|
12
12
|
| Stage | Purpose | Tools | Failure Policy |
|
|
13
13
|
|---|---|---|---|
|
|
14
|
-
| Build | Compile, lint, typecheck | tsc, eslint, cargo check, go vet | Fail fast
|
|
14
|
+
| Build | Compile, lint, typecheck | tsc, eslint, cargo check, go vet | Fail fast: block all downstream stages |
|
|
15
15
|
| Test | Unit → integration → e2e | Jest, Pytest, go test, Playwright | Fail on any; parallelize within stage |
|
|
16
16
|
| Security Scan | SAST, dep audit, secrets detection | Semgrep, CodeQL, Trivy, gitleaks | Block on CRITICAL/HIGH; warn on MEDIUM |
|
|
17
17
|
| Deploy | Promote artifact through environments | GitHub Actions, ArgoCD, Helm | Gate on all prior stages passing |
|
|
18
18
|
|
|
19
|
-
Always run lint and typecheck before tests
|
|
19
|
+
Always run lint and typecheck before tests: they are faster and catch more errors per second of CI time.
|
|
20
20
|
|
|
21
21
|
## GitHub Actions
|
|
22
22
|
|
|
@@ -94,14 +94,14 @@ Never auto-deploy to production without a passing security scan and at least one
|
|
|
94
94
|
|
|
95
95
|
- Store secrets in the platform's encrypted secret store (GitHub Actions Secrets, GitLab CI Variables).
|
|
96
96
|
- Never hardcode secrets in workflow files or Dockerfiles.
|
|
97
|
-
- Mask secrets in logs
|
|
97
|
+
- Mask secrets in logs: CI platforms do this automatically for registered secrets; verify it works before relying on it.
|
|
98
98
|
- Rotate any secret immediately after a potential exposure; treat "may have leaked" the same as "did leak".
|
|
99
99
|
- Use OIDC-based short-lived tokens (GitHub OIDC → AWS/GCP/Azure) over long-lived service account keys wherever the cloud provider supports it.
|
|
100
100
|
|
|
101
101
|
## Speed Optimization
|
|
102
102
|
|
|
103
103
|
- Cache dependency layers keyed to lock file hash; a clean install on every run is a CI antipattern.
|
|
104
|
-
- Run lint and typecheck first
|
|
104
|
+
- Run lint and typecheck first: they fail fast and cost less than a full test suite.
|
|
105
105
|
- Split slow test suites across workers using matrix or `--shard` flags (Vitest, Jest, Playwright all support sharding).
|
|
106
106
|
- Parallelize independent test files; do not serialize unit tests.
|
|
107
107
|
- In monorepos, run only affected packages: `turbo run test --filter=[HEAD^1]` or `nx affected --target=test`.
|