Skip to content

Keitark/pcba-design-skills / .agents/skills/pcb-layout-review

pcb-layout-review

Verified

Audit, finish, or port PCB placement and routing using circuit intent, mechanical constraints, sourcing evidence, native DRC/connectivity, rendered views, and manufacturing feedback. Use before routing, after autorouting, before fabrication release, when adapting a proven board to another connector, enclosure, platform, or regional variant, or when reviewing layers, GND references, power distribution, decoupling, buses, controlled interfaces, RF keepouts, vias, cost-driving features, opens, or DRC findings.

scripts/record_lesson.py

View on GitHub
#!/usr/bin/env python3
"""Record a project-local layout lesson without mutating the installed skill."""

from __future__ import annotations

import argparse
import json
import re
from pathlib import Path


MARK = "<!-- PROJECT-LAYOUT-LESSONS -->"


def main() -> int:
    parser = argparse.ArgumentParser()
    parser.add_argument("--file", type=Path, default=Path(".pcba-workflow/layout-lessons.md"))
    parser.add_argument("--id", required=True)
    parser.add_argument("--trigger", required=True)
    parser.add_argument("--rule", required=True)
    parser.add_argument("--evidence", required=True)
    parser.add_argument("--check", default="manual")
    args = parser.parse_args()
    slug = re.sub(r"[^a-z0-9-]", "-", args.id.lower()).strip("-")
    if not slug:
        raise SystemExit("lesson id must contain letters or digits")
    entry = (
        f"\n### {slug}\n"
        f"- **Trigger:** {args.trigger}\n"
        f"- **Rule:** {args.rule}\n"
        f"- **Evidence:** {args.evidence}\n"
        f"- **Check:** {args.check}\n"
    )
    text = args.file.read_text(encoding="utf-8") if args.file.exists() else f"# Project layout lessons\n\n{MARK}\n"
    pattern = re.compile(r"\n### " + re.escape(slug) + r"\n(?:- .*\n)*")
    replaced = bool(pattern.search(text))
    text = pattern.sub("", text)
    if MARK not in text:
        text = text.rstrip() + f"\n\n{MARK}\n"
    text = text.replace(MARK, MARK + entry, 1)
    args.file.parent.mkdir(parents=True, exist_ok=True)
    args.file.write_text(text, encoding="utf-8")
    print(json.dumps({"recorded": slug, "replaced": replaced, "file": str(args.file)}))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall