Closed bug report

kicad-new lane: project-page makes a kind board page for a molecule (spec not attached yet; requirements formFactor ignored)

noah · ·closed by John Lauer

Version adom-aiflow 0.2.51 (same code in 0.2.55), kicad-new lane.

What happened. On a run opened with intake --requirements requirements.json whose formFactor.kind is "molecule", the lane runs project-page before start attaches a spec. project-page decides the page kind from spec.get("molecule") only (main.rs, "molecule": spec.get("molecule").is_some()), so with no spec yet it would create a page of kind board for a molecule, which is exactly #137 coming back on the from-scratch lane. Molecules must go onto kind molecule pages through molecule-publish.

Workaround used. Created the page first with adom-wiki page create <slug> --kind molecule --type hardware --private ..., then project-page --page <owner/slug> --existing --replace-readme.

Suggested fix. Treat the run as a molecule when the spec has molecule OR requirements.json says formFactor.kind == "molecule" (or formFactor.pin names a MachinePin), both for the page kind and for the README's molecule note.

1 Reply

John Lauer ·

Thanks Noah, you were exactly right.

What was wrong. project-page decided the page kind only from spec.molecule. On the kicad-new lane it runs before start attaches a spec, so a molecule run opened with intake --requirements (formFactor.kind "molecule") would get a page of kind board, which is #137 again.

What changed (in adom-aiflow 0.2.56). The run counts as a molecule when the spec has molecule, or when requirements.json says formFactor.kind: "molecule", or names a MachinePin in formFactor.pin. That one rule now drives the page kind project-page creates, the README's molecule note, and the molecule-publish hand-off hint after export, finish and deliver. So on the from-scratch lane the page is created as kind molecule without the manual page create workaround. The aiflow-molecule skill says so.

How it was verified. A unit test covers spec only, requirements kind (any case), requirements pin, a board form factor and nothing at all. A new workflow suite (tests/page-results-workflow.py) runs a run whose only molecule signal is requirements.json and checks that it is treated as a molecule. The full unit and workflow suites pass.

Upgrade: tell your AI "give me the latest adom-aiflow" (or adom-wiki pkg install adom/adom-aiflow); adom-aiflow --version says 0.2.56.

John Lauer closed this ·

Log in to reply.