@fateforge/xpedition-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.agent/AGENT.md +59 -0
  2. package/.agent/AGENT_zh.md +59 -0
  3. package/.agent/CLI-SPEC.md +1073 -0
  4. package/.agent/CLI-SPEC_zh.md +891 -0
  5. package/.agent/SEC-SPEC.md +158 -0
  6. package/.agent/SEC-SPEC_zh.md +132 -0
  7. package/.agent/SKILL-SPEC.md +266 -0
  8. package/.agent/SKILL-SPEC_zh.md +221 -0
  9. package/.agent/SPEC_VERSION +1 -0
  10. package/AGENTS.md +34 -0
  11. package/AGENTS_zh.md +33 -0
  12. package/CHANGELOG.md +795 -0
  13. package/CODE_OF_CONDUCT.md +35 -0
  14. package/CODE_OF_CONDUCT_zh.md +35 -0
  15. package/CONTRIBUTING.md +50 -0
  16. package/CONTRIBUTING_zh.md +42 -0
  17. package/LICENSE +21 -0
  18. package/NOTICE.md +16 -0
  19. package/NOTICE_zh.md +13 -0
  20. package/README.md +200 -0
  21. package/README_zh.md +178 -0
  22. package/SECURITY.md +108 -0
  23. package/SECURITY_zh.md +83 -0
  24. package/docs/AGENT_HARDENING_EVIDENCE.md +102 -0
  25. package/docs/AGENT_READS.md +74 -0
  26. package/docs/AGENT_READS_METRICS.json +216 -0
  27. package/docs/AGENT_READS_VALIDATION.json +13 -0
  28. package/docs/API_INVENTORY_BINDING_VALIDATION.json +16 -0
  29. package/docs/API_INVENTORY_DESIGN.md +90 -0
  30. package/docs/API_INVENTORY_REVIEW.md +59 -0
  31. package/docs/API_INVENTORY_VALIDATION.json +29 -0
  32. package/docs/API_INVENTORY_WINDOWS_VALIDATION.json +29 -0
  33. package/docs/COMPATIBILITY.md +499 -0
  34. package/docs/CONFIRMATION_CONCURRENCY_VALIDATION.json +33 -0
  35. package/docs/DIAGNOSTIC_BOUNDARIES.md +33 -0
  36. package/docs/DIAGNOSTIC_BOUNDARIES_VALIDATION.json +12 -0
  37. package/docs/E2E.md +445 -0
  38. package/docs/EVALS.md +134 -0
  39. package/docs/MCP.md +20 -0
  40. package/docs/NATIVE_ADAPTER.md +141 -0
  41. package/docs/OPEN_SOURCE_CHECKLIST.md +61 -0
  42. package/docs/OPEN_SOURCE_CHECKLIST_zh.md +61 -0
  43. package/docs/PIN_WORKFLOW_VALIDATION.json +28 -0
  44. package/docs/PLACEMENT_TASKS.md +99 -0
  45. package/docs/PLACEMENT_TASKS_VALIDATION.json +36 -0
  46. package/docs/REFERENCE_ADOPTION.md +67 -0
  47. package/package.json +48 -0
  48. package/scripts/run.js +46 -0
  49. package/skills/xpedition-cli/SKILL.md +300 -0
  50. package/skills/xpedition-cli/reference/agent-hardening.md +58 -0
  51. package/skills/xpedition-cli/reference/api-inventory.md +58 -0
  52. package/skills/xpedition-cli/reference/confirmation-safety.md +55 -0
  53. package/skills/xpedition-cli/test-prompts.json +62 -0
  54. package/skills/xpedition-pcb/SKILL.md +244 -0
  55. package/skills/xpedition-pcb/reference/fabrication.md +26 -0
  56. package/skills/xpedition-pcb/reference/hand-routing.md +33 -0
  57. package/skills/xpedition-pcb/reference/pcb-conventions.md +162 -0
  58. package/skills/xpedition-pcb/reference/placement-tasks.md +28 -0
  59. package/skills/xpedition-pcb/test-prompts.json +62 -0
  60. package/skills/xpedition-schematic/SKILL.md +244 -0
  61. package/skills/xpedition-schematic/reference/pin-assignment.md +61 -0
  62. package/skills/xpedition-schematic/reference/schematic-conventions.md +306 -0
  63. package/skills/xpedition-schematic/reference/schematic-design-format.md +219 -0
  64. package/skills/xpedition-schematic/test-prompts.json +52 -0
@@ -0,0 +1,244 @@
1
+ ---
2
+ name: xpedition-pcb
3
+ version: "1.0.0"
4
+ description: "Handles board work in Xpedition Layout through the xpedition-cli tool: builds the board from a drawn schematic, forward-annotates it and brings it up to date after the schematic or a footprint changes, then the outline, mounting holes, placement, copper pours, net classes and trace widths, autorouting or planned hand routing, DRC, board renders and screenshots, and the fabrication package (Gerber, NC drill, ODB++, centroid). Use when the user asks to lay out, place or move parts on, route, DRC-check, render or export the PCB of an Xpedition project, including a part move given in mm, even without the word Xpedition. Not for the schematic, pin planning or footprint mapping (xpedition-schematic), or for install, doctor, sessions and Layout connection failures, project creation, the BOM and ChangeSet writes (the xpedition-cli Skill, loaded before this one)."
5
+ license: MIT
6
+ user-invocable: true
7
+ metadata: {"requires":{"bins":["xpedition-cli"],"skills":["xpedition-cli"],"min_version":"1.0.0"}}
8
+ ---
9
+
10
+ # xpedition-pcb
11
+
12
+ Read `../xpedition-cli/SKILL.md` before running any command. It carries what
13
+ every xpedition-cli task needs and this Skill does not repeat: the install, the
14
+ first step (`context`, `doctor`, `reference`), native sessions, the dry-run →
15
+ confirm recipe, the error decision tree, the security boundary and the
16
+ `_untrusted` rule. If that file is missing, STOP CHECKPOINT: tell the user the
17
+ xpedition-cli entry Skill is not installed and, once they agree, install the
18
+ family with `npx skills add fatecannotbealtered/xpedition-cli -y -g`.
19
+
20
+ This Skill covers the board in Xpedition Layout, from packaging a drawn
21
+ schematic to the fabrication package.
22
+
23
+ ## When to use
24
+
25
+ Use this Skill for:
26
+
27
+ - turning a drawn schematic into a board: package the parts, create the board,
28
+ forward-annotate;
29
+ - the first layout: outline, mounting holes, placement, pours, net classes,
30
+ autorouting and DRC;
31
+ - routing by hand, moving parts and small local placement adjustments;
32
+ - looking at a board and reading it back;
33
+ - the fabrication package.
34
+
35
+ Do not use it for the schematic, pin planning or footprint mapping
36
+ (xpedition-schematic), or for the BOM or creating a project (xpedition-cli).
37
+ Never present an autorouted board or a generated placement as signed off: both
38
+ are starting points for a person.
39
+
40
+ ## Before a board task
41
+
42
+ `pcb *` commands run in Xpedition Layout, except `pcb stitch` and
43
+ `pcb placement-plan`, which work from files. Check `doctor`'s `native_session` for
44
+ what is attached and start Layout explicitly with `session start --backend
45
+ native_xpedition --kind pcb`. `--backend` defaults to `mock`, so every native
46
+ command names `--backend native_xpedition --project X.prj`; the short forms in
47
+ the prose leave both out. Read `reference/pcb-conventions.md` before touching a
48
+ board: the rules in this Skill are its non-negotiable subset, and only a
49
+ company rule changes them. `reference --compact` stays the source of truth for
50
+ commands and parameters. When `context` lists a knowledge-base document for
51
+ board work, read it first: its rules replace the design defaults, here and in
52
+ the conventions, and settle the TBDs; the verified facts and the write safety
53
+ rules stand (see Company knowledge base in the entry Skill).
54
+
55
+ Every write is shown as its dry run: inspect the preview, then run the same
56
+ command with `--confirm <confirm_token>` in place of `--dry-run`. The token is
57
+ bound to the arguments, so change nothing else.
58
+
59
+ While a board opens, Layout may ask about a stale lock, database recovery or
60
+ forward annotation; the adapter answers them and lists what it pressed under
61
+ `prompts`. If a result carries a prompt you did not expect, read it before
62
+ going on.
63
+
64
+ A MockBackend read needs no Layout:
65
+
66
+ ```bash
67
+ xpedition-cli pcb info --backend mock --project ./demo-project.json --compact
68
+ ```
69
+
70
+ ## From the schematic to a board
71
+
72
+ Three guarded steps, each `--dry-run` then `--confirm`, then a read-back:
73
+ `library build --design FILE --package` (padstacks, cells and parts for every
74
+ part — placeholder cells unless the design names KiCad footprints — imported into
75
+ the project's central library, then packaged), `pcb create` (the board from the
76
+ library's `4 Layer Template` through JobWizard; `--template` for another), `pcb
77
+ annotate` (Layout's forward annotation: the packaged parts and nets arrive
78
+ unplaced), then `pcb info` and `pcb components` to read the board back. Report
79
+ done only when `pcb annotate` says `outcome: annotated` (`annotated_on_open` and
80
+ `in_synch` count too) with no `errors`, and the counts match the schematic.
81
+
82
+ `FILE` is the design file the schematic was drawn from. Its `packages` choose
83
+ the footprints; see the drawing conventions in `../xpedition-schematic/SKILL.md`.
84
+
85
+ ```bash
86
+ xpedition-cli session start --backend native_xpedition --kind pcb --compact
87
+ xpedition-cli library build --backend native_xpedition --project X.prj --design design.json --package --dry-run --compact
88
+ xpedition-cli pcb create --backend native_xpedition --project X.prj --dry-run --compact
89
+ xpedition-cli pcb annotate --backend native_xpedition --project X.prj --dry-run --compact
90
+ xpedition-cli pcb info --backend native_xpedition --project X.prj --compact
91
+ xpedition-cli pcb components --backend native_xpedition --project X.prj --compact
92
+ ```
93
+
94
+ ## First layout
95
+
96
+ Forward-annotated parts are invisible until placed. The first layout is a
97
+ handful of commands in this order; 1–7 are guarded writes, each `--dry-run` then
98
+ `--confirm`, and 8–9 are reads to run directly:
99
+
100
+ 1. `pcb outline --width W --height H --radius 3`: a rectangle from the origin
101
+ with rounded corners, replacing the board's outline.
102
+ 2. `pcb holes`: a mounting hole in each corner; do it before the arrangement so
103
+ the planner keeps the corners clear (`--replace` once the outline has grown).
104
+ 3. `pcb arrange --design FILE`: one cluster per IC with its parts around it,
105
+ decoupling nearest, rows and columns on one pitch, centres on a 0.5 mm grid,
106
+ room above every part for its designator, clusters in rows by sheet,
107
+ connectors on the side edges with their designators inward, test points
108
+ along the bottom, a zone label per sheet from the design file's `zone`;
109
+ `--all` to move parts that are already placed; each part of a cluster stands
110
+ beside the IC pin it connects to, its own pad facing that pin. Its dry run
111
+ sizes the board: `summary.outside` names parts the outline could not hold,
112
+ which means a bigger outline (steps 1 and 2 again), not a smaller gap — 70 ×
113
+ 48 mm held the 39-part board of the recorded end-to-end run on real
114
+ footprints, with room for every designator. A confirmed arrange deletes every
115
+ trace and via on the board first and reports what it removed; on a routed
116
+ board its dry run says `dangerous` and the confirm needs `--dangerous`.
117
+ 4. `pcb pour --net GND --layer 2`: a copper plane inset from the outline,
118
+ rounded like it; `--replace` after the outline changed.
119
+ 5. `pcb rules --class POWER --nets VBAT,+3V3 --width 0.5`: a net class with its
120
+ trace widths on every layer, written through Constraint Manager; supply nets
121
+ get 0.5 mm, signals keep the template's 0.254 mm; the result must say
122
+ `seen_by_layout`.
123
+ 6. `pcb route --layers 1,4`: Layout's autorouter on the outer layers only:
124
+ Route at effort 1–5, Via Min, Smooth; `--unroute` to start over.
125
+ 7. `pcb pour --net GND --layer 1` and `--layer 4`, the outer-layer ground
126
+ pours: after routing, never before: a pour in place makes the router count
127
+ the ground net as done while the copper leaves pins cut off.
128
+ 8. `pcb drc`: Layout's Batch DRC, every hazard listed with its kind, objects
129
+ and position; `errors` and `warnings` apart, `passes` when there are no
130
+ errors.
131
+ 9. `pcb render --output board.png`: the board drawn from its geometry in KiCad's
132
+ colours, `--side bottom` for the other side.
133
+
134
+ The result of `pcb route` says `complete` and lists `unrouted` nets with their
135
+ open count; a net that stays open next to a fine-pitch part is a rule problem
136
+ (0.254 mm traces and clearances on the stock templates), not a router problem.
137
+ Report a board as checked only when `pcb drc` says `passes` and you can name
138
+ each warning kind and why it is acceptable (`ViasUnderParts` — vias under
139
+ surface-mount bodies, tented — is; overlapping pads or partial nets are errors
140
+ and are not).
141
+
142
+ The placement is a starting point for a person, not a layout. `pcb arrange`
143
+ lists each part's `x`/`y` in millimetres and `read_back` proves the placement.
144
+
145
+ ```bash
146
+ xpedition-cli pcb outline --backend native_xpedition --project X.prj --width W --height H --radius 3 --dry-run --compact
147
+ xpedition-cli pcb holes --backend native_xpedition --project X.prj --dry-run --compact
148
+ # confirm the arrange only once its dry run leaves nothing in summary.outside
149
+ xpedition-cli pcb arrange --backend native_xpedition --project X.prj --design design.json --dry-run --compact
150
+ xpedition-cli pcb pour --backend native_xpedition --project X.prj --net GND --layer 2 --dry-run --compact
151
+ xpedition-cli pcb rules --backend native_xpedition --project X.prj --class POWER --nets VBAT,+3V3 --width 0.5 --dry-run --compact
152
+ xpedition-cli pcb route --backend native_xpedition --project X.prj --layers 1,4 --dry-run --compact
153
+ xpedition-cli pcb pour --backend native_xpedition --project X.prj --net GND --layer 1 --dry-run --compact
154
+ xpedition-cli pcb pour --backend native_xpedition --project X.prj --net GND --layer 4 --dry-run --compact
155
+ xpedition-cli pcb drc --backend native_xpedition --project X.prj --compact
156
+ xpedition-cli pcb render --backend native_xpedition --project X.prj --output board.png --compact
157
+ ```
158
+
159
+ ## Moving parts
160
+
161
+ One part: `pcb move --refdes R1 --to x,y --rotate 90`. Its traces stay where
162
+ they were, so check the routing afterwards (`pcb drc`, `pcb render`) and route
163
+ again where it broke; Layout refuses a position that touches another part.
164
+ Several parts, aligned or distributed: use the selected-placement workflow
165
+ (`pcb placement-plan`, `pcb placement`) and read `reference/placement-tasks.md`,
166
+ which states its native evidence and partial-execution boundaries. Never use
167
+ `pcb arrange` for a small edit.
168
+
169
+ ```bash
170
+ xpedition-cli pcb components --backend native_xpedition --project X.prj --compact
171
+ xpedition-cli pcb move --backend native_xpedition --project X.prj --refdes R12 --to 34,35.5 --dry-run --compact
172
+ ```
173
+
174
+ ## Looking at the board
175
+
176
+ `pcb show --output board.png` puts the board in front of the person; look at it
177
+ yourself too. Layout opens the stock templates under the `Loc: Assembly Bottom`
178
+ display scheme, which hides top-side parts, so a board that "looks empty" after
179
+ annotation or placement usually needs this, not a fix; `pcb show` switches to
180
+ `Loc: All On` (or `--scheme`). When the person looks at Layout's own screen,
181
+ `pcb show --top-view`: the stock schemes draw the pours as outlines and every
182
+ layer at once, so a poured, routed board looks bare and crowded until that
183
+ scheme is picked.
184
+
185
+ `pcb render --output board.png` needs no screen, unlike `pcb show --output`,
186
+ which captures a black PNG while the desktop is locked. A render does not
187
+ overwrite an existing file without `--replace`.
188
+
189
+ ## After a cell changed
190
+
191
+ After `library build` changed a cell that is already on the board, annotate
192
+ again and the part keeps its old cell: Layout never swaps the cell of an
193
+ existing component. Recreate the board instead: `pcb create --replace`, then
194
+ `pcb annotate`, `pcb outline`, `pcb holes`, `pcb arrange`, `pcb pour`, `pcb
195
+ rules`, `pcb route`, the outer pours — about three minutes, all through the CLI.
196
+
197
+ STOP CHECKPOINT: `pcb create --replace` archives the existing layout folder to a
198
+ zip beside the project and deletes it. Confirm only with the user's go-ahead for
199
+ that board (the confirm needs `--dangerous`), and report the archive path.
200
+
201
+ ## Handing over
202
+
203
+ Placeholder cells are placeholders: right pin count and rough size, nothing a
204
+ factory can use. Say so when handing over, and keep real cells from the
205
+ company's library as the follow-up. With a fabrication package, also say that its
206
+ README leaves board thickness, finish and mask colour to the board house
207
+ (`pcb export` takes no such options); pass on any the person named separately.
208
+
209
+ STOP CHECKPOINT: ask the user before confirming a board write they have not
210
+ asked for, and before any that discards work: `pcb arrange` on a routed board (a
211
+ confirmed arrange deletes every trace and via first; `--all` also moves the parts
212
+ already placed), `pcb route --unroute`, `pcb unroute`, `pcb annotate --unroute`,
213
+ `pcb pour --replace` or `pcb holes --replace` on pours or holes that were there
214
+ before this task (redoing the ones this layout just made, after the outline grew,
215
+ is part of the first layout), or any confirm whose preview lists something it
216
+ deletes or removes. The ones whose preview says `dangerous` -- routing
217
+ deleted with no archive, a layout replaced -- also need `--dangerous` next to the
218
+ token; add it only after the user agreed to that loss.
219
+
220
+ ## References
221
+
222
+ | Task | Read |
223
+ | --- | --- |
224
+ | Any board edit | `reference/pcb-conventions.md` |
225
+ | Routing a net or a board by hand | `reference/hand-routing.md` |
226
+ | Sending the board out | `reference/fabrication.md` |
227
+ | Aligning or distributing a set of parts | `reference/placement-tasks.md` |
228
+
229
+ ## Eval Scenarios
230
+
231
+ - Entry first: read `../xpedition-cli/SKILL.md` before any command; with it
232
+ missing, stop and ask before installing the family.
233
+ - Schematic to board: package, create and annotate with a dry run each; done
234
+ only on `outcome: annotated` (`annotated_on_open`, `in_synch`) with matching
235
+ counts.
236
+ - First layout: the outline grown until the arrange dry run leaves nothing
237
+ outside, holes before the arrangement, the outer ground pours only after
238
+ routing, and "checked" only when `pcb drc` passes with every warning kind
239
+ explained.
240
+ - Work that goes: a confirmed arrange deletes all routing and `pcb create
241
+ --replace` archives the layout; both stop for the user, and `--dangerous` is
242
+ added only after the user agreed.
243
+ - One part: `pcb move`, never `pcb arrange`, and the routing checked afterwards.
244
+ - Boundary: a schematic drawing or BOM request is not this Skill's.
@@ -0,0 +1,26 @@
1
+ # Fabrication package
2
+
3
+ To send the board out: `pcb export --output DIR` (`--dry-run` then `--confirm`)
4
+ writes Layout's ODB++, Gerber (RS-274X) and NC drill outputs and gathers them
5
+ into `DIR`: `gerber/*.gbr` (empty and duplicate files left out), `drill/*.drl`,
6
+ the ODB++ job as a zip, `centroid.csv`, `bom.csv`, `README.md` for the board
7
+ house and `manifest.json` with `checks`. Report the package as ready only when
8
+ `checks.ok` is true; `problems` names what is missing (a silkscreen, an outline,
9
+ a drill layer). The first run on a board closes and reopens it in Layout to
10
+ patch the output setups; later runs do not. The README leaves board thickness,
11
+ finish and mask colour to the board house (`pcb export` takes no such options);
12
+ pass on any the person names separately.
13
+
14
+ `checks` covers what the package contains, not the board's design rules, so run
15
+ `pcb drc` first: a board that does not pass is not ready to send.
16
+
17
+ `manufacturing artifacts` and `manufacturing verify` read the artifact records a
18
+ project stores, and `manufacturing bom` lists BOM rows built from its
19
+ components; none of them produces files.
20
+
21
+ ```bash
22
+ xpedition-cli pcb drc --backend native_xpedition --project X.prj --compact
23
+ xpedition-cli pcb export --backend native_xpedition --project X.prj --output ./fab --dry-run --compact
24
+ ```
25
+
26
+ Confirm with the same arguments and the returned token.
@@ -0,0 +1,33 @@
1
+ # Routing by hand
2
+
3
+ For the person's layout, when the autorouter's is not good enough. Native
4
+ commands name `--backend native_xpedition --project X.prj`; every write is a
5
+ dry run first, then the same command with `--confirm <confirm_token>`.
6
+
7
+ `pcb geometry --output board.json` gives every pad, pin, trace, via and plane;
8
+ plan the traces yourself (a `PlanBuilder` from `xpedition_cli.routing_plan`
9
+ resolves pin names and checks angles and clearances; `pcb stitch --geometry
10
+ board.json --net GND` plans the ground vias without Layout, a plan to draw with
11
+ `pcb trace --file`), then `pcb trace --file plan.json --geometry board.json`
12
+ (`--dry-run` shows the nearest pin of every trace end and the offline check;
13
+ `--confirm` draws; Layout's online DRC refuses an item that violates a rule and
14
+ the result names it), read `opens_after` per net and `pcb render` to look. Fix a
15
+ wrong piece with `pcb unroute --at x,y --layer N` (its confirm takes `--dangerous`:
16
+ the routing it deletes is not archived) and draw it again; move a part
17
+ with `pcb move --refdes R1 --to x,y --rotate 90`; when someone is watching
18
+ Layout's screen, `--pace 0.15` on `pcb trace` / `pcb via` / `pcb arrange` makes
19
+ the items land one at a time instead of in a burst; tidy the designators with
20
+ `pcb labels`.
21
+
22
+ Widths: 0.254 mm signals, 0.5 mm supply (the POWER class), 0.3 mm ground stubs
23
+ (raise the default class's expansion width first). Keep 0.254 mm from any pad a
24
+ via does not sit inside; a test point is a surface-mount pad, so an inner-layer
25
+ run to it needs a via beside it; pour the outer layers after the traces are in,
26
+ then stitch every ground pad with a via. A 39-part board took two rounds this
27
+ way: 129 traces, 41 vias, DRC clean.
28
+
29
+ ```bash
30
+ xpedition-cli pcb geometry --backend native_xpedition --project X.prj --output board.json --compact
31
+ xpedition-cli pcb stitch --geometry board.json --net GND --output stitch.json --compact
32
+ xpedition-cli pcb trace --backend native_xpedition --project X.prj --file plan.json --geometry board.json --dry-run --compact
33
+ ```
@@ -0,0 +1,162 @@
1
+ # PCB layout conventions for Xpedition Layout
2
+
3
+ Defaults an agent applies when it creates or edits a board. Nothing here is
4
+ enforced by the CLI: the Skill's commands create, place, route and check a board,
5
+ but every value below is a **default** (industry practice) unless marked
6
+ **verified**. Company rules supersede defaults: when `context` lists a
7
+ knowledge-base document for board work, read it first (**TBD** marks where a
8
+ company decision is still expected). `reference --compact` is the source of
9
+ truth for commands.
10
+
11
+ Contents
12
+
13
+ 1. Scope and units
14
+ 2. Stackup
15
+ 3. Net classes: width and clearance
16
+ 4. Vias
17
+ 5. Placement
18
+ 6. Routing
19
+ 7. Copper and planes
20
+ 8. Silkscreen, assembly and test
21
+ 9. Manufacturing outputs
22
+ 10. Checklist
23
+ 11. Sources
24
+
25
+ ## 1. Scope and units
26
+
27
+ - Work in mm. Every `pcb` command and read takes and reports millimetres,
28
+ whatever unit the board displays; only a ChangeSet place or move without a
29
+ `unit` uses the board's current unit.
30
+ - A board comes from the CLI: `library build --package` builds and packages the
31
+ parts, `pcb create` makes the board from a template through JobWizard and `pcb
32
+ annotate` forward-annotates it; the Skill has the order.
33
+ - Produce ODB++ alongside Gerber: DFM and assembly tools commonly read it.
34
+
35
+ ## 2. Stackup
36
+
37
+ | Layers | Order (top to bottom) | Use |
38
+ |---|---|---|
39
+ | 2 | SIG + GND pour, SIG + GND pour | simple boards without controlled impedance |
40
+ | 4 | SIG, GND, PWR, SIG | default for MCU + USB + charger class boards |
41
+ | 6 | SIG, GND, SIG, PWR, GND, SIG | when 4 layers cannot route or two reference planes are needed |
42
+
43
+ - Every signal layer adjacent to a solid reference plane.
44
+ - 1 oz (35 µm) outer copper by default; 2 oz for rails above 3 A.
45
+ - Total thickness 1.0 or 1.6 mm unless mechanics say otherwise (TBD).
46
+
47
+ ## 3. Net classes: width and clearance
48
+
49
+ Defaults for 1 oz copper; the fab's capability sheet sets the floor (TBD). The
50
+ stock templates ship 0.254 mm width and clearance, and the Skill keeps signals
51
+ there; the SIGNAL row is the target once the fab's capability sheet allows it.
52
+
53
+ | Class | Width | Clearance | Notes |
54
+ |---|---|---|---|
55
+ | SIGNAL (default) | 0.15 mm | 0.15 mm | 6/6 mil; 0.1/0.1 mm only for BGA escape |
56
+ | POWER | by current: ≥ 0.3 mm per A on outer layers, ≥ 0.6 mm per A on inner layers, 10 °C rise | 0.2 mm | IPC-2221 sizing; recompute for the real copper weight; pours preferred above 1 A |
57
+ | USB2_DIFF | 90 Ω differential per stackup | pair gap per stackup | coupled and length-matched (§6) |
58
+ | DIFF_100 | 100 Ω differential per stackup | pair gap per stackup | |
59
+ | RF_50 | 50 Ω single-ended per stackup | | keep-out both sides |
60
+ | HIGH_VOLTAGE | class width | per the IPC-2221 voltage table | battery packs and mains-adjacent nets |
61
+
62
+ - Copper to board edge ≥ 0.3 mm; components to board edge ≥ 1 mm.
63
+
64
+ ## 4. Vias
65
+
66
+ | Type | Drill / pad | Use |
67
+ |---|---|---|
68
+ | Standard | 0.3 / 0.6 mm | everything |
69
+ | Minimum | 0.2 / 0.45 mm | dense escape only |
70
+ | Power | at least 2 vias per ampere per layer change | rails |
71
+
72
+ - No via in an SMT pad unless filled and capped; via to pad ≥ 0.2 mm.
73
+ - A ground via next to every signal-layer change; a via fence every ≤ 5 mm
74
+ along RF sections and the board edge of RF boards.
75
+
76
+ ## 5. Placement
77
+
78
+ - Mechanics first: connectors, switches, LEDs and mounting holes where the
79
+ enclosure needs them; keep-out ring ≥ 1 mm around mounting holes (TBD washer
80
+ size).
81
+ - Decoupling: each supply pin has its capacitor ≤ 2 mm away on the same side
82
+ with the shortest path to a ground via; the smallest value closest to the pin.
83
+ - Crystal ≤ 10 mm from its IC, nothing routed underneath, ground fill around it.
84
+ - Switching converters (charger, boost): input capacitor, switch, inductor and
85
+ output capacitor in the smallest loop; the switch node is a small island.
86
+ - Thermal: heat sources spaced apart and over copper; temperature sensors and
87
+ thermistors away from them at the distance the design note specifies.
88
+ - Group by function following the schematic sheets; single-side SMT preferred,
89
+ bottom side for passives only when the assembly process allows (TBD).
90
+ - Polarised parts oriented consistently.
91
+
92
+ ## 6. Routing
93
+
94
+ - 45° bends or arcs; no acute angles, stubs or loops.
95
+ - Continuous return path: no trace crosses a plane split; every layer change
96
+ has a nearby ground via.
97
+ - Differential pairs routed together at the class gap; USB 2.0 intra-pair
98
+ mismatch ≤ 1.25 mm (common design-guide value; the platform guide wins).
99
+ - Sensitive analog nets (battery sense, thermistor, regulator feedback) short
100
+ and away from switch nodes and inductors; the feedback divider next to the IC.
101
+ - No routing under crystals, switcher inductors or antenna keep-outs; antenna
102
+ areas have no copper on any layer, per the module datasheet.
103
+
104
+ ## 7. Copper and planes
105
+
106
+ - Solid ground plane unbroken under signal areas; power planes split only along
107
+ rail boundaries and never under a differential pair.
108
+ - Ground pour on outer layers with stitching vias every ≤ 5 mm; no dead copper
109
+ islands.
110
+ - Thermal reliefs on through-hole and hand-soldered pads; direct connection on
111
+ SMT power pads.
112
+ - Pour clearance equals the class clearance; minimum pour width 0.2 mm.
113
+
114
+ ## 8. Silkscreen, assembly and test
115
+
116
+ - A refdes on silk for every part, readable in at most two orientations, never
117
+ on pads or vias; text ≥ 0.8 mm high, line ≥ 0.15 mm (TBD fab capability).
118
+ - Polarity and pin-1 marks for diodes, LEDs, electrolytic capacitors,
119
+ connectors and ICs.
120
+ - Fiducials: 3 per SMT side, 1 mm copper dot with a 3 mm mask opening, ≥ 5 mm
121
+ from the edge; local fiducials for fine-pitch BGA and QFN.
122
+ - Test points on rails, ground, UART, reset and battery sense: ≥ 1 mm pad,
123
+ 2.54 mm pitch preferred, one side.
124
+ - Solder-mask dam ≥ 0.1 mm between pads; mask expansion 0.05 mm unless the fab
125
+ says otherwise.
126
+ - Panel rails, tooling holes and breakaway per the assembler (TBD).
127
+
128
+ ## 9. Manufacturing outputs
129
+
130
+ ODB++ and Gerber X2, NC drill, IPC-D-356 netlist, pick-and-place centroid
131
+ file, assembly drawing, fabrication drawing with stackup and notes, and the
132
+ BOM — all from the same released revision.
133
+
134
+ ## 10. Checklist
135
+
136
+ Classes: L2 from the netlist, L2b from geometry, manual needs an engineer.
137
+
138
+ | ID | Check | Class |
139
+ |---|---|---|
140
+ | DP-01 | every schematic part placed; forward annotation has zero unresolved items | L2 |
141
+ | DP-02 | DRC clean at the class rules | L2b |
142
+ | DP-03 | decoupling ≤ 2 mm from its pin | L2b |
143
+ | DP-04 | no plane split under differential pairs | L2b |
144
+ | DP-05 | via count on power layer changes | L2b |
145
+ | DP-06 | antenna, mounting and edge keep-outs respected | L2b |
146
+ | DP-07 | silk clear of pads; polarity marks present | L2b |
147
+ | DP-08 | fiducials and test points present | L2 |
148
+ | DP-09 | thermal and sensor distances per design notes | L2b |
149
+ | DP-10 | board netlist equals schematic netlist | L2 |
150
+ | DP-11 | outputs generated from the released revision and reviewed | manual |
151
+
152
+ ## 11. Sources
153
+
154
+ Versions unverified; cite by name until the edition in use is checked.
155
+
156
+ - IPC-2221 generic design, IPC-2222 rigid boards, IPC-2141 controlled impedance.
157
+ - IPC-7351 land patterns — the installation's Footprint Expert generates to it.
158
+ - IPC-6012 fabrication acceptance, IPC-A-610 assembly acceptance, IPC-D-356
159
+ netlist.
160
+ - Interface specifications: USB 2.0, I2C (NXP UM10204).
161
+ - Company PCB design specification — the knowledge-base document `context`
162
+ lists for board work, when one is bound; it supersedes every default.
@@ -0,0 +1,28 @@
1
+ # Local placement tasks
2
+
3
+ Obtain the input schemas and preconditions of `pcb placement-plan` and
4
+ `pcb placement` from `reference`. The native path has been smoke-tested on one
5
+ disposable board, top side only (`reference`'s `release_readiness` says what that
6
+ covers); that is
7
+ not a reason to assume native compatibility or bypass engineer authorization.
8
+
9
+ Prefer an explicit selected set and local transforms when adjusting an existing
10
+ layout. Do not use whole-board arrangement as a substitute for a small edit: it
11
+ has different effects on placement and routing. Determine the intended order,
12
+ anchor and coordinate origin before planning; origin spacing is not body clearance.
13
+
14
+ The native path reads a running Xpedition Layout session; `placement-plan` is
15
+ offline and needs none. Check `doctor`'s `native_session` for what is attached
16
+ before previewing, and start Layout explicitly rather than letting the command
17
+ activate it.
18
+
19
+ Preview, inspect every before/target and the native evidence status, then confirm
20
+ only within the user's authorization. Do not override fixed/locked states. Check
21
+ per-item results as well as the outer envelope. A failed or missing response can
22
+ leave earlier changes or an unplaced part; do not replay or silently reconstruct
23
+ the original write. Read the observed state and plan the remaining work explicitly.
24
+
25
+ Native placement DRC is not full-board DRC. Moving a component does not repair its
26
+ traces. Inspect routing, render the board, run the appropriate native checks, and
27
+ record remaining warnings before handing off. Successful coordinate read-back
28
+ is not a save/close/reopen durability test or a hardware sign-off.
@@ -0,0 +1,62 @@
1
+ [
2
+ {
3
+ "id": "entry-skill-first",
4
+ "prompt": "Use xpedition-pcb to check the board in the running Layout session.",
5
+ "expected": "Read ../xpedition-cli/SKILL.md first and run context, doctor and reference as it says; check doctor's native_session for Layout before a native command."
6
+ },
7
+ {
8
+ "id": "schematic-to-board",
9
+ "prompt": "The schematic of the demo sensor board is drawn in Designer from design.json. Turn it into a board in Layout.",
10
+ "expected": "Start Layout with session start --backend native_xpedition --kind pcb; run library build --design design.json --package, pcb create and pcb annotate with --backend native_xpedition --project X.prj, each --dry-run then the same command with --confirm and the returned token; read back with pcb info and pcb components; report done only when pcb annotate says outcome annotated (annotated_on_open or in_synch also count) with no errors and the counts match the schematic."
11
+ },
12
+ {
13
+ "id": "first-layout",
14
+ "prompt": "Place the parts on the new board, route it and tell me whether it is clean.",
15
+ "expected": "Draw the outline and the holes first, dry-run pcb arrange and grow the outline (holes --replace) until summary.outside is empty, then confirm the arrange; pour GND on layer 2, set the POWER class and check seen_by_layout, route layers 1 and 4, pour the outer layers only after routing, then run pcb drc; call the board checked only when drc passes and every warning kind is named with why it is acceptable; present the placement as a starting point for a person, not a signed-off layout."
16
+ },
17
+ {
18
+ "id": "fabrication-package",
19
+ "prompt": "Send this board out for fabrication.",
20
+ "expected": "Read reference/fabrication.md; run pcb drc, then pcb export --output DIR --dry-run and confirm with the same arguments and the returned token; report the package ready only when drc passes and checks.ok is true, naming any problems; say the README leaves thickness, finish and mask colour to the board house, and pass on any the user gave separately."
21
+ },
22
+ {
23
+ "id": "rebuild-after-cell-change",
24
+ "prompt": "I changed the footprint of U3 and rebuilt the library. Update the board.",
25
+ "expected": "Explain that annotating again keeps the old cell, so the board is recreated with pcb create --replace; stop and ask before confirming it because it archives the layout folder to a zip and deletes it; with the user's go-ahead confirm with --dangerous as well as the token; report the archive path; then annotate, outline, holes, arrange, pour, rules, route and the outer pours again."
26
+ },
27
+ {
28
+ "id": "arrange-on-routed-board",
29
+ "prompt": "Two parts are still unplaced on the routed board. Run the arrange so they get placed.",
30
+ "expected": "Stop and ask first: a confirmed pcb arrange deletes every trace and via on the board before placing (its dry run says dangerous and the confirm would need --dangerous), so the routing would have to be redone. Offer pcb move for the two parts instead."
31
+ },
32
+ {
33
+ "id": "small-local-move",
34
+ "prompt": "Move R12 two millimetres to the left, nothing else.",
35
+ "expected": "Read R12's position with pcb components, then pcb move --refdes R12 --to <new x,y> with a dry run first; never pcb arrange for a small edit; confirm only with the user's authorization; its traces do not move with it, so check the routing afterwards with pcb drc or pcb render."
36
+ },
37
+ {
38
+ "id": "board-looks-empty",
39
+ "prompt": "I annotated the board but Layout shows nothing on it. Is it broken?",
40
+ "expected": "Not broken: forward-annotated parts are unplaced until placed, and the stock templates open under the Loc: Assembly Bottom scheme that hides top-side parts. Check placement with pcb components, and use pcb show (Loc: All On) or pcb render to look; do not try to repair the board."
41
+ },
42
+ {
43
+ "id": "hand-route-a-net",
44
+ "prompt": "The autorouter gave VBAT a long detour. Route it by hand.",
45
+ "expected": "Read reference/hand-routing.md; pcb geometry --output board.json; remove the detour with pcb unroute (its confirm deletes routing that is not archived and needs --dangerous, so ask first); plan the trace (PlanBuilder, 0.5 mm for a supply net), pcb trace --file plan.json --geometry board.json --dry-run, check the nearest pins and the offline check, confirm with the user's authorization, then read opens_after and look with pcb render."
46
+ },
47
+ {
48
+ "id": "schematic-request-boundary",
49
+ "prompt": "Draw a schematic for a 5 V to 3.3 V regulator with an I2C sensor.",
50
+ "expected": "Not this Skill: schematic drawing belongs to xpedition-schematic (its drawing conventions and design format); read ../xpedition-schematic/SKILL.md. Run no pcb command."
51
+ },
52
+ {
53
+ "id": "bom-request-boundary",
54
+ "prompt": "Export the BOM of this design as CSV.",
55
+ "expected": "Not this Skill: bom export belongs to xpedition-cli. Only inside a fabrication package does pcb export write bom.csv."
56
+ },
57
+ {
58
+ "id": "entry-skill-missing",
59
+ "prompt": "Check the board in the running Layout session. (The entry Skill is not installed here: ../xpedition-cli/SKILL.md does not exist.)",
60
+ "expected": "Stop before any command: the entry Skill this one builds on is missing. Tell the user and, once they agree, install the family with npx skills add fatecannotbealtered/xpedition-cli -y -g."
61
+ }
62
+ ]