Add manufacturing-artifact-generation reasoning protocol#182
Merged
Alan-Jowett merged 3 commits intomicrosoft:mainfrom Apr 6, 2026
Merged
Conversation
Add a systematic reasoning protocol for generating all manufacturing deliverables from a completed PCB design. This is Step 4 of 9 in the end-to-end hardware design workflow. The protocol covers 9 phases: 1. Input validation (DRC-clean board, target fab service, BOM data) 2. Gerber generation (all layers, RS-274X/X2, Protel extensions) 3. Drill file generation (Excellon, PTH + NPTH separated) 4. BOM generation with fab-specific formatting (JLCPCB LCSC numbers, PCBWay format, DNP handling) 5. Pick-and-place centroid file with rotation offset corrections 6. Assembly drawing generation (top/bottom PDF) 7. Fab-specific packaging (directory structure, Gerber ZIP, submission checklist) 8. Pre-submission validation (cross-artifact consistency checks: layer count, hole count, BOM count, PnP count, coordinate origin) 9. Python script generation wrapping kicad-cli for full automation Key design decisions: - Python script wrapping kicad-cli commands, consistent with the pcb-layout-design protocol's approach - Fab-specific BOM and pick-and-place formatting (JLCPCB, PCBWay) because generic artifacts require manual reformatting - Cross-artifact validation catches common submission failures (missing board outline, coordinate origin mismatch, drill unit mismatch) - No new audit protocol needed — the pre-submission validation phase serves as the self-audit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new hardware-focused reasoning protocol to PromptKit for generating the full set of manufacturing deliverables (fab + assembly) from a completed KiCad PCB design, intended as a workflow step before templates start referencing it.
Changes:
- Introduce
manufacturing-artifact-generationreasoning protocol with phased guidance for Gerbers/drill/BOM/PnP/assembly drawings plus validation and an automation-script outline. - Register the new protocol in
manifest.yamlunder the reasoning protocols list.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| protocols/reasoning/manufacturing-artifact-generation.md | New multi-phase protocol describing artifact generation, validation, and a Python automation script outline. |
| manifest.yaml | Adds the new protocol to the manifest so it’s discoverable by the bootstrap/component system. |
7f3fc67 to
c457f7c
Compare
Address four reviewer findings: 1. BOM export command used fake placeholders (\, \) that are not valid kicad-cli field syntax. Updated to use actual schematic field names (MPN, Manufacturer, LCSC, DNP). Documented that quantity is computed by --group-by grouping, not a field. 2. Drill hole count validation referenced 'pcbnew API' but pcbnew is not in the tool dependencies. Changed to parse tool definitions and hit counts from the Excellon drill file directly. 3. Script takes .kicad_pcb path but BOM export needs the schematic. Added schematic path derivation (same directory, same basename, .kicad_sch extension) with error handling for missing schematic. 4. 'oshpark' listed as supported fab service but not defined in FAB_CONFIGS. Removed from supported list until defined (OSH Park is fab-only, no assembly formatting needed). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1. Script accessed sys.argv[1] without arg count check, causing IndexError when run without arguments. Added len(sys.argv) guard with usage message and board file existence check, consistent with pcb-layout-design protocol. 2. kicad-cli commands used inconsistent output paths (./gerbers/, ./assembly/, bom-raw.csv) that didn't match Phase 7's defined directory structure (manufacturing/gerbers/, manufacturing/ assembly/). Updated all commands to use the manufacturing/ prefix for consistency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a \manufacturing-artifact-generation\ reasoning protocol for producing all files needed to submit a PCB design for fabrication and assembly. This is Step 4 of 9 in the end-to-end hardware design workflow — the final protocol step before templates.
New Components
Design Decisions
Checklist