@protoboardai/ext-hardware 0.0.0-stage → 0.2.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/LICENSE +202 -0
- package/NOTICE +13 -0
- package/README.md +10 -2
- package/checks/evidence.ts +63 -0
- package/evals/compose-probe-cable/case.json +160 -0
- package/evals/e2e-desk-rover/case.json +62 -0
- package/evals/e2e-desk-rover/fixture/AGENTS.md +9 -0
- package/evals/e2e-desk-rover/fixture/docs/brief.md +28 -0
- package/evals/e2e-desk-rover/fixture/docs/decisions.md +3 -0
- package/evals/e2e-desk-rover/fixture/package.json +1 -0
- package/evals/e2e-desk-rover/fixture/protoboard.config.ts +12 -0
- package/evals/e2e-desk-rover/fixture/src/.gitkeep +0 -0
- package/evals/e2e-desk-rover/solution/decisions.md +26 -0
- package/evals/e2e-desk-rover/solution/desk-rover.uhd.ts +60 -0
- package/evals/find-reversed-cell-leads/case.json +78 -0
- package/evals/fix-gnss-uart-swap/case.json +32 -0
- package/evals/fix-two-wiring-faults/case.json +97 -0
- package/evals/rough-draft-is-concept/case.json +36 -0
- package/evals/rough-draft-is-concept/fixture/AGENTS.md +9 -0
- package/evals/rough-draft-is-concept/fixture/docs/brief.md +8 -0
- package/evals/rough-draft-is-concept/fixture/docs/decisions.md +3 -0
- package/evals/rough-draft-is-concept/fixture/package.json +1 -0
- package/evals/rough-draft-is-concept/fixture/protoboard.config.ts +11 -0
- package/evals/rough-draft-is-concept/fixture/src/.gitkeep +0 -0
- package/evals/rough-draft-is-concept/solution/trail-light.uhd.ts +40 -0
- package/evals/tidy-the-diagram/case.json +30 -0
- package/evals/tidy-the-diagram/fixture/.protoboard/display.json +20 -0
- package/evals/tidy-the-diagram/fixture/AGENTS.md +9 -0
- package/evals/tidy-the-diagram/fixture/docs/brief.md +5 -0
- package/evals/tidy-the-diagram/fixture/package.json +1 -0
- package/evals/tidy-the-diagram/fixture/protoboard.config.ts +12 -0
- package/evals/tidy-the-diagram/fixture/src/bike-computer.uhd.ts +63 -0
- package/ops/bom.ts +22 -0
- package/package.json +41 -4
- package/protoboard-extension.json +65 -0
- package/skills/build-a-project/SKILL.md +562 -0
- package/skills/harness-author/SKILL.md +232 -0
- package/skills/harness-author/references/stack-up.md +70 -0
- package/skills/harness-author/references/wire-harnesses.md +35 -0
- package/skills/harness-author/scripts/stackup.ts +104 -0
- package/skills/harness-verify/SKILL.md +112 -0
- package/skills/system-compose/SKILL.md +269 -0
- package/skills/system-compose/references/diagnostic-codes.md +292 -0
- package/skills/system-compose/scripts/scenarios.ts +82 -0
- package/skills/system-review/SKILL.md +145 -0
- package/skills/test-and-measure/SKILL.md +181 -0
- package/skills/test-and-measure/references/procedure-template.md +45 -0
- package/skills/test-and-measure/references/test-plan.md +35 -0
- package/skills/test-and-measure/scripts/test-data.ts +94 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Protoboard Stack: @protoboardai/ext-hardware
|
|
2
|
+
Copyright 2026 Delta Robotics, Inc.
|
|
3
|
+
|
|
4
|
+
This product includes software developed at Delta Robotics, Inc.
|
|
5
|
+
(https://deltaroboticsinc.com).
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License").
|
|
8
|
+
See the LICENSE file in this package for full terms.
|
|
9
|
+
|
|
10
|
+
"Protoboard", the Protoboard logo and the "0" mark are trademarks of
|
|
11
|
+
Delta Robotics, Inc. The License grants no rights to them (section 6);
|
|
12
|
+
see TRADEMARKS.md in the Protoboard Stack repository
|
|
13
|
+
(https://github.com/Delta-Robotics-Inc/protoboard-stack).
|
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @protoboardai/ext-hardware
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
System design, wiring, BOM, test and release skills for agents.
|
|
4
|
+
|
|
5
|
+
Part of [Protoboard](https://github.com/Delta-Robotics-Inc/protoboard-stack), which designs hardware with your AI agent. A project lists this extension in its `protoboard.config.ts`; the Protoboard templates add it where it fits. You rarely install it by hand: the [command line](https://www.npmjs.com/package/@protoboardai/cli) and the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=deltarobotics.vscode-protoboard) bring it with them.
|
|
6
|
+
|
|
7
|
+
- [Installation guide](https://github.com/Delta-Robotics-Inc/protoboard-stack/blob/main/docs/guides/installation.md)
|
|
8
|
+
- [Source](https://github.com/Delta-Robotics-Inc/protoboard-stack/tree/main/packages/ext-hardware)
|
|
9
|
+
- [Report an issue](https://github.com/Delta-Robotics-Inc/protoboard-stack/issues)
|
|
10
|
+
|
|
11
|
+
Apache 2.0. Protoboard is a trademark of Delta Robotics, Inc.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { packageRoot, type ExtensionCheck, type Project, type ProjectDiagnostic } from "@protoboardai/core";
|
|
4
|
+
|
|
5
|
+
/** Where a definition's sources.json / verification.json live: project parts/evidence, or next to its package origin. */
|
|
6
|
+
function evidenceDir(p: Project, id: string): string[] {
|
|
7
|
+
const rec = p.definitions.get(id)!;
|
|
8
|
+
const dirs = [join(p.root, "parts", "evidence", id)];
|
|
9
|
+
if (rec.origin.kind === "catalog" && rec.origin.package) {
|
|
10
|
+
// library parts keep their evidence at library/parts/<id> in the providing package
|
|
11
|
+
const pkg = packageRoot(p.root, rec.origin.package);
|
|
12
|
+
if (pkg) dirs.push(join(pkg, "library", "parts", id));
|
|
13
|
+
}
|
|
14
|
+
return dirs;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** An evidence file of one kind: project parts/evidence first, then what the catalog revision vendored, then the package. */
|
|
18
|
+
function evidenceFile(p: Project, id: string, name: string, kind: string): string | undefined {
|
|
19
|
+
const [project, ...packages] = evidenceDir(p, id).map((d) => join(d, name));
|
|
20
|
+
const vendored = (p.definitions.get(id)!.origin.evidence ?? []).filter((e) => e.kind === kind).map((e) => join(p.root, e.file));
|
|
21
|
+
return [project, ...vendored, ...packages].find(existsSync);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Purchased parts (have a manufacturer part number, not custom, not included
|
|
26
|
+
* with another part) must cite sources and have a recorded verification.
|
|
27
|
+
*/
|
|
28
|
+
export const evidence: ExtensionCheck = (p) => {
|
|
29
|
+
const out: Omit<ProjectDiagnostic, "validator">[] = [];
|
|
30
|
+
const used = new Set(p.instances.map((i) => i.definition));
|
|
31
|
+
for (const id of [...used].sort()) {
|
|
32
|
+
const def = p.lookup(id);
|
|
33
|
+
if (!def || def.children?.length || def.kind === "harness") continue;
|
|
34
|
+
if (/\(custom\)/i.test(def.manufacturer ?? "") || !def.manufacturer) continue;
|
|
35
|
+
const included = def.traits?.some((t) => t.type === "usage_note" && t.params?.included_with);
|
|
36
|
+
const sourcesFile = evidenceFile(p, id, "sources.json", "sources");
|
|
37
|
+
const verFile = evidenceFile(p, id, "verification.json", "verification");
|
|
38
|
+
const supplierCited = def.traits?.some((t) => t.type === "usage_note" && typeof t.params?.source === "string");
|
|
39
|
+
const source = p.definitions.get(id)!.origin.source;
|
|
40
|
+
if (!sourcesFile && !supplierCited && !included) {
|
|
41
|
+
out.push({ code: "HW_NO_SOURCES", severity: "warning", entity: { kind: "definition", id }, message: `${id} cites no sources (no sources.json in parts/evidence or vendored with its catalog revision, no supplier listing)`, source });
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (!verFile) {
|
|
45
|
+
out.push({ code: "HW_NOT_VERIFIED", severity: "info", entity: { kind: "definition", id }, message: `${id} has sources but no recorded verification (run the uhd-part-verify skill)`, source });
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const v = JSON.parse(readFileSync(verFile, "utf8"));
|
|
49
|
+
// PB-862: the record says whether an agent that did not author the part ran the audit
|
|
50
|
+
if (v.audit && v.audit.independent === false) {
|
|
51
|
+
out.push({ code: "HW_VERIFICATION_SELF_AUDIT", severity: "info", entity: { kind: "definition", id }, message: `${id}: verified by a self-audit only (the authoring agent checked its own part); an independent audit is still owed`, source });
|
|
52
|
+
}
|
|
53
|
+
if (v.audit && v.audit.wrong > 0) {
|
|
54
|
+
// a wrong fact is resolved when the verification records the repair that fixed it
|
|
55
|
+
out.push(
|
|
56
|
+
v.repairs
|
|
57
|
+
? { code: "HW_VERIFICATION_REPAIRED", severity: "info", entity: { kind: "definition", id }, message: `${id}: audit found ${v.audit.wrong} wrong fact(s); repairs recorded (${String(v.repairs).slice(0, 80)})`, source }
|
|
58
|
+
: { code: "HW_VERIFICATION_WRONG", severity: "error", entity: { kind: "definition", id }, message: `${id}: verification found ${v.audit.wrong} wrong fact(s) with no recorded repair`, source },
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "protoboard.eval-case/v0",
|
|
3
|
+
"title": "Compose the temperature probe's connection through its cable to the cap board",
|
|
4
|
+
"skills": [
|
|
5
|
+
"system-compose",
|
|
6
|
+
"harness-author"
|
|
7
|
+
],
|
|
8
|
+
"tags": [
|
|
9
|
+
"system",
|
|
10
|
+
"compose"
|
|
11
|
+
],
|
|
12
|
+
"requires": [
|
|
13
|
+
"python-build123d"
|
|
14
|
+
],
|
|
15
|
+
"fixture": {
|
|
16
|
+
"from": "../../../../examples/smart-bottle",
|
|
17
|
+
"exclude": [
|
|
18
|
+
"release"
|
|
19
|
+
],
|
|
20
|
+
"steps": [
|
|
21
|
+
{
|
|
22
|
+
"note": "the probe and its cable are instances of the system, but nothing connects them: both links removed",
|
|
23
|
+
"replace": {
|
|
24
|
+
"file": "src/bottle.uhd.ts",
|
|
25
|
+
"find": " {\n id: \"probe_wires\",\n name: \"Probe cable leaves the probe\",\n a: { child: \"probe\", interfaceId: \"wires\", compose: { p1: \"wire_vdd\", p2: \"wire_dq\", p3: \"wire_gnd\" } },\n b: { child: \"probe_cable\", interfaceId: \"end_probe\" },\n },\n {\n id: \"probe_pads\",\n name: \"Probe cable on the probe pads\",\n a: { child: \"probe_cable\", interfaceId: \"end_board\" },\n b: { child: \"board\", interfaceId: \"probe_pads\", compose: { p1: \"probe_vdd\", p2: \"probe_dq\", p3: \"probe_gnd\" } },\n },\n",
|
|
26
|
+
"with": "",
|
|
27
|
+
"count": 1
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"instruction": "In the smart bottle's system model (src/bottle.uhd.ts) the temperature probe (`probe`) and its cable (`probe_cable`) are instances but nothing connects them yet, and `npx protoboard check` has warnings about it. Compose the connection as docs/system.md describes: the probe's own wires through the probe cable to the cap board's probe pads. Done means: check reports no errors, no unpowered interface and nothing stale, and the probe's fault scenario in src/scenarios.ts (probe-dq-on-gnd-pad) is caught again by the system-compose scenarios script. The board, the harness modules, the parts and the scenarios are correct; do not change them. Say briefly what you connected and how you checked it.",
|
|
33
|
+
"tools": {
|
|
34
|
+
"read": true,
|
|
35
|
+
"edit": true,
|
|
36
|
+
"commands": [
|
|
37
|
+
"npx protoboard *",
|
|
38
|
+
"npx tsx node_modules/@protoboardai/ext-hardware/skills/*"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"budget": {
|
|
42
|
+
"turns": 30,
|
|
43
|
+
"seconds": 900,
|
|
44
|
+
"usd": 4
|
|
45
|
+
},
|
|
46
|
+
"graders": [
|
|
47
|
+
{
|
|
48
|
+
"id": "probe-powered",
|
|
49
|
+
"kind": "fault",
|
|
50
|
+
"code": "UHD_UNPOWERED",
|
|
51
|
+
"seeded": [
|
|
52
|
+
"UHD_UNPOWERED",
|
|
53
|
+
"HARNESS_ROUTE_STALE"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "check-clean",
|
|
58
|
+
"kind": "check",
|
|
59
|
+
"maxErrors": 0,
|
|
60
|
+
"absent": [
|
|
61
|
+
"UHD_UNPOWERED",
|
|
62
|
+
"UHD_LINK_STATE",
|
|
63
|
+
"HARNESS_ROUTE_STALE",
|
|
64
|
+
"ENCLOSURE_STALE",
|
|
65
|
+
"PB_INVALID_ENDPOINT"
|
|
66
|
+
],
|
|
67
|
+
"ran": [
|
|
68
|
+
"uhd/checkSystem",
|
|
69
|
+
"ext:@protoboardai/ext-harness-cad/routes"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "through-the-cable",
|
|
74
|
+
"kind": "text",
|
|
75
|
+
"file": "src/bottle.uhd.ts",
|
|
76
|
+
"matches": [
|
|
77
|
+
"child:\\s*\"probe\",\\s*interfaceId:\\s*\"wires\"",
|
|
78
|
+
"child:\\s*\"probe_cable\",\\s*interfaceId:\\s*\"end_probe\"",
|
|
79
|
+
"child:\\s*\"probe_cable\",\\s*interfaceId:\\s*\"end_board\"",
|
|
80
|
+
"child:\\s*\"board\",\\s*interfaceId:\\s*\"probe_pads\""
|
|
81
|
+
],
|
|
82
|
+
"description": "probe wires → cable end_probe; cable end_board → board probe pads (not the probe straight to the board)"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "scenario-link-kept",
|
|
86
|
+
"kind": "text",
|
|
87
|
+
"file": "src/bottle.uhd.ts",
|
|
88
|
+
"matches": [
|
|
89
|
+
"id:\\s*\"probe_pads\"[\\s\\S]{0,300}b:\\s*\\{\\s*child:\\s*\"board\",\\s*interfaceId:\\s*\"probe_pads\",\\s*compose"
|
|
90
|
+
],
|
|
91
|
+
"description": "the probe-dq-on-gnd-pad scenario recomposes the link `probe_pads` on its board side: without it that scenario is no longer caught"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "probe-scenario-caught",
|
|
95
|
+
"kind": "script",
|
|
96
|
+
"script": "skills/system-compose/scripts/scenarios.ts",
|
|
97
|
+
"args": [
|
|
98
|
+
"--json"
|
|
99
|
+
],
|
|
100
|
+
"facts": [
|
|
101
|
+
{
|
|
102
|
+
"path": "[id=probe-dq-on-gnd-pad].ok",
|
|
103
|
+
"equals": true
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"path": "[id=nominal].ok",
|
|
107
|
+
"equals": true
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"description": "what the instruction asks: the scenarios script catches the probe's fault again, and the nominal build is clean (not the exit code: cell-leads-reversed is missed on this stack, PB-869)"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "board-untouched",
|
|
114
|
+
"kind": "digest",
|
|
115
|
+
"file": "src/boards/bottle-cap/bottle-cap.uhd.ts",
|
|
116
|
+
"changed": false
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "harnesses-untouched",
|
|
120
|
+
"kind": "digest",
|
|
121
|
+
"file": "src/harnesses/harnesses.uhd.ts",
|
|
122
|
+
"changed": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "scenarios-untouched",
|
|
126
|
+
"kind": "digest",
|
|
127
|
+
"file": "src/scenarios.ts",
|
|
128
|
+
"changed": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "probe-part-untouched",
|
|
132
|
+
"kind": "digest",
|
|
133
|
+
"file": "parts/local/adafruit-381-ds18b20-probe.uhd.ts",
|
|
134
|
+
"changed": false
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"solution": [
|
|
138
|
+
{
|
|
139
|
+
"protoboard": [
|
|
140
|
+
"check"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"replace": {
|
|
145
|
+
"file": "src/bottle.uhd.ts",
|
|
146
|
+
"find": " b: { child: \"board\", interfaceId: \"bat_pads\", compose: { p1: \"bat_pos\", p2: \"bat_neg\" } },\n },\n",
|
|
147
|
+
"with": " b: { child: \"board\", interfaceId: \"bat_pads\", compose: { p1: \"bat_pos\", p2: \"bat_neg\" } },\n },\n {\n id: \"probe_wires\",\n name: \"Probe cable leaves the probe\",\n a: { child: \"probe\", interfaceId: \"wires\", compose: { p1: \"wire_vdd\", p2: \"wire_dq\", p3: \"wire_gnd\" } },\n b: { child: \"probe_cable\", interfaceId: \"end_probe\" },\n },\n {\n id: \"probe_pads\",\n name: \"Probe cable on the probe pads\",\n a: { child: \"probe_cable\", interfaceId: \"end_board\" },\n b: { child: \"board\", interfaceId: \"probe_pads\", compose: { p1: \"probe_vdd\", p2: \"probe_dq\", p3: \"probe_gnd\" } },\n },\n",
|
|
148
|
+
"count": 1
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"protoboard": [
|
|
153
|
+
"check"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"say": "Connected the probe through its cable: link probe_wires takes the probe's three wires (VDD, DQ, GND, composed from its wires bundle) to the cable's end_probe, and link probe_pads takes the cable's end_board to the board's probe pads (probe_vdd, probe_dq, probe_gnd). check: no errors, no UHD_UNPOWERED, the cable's route and the cap enclosure are current again; the probe-dq-on-gnd-pad scenario is caught again."
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "protoboard.eval-case/v0",
|
|
3
|
+
"title": "End to end: a small project from its brief to a Manufacturing Package",
|
|
4
|
+
"skills": ["build-a-project", "system-compose", "release"],
|
|
5
|
+
"tags": ["e2e", "system", "release"],
|
|
6
|
+
"requires": ["chrome"],
|
|
7
|
+
"fixture": {
|
|
8
|
+
"from": "fixture",
|
|
9
|
+
"steps": [{ "note": "the agreed parts, vendored from the catalog (the uno-motor-bench example's)", "copy": { "from": "../../../../examples/uno-motor-bench/parts", "to": "parts" } }]
|
|
10
|
+
},
|
|
11
|
+
"instruction": "Build this project from its brief (docs/brief.md) to a release: compose the system as the root module `desk-rover` (export DESK_ROVER in src/desk-rover.uhd.ts, as protoboard.config.ts expects) from the parts already vendored in parts/catalog, record the requirement trace and your decisions in docs/decisions.md, get `npx protoboard check` to no errors with every warning dispositioned, and cut release 0.1.0 with `npx protoboard release --version 0.1.0`. There is no network and no parts service: use only the vendored parts, and do not edit them or the brief. Follow the stack's build-a-project SOP. End with what you built, what the package contains, and what is left open.",
|
|
12
|
+
"tools": { "read": true, "edit": true, "commands": ["npx protoboard *", "npx tsx node_modules/@protoboardai/ext-hardware/skills/*"] },
|
|
13
|
+
"budget": { "turns": 60, "seconds": 2400, "usd": 10 },
|
|
14
|
+
"graders": [
|
|
15
|
+
{ "id": "root-composed", "kind": "fault", "code": "PB_ROOT_NOT_FOUND" },
|
|
16
|
+
{ "id": "check-clean", "kind": "check", "maxErrors": 0, "absent": ["UHD_LINK_STATE", "PB_INVALID_ENDPOINT", "PB_UNRESOLVED_DEFINITION"], "ran": ["uhd/checkSystem"] },
|
|
17
|
+
{
|
|
18
|
+
"id": "the-agreed-parts",
|
|
19
|
+
"kind": "facts",
|
|
20
|
+
"definition": "desk-rover",
|
|
21
|
+
"facts": [
|
|
22
|
+
{ "path": "children[moduleDefId=arduino-uno-rev3].id" },
|
|
23
|
+
{ "path": "children[moduleDefId=adafruit-1438-motor-shield-v2].id" },
|
|
24
|
+
{ "path": "children[moduleDefId=adafruit-5396-vl53l4cd].id" }
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "powered-from-the-uno",
|
|
29
|
+
"kind": "facts",
|
|
30
|
+
"protoboard": ["check", "--severity", "info"],
|
|
31
|
+
"description": "R2, R3: the shield's logic and the sensor have a supply (no UHD_UNPOWERED on them)",
|
|
32
|
+
"facts": [
|
|
33
|
+
{ "path": "diagnostics[message=shield:arduino_5v (5V) has no supply link.]", "exists": false },
|
|
34
|
+
{ "path": "diagnostics[message=shield:arduino_ioref (IOREF) has no supply link.]", "exists": false },
|
|
35
|
+
{ "path": "diagnostics[message=tof:vin (VIN) has no supply link.]", "exists": false }
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{ "id": "package-written", "kind": "files", "exist": ["release/0.1.0/index.html", "release/0.1.0/manifest.json", "release/0.1.0/00-overview.pdf", "release/0.1.0/system/work-order.pdf", "release/0.1.0/system/test-plan.pdf", "release/0.1.0/system/ordering-list.csv"] },
|
|
39
|
+
{ "id": "manifest", "kind": "facts", "file": "release/0.1.0/manifest.json", "facts": [{ "path": "version", "equals": "0.1.0" }, { "path": "check.errors", "equals": 0 }] },
|
|
40
|
+
{ "id": "bom-has-the-parts", "kind": "text", "file": "release/0.1.0/system/bom.csv", "matches": ["A000066", ",1438,", ",5396,"] },
|
|
41
|
+
{ "id": "bus-scan", "kind": "text", "file": "release/0.1.0/index.html", "matches": ["0x29", "0x60"], "description": "R1, R3, R4: both I2C devices are on the UNO's bus, so the bring-up scan lists the sensor (0x29) and the shield (0x60)" },
|
|
42
|
+
{ "id": "trace-recorded", "kind": "text", "file": "docs/decisions.md", "matches": ["R1", "R3", "R5", "R6", "UHD_UNPOWERED"] },
|
|
43
|
+
{ "id": "brief-untouched", "kind": "digest", "file": "docs/brief.md", "changed": false },
|
|
44
|
+
{ "id": "origins-untouched", "kind": "digest", "file": "parts/origins.json", "changed": false },
|
|
45
|
+
{ "id": "shield-part-untouched", "kind": "digest", "file": "parts/catalog/adafruit-1438-motor-shield-v2.json", "changed": false },
|
|
46
|
+
{
|
|
47
|
+
"id": "engineering",
|
|
48
|
+
"kind": "rubric",
|
|
49
|
+
"files": ["src/desk-rover.uhd.ts", "docs/decisions.md"],
|
|
50
|
+
"rubric": "A small project (Arduino UNO R3, Adafruit Motor Shield V2 stacked on it, Adafruit VL53L4CD breakout) composed from a brief and released. 1. The system model has the three agreed parts and no other purchased part (a harness or cable module that carries the sensor wiring is fine; a stated open item for something the brief did not list, such as stacking headers, is fine), the shield mated to the UNO's headers, both I2C devices on the UNO's I2C, the shield's 5 V, IOREF and ground and the sensor's power and ground from the UNO, and nothing invented (no extra parts, no motor supply). 2. Assumed values (header stack height, anything not in a part) are stated as assumptions, not presented as facts. 3. docs/decisions.md traces every requirement R1-R6 to how it is shown (a check, a link, a document or a test). 4. Every warning check leaves is dispositioned with a reason (the unpowered USB/VIN/DC jack/motor terminal because the USB host and the motor battery are not modelled; unavailable vendor CAD). 5. The final answer says what the package contains and what is left open (motors, battery, the shield's motor supply, unmodelled USB host) without claiming physical verification."
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"solution": [
|
|
54
|
+
{ "protoboard": ["check"], "expect": { "exit": 1 } },
|
|
55
|
+
{ "write": { "file": "src/desk-rover.uhd.ts", "from": "solution/desk-rover.uhd.ts" } },
|
|
56
|
+
{ "write": { "file": "docs/decisions.md", "from": "solution/decisions.md" } },
|
|
57
|
+
{ "protoboard": ["check"] },
|
|
58
|
+
{ "protoboard": ["release", "--check", "--version", "0.1.0"] },
|
|
59
|
+
{ "protoboard": ["release", "--version", "0.1.0"], "expect": { "status": "succeeded" } },
|
|
60
|
+
{ "say": "Composed desk-rover from the three vendored parts: the motor shield stacked on the UNO (mount mate, 11 mm stack assumed) with I2C, 5V, IOREF and GND from the UNO's headers, and the VL53L4CD on the UNO's I2C, 5 V and ground. docs/decisions.md traces R1-R6 and dispositions the warnings (UHD_UNPOWERED on the UNO's USB/VIN/DC jack and the shield's VIN and motor terminal: the USB host and the rover battery are not modelled; vendor CAD not redistributed). check: 0 errors. release 0.1.0: one unit, overview, spec sheet, BOM and ordering list, work order, assembly guide and test plan (I2C scan 0x29 and 0x60), manifest. Left open: motors, battery and the shield's motor supply." }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# desk-rover
|
|
2
|
+
|
|
3
|
+
A Protoboard hardware project. The system is described in UHD
|
|
4
|
+
(`@deltarobotics/uhd`): modules, interfaces, links, harnesses, artifacts.
|
|
5
|
+
|
|
6
|
+
- `npx protoboard inspect [instance]`, `npx protoboard check`, `npx protoboard build`
|
|
7
|
+
- `npx protoboard skills` lists the installed SOPs; start with **build-a-project**.
|
|
8
|
+
- Catalog definitions in `parts/catalog` are immutable (digest-pinned).
|
|
9
|
+
- Decisions go in `docs/decisions.md`; requirements are in `docs/brief.md`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Desk rover sensor bench: brief
|
|
2
|
+
|
|
3
|
+
EVAL FIXTURE (a small project; the parts are real catalog parts, the project is ours).
|
|
4
|
+
|
|
5
|
+
A bench rig for developing a small rover's obstacle detection before the
|
|
6
|
+
chassis exists: a microcontroller board, a motor driver for the rover's two
|
|
7
|
+
DC motors, and a time-of-flight distance sensor, wired so firmware can be
|
|
8
|
+
written and tested at a desk. The motors, the motor battery and the chassis
|
|
9
|
+
are not part of this build.
|
|
10
|
+
|
|
11
|
+
## Agreed parts (already in `parts/catalog`, no others)
|
|
12
|
+
|
|
13
|
+
| Function | Part | Catalog id |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| Controller | Arduino UNO R3 (A000066) | `arduino-uno-rev3` |
|
|
16
|
+
| Motor driver | Adafruit Motor Shield V2 (1438), stacked on the UNO's headers | `adafruit-1438-motor-shield-v2` |
|
|
17
|
+
| Distance sensor | Adafruit VL53L4CD breakout (5396) | `adafruit-5396-vl53l4cd` |
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
| ID | Requirement |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| R1 | The motor shield sits on the UNO's headers (shield stacking), and talks to the UNO over I2C. |
|
|
24
|
+
| R2 | The shield's logic is powered from the UNO's headers (5 V, IOREF, ground). |
|
|
25
|
+
| R3 | The distance sensor is on the UNO's I2C bus and powered from the UNO's 5 V pin, with a common ground. |
|
|
26
|
+
| R4 | Every I2C device has a distinct address on the bus. |
|
|
27
|
+
| R5 | The bench is powered from the UNO's USB port; the motor supply terminal on the shield stays unconnected until the rover's battery is chosen. |
|
|
28
|
+
| R6 | A Manufacturing Package (release 0.1.0) lets someone order the parts, assemble the bench and bring it up. |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "name": "desk-rover", "version": "0.1.0", "private": true, "type": "module" }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineConfig } from "@protoboardai/core";
|
|
2
|
+
|
|
3
|
+
// EVAL FIXTURE: a small project set up with `protoboard init`, its parts already vendored
|
|
4
|
+
// from the catalog into parts/catalog (pinned in parts/origins.json). The system is not
|
|
5
|
+
// composed yet: src/desk-rover.uhd.ts does not exist.
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
name: "desk-rover",
|
|
8
|
+
root: { source: "src/desk-rover.uhd.ts", export: "DESK_ROVER" },
|
|
9
|
+
sources: ["src/**/*.uhd.ts"],
|
|
10
|
+
catalog: "parts/catalog",
|
|
11
|
+
extensions: ["@protoboardai/ext-hardware", "@protoboardai/ext-release"],
|
|
12
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Decisions
|
|
2
|
+
|
|
3
|
+
One entry per engineering decision: context, options, choice, evidence.
|
|
4
|
+
|
|
5
|
+
## D1. Composition (R1-R3)
|
|
6
|
+
|
|
7
|
+
The agreed catalog parts only. The shield stacks on the UNO (mount mate, 11 mm
|
|
8
|
+
header stack height assumed); its I2C, 5 V, IOREF and GND come from the UNO's
|
|
9
|
+
headers. The VL53L4CD breakout is on the UNO's I2C and 5 V with a common ground.
|
|
10
|
+
|
|
11
|
+
## D2. Requirements trace
|
|
12
|
+
|
|
13
|
+
| ID | Shown by |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| R1 | UHD links shield_mount (mate) and shield_i2c; `protoboard check` |
|
|
16
|
+
| R2 | UHD links shield_5v, shield_ioref, shield_gnd; check reports no UHD_UNPOWERED on them |
|
|
17
|
+
| R3 | UHD links tof_i2c, tof_power, tof_gnd; check |
|
|
18
|
+
| R4 | I2C addresses 0x60 (shield) and 0x29 (sensor) are distinct; the test plan's bus scan |
|
|
19
|
+
| R5 | Assembly and bring-up from USB in the release's work order and test plan |
|
|
20
|
+
| R6 | release/0.1.0 (manifest, documents) |
|
|
21
|
+
|
|
22
|
+
## D3. Warnings left open
|
|
23
|
+
|
|
24
|
+
- UHD_UNPOWERED on uno:usb: the bench is powered from a USB host (R5), which is not modelled.
|
|
25
|
+
- uno:vin, uno:dc_jack, shield:arduino_vin, shield:vmotor_in are marked `unconnected` on their instances (check reports them as info, not UHD_UNPOWERED warnings): VIN, the DC jack and the motor terminal stay unconnected until the rover's battery is chosen (R5). The test plan does not power them; the motor-output checks come after a temporary supply on the motor terminal.
|
|
26
|
+
- PB_ARTIFACT_UNAVAILABLE: vendor CAD not redistributed by the catalog; the documents lack those figures.
|