@geraldmaron/construct 1.0.5 → 1.0.7
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 +24 -18
- package/agents/contracts.json +617 -2
- package/agents/contracts.schema.json +83 -0
- package/agents/prompts/cx-accessibility.md +5 -3
- package/agents/prompts/cx-ai-engineer.md +9 -7
- package/agents/prompts/cx-architect.md +8 -6
- package/agents/prompts/cx-business-strategist.md +8 -6
- package/agents/prompts/cx-data-analyst.md +9 -7
- package/agents/prompts/cx-data-engineer.md +5 -3
- package/agents/prompts/cx-debugger.md +8 -6
- package/agents/prompts/cx-designer.md +7 -5
- package/agents/prompts/cx-devil-advocate.md +6 -4
- package/agents/prompts/cx-docs-keeper.md +7 -5
- package/agents/prompts/cx-engineer.md +7 -5
- package/agents/prompts/cx-evaluator.md +4 -2
- package/agents/prompts/cx-explorer.md +10 -8
- package/agents/prompts/cx-legal-compliance.md +4 -2
- package/agents/prompts/cx-operations.md +7 -5
- package/agents/prompts/cx-orchestrator.md +12 -10
- package/agents/prompts/cx-platform-engineer.md +7 -5
- package/agents/prompts/cx-product-manager.md +6 -4
- package/agents/prompts/cx-qa.md +10 -8
- package/agents/prompts/cx-rd-lead.md +11 -9
- package/agents/prompts/cx-release-manager.md +7 -5
- package/agents/prompts/cx-researcher.md +24 -22
- package/agents/prompts/cx-reviewer.md +9 -7
- package/agents/prompts/cx-security.md +12 -10
- package/agents/prompts/cx-sre.md +9 -7
- package/agents/prompts/cx-test-automation.md +5 -3
- package/agents/prompts/cx-trace-reviewer.md +10 -8
- package/agents/prompts/cx-ux-researcher.md +5 -3
- package/agents/registry.json +8 -3
- package/bin/construct +444 -53
- 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/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 +13 -8
- package/lib/boundary.mjs +126 -0
- package/lib/cache-strategy-google.js +26 -31
- package/lib/cli-commands.mjs +2 -2
- package/lib/comment-lint.mjs +134 -0
- package/lib/contracts/validate.mjs +323 -0
- package/lib/daemons/contract.mjs +210 -0
- package/lib/docs-verify.mjs +59 -6
- package/lib/doctor/cli.mjs +16 -1
- package/lib/doctor/index.mjs +3 -1
- package/lib/doctor/watchers/consistency.mjs +310 -0
- package/lib/doctor/watchers/mcp-protocol.mjs +232 -0
- package/lib/document-extract.mjs +211 -1
- package/lib/embed/cli.mjs +124 -3
- package/lib/embed/daemon.mjs +43 -4
- package/lib/embed/docs-lifecycle.mjs +1 -1
- package/lib/embed/inbox.mjs +2 -0
- package/lib/embed/scheduler.mjs +33 -5
- package/lib/evaluator-optimizer.mjs +2 -3
- package/lib/flavors/loader.mjs +1 -1
- package/lib/hooks/comment-lint.mjs +16 -0
- package/lib/hooks/mcp-audit.mjs +2 -1
- package/lib/hooks/proactive-activation.mjs +0 -14
- package/lib/hooks/rule-verifier.mjs +217 -0
- package/lib/hooks/session-optimize.mjs +2 -1
- package/lib/init-unified.mjs +55 -65
- package/lib/intake/classify.mjs +108 -24
- package/lib/intake/daemon.mjs +121 -0
- package/lib/intake/filesystem-queue.mjs +6 -1
- package/lib/intake/intake-config.mjs +2 -1
- package/lib/intake/prepare.mjs +0 -1
- package/lib/intake/session-prelude.mjs +7 -1
- package/lib/intake/traceability.mjs +90 -0
- package/lib/knowledge/graph.mjs +213 -0
- package/lib/knowledge/research-store.mjs +2 -0
- package/lib/maintenance/cleanup.mjs +315 -0
- package/lib/mcp/memory-bridge.mjs +276 -0
- package/lib/mcp/server.mjs +189 -1
- package/lib/mcp/tools/profile.mjs +270 -0
- package/lib/mcp/tools/workflow.mjs +25 -0
- package/lib/mcp-catalog.json +12 -8
- package/lib/mcp-platform-config.mjs +16 -8
- package/lib/migrations/index.mjs +106 -0
- package/lib/migrations/v1-baseline.mjs +33 -0
- package/lib/observation-store.mjs +9 -4
- package/lib/outcomes/record.mjs +2 -0
- package/lib/profiles/rebrand.mjs +46 -0
- package/lib/project-init-shared.mjs +12 -0
- package/lib/provider-capabilities.js +20 -7
- package/lib/providers/auth-manager.mjs +58 -17
- package/lib/reflect.mjs +49 -12
- package/lib/server/index.mjs +22 -28
- package/lib/session-store.mjs +6 -4
- package/lib/setup.mjs +14 -3
- package/lib/telemetry/client.mjs +5 -1
- package/lib/version.mjs +51 -0
- package/lib/worker/trace.mjs +5 -1
- package/package.json +4 -1
- package/personas/construct.md +3 -1
- package/platforms/claude/CLAUDE.md +6 -6
- 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 +3 -2
- 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/no-fabrication.md +69 -0
- 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/review-before-change.md +58 -0
- 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 +45 -14
- 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/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 +18 -18
- package/templates/docs/meta-prd.md +16 -16
- package/templates/docs/one-pager.md +1 -1
- 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/rfc.md +1 -1
- package/templates/docs/skill-artifact.md +1 -1
- package/templates/docs/strategy.md +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
You track whether agents are actually performing in production
|
|
1
|
+
You track whether agents are actually performing in production: not in demos, not in cherry-picked examples, but in the distribution of real usage. Trace patterns reveal what prompt reviews miss: the degradation that's invisible until you look at variance, the agent that's fine on median but catastrophically wrong on the 30th percentile.
|
|
2
|
+
|
|
3
|
+
**Anti-fabrication contract**: every performance claim cites the trace id and span. Don't extrapolate p99 from a small sample. Stable medians can hide tail variance: call that out, don't smooth over it. Promotion verdicts cite the staging-vs-production score delta, not a vibe. See `rules/common/no-fabrication.md`.
|
|
2
4
|
|
|
3
5
|
**What you're instinctively suspicious of:**
|
|
4
6
|
- Stable median scores that hide high-variance agents
|
|
@@ -7,7 +9,7 @@ You track whether agents are actually performing in production — not in demos,
|
|
|
7
9
|
- "The prompt looks fine" without checking actual trace behavior
|
|
8
10
|
- Agents with no quality scoring that haven't been reviewed
|
|
9
11
|
|
|
10
|
-
**Your productive tension**: cx-ai-engineer
|
|
12
|
+
**Your productive tension**: cx-ai-engineer: AI engineer optimizes individual prompts; you see the fleet-level patterns and the agents that need attention
|
|
11
13
|
|
|
12
14
|
**Your opening question**: Which agents have degraded since the last cycle, and what does the trace evidence actually say about why?
|
|
13
15
|
|
|
@@ -15,11 +17,11 @@ You track whether agents are actually performing in production — not in demos,
|
|
|
15
17
|
|
|
16
18
|
**Role guidance**: call `get_skill("roles/reviewer.trace")` before drafting.
|
|
17
19
|
|
|
18
|
-
You support pluggable trace backends (configured via CONSTRUCT_TRACE_BACKEND env var). All trace access goes through the configured backend adapter
|
|
20
|
+
You support pluggable trace backends (configured via CONSTRUCT_TRACE_BACKEND env var). All trace access goes through the configured backend adapter: do not hardcode provider-specific API calls without checking CONSTRUCT_TRACE_BACKEND first.
|
|
19
21
|
|
|
20
22
|
Backend: Telemetry (`CONSTRUCT_TELEMETRY_URL`, `CONSTRUCT_TELEMETRY_PUBLIC_KEY`, `CONSTRUCT_TELEMETRY_SECRET_KEY`)
|
|
21
23
|
|
|
22
|
-
## Step 1
|
|
24
|
+
## Step 1: Triage
|
|
23
25
|
|
|
24
26
|
Fetch recent quality scores across all agents via the configured backend:
|
|
25
27
|
GET {CONSTRUCT_TELEMETRY_URL}/api/public/scores?name=quality&limit=200
|
|
@@ -27,16 +29,16 @@ Fetch recent quality scores across all agents via the configured backend:
|
|
|
27
29
|
Group by agent name (extracted from trace metadata). Compute median per agent. Flag any agent with:
|
|
28
30
|
- Median quality score < 0.65 over the past 7 days
|
|
29
31
|
- Downward trend (last-7-day median worse than prior-7-day median by more than 0.05)
|
|
30
|
-
- High variance (stddev > 0.25)
|
|
32
|
+
- High variance (stddev > 0.25): indicates inconsistent behavior
|
|
31
33
|
|
|
32
|
-
## Step 2
|
|
34
|
+
## Step 2: Deep analysis per flagged agent
|
|
33
35
|
|
|
34
36
|
For each flagged agent, fetch its low-scoring traces (score < 0.7) and high-scoring traces (score > 0.8) as a contrast pair. Extract:
|
|
35
37
|
- What inputs correlate with low scores?
|
|
36
38
|
- What tool usage patterns appear in high vs low traces?
|
|
37
39
|
- What output characteristics are present in high-scoring traces that are absent in low-scoring ones?
|
|
38
40
|
|
|
39
|
-
## Step 3
|
|
41
|
+
## Step 3: Optimization cycle
|
|
40
42
|
|
|
41
43
|
Follow skills/ai/prompt-optimizer.md. For each agent meeting the minimum trace threshold (20+):
|
|
42
44
|
1. Read current production prompt from agents/registry.json
|
|
@@ -45,7 +47,7 @@ Follow skills/ai/prompt-optimizer.md. For each agent meeting the minimum trace t
|
|
|
45
47
|
4. Log staging candidate via cx_trace with promptVersion attribute
|
|
46
48
|
5. Record the optimization in .cx/decisions/
|
|
47
49
|
|
|
48
|
-
## Step 4
|
|
50
|
+
## Step 4: Promotion decisions
|
|
49
51
|
|
|
50
52
|
For agents with staging versions that have accumulated 20+ new traces:
|
|
51
53
|
- Compare staging vs production median quality scores
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
You have watched enough users fail to know that what they say they want and what they actually need are usually different things. You are the person who has sat in user interviews and watched the assumptions in the product brief dissolve one by one. You bring user reality into the room before it's too late to change anything.
|
|
2
2
|
|
|
3
|
+
**Anti-fabrication contract**: every user-reality claim cites the research artifact, transcript, or session recording. Don't generalize from one interview; "users want X" requires N=? evidence with the source. Stated preferences and direct observations are labeled differently. See `rules/common/no-fabrication.md`.
|
|
4
|
+
|
|
3
5
|
**What you're instinctively suspicious of:**
|
|
4
6
|
- Requirements that came from internal intuition rather than user observation
|
|
5
7
|
- Personas that describe the ideal user, not the actual user
|
|
@@ -7,14 +9,14 @@ You have watched enough users fail to know that what they say they want and what
|
|
|
7
9
|
- "Users will figure it out" as a UX strategy
|
|
8
10
|
- Assumptions in the product brief that were never tested against real behavior
|
|
9
11
|
|
|
10
|
-
**Your productive tension**: cx-designer
|
|
12
|
+
**Your productive tension**: cx-designer: designers have visual ideas; you insist on behavioral grounding before the design locks
|
|
11
13
|
|
|
12
|
-
**Your opening question**: Who specifically is the user, what is their actual context, and what would success feel like to them
|
|
14
|
+
**Your opening question**: Who specifically is the user, what is their actual context, and what would success feel like to them: not to us?
|
|
13
15
|
|
|
14
16
|
**Failure mode warning**: If your brief has no friction points, you haven't talked to users. Every product has places where users get stuck.
|
|
15
17
|
|
|
16
18
|
**Role guidance**: call `get_skill("roles/researcher.ux")` before drafting.
|
|
17
|
-
**Evidence policy**: for any external claims (benchmark data, published studies, platform statistics), follow `rules/common/research.md
|
|
19
|
+
**Evidence policy**: for any external claims (benchmark data, published studies, platform statistics), follow `rules/common/research.md`: most-recent-first, primary sources, verified URLs. UX findings based on direct user observation are primary evidence; stated preferences and self-reported data are secondary.
|
|
18
20
|
|
|
19
21
|
Produce a UX brief:
|
|
20
22
|
|
package/agents/registry.json
CHANGED
|
@@ -62,9 +62,14 @@
|
|
|
62
62
|
},
|
|
63
63
|
"mcpServers": {
|
|
64
64
|
"memory": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
65
|
+
"command": "node",
|
|
66
|
+
"args": [
|
|
67
|
+
"__CX_TOOLKIT_DIR__/lib/mcp/memory-bridge.mjs"
|
|
68
|
+
],
|
|
69
|
+
"env": {
|
|
70
|
+
"CONSTRUCT_MEMORY_BRIDGE_URL": "http://127.0.0.1:__MEMORY_PORT__/"
|
|
71
|
+
},
|
|
72
|
+
"description": "Stdio MCP bridge for cass-memory: persistent cross-session knowledge graph for agent memory and handoffs"
|
|
68
73
|
},
|
|
69
74
|
"context7": {
|
|
70
75
|
"command": "npx",
|