@huaqiu/hqeda 0.1.1
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 +2405 -0
- package/SKILL.md +279 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +2008 -0
- package/dist/index.js.map +1 -0
- package/generated/capability-registry.json +4837 -0
- package/guides/bom-review.md +49 -0
- package/guides/erc-review.md +48 -0
- package/guides/manufacturing-readiness.md +51 -0
- package/guides/schematic-review.md +38 -0
- package/package.json +67 -0
- package/playbooks/bom-review.json +42 -0
- package/playbooks/erc-review.json +46 -0
- package/playbooks/manufacturing-review.json +45 -0
- package/playbooks/schematic-review.json +44 -0
- package/prompts/reporting-template.md +45 -0
- package/prompts/review-style.md +41 -0
- package/skill.json +132 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# BOM Review Guidance
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Identify high-risk components, lifecycle issues, duplicate parts, and
|
|
6
|
+
manufacturing inconsistencies before sending the design to production.
|
|
7
|
+
|
|
8
|
+
## Execution Flow
|
|
9
|
+
|
|
10
|
+
1. Invoke capability `bom-get-bom` to retrieve the active project BOM.
|
|
11
|
+
2. For each line item, evaluate against the checklist rules:
|
|
12
|
+
- Verify if any part is marked as **DNP** (Do Not Populate) but lacks
|
|
13
|
+
designator annotation.
|
|
14
|
+
- Flag missing Manufacturer Part Numbers (MPN).
|
|
15
|
+
- Detect duplicate MPNs assigned to differing PCB package footprints.
|
|
16
|
+
- Highlight lifecycle risks (e.g., EOL, NRND).
|
|
17
|
+
3. Format output findings strictly according to the reporting template in
|
|
18
|
+
`prompts/reporting-template.md`.
|
|
19
|
+
|
|
20
|
+
## Required Capabilities
|
|
21
|
+
|
|
22
|
+
| Capability | Purpose |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `bom-get-bom` | Retrieve the full BOM snapshot from the schematic. |
|
|
25
|
+
| `project-get-active-project` | Resolve the active project context. |
|
|
26
|
+
|
|
27
|
+
## Critical Guardrails
|
|
28
|
+
|
|
29
|
+
- **Never** automatically alter component parameters or delete findings.
|
|
30
|
+
- Group all findings by severity: `CRITICAL`, `WARNING`, `INFO`.
|
|
31
|
+
- Reference exact component designators (e.g. `C12`, `R5`) in every finding.
|
|
32
|
+
- A BOM row with zero references is always a `CRITICAL` finding — it indicates
|
|
33
|
+
an orphaned part entry that has no placement on the board.
|
|
34
|
+
|
|
35
|
+
## Output Format
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
## BOM Review Report
|
|
39
|
+
|
|
40
|
+
### CRITICAL
|
|
41
|
+
- [bom-2] Duplicate MPN `XXX` on differing footprints: R5 (0603) vs R6 (0805)
|
|
42
|
+
|
|
43
|
+
### WARNING
|
|
44
|
+
- [bom-1] Row 14 has no designator assigned
|
|
45
|
+
- [bom-4] Part `ABC123` is marked EOL
|
|
46
|
+
|
|
47
|
+
### INFO
|
|
48
|
+
- [bom-3] DNP part C8 lacks explicit annotation
|
|
49
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ERC Review Guidance
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Run the Electrical Rules Check (ERC), classify every finding by severity, and
|
|
6
|
+
drive the resolution workflow end-to-end including canvas highlighting and
|
|
7
|
+
report webview visibility.
|
|
8
|
+
|
|
9
|
+
## Execution Flow
|
|
10
|
+
|
|
11
|
+
1. Resolve the active project via `project-get-active-project`.
|
|
12
|
+
2. Invoke `erc-run-checks` to execute the EDA's built-in ERC engine.
|
|
13
|
+
3. Collect all findings from the response; do **not** filter or discard any
|
|
14
|
+
finding before classification.
|
|
15
|
+
4. Group findings by severity:
|
|
16
|
+
- **CRITICAL** — blocks production release (e.g., conflicting power
|
|
17
|
+
drivers, unconnected mandatory pins).
|
|
18
|
+
- **WARNING** — should be reviewed but may be acceptable (e.g., unused
|
|
19
|
+
input pins, passive-only nets).
|
|
20
|
+
- **INFO** — informational (e.g., net naming suggestions, style hints).
|
|
21
|
+
5. Push findings to the canvas via `erc-show-findings` so the user can
|
|
22
|
+
visually inspect each violation in the EDA view.
|
|
23
|
+
6. Toggle the ERC report webview via `erc-set-erc-report-webview-visibility` so
|
|
24
|
+
the user sees the summary panel.
|
|
25
|
+
7. After the user addresses a finding, invoke `erc-clear-findings` with the
|
|
26
|
+
resolved finding ids, then re-run ERC (step 2) to confirm the violation is
|
|
27
|
+
gone. If a full reset is needed, use `erc-clear-all-findings`.
|
|
28
|
+
|
|
29
|
+
## Required Capabilities
|
|
30
|
+
|
|
31
|
+
| Capability | Purpose |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `erc-run-checks` | Execute the ERC engine and collect findings. |
|
|
34
|
+
| `erc-show-findings` | Highlight findings on the EDA canvas. |
|
|
35
|
+
| `erc-clear-findings` | Clear specific resolved findings before re-run. |
|
|
36
|
+
| `erc-clear-all-findings` | Clear every finding for a full reset. |
|
|
37
|
+
| `erc-set-erc-report-webview-visibility` | Show/hide the ERC report panel. |
|
|
38
|
+
| `project-get-active-project` | Resolve the active project context. |
|
|
39
|
+
|
|
40
|
+
## Critical Guardrails
|
|
41
|
+
|
|
42
|
+
- Never auto-resolve or suppress a CRITICAL finding — surface it to the user.
|
|
43
|
+
- Always re-run ERC after clearing findings to confirm the resolution.
|
|
44
|
+
- When highlighting findings on the canvas, send the full finding list in a
|
|
45
|
+
single `erc-show-findings` call rather than one call per finding (reduces
|
|
46
|
+
RPC round-trips and canvas flicker).
|
|
47
|
+
- Reference the exact designator and net name from the finding object in
|
|
48
|
+
every report line.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Manufacturing Readiness Guidance
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Gate the production release on a combined set of DFM, DRC, and BOM-freeze
|
|
6
|
+
criteria. This playbook combines BOM integrity, ERC cleanliness, and project
|
|
7
|
+
persistence into a single go/no-go gate.
|
|
8
|
+
|
|
9
|
+
## Execution Flow
|
|
10
|
+
|
|
11
|
+
1. **BOM integrity gate** — invoke `bom-get-bom` and apply the BOM review
|
|
12
|
+
checklist (see `guides/bom-review.md`). Any `CRITICAL` BOM finding blocks
|
|
13
|
+
the gate.
|
|
14
|
+
2. **ERC cleanliness gate** — invoke `erc-run-checks`. If any `CRITICAL`
|
|
15
|
+
finding is present, the gate fails. Clear all findings via
|
|
16
|
+
`erc-clear-all-findings`, ask the user to fix the violations, then re-run
|
|
17
|
+
ERC. The gate passes only when the re-run returns zero `CRITICAL`
|
|
18
|
+
findings.
|
|
19
|
+
3. **Project persistence gate** — invoke `project-save-project` to ensure the
|
|
20
|
+
latest schematic state is persisted to disk before generating
|
|
21
|
+
manufacturing outputs (Gerber, BOM CSV, pick-and-place).
|
|
22
|
+
4. Emit a combined go/no-go report using the reporting template.
|
|
23
|
+
|
|
24
|
+
## Required Capabilities
|
|
25
|
+
|
|
26
|
+
| Capability | Purpose |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `bom-get-bom` | Retrieve the BOM for the integrity gate. |
|
|
29
|
+
| `erc-run-checks` | Run the ERC engine for the cleanliness gate. |
|
|
30
|
+
| `erc-clear-all-findings` | Reset findings between ERC runs. |
|
|
31
|
+
| `project-get-active-project` | Resolve the active project context. |
|
|
32
|
+
| `project-save-project` | Persist the schematic state before output. |
|
|
33
|
+
|
|
34
|
+
## Go / No-Go Decision Matrix
|
|
35
|
+
|
|
36
|
+
| Gate | Fail Condition | Action |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| BOM integrity | Any `CRITICAL` BOM finding | Block — surface findings to user |
|
|
39
|
+
| ERC cleanliness | Any `CRITICAL` ERC finding | Block — surface findings, clear, re-run |
|
|
40
|
+
| Project persistence | `project-save-project` fails | Block — check file permissions / disk |
|
|
41
|
+
|
|
42
|
+
All three gates must pass for a **GO** decision.
|
|
43
|
+
|
|
44
|
+
## Critical Guardrails
|
|
45
|
+
|
|
46
|
+
- Never skip a gate even if the user insists — manufacturing release is
|
|
47
|
+
irreversible.
|
|
48
|
+
- Always persist the project (`project-save-project`) as the final step before
|
|
49
|
+
generating manufacturing outputs.
|
|
50
|
+
- If the user interrupts the gate, leave findings on the canvas for visual
|
|
51
|
+
inspection; do not auto-clear.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Schematic Review Guidance
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Verify net connectivity, power-rail integrity, symbol/footprint consistency,
|
|
6
|
+
and ERC compliance across the schematic before board layout.
|
|
7
|
+
|
|
8
|
+
## Execution Flow
|
|
9
|
+
|
|
10
|
+
1. Resolve the active project via `project-get-active-project`.
|
|
11
|
+
2. Retrieve the kernel snapshot via `kernel-get-snapshot` to access the
|
|
12
|
+
symbol definitions, net list, and connectivity graph.
|
|
13
|
+
3. Walk the net list and evaluate each rule in the checklist:
|
|
14
|
+
- Every net must have at least two pins connected (dangling-net check).
|
|
15
|
+
- Power nets must use explicit named labels (not implicit wire joins).
|
|
16
|
+
- Active-component pins (ICs, transistors) must be connected or explicitly
|
|
17
|
+
marked No-Connect.
|
|
18
|
+
4. For visual inspection, use `selection-set-selection` to highlight a
|
|
19
|
+
specific symbol or net on the canvas, then read back the current selection
|
|
20
|
+
via `selection-get-selection` to confirm the highlight landed.
|
|
21
|
+
|
|
22
|
+
## Required Capabilities
|
|
23
|
+
|
|
24
|
+
| Capability | Purpose |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `kernel-get-snapshot` | Read the symbol/net graph for static analysis. |
|
|
27
|
+
| `selection-set-selection` | Highlight a symbol/net for visual inspection. |
|
|
28
|
+
| `selection-get-selection` | Confirm the active selection. |
|
|
29
|
+
| `project-get-active-project` | Resolve the active project context. |
|
|
30
|
+
|
|
31
|
+
## Critical Guardrails
|
|
32
|
+
|
|
33
|
+
- Do **not** modify the schematic during review — this is a read-only audit.
|
|
34
|
+
- Report findings grouped by severity with the offending designator and net
|
|
35
|
+
name.
|
|
36
|
+
- An unconnected power pin is always `CRITICAL` regardless of component type.
|
|
37
|
+
- Use exact net names as returned by the kernel snapshot; never fabricate net
|
|
38
|
+
identifiers.
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@huaqiu/hqeda",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Official HQ EDA Skill Package — executable SDK capabilities and human-authored review playbooks for Huaqiu EDA engines.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./skill": "./SKILL.md",
|
|
15
|
+
"./manifest": "./skill.json",
|
|
16
|
+
"./registry": "./generated/capability-registry.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"SKILL.md",
|
|
20
|
+
"skill.json",
|
|
21
|
+
"dist",
|
|
22
|
+
"generated/capability-registry.json",
|
|
23
|
+
"playbooks",
|
|
24
|
+
"guides",
|
|
25
|
+
"prompts",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@bufbuild/protobuf": "^2.6.3",
|
|
31
|
+
"@hqedge/connect": "0.1.11",
|
|
32
|
+
"@huaqiu/huaqiu-client": "0.0.3"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^24.0.0",
|
|
36
|
+
"tsup": "^8.3.5",
|
|
37
|
+
"typescript": "^5.7.2",
|
|
38
|
+
"vitest": "^4.1.10"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"huaqiu",
|
|
42
|
+
"hqeda",
|
|
43
|
+
"eda",
|
|
44
|
+
"skill",
|
|
45
|
+
"erc",
|
|
46
|
+
"bom",
|
|
47
|
+
"pcb",
|
|
48
|
+
"capability",
|
|
49
|
+
"connect-rpc"
|
|
50
|
+
],
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/Huaqiu-Electronics/skills.git",
|
|
54
|
+
"directory": "hqeda"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/Huaqiu-Electronics/skills/tree/main/hqeda",
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/Huaqiu-Electronics/skills/issues"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=18.0.0"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
65
|
+
"test": "vitest run"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.huaqiu.com/skills/v1/playbook.schema.json",
|
|
3
|
+
"id": "playbook-bom-review",
|
|
4
|
+
"name": "BOM Review Playbook",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"domain": "bom",
|
|
7
|
+
"description": "Guides the agent through verifying component availability, footprint consistency, lifecycle risks, and assembly variants before production release.",
|
|
8
|
+
"requiredCapabilities": [
|
|
9
|
+
"bom-get-bom",
|
|
10
|
+
"project-get-active-project"
|
|
11
|
+
],
|
|
12
|
+
"outputTemplate": "guides/bom-review.md",
|
|
13
|
+
"guidanceFile": "guides/bom-review.md",
|
|
14
|
+
"checklist": {
|
|
15
|
+
"items": [
|
|
16
|
+
{
|
|
17
|
+
"id": "bom-1",
|
|
18
|
+
"title": "Every BOM line has a designator",
|
|
19
|
+
"severity": "WARNING",
|
|
20
|
+
"rule": "Each row in the BOM must have at least one reference designator (e.g. R1, C12). Rows with empty references are flagged."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "bom-2",
|
|
24
|
+
"title": "No duplicate MPNs on differing footprints",
|
|
25
|
+
"severity": "CRITICAL",
|
|
26
|
+
"rule": "If the same manufacturer part number appears on rows with different footprint/package values, flag as a footprint mismatch."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "bom-3",
|
|
30
|
+
"title": "DNP parts are explicitly annotated",
|
|
31
|
+
"severity": "INFO",
|
|
32
|
+
"rule": "Components marked Do Not Populate should carry a designator annotation so they are not confused with missing parts."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "bom-4",
|
|
36
|
+
"title": "Lifecycle risk check",
|
|
37
|
+
"severity": "WARNING",
|
|
38
|
+
"rule": "Flag any part whose lifecycle status is EOL (End of Life) or NRND (Not Recommended for New Designs)."
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.huaqiu.com/skills/v1/playbook.schema.json",
|
|
3
|
+
"id": "playbook-erc-review",
|
|
4
|
+
"name": "ERC Review Playbook",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"domain": "erc",
|
|
7
|
+
"description": "Orchestrates ERC runs, classifies findings by severity, and drives the resolution workflow including canvas highlighting and report visibility.",
|
|
8
|
+
"requiredCapabilities": [
|
|
9
|
+
"erc-run-checks",
|
|
10
|
+
"erc-show-findings",
|
|
11
|
+
"erc-clear-findings",
|
|
12
|
+
"erc-clear-all-findings",
|
|
13
|
+
"erc-set-erc-report-webview-visibility",
|
|
14
|
+
"project-get-active-project"
|
|
15
|
+
],
|
|
16
|
+
"outputTemplate": "guides/erc-review.md",
|
|
17
|
+
"guidanceFile": "guides/erc-review.md",
|
|
18
|
+
"checklist": {
|
|
19
|
+
"items": [
|
|
20
|
+
{
|
|
21
|
+
"id": "erc-1",
|
|
22
|
+
"title": "Run ERC and collect all findings",
|
|
23
|
+
"severity": "CRITICAL",
|
|
24
|
+
"rule": "Invoke erc-run-checks and collect every finding returned. Do not filter or discard findings before classification."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "erc-2",
|
|
28
|
+
"title": "Classify findings by severity",
|
|
29
|
+
"severity": "WARNING",
|
|
30
|
+
"rule": "Group findings into CRITICAL, WARNING, INFO. CRITICAL findings block production release."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "erc-3",
|
|
34
|
+
"title": "Highlight findings on canvas",
|
|
35
|
+
"severity": "INFO",
|
|
36
|
+
"rule": "Use erc-show-findings to push findings to the EDA canvas so the user can visually inspect each violation."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "erc-4",
|
|
40
|
+
"title": "Clear resolved findings after re-run",
|
|
41
|
+
"severity": "INFO",
|
|
42
|
+
"rule": "After the user addresses a finding, invoke erc-clear-findings with the resolved finding ids, then re-run ERC to confirm."
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.huaqiu.com/skills/v1/playbook.schema.json",
|
|
3
|
+
"id": "playbook-manufacturing-review",
|
|
4
|
+
"name": "Manufacturing Readiness Playbook",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"domain": "manufacturing",
|
|
7
|
+
"description": "Gates production release on DFM, DRC, and BOM freeze criteria. Combines BOM integrity, ERC cleanliness, and project persistence checks into a single go/no-go gate.",
|
|
8
|
+
"requiredCapabilities": [
|
|
9
|
+
"bom-get-bom",
|
|
10
|
+
"erc-run-checks",
|
|
11
|
+
"erc-clear-all-findings",
|
|
12
|
+
"project-get-active-project",
|
|
13
|
+
"project-save-project"
|
|
14
|
+
],
|
|
15
|
+
"outputTemplate": "guides/manufacturing-readiness.md",
|
|
16
|
+
"guidanceFile": "guides/manufacturing-readiness.md",
|
|
17
|
+
"checklist": {
|
|
18
|
+
"items": [
|
|
19
|
+
{
|
|
20
|
+
"id": "mfg-1",
|
|
21
|
+
"title": "BOM is complete and frozen",
|
|
22
|
+
"severity": "CRITICAL",
|
|
23
|
+
"rule": "BOM must have no empty designators, no duplicate MPNs on differing footprints, and all parts must have valid MPNs."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "mfg-2",
|
|
27
|
+
"title": "ERC has zero CRITICAL findings",
|
|
28
|
+
"severity": "CRITICAL",
|
|
29
|
+
"rule": "Run erc-run-checks; if any CRITICAL finding is present, the gate fails. Clear all findings and re-run to confirm."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "mfg-3",
|
|
33
|
+
"title": "Project is saved and persisted",
|
|
34
|
+
"severity": "WARNING",
|
|
35
|
+
"rule": "Invoke project-save-project to ensure the latest schematic state is persisted before generating manufacturing outputs."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "mfg-4",
|
|
39
|
+
"title": "Designator coverage",
|
|
40
|
+
"severity": "INFO",
|
|
41
|
+
"rule": "Every component in the BOM should have a unique designator. Duplicate or missing designators are flagged for review."
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.huaqiu.com/skills/v1/playbook.schema.json",
|
|
3
|
+
"id": "playbook-schematic-review",
|
|
4
|
+
"name": "Schematic Review Playbook",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"domain": "schematic",
|
|
7
|
+
"description": "Checks net connectivity, power-rail integrity, symbol/footprint consistency, and ERC compliance across the schematic.",
|
|
8
|
+
"requiredCapabilities": [
|
|
9
|
+
"kernel-get-snapshot",
|
|
10
|
+
"selection-set-selection",
|
|
11
|
+
"selection-get-selection",
|
|
12
|
+
"project-get-active-project"
|
|
13
|
+
],
|
|
14
|
+
"outputTemplate": "guides/schematic-review.md",
|
|
15
|
+
"guidanceFile": "guides/schematic-review.md",
|
|
16
|
+
"checklist": {
|
|
17
|
+
"items": [
|
|
18
|
+
{
|
|
19
|
+
"id": "sch-1",
|
|
20
|
+
"title": "All nets have at least two connections",
|
|
21
|
+
"severity": "WARNING",
|
|
22
|
+
"rule": "A net with only one connection is a dangling net and should be reviewed."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "sch-2",
|
|
26
|
+
"title": "Power rails are explicitly named",
|
|
27
|
+
"severity": "INFO",
|
|
28
|
+
"rule": "Power nets (VCC, GND, 3V3, etc.) should use named labels rather than implicit wire connections."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "sch-3",
|
|
32
|
+
"title": "No unconnected pins on active components",
|
|
33
|
+
"severity": "CRITICAL",
|
|
34
|
+
"rule": "Every pin on an active component (IC, transistor) must be either connected or explicitly marked No-Connect."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "sch-4",
|
|
38
|
+
"title": "Symbol footprint matches BOM package",
|
|
39
|
+
"severity": "WARNING",
|
|
40
|
+
"rule": "The footprint assigned to each symbol must match the package declared in the BOM for the same designator."
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Reporting Template
|
|
2
|
+
|
|
3
|
+
Use this template verbatim for every review report. Replace the bracketed
|
|
4
|
+
placeholders with actual data. Do not remove sections even if empty — emit
|
|
5
|
+
`_(none)_` instead.
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
## <Review Name> Report
|
|
9
|
+
|
|
10
|
+
**Project:** <project-id>
|
|
11
|
+
**Generated:** <ISO-8601 timestamp>
|
|
12
|
+
**ERC run count:** <n>
|
|
13
|
+
|
|
14
|
+
### CRITICAL
|
|
15
|
+
|
|
16
|
+
<list of critical findings, or "_none_">
|
|
17
|
+
|
|
18
|
+
### WARNING
|
|
19
|
+
|
|
20
|
+
<list of warnings, or "_none_">
|
|
21
|
+
|
|
22
|
+
### INFO
|
|
23
|
+
|
|
24
|
+
<list of informational notes, or "_none_">
|
|
25
|
+
|
|
26
|
+
### Summary
|
|
27
|
+
|
|
28
|
+
- Total findings: <n>
|
|
29
|
+
- Critical: <n>
|
|
30
|
+
- Warnings: <n>
|
|
31
|
+
- Info: <n>
|
|
32
|
+
|
|
33
|
+
### Recommendations
|
|
34
|
+
|
|
35
|
+
<optional, ordered list of suggested next steps — only if findings exist>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rules
|
|
39
|
+
|
|
40
|
+
1. The `CRITICAL` section appears first, always.
|
|
41
|
+
2. Within each section, sort findings by designator (alphanumeric).
|
|
42
|
+
3. The `Summary` counts must match the findings listed above.
|
|
43
|
+
4. The `Recommendations` section is omitted entirely when there are zero
|
|
44
|
+
findings.
|
|
45
|
+
5. Timestamps use the ISO-8601 format (`2026-07-17T12:34:56Z`).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Review Style Guide
|
|
2
|
+
|
|
3
|
+
## Tone
|
|
4
|
+
|
|
5
|
+
- **Direct and technical.** The audience is a hardware engineer reviewing a
|
|
6
|
+
schematic — avoid hedging or marketing language.
|
|
7
|
+
- **Evidence-first.** Every finding must cite the designator, net name, or
|
|
8
|
+
rule id that triggered it. Never state "this might be wrong" without naming
|
|
9
|
+
the exact component and the violated rule.
|
|
10
|
+
|
|
11
|
+
## Severity Definitions
|
|
12
|
+
|
|
13
|
+
| Severity | Meaning | Blocks production? |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `CRITICAL` | Electrical safety or functionality risk. | Yes |
|
|
16
|
+
| `WARNING` | Likely a problem; user should review. | No |
|
|
17
|
+
| `INFO` | Suggestion or style note. | No |
|
|
18
|
+
|
|
19
|
+
## Finding Format
|
|
20
|
+
|
|
21
|
+
Every finding line MUST follow this shape:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
- [rule-id] <component designator or net name>: <one-line description>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
```
|
|
29
|
+
- [erc-1] U3 pin 14 (VDD): unconnected power pin
|
|
30
|
+
- [bom-2] R5/R6: duplicate MPN ABC123 on differing footprints (0603 vs 0805)
|
|
31
|
+
- [sch-2] VCC: power rail uses implicit wire join, expected named label
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Forbidden Patterns
|
|
35
|
+
|
|
36
|
+
- Do **not** use first-person voice ("I think", "I found").
|
|
37
|
+
- Do **not** propose fixes in the findings list — fixes belong in a separate
|
|
38
|
+
"Recommendations" section.
|
|
39
|
+
- Do **not** reference capability ids in user-facing findings — the user sees
|
|
40
|
+
designators and net names, not skill ids.
|
|
41
|
+
- Do **not** group by capability; group by severity, then by designator.
|
package/skill.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.huaqiu.com/skills/v1/skill.schema.json",
|
|
3
|
+
"id": "hqeda",
|
|
4
|
+
"name": "HQ EDA Official Skill",
|
|
5
|
+
"vendor": "Huaqiu Electronics",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"description": "Executable capabilities and review playbooks for HQ EDA.",
|
|
8
|
+
"skillMarkdown": "./SKILL.md",
|
|
9
|
+
"entry": "./dist/index.js",
|
|
10
|
+
"capabilities": [
|
|
11
|
+
"ai-execute-prompt",
|
|
12
|
+
"bom-get-bom",
|
|
13
|
+
"canvas-align-objects",
|
|
14
|
+
"canvas-can-paste",
|
|
15
|
+
"canvas-clear-all-sel",
|
|
16
|
+
"canvas-copy-selected",
|
|
17
|
+
"canvas-delete-selected",
|
|
18
|
+
"canvas-distribute-objects",
|
|
19
|
+
"canvas-get-align-type",
|
|
20
|
+
"canvas-get-selected-object-json",
|
|
21
|
+
"canvas-get-selected-objects-json",
|
|
22
|
+
"canvas-mirror-objects",
|
|
23
|
+
"canvas-move-selected-objs",
|
|
24
|
+
"canvas-on-canvas-escape",
|
|
25
|
+
"canvas-pan-canvas",
|
|
26
|
+
"canvas-paste-selected",
|
|
27
|
+
"canvas-rotate-objects",
|
|
28
|
+
"canvas-screen-to-canvas-local",
|
|
29
|
+
"canvas-select-all",
|
|
30
|
+
"canvas-select-object-at",
|
|
31
|
+
"canvas-set-align-type",
|
|
32
|
+
"canvas-set-page-size",
|
|
33
|
+
"canvas-set-page-size-rect",
|
|
34
|
+
"canvas-zoom-all",
|
|
35
|
+
"canvas-zoom-area-by-double-box",
|
|
36
|
+
"canvas-zoom-area-by-int-box",
|
|
37
|
+
"canvas-zoom-area-by-points",
|
|
38
|
+
"canvas-zoom-in",
|
|
39
|
+
"canvas-zoom-out",
|
|
40
|
+
"canvas-zoom-selected",
|
|
41
|
+
"capability-get-capabilities",
|
|
42
|
+
"context-get-context",
|
|
43
|
+
"discovery-get-server-info",
|
|
44
|
+
"erc-clear-all-findings",
|
|
45
|
+
"erc-clear-findings",
|
|
46
|
+
"erc-run-checks",
|
|
47
|
+
"erc-set-erc-report-webview-visibility",
|
|
48
|
+
"erc-set-report-webview-state",
|
|
49
|
+
"erc-show-findings",
|
|
50
|
+
"event-subscribe",
|
|
51
|
+
"export-export-bom",
|
|
52
|
+
"export-export-target",
|
|
53
|
+
"graph-get-connectivity",
|
|
54
|
+
"graph-query-graph",
|
|
55
|
+
"import-import-design",
|
|
56
|
+
"kernel-get-entity",
|
|
57
|
+
"kernel-get-snapshot",
|
|
58
|
+
"obj-place-add-bus-segment",
|
|
59
|
+
"obj-place-add-ellipse",
|
|
60
|
+
"obj-place-add-free-line-segment",
|
|
61
|
+
"obj-place-add-line",
|
|
62
|
+
"obj-place-add-rect",
|
|
63
|
+
"obj-place-add-wire-segment",
|
|
64
|
+
"obj-place-cancel-bus-draw",
|
|
65
|
+
"obj-place-cancel-ellipse-arc-draw",
|
|
66
|
+
"obj-place-cancel-ellipse-draw",
|
|
67
|
+
"obj-place-cancel-free-line-draw",
|
|
68
|
+
"obj-place-cancel-line-draw",
|
|
69
|
+
"obj-place-cancel-rect-draw",
|
|
70
|
+
"obj-place-cancel-wire-draw",
|
|
71
|
+
"obj-place-handle-bus-draw-click",
|
|
72
|
+
"obj-place-handle-ellipse-arc-draw-click",
|
|
73
|
+
"obj-place-handle-ellipse-draw-click",
|
|
74
|
+
"obj-place-handle-free-line-draw-click",
|
|
75
|
+
"obj-place-handle-image-draw-click",
|
|
76
|
+
"obj-place-handle-line-draw-click",
|
|
77
|
+
"obj-place-handle-net-alias-draw-click",
|
|
78
|
+
"obj-place-handle-rect-draw-click",
|
|
79
|
+
"obj-place-handle-table-draw-click",
|
|
80
|
+
"obj-place-handle-text-draw-click",
|
|
81
|
+
"obj-place-handle-wire-draw-click",
|
|
82
|
+
"obj-place-place-bus",
|
|
83
|
+
"obj-place-place-ellipse",
|
|
84
|
+
"obj-place-place-ellipse-arc",
|
|
85
|
+
"obj-place-place-ellipse-arc-from-virtual",
|
|
86
|
+
"obj-place-place-free-line",
|
|
87
|
+
"obj-place-place-image",
|
|
88
|
+
"obj-place-place-line",
|
|
89
|
+
"obj-place-place-net-alias",
|
|
90
|
+
"obj-place-place-rect",
|
|
91
|
+
"obj-place-place-table",
|
|
92
|
+
"obj-place-place-table-from-virtual",
|
|
93
|
+
"obj-place-place-text",
|
|
94
|
+
"obj-place-place-text-from-virtual",
|
|
95
|
+
"obj-place-place-wire",
|
|
96
|
+
"placement-cancel-block-draw",
|
|
97
|
+
"placement-clear-net-alias-attach-obj",
|
|
98
|
+
"placement-handle-block-draw-click",
|
|
99
|
+
"placement-handle-part-draw-click",
|
|
100
|
+
"placement-handle-symbol-draw-click",
|
|
101
|
+
"placement-place-block",
|
|
102
|
+
"placement-place-part",
|
|
103
|
+
"placement-place-symbol",
|
|
104
|
+
"placement-set-net-alias-attach-obj",
|
|
105
|
+
"project-close-project",
|
|
106
|
+
"project-get-active-project",
|
|
107
|
+
"project-get-project",
|
|
108
|
+
"project-list-open-projects",
|
|
109
|
+
"project-open-project",
|
|
110
|
+
"project-save-project",
|
|
111
|
+
"runtime-execute-commands",
|
|
112
|
+
"runtime-validate-commands",
|
|
113
|
+
"selection-clear-selection",
|
|
114
|
+
"selection-get-selection",
|
|
115
|
+
"selection-set-selection",
|
|
116
|
+
"transaction-commit",
|
|
117
|
+
"transaction-open",
|
|
118
|
+
"transaction-redo",
|
|
119
|
+
"transaction-rollback",
|
|
120
|
+
"transaction-undo"
|
|
121
|
+
],
|
|
122
|
+
"playbooks": [
|
|
123
|
+
"playbooks/bom-review.json",
|
|
124
|
+
"playbooks/schematic-review.json",
|
|
125
|
+
"playbooks/erc-review.json",
|
|
126
|
+
"playbooks/manufacturing-review.json"
|
|
127
|
+
],
|
|
128
|
+
"resources": {
|
|
129
|
+
"guides": "./guides",
|
|
130
|
+
"prompts": "./prompts"
|
|
131
|
+
}
|
|
132
|
+
}
|