@geraldmaron/construct 1.0.17 → 1.0.18
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/commands/design/flow.md +2 -0
- package/commands/design/ui.md +2 -0
- package/lib/embed/semantic.mjs +5 -3
- package/package.json +4 -5
- package/specialists/prompts/cx-architect.md +1 -0
- package/specialists/prompts/cx-designer.md +1 -1
- package/specialists/prompts/cx-operations.md +1 -0
- package/specialists/prompts/cx-rd-lead.md +1 -0
- package/specialists/prompts/cx-sre.md +1 -0
- package/specialists/registry.json +2 -2
- package/templates/docs/test-plan.md +96 -0
package/commands/design/flow.md
CHANGED
|
@@ -8,3 +8,5 @@ Produce:
|
|
|
8
8
|
- JOBS-TO-BE-DONE: "When [situation], I want to [motivation], so I can [outcome]."
|
|
9
9
|
- FRICTION MAP: 5 likely points where users get stuck, confused, or quit
|
|
10
10
|
- DESIGN-DRIVING QUESTIONS: a small set of questions (typically 3-7) whose answers would change layout, flow, or interaction decisions
|
|
11
|
+
|
|
12
|
+
To capture the flow as a committed artifact, run `construct wireframe "<flow description>" --type=flow` (or `--type=user-journey` for a persona funnel) to emit a diffable Mermaid diagram under `.cx/wireframes/`. Stay text-first (no new diagramming dependency).
|
package/commands/design/ui.md
CHANGED
|
@@ -10,3 +10,5 @@ Every meaningful UI surface needs:
|
|
|
10
10
|
- WCAG AA baseline: keyboard-navigable, 4.5:1 contrast, visible focus, ARIA labels
|
|
11
11
|
|
|
12
12
|
Does it look intentional, or like a default template? Flag experience drift.
|
|
13
|
+
|
|
14
|
+
For a layout sketch, run `construct wireframe "<screen description>" --type=layout` to produce a committed low-fi HTML/Mermaid artifact under `.cx/wireframes/`, then refine it. Stay text-first (no new diagramming dependency). Valid `--type` values: layout, flow, state, sequence, er, user-journey.
|
package/lib/embed/semantic.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* lib/embed/semantic.mjs — Semantic analysis for intake signals.
|
|
3
3
|
*
|
|
4
|
-
* Generates embeddings via @
|
|
4
|
+
* Generates embeddings via @huggingface/transformers, caches them to disk,
|
|
5
5
|
* computes cosine similarity, and clusters related signals by topic.
|
|
6
6
|
* All local — no external API calls. Default model is all-MiniLM-L6-v2
|
|
7
7
|
* (384-dimensional vectors, ~50MB on disk, fast inference).
|
|
@@ -23,7 +23,7 @@ import { homedir } from 'node:os';
|
|
|
23
23
|
|
|
24
24
|
const CACHE_DIR = join(homedir(), '.cx', 'cache', 'embeddings');
|
|
25
25
|
const INDEX_FILE = join(CACHE_DIR, 'index.json');
|
|
26
|
-
const MODEL_NAME = 'all-MiniLM-L6-v2';
|
|
26
|
+
const MODEL_NAME = 'Xenova/all-MiniLM-L6-v2';
|
|
27
27
|
const DIMENSIONS = 384;
|
|
28
28
|
const LOG = process.env.CONSTRUCT_DEBUG_EMBED === '1';
|
|
29
29
|
|
|
@@ -35,7 +35,9 @@ let embedder = null;
|
|
|
35
35
|
async function getEmbedder() {
|
|
36
36
|
if (embedder !== null) return embedder;
|
|
37
37
|
try {
|
|
38
|
-
const { pipeline } = await import('@
|
|
38
|
+
const { pipeline, env: hfEnv } = await import('@huggingface/transformers');
|
|
39
|
+
hfEnv.allowLocalModels = true;
|
|
40
|
+
hfEnv.useBrowserCache = false;
|
|
39
41
|
embedder = await pipeline('feature-extraction', MODEL_NAME, {
|
|
40
42
|
quantized: true,
|
|
41
43
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geraldmaron/construct",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Construct — agent orchestration layer for OpenCode, Claude Code, and other coding surfaces",
|
|
6
6
|
"bin": {
|
|
@@ -69,20 +69,20 @@
|
|
|
69
69
|
"eval:routing": "node scripts/eval/score-intent-classifier.mjs",
|
|
70
70
|
"release:check": "node ./bin/construct doctor && npm test && node ./bin/construct docs:update --check && node ./bin/construct dashboard:sync --check && node ./bin/construct lint:comments && node scripts/lint-commits-pr.mjs",
|
|
71
71
|
"release:gate": "node --test tests/functional/release-gate.functional.test.mjs",
|
|
72
|
+
"audit:published": "node scripts/audit-published-artifact.mjs",
|
|
72
73
|
"release:preflight": "node scripts/pre-release-check.mjs",
|
|
73
74
|
"release:preflight:no-auth": "node scripts/pre-release-check.mjs --skip-auth",
|
|
74
75
|
"npm:publish": "npm run release:check && npm publish --access public",
|
|
75
76
|
"postinstall": "node ./bin/construct-postinstall.mjs"
|
|
76
77
|
},
|
|
77
78
|
"dependencies": {
|
|
78
|
-
"@huggingface/transformers": "^4.2.0",
|
|
79
79
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
80
|
-
"@xenova/transformers": "^2.0.1",
|
|
81
80
|
"js-yaml": "^4.2.0",
|
|
82
81
|
"node-webvtt": "^1.9.3",
|
|
83
82
|
"postgres": "^3.4.9"
|
|
84
83
|
},
|
|
85
84
|
"optionalDependencies": {
|
|
85
|
+
"@huggingface/transformers": "^4.2.0",
|
|
86
86
|
"@opentelemetry/api": "^1.9.0",
|
|
87
87
|
"@opentelemetry/core": "^2.7.1",
|
|
88
88
|
"@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
|
|
@@ -91,7 +91,6 @@
|
|
|
91
91
|
"@opentelemetry/semantic-conventions": "^1.25.0"
|
|
92
92
|
},
|
|
93
93
|
"overrides": {
|
|
94
|
-
"express-rate-limit": "8.5.1"
|
|
95
|
-
"protobufjs": "^8.4.2"
|
|
94
|
+
"express-rate-limit": "8.5.1"
|
|
96
95
|
}
|
|
97
96
|
}
|
|
@@ -16,6 +16,7 @@ You have inherited enough unmaintainable systems to be permanently suspicious of
|
|
|
16
16
|
**Failure mode warning**: If the ADR has no "options rejected" section, the decision wasn't made: it defaulted. Defaulted decisions are the ones that bite hardest.
|
|
17
17
|
|
|
18
18
|
**Role guidance**: call `get_skill("roles/architect")` before drafting.
|
|
19
|
+
**Templates**: call `get_template("adr")` before authoring an ADR so the section structure, framing rules, and rejected-alternatives requirement come from the canonical template rather than memory. Use `list_templates` to discover overrides.
|
|
19
20
|
**Strategy grounding**: for decisions with long-term interface or data model implications, check `.cx/knowledge/decisions/strategy/` for any declared strategy documents before choosing. A decision that contradicts a declared Bet or enables a Non-bet must surface the conflict explicitly in the ADR's OPTIONS CONSIDERED section. If no strategy documents exist, proceed without: do not block the workflow or invent strategy.
|
|
20
21
|
|
|
21
22
|
When the architecture domain is clear, also load exactly one relevant overlay before drafting:
|
|
@@ -32,7 +32,7 @@ When the user asks for a visual deliverable, choose the lightest artifact that h
|
|
|
32
32
|
- walkthroughs and demo videos: use the available browser/demo tooling and follow a discover → rehearse → record flow instead of jumping straight to recording
|
|
33
33
|
|
|
34
34
|
Tool and skill discipline:
|
|
35
|
-
- prefer
|
|
35
|
+
- prefer the bundled generator before inventing bespoke formats: `construct wireframe "<description>" --type=<layout|flow|state|sequence|er|user-journey>` writes a diffable artifact to `.cx/wireframes/`. Use `layout` for screens, `flow`/`user-journey` for paths, `state`/`sequence`/`er` for system diagrams. It is zero-dependency and text-first; do not add a diagramming library
|
|
36
36
|
- use `list_skills` and `search_skills` to load the host's relevant visual skill when the ask is a deck, presentation, polished UI exploration, or demo video
|
|
37
37
|
- if the user provides source material like a `.pptx`, export, or PDF, ingest it first so the deliverable is grounded in the actual content
|
|
38
38
|
|
|
@@ -16,6 +16,7 @@ A beautiful plan is worthless if it can't be executed in the right sequence. You
|
|
|
16
16
|
**Failure mode warning**: If every task can run in parallel, the dependency graph wasn't drawn. Real plans have sequences, and real sequences have blockers.
|
|
17
17
|
|
|
18
18
|
**Role guidance**: call `get_skill("roles/operator")` before drafting.
|
|
19
|
+
**Templates**: call `get_template("runbook")` before authoring an operational runbook and `get_template("incident-report")` before authoring a post-incident writeup, so the section structure and required fields come from the canonical template rather than memory. Use `list_templates` to discover overrides.
|
|
19
20
|
|
|
20
21
|
Start only after cx-architect and cx-engineer have produced a plan and cx-devil-advocate feedback is resolved.
|
|
21
22
|
|
|
@@ -16,6 +16,7 @@ Most "problems" that arrive on your desk are actually hypotheses masquerading as
|
|
|
16
16
|
**Failure mode warning**: If you can't write a falsifiable hypothesis, you don't have an R&D task: you have a planning task being treated as R&D to avoid committing to a spec.
|
|
17
17
|
|
|
18
18
|
**Role guidance**: call `get_skill("roles/architect")` before drafting.
|
|
19
|
+
**Templates**: call `get_template("research-brief")` before authoring so the section structure comes from the canonical template rather than memory. Use `list_templates` to discover overrides.
|
|
19
20
|
**Evidence policy**: hypotheses must be grounded in evidence, not plausibility. Follow `rules/common/research.md` (most-recent-first, primary sources, verified URLs) when citing external literature, benchmarks, or published results to motivate an R&D task.
|
|
20
21
|
**Strategy grounding**: before proposing an R&D direction, check `.cx/knowledge/decisions/strategy/` for declared Bets and Non-bets. A research direction that contradicts a Non-bet requires explicit surfacing and user decision before proceeding.
|
|
21
22
|
|
|
@@ -16,6 +16,7 @@ You have been paged at 2am enough times to know that reliability problems are de
|
|
|
16
16
|
**Failure mode warning**: If there's no alert definition before deployment, nobody planned for failure. The first alert will be a user report.
|
|
17
17
|
|
|
18
18
|
**Role guidance**: call `get_skill("roles/operator.sre")` before drafting.
|
|
19
|
+
**Templates**: call `get_template("runbook")` before authoring a runbook and `get_template("incident-report")` before authoring a postmortem, so the section structure and required fields come from the canonical template rather than memory. Use `list_templates` to discover overrides.
|
|
19
20
|
|
|
20
21
|
For each observability or reliability initiative, define:
|
|
21
22
|
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
"modelTier": "standard",
|
|
272
272
|
"reasoningEffort": "medium",
|
|
273
273
|
"codexSandbox": "read-only",
|
|
274
|
-
"claudeTools": "Read,Grep,Glob,LS,WebSearch,WebFetch,list_skills,get_skill,search_skills,memory_search,memory_add_observations",
|
|
274
|
+
"claudeTools": "Read,Grep,Glob,LS,WebSearch,WebFetch,list_skills,get_skill,search_skills,get_template,list_templates,memory_search,memory_add_observations",
|
|
275
275
|
"promptFile": "specialists/prompts/cx-researcher.md",
|
|
276
276
|
"embedOrientation": {
|
|
277
277
|
"focusAreas": [
|
|
@@ -1075,7 +1075,7 @@
|
|
|
1075
1075
|
"modelTier": "standard",
|
|
1076
1076
|
"reasoningEffort": "medium",
|
|
1077
1077
|
"codexSandbox": "workspace-write",
|
|
1078
|
-
"claudeTools": "Read,Grep,Glob,LS,Edit,Write,Bash,list_skills,get_skill,search_skills,memory_search,memory_add_observations",
|
|
1078
|
+
"claudeTools": "Read,Grep,Glob,LS,Edit,Write,Bash,list_skills,get_skill,search_skills,get_template,list_templates,memory_search,memory_add_observations",
|
|
1079
1079
|
"promptFile": "specialists/prompts/cx-docs-keeper.md",
|
|
1080
1080
|
"embedOrientation": {
|
|
1081
1081
|
"focusAreas": [
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Test Plan: {feature or system name}
|
|
2
|
+
|
|
3
|
+
- **Date**: {YYYY-MM-DD}
|
|
4
|
+
- **Owner**: {name or role}
|
|
5
|
+
- **Status**: draft | in-review | approved | executed
|
|
6
|
+
- **Related**: {PRD / ADR paths or none}
|
|
7
|
+
|
|
8
|
+
<!--
|
|
9
|
+
Use this when a feature, migration, or system change needs a deliberate
|
|
10
|
+
verification strategy before it ships. The plan is the contract between
|
|
11
|
+
what was specified and what will be proven; every scenario below must
|
|
12
|
+
trace to a requirement or an observed risk, never to guesswork.
|
|
13
|
+
|
|
14
|
+
Before drafting, read rules/common/framing.md and rules/common/no-fabrication.md.
|
|
15
|
+
Acceptance criteria must be binary pass/fail. If a criterion cannot be
|
|
16
|
+
checked without asking the author, it is not done. Cite the requirement
|
|
17
|
+
(FR/NFR id, ADR decision, ticket) each scenario verifies.
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
## Scope
|
|
21
|
+
<!--
|
|
22
|
+
What is under test and what is explicitly not. Name the components, surfaces,
|
|
23
|
+
or behaviors covered. The out-of-scope list protects reviewer attention and
|
|
24
|
+
makes coverage gaps deliberate rather than accidental.
|
|
25
|
+
-->
|
|
26
|
+
|
|
27
|
+
| | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| **In scope** | <what this plan verifies> |
|
|
30
|
+
| **Out of scope** | <related behavior deliberately not tested here, and why> |
|
|
31
|
+
|
|
32
|
+
## Test strategy
|
|
33
|
+
<!--
|
|
34
|
+
The levels of testing applied and why each is justified. Map levels to risk:
|
|
35
|
+
unit for logic, integration for contracts and boundaries, end-to-end for
|
|
36
|
+
user-visible flows, manual/exploratory for what automation cannot reach.
|
|
37
|
+
State what each level is responsible for so coverage gaps are visible.
|
|
38
|
+
-->
|
|
39
|
+
|
|
40
|
+
| Level | What it covers | Why it lives at this level |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Unit | <logic, pure functions, edge cases> | <reason> |
|
|
43
|
+
| Integration | <contracts, boundaries, data access> | <reason> |
|
|
44
|
+
| End-to-end | <user-visible flows> | <reason> |
|
|
45
|
+
| Manual / exploratory | <what automation cannot reach> | <reason> |
|
|
46
|
+
|
|
47
|
+
## Key scenarios
|
|
48
|
+
<!--
|
|
49
|
+
The scenarios that prove the change works. Each scenario names the requirement
|
|
50
|
+
it verifies, the setup, the action, and the binary acceptance criterion. A
|
|
51
|
+
reviewer must be able to run or read the scenario and decide pass/fail without
|
|
52
|
+
asking the author.
|
|
53
|
+
-->
|
|
54
|
+
|
|
55
|
+
| ID | Scenario | Verifies | Acceptance (binary pass/fail) |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| TC-1 | <setup, action, expected result> | <FR/NFR id or risk> | <observable condition> |
|
|
58
|
+
| TC-2 | <...> | <...> | <...> |
|
|
59
|
+
|
|
60
|
+
## Risks and edge cases
|
|
61
|
+
<!--
|
|
62
|
+
The failure modes and boundary conditions worth explicit attention: empty
|
|
63
|
+
inputs, concurrency, partial failure, large data, permission boundaries,
|
|
64
|
+
rollback. For each, state how the plan covers it or why the residual risk
|
|
65
|
+
is accepted.
|
|
66
|
+
-->
|
|
67
|
+
|
|
68
|
+
| Risk / edge case | Likelihood | Impact | Coverage or accepted reason |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| <condition> | low / med / high | low / med / high | <how it is tested, or why accepted> |
|
|
71
|
+
|
|
72
|
+
## Environments and data
|
|
73
|
+
<!--
|
|
74
|
+
Where tests run and what data they use. Name the environments, fixtures,
|
|
75
|
+
seed data, and any external dependencies (sandboxes, stubs, recorded
|
|
76
|
+
responses). Flag data that must be synthetic or anonymized.
|
|
77
|
+
-->
|
|
78
|
+
|
|
79
|
+
## Entry and exit criteria
|
|
80
|
+
<!--
|
|
81
|
+
Entry: what must be true before testing starts (build available, environment
|
|
82
|
+
provisioned, dependencies stubbed). Exit: what must be true to call testing
|
|
83
|
+
done (all blocking scenarios pass, known issues triaged, coverage threshold
|
|
84
|
+
met). Both are checklists a reviewer can verify.
|
|
85
|
+
-->
|
|
86
|
+
|
|
87
|
+
**Entry criteria**
|
|
88
|
+
|
|
89
|
+
- <condition that must hold before execution begins>
|
|
90
|
+
|
|
91
|
+
**Exit criteria**
|
|
92
|
+
|
|
93
|
+
- <condition that must hold to declare the plan executed>
|
|
94
|
+
|
|
95
|
+
## References
|
|
96
|
+
<!-- PRD, ADR, RFC, related test plans, prior incidents. -->
|