Skip to content

fidelodok/metaforge

v0.1.0Apache-2.0

Engineer hardware against a digital twin: requirements, CAD, simulation and evidence, with writes held for human approval.

analyze_hazards

Log the hazards of a system or subsystem, score each as severity x likelihood, classify the overall risk and record the hazard log in the MetaForge twin. Use when the user asks for a hazard analysis, risk assessment, FMEA-style hazard log, ISO 12100 or ISO 14971 style risk table, "what could go wrong with this", or when a design-flow gate reports that no risks are recorded or that a critical risk is unmitigated.

author_design_sketch

Draw a scaled 2D design sketch of a part or mechanism as a chain of segments (lengths, thicknesses and joint angles in mm and degrees), side by side with the current design when it is a revision, and submit it for a person's approval before any CAD is built. Use when decide_sketch_needed says a sketch is required, when the user asks to see proportions or a layout before modelling, or before revising a committed part, linkage, leg, arm or bracket.

check_power_budget

Check an electronics design's power budget by summing worst-case load on each supply rail, comparing it against what the rail can deliver with the user's margin, flagging any rail over budget, and recording the sourced budget in the twin. Use when the user asks whether a regulator or battery can supply the board, asks for a power or current budget per rail, asks how much headroom a rail has, or when a power or current requirement needs analysis evidence.

check_tolerance

Check a part's toleranced dimensions against what the chosen manufacturing process can actually hold, with a capability index per dimension, DFM flags for too-tight bands and sub-minimum features, and an optional RSS stack-up, then record the verdict in the twin. Use when the user asks whether tolerances are achievable, whether a part can be machined or printed to spec, wants a DFM or tolerance review, or asks about a tolerance stack-up on a committed part.

configure_rtos

Write the RTOS configuration for a firmware project (task table, priorities, stack sizes, heap, tick rate) from task definitions and the MCU's memory, check it fits in RAM, and record it in the twin. Use when the user asks to set up or change FreeRTOS, Zephyr, ChibiOS, ThreadX or RTEMS configuration, asks for a task table or stack and heap sizing, or asks whether their tasks fit in the MCU's RAM.

connect-workflow

Find the gateway to point this plugin at in MetaForge. Use when the user asks to find the gateway to point this plugin at.

create_assembly

Combine already-built CAD parts into one named multi-part assembly STEP at user-given positions, check that the parts, names and placements came out right, and commit the assembly to the twin linked to its part items. Use when the user asks to assemble, put together, stack or mount committed parts (for example a bracket on a plate, a gripper from its fingers and base, an arm from its links), or a design phase needs an assembly cad_model built from part cad_models.

create_procurement_record

Record a purchase-order-style procurement record (line items with part number, quantity, unit cost, currency, distributor and lead time) in the MetaForge twin, with total cost and longest lead time, linked to the BOM it was sourced from. Use when the user asks to raise, record or save a purchase order, buy list, procurement record or order for a build, or to turn a priced BOM into an order the team can review.

decide_sketch_needed

Decide, before any CAD tool runs, whether a proportions-and-topology design sketch must be made and approved by a person first, using five fixed rules (user asked for review, revision of built geometry, multi-part with moving joints, novel topology, four or more parts). Use when you are about to model or change a part or assembly with freecad or cadquery tools, when the user asks for a mechanism, linkage, limb, arm or multi-part assembly, or when the request changes geometry that is already committed.

define_system_architecture

Capture a product's system architecture (the named components, the discipline that owns each, and the interfaces between them) as a reviewable block diagram in the twin before detailed design starts. Use when the user asks for a block diagram, a system breakdown, "what talks to what", an interface list or interface control table, or when a design flow phase requires a system_architecture deliverable.

design-workflow

Design or revise a part in MetaForge. Use when the user asks to design or revise a part.

doctor-workflow

Check the connection and what is reachable in MetaForge. Use when the user asks to check the connection and what is reachable.

fea-workflow

Run a load case and record the evidence in MetaForge. Use when the user asks to run a load case and record the evidence.

find_alternates

Find and rank up to three alternate parts for a BOM part that is risky to source, scoring each candidate on spec compatibility, availability, price and supply-risk reduction, using MetaForge's component search and live distributor data. Use when the user asks for an alternate, substitute, second source, drop-in replacement or cross-reference for a part, or when a part is out of stock, end of life, NRND, single-source or has a long lead time.

flow-workflow

Plan a design flow for this project in MetaForge. Use when the user asks to plan a design flow for this project.

gate-workflow

Review a maturity gate in MetaForge. Use when the user asks to review a maturity gate.

generate_cad

Generate one named parametric CAD part (plate, L-bracket, open-top enclosure or cylinder) from dimensions the user states, check the solid really matches them, and commit it to the twin as a cad_model. Use when the user asks for a simple plate, bracket, box enclosure, spacer, rod or cylinder with given sizes, wants a quick placeholder part in a project, or needs a first committed geometry before FEA.

generate_cad_ir

Build a featured CAD part step by step (body, sketches, pads, pockets, booleans, fillets, revolves, patterns) as an ordered feature list, execute it through the FreeCAD session tools or one CadQuery script, then export a correctly named STEP and commit it to the twin. Use when the user wants a real part with holes, pockets, cut-outs, bosses, rounded edges, revolved or patterned features at stated positions, or when a simple parametric primitive from generate_cad cannot represent the part.

generate_cad_script

Write a CadQuery (or FreeCAD) script for a described part, run it in the MetaForge sandbox, check the geometry against the user's dimensions, and commit it to the twin as a named CAD model. Use when the user asks for a part whose shape is more than a single primitive ("model a bracket with a slot and two counterbored holes", "write a CadQuery script for this flange"), hands you a script to run and record, or a design phase needs a cad_model deliverable that no dedicated generator covers.

generate_checklist

Build a regulatory compliance checklist for a product's target markets (UKCA, CE, FCC, PSTI) from MetaForge's built-in regime catalogue, with standards shared across regimes listed once. Use when the user asks what certifications, standards, declarations or test reports a product needs to sell in the UK, EU or US, asks for a compliance or certification checklist, or asks what evidence is still missing for market approval. Computes only; to save the checklist in the twin use record_compliance_checklist.

generate_enclosure

Generate an open-top PCB enclosure (shelled box with connector cutouts and mounting posts) from the board's real dimensions with CadQuery, check it fits, and commit it to the twin as a named CAD model. Use when the user asks for a case, housing or enclosure around a PCB ("make an enclosure for the 60 x 40 mm controller board"), when a hardware flow needs a mechanical housing for an electronics deliverable, or when board size and connector positions are known and a first-fit box is wanted.

generate_hal

Write a thin hardware abstraction layer for a firmware project's MCU and peripherals (GPIO, SPI, I2C, UART, ADC, PWM, timers, DMA) using the pin assignments from the real KiCad schematic, and record what was generated in the twin. Use when the user asks to generate or set up a HAL, peripheral init code or a pin map for their board, asks to wire firmware to the schematic's pins, or starts firmware for a new board.

generate_mesh

Turn a committed CAD part into a CalculiX-ready tetrahedral finite element mesh with gmsh, check its quality, and identify the fixed and loaded faces by their real coordinates. Use when the user asks to mesh a part, prepare a part for FEA or thermal analysis, refine or coarsen a mesh, or find which mesh surface group is a given face (for example "the face at x = 0"), and before any calculix.run_fea or calculix.run_thermal call that has no mesh yet.

generate_parametric_feature

Build one of MetaForge's named parametric features (bolt_pattern, a plate with a circular bolt-hole pattern, or rib, a triangular gusset) from typed parameters in a FreeCAD session, check it, and commit it with its parameters so a later change becomes a linked revision. Use when the user asks for a bolt circle, a mounting plate with N holes on a pitch circle, a motor-face or flange hole pattern, a gusset or stiffening rib, or asks to change one parameter of such a feature they already made.

generate_technical_drawing

Record a drawing package for a committed CAD part (toleranced dimensions, GD&T callouts, surface finishes and inspection requirements) as structured data linked to that part, after checking the nominal values against the real geometry. Use when the user asks for a drawing, a drawing spec, tolerances, GD&T or surface finish callouts for a part, or an inspection sheet, or when a manufacturing phase needs a technical_drawing deliverable. It does not render a 2D drawing sheet.

ingest_knowledge

Add a document (datasheet text, an application note, a standard's excerpt, a lessons-learned note, a design rule) to MetaForge's project-scoped knowledge layer so later searches and agents can cite it. Use when the user asks to ingest, index, remember, add to the knowledge base or "make searchable" a document, URL, datasheet or note, or when a source you just read with web.fetch should stay available for this project.

intent-to-verified-design

Take a hardware product from a stated intent to a verified design in MetaForge, end to end. Use when the user describes something they want built ("design a wall shelf for 15 kg per shelf", "start a project for a 6-DOF arm"), asks to set up or plan a design flow, asks what the next step on a project is, or asks whether a design meets its requirements. Covers project setup, typed requirements, the gated design flow (propose, human approval, run), design work, verification evidence and the release gate. Do not use for a single isolated tool call such as one FEA run on an existing part; use the matching domain skill for that.

new-workflow

Start a project, or open the one the user means in MetaForge. Use when the user asks to start a project, or open the one the user means.

record_compliance_checklist

Build a regulatory compliance checklist for a project's target markets (UKCA, CE, FCC, PSTI) from MetaForge's built-in regime catalogue and save it in the twin as a reviewable work product linked to the project. Use when the user asks to save, record, attach or track a compliance or certification checklist for a project, or wants the checklist to show up on the project's work products for review. To only see the checklist without saving it, use generate_checklist.

replan-workflow

Change a running design flow without starting again in MetaForge. Use when the user asks to change a running design flow without starting again.

retrieve_knowledge

Search MetaForge's project knowledge layer (ingested datasheets, design rules, failure notes, past decisions) and answer with citations to the source and heading each fact came from. Use when the user asks what a datasheet, standard or earlier note says, asks "do we have anything on", "what did we learn about" or "what is the limit for" a part or rule, or when a design step needs a sourced value rather than a remembered one.

run_cfd

Handle a fluid flow or cooling question about a committed part honestly. MetaForge has no CFD solver, so this skill runs the steady-state conduction model it does have when that answers the question, and otherwise records the question, the assumptions and any results the user brings from their own CFD tool. Use when the user asks for CFD, airflow, pressure drop, flow velocity, fan or duct sizing, convection cooling, or "will this part stay below N degrees", or when a requirement needs flow or thermal evidence.

run_drc

Run KiCad's Design Rules Check on a PCB layout, sort the violations and unrouted connections, judge pass or fail, and record the result in the twin pinned to the board revision it checked. Use when the user asks to run DRC, check a board for clearance, track width, courtyard or unrouted-net problems, asks whether a layout is ready for Gerbers or fab, or when a flow gate needs DRC evidence.

run_erc

Run KiCad's Electrical Rules Check on a schematic, sort the violations into errors and warnings, judge pass or fail on errors, and record the result in the twin pinned to the schematic it checked. Use when the user asks to run ERC, check a schematic for electrical errors, asks whether the schematic is clean before layout, or when a requirement or flow gate needs ERC evidence.

run_fea

Run a static stress or modal finite element analysis on a committed CAD part with CalculiX, check that the answer can be trusted, and record it in the twin pinned to the geometry revision it analysed. Use when the user asks for stress, deflection, safety factor, natural frequency or "will this hold", or when a requirement with verification_method analysis needs structural evidence.

run_spice

Simulate a circuit with ngspice through MetaForge (DC operating point or sweep, AC frequency response, transient), from a KiCad schematic's SPICE netlist or a netlist the user gives, and record the result as evidence. Use when the user asks to simulate a circuit, run SPICE or ngspice, check a filter's cutoff, a regulator's transient response, a bias point or a startup waveform.

scaffold_driver

Scaffold a device driver for one external peripheral chip (header, source and register map) on top of the project's HAL, with every register, address and bus setting taken from the part's datasheet and the board's schematic, and record it in the twin. Use when the user asks to write, start or scaffold a driver for a sensor, display, radio or other chip on SPI, I2C, UART or a parallel bus, or asks for a register map for a part on their board.

score_bom_risk

Score the supply-chain risk of a project's BOM, part by part, across single source, lead time, lifecycle, price volatility, stock level and RoHS/REACH compliance, and roll it up so the riskiest parts surface first. Use when the user asks how risky the BOM is, which parts are hard to buy, single-source, long lead, end of life or obsolete, whether the BOM is ready to build, or for a supply-chain risk report before a build or gate review.

status-workflow

Where this project stands right now in MetaForge. Use when the user asks to where this project stands right now.

use-workflow

Pick the project to work in for this session in MetaForge. Use when the user asks to pick the project to work in for this session.

validate_stress

Give a pass or fail verdict on whether a part's peak von Mises stress stays within an allowable stress (limit stress divided by a required safety factor) under a stated static load, using a CalculiX static solve, then record the verdict pinned to the geometry revision. Use when the user asks "does it pass", "is the safety factor at least 2", "is the bracket within allowable stress at 200 N", or when a requirement states a stress limit or minimum safety factor. For deflection, natural frequency or an open-ended stress study use run_fea instead.

verify-workflow

Check whether a design run achieved what was asked in MetaForge. Use when the user asks to check whether a design run achieved what was asked.

workflow-lifecycle

Generate, inspect, and revise outcome-driven workflows from user intent; evaluate results, capability gaps, failures, and completion. Use when the work has meaningful dependencies, validation gates, iterative repair or lifecycle tracking, including MetaForge design flows (pair it with intent-to-verified-design for the MetaForge procedure). Avoid imposing a workflow on a simple independent task.