Skip to content

Simplify module specs, add source links, document agent-built provenance#15

Merged
ewowi merged 4 commits into
mainfrom
release-prep
Jun 9, 2026
Merged

Simplify module specs, add source links, document agent-built provenance#15
ewowi merged 4 commits into
mainfrom
release-prep

Conversation

@ewowi

@ewowi ewowi commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #14 on the same release-prep branch. Pure docs + scripts — no src/, test/, CMakeLists, or library.json touched, so only the spec-check commit gate applies (passing).

What landed

Provenance (README + release notes)

  • State that everything in the repo — code, installer, MoonDeck, docs, unit + scenario tests, screenshots/GIFs — is authored by agents; the product owner authors process (CLAUDE.md), architecture, and module specs, and controls every commit, merge, and release.
  • Call out unit and scenario tests as a strongpoint in both README and the v1.0.0 release notes.

Spec simplification (docs/moonmodules, ~3,400 → ~2,000 lines, no info lost)

  • Removed prose that duplicated the .h (method signatures, control mechanics, validation rules) across all 40 spec pages; kept wire contracts, cross-domain wiring, and prior art per the CLAUDE.md spec-doc rule.
  • Fixed two present-tense violations (BlendMap, Layouts) and a stale BlendMap blend-path description.
  • Consolidated the REST API into HttpServerModule (ui.md now links to it); removed ui.md's self-recap "Feature summary".
  • Moved leddriver-analysis-{top-down,bottom-up}.md to docs/backlog/ (forward-looking design studies, not module specs); repointed the architecture.md link and internal relative links.

Source links + enforcement

  • Added a ## Source section to every spec page linking back to its .h/.cpp (UI + LightConfig to their multi-file sources).
  • check_specs.py now enforces the contract: every spec must carry a ## Source section whose relative links resolve — catches renamed-source drift and Source-less new pages at commit gate 1.

Checks

  • Spec check (gate 1): ✅ 29 modules ok, 0 missing, 0 outdated, 0 source-link issues.
  • Build/test/scenario/KPI gates: skipped — triggers don't fire (doc/scripts-only).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Web installer/README wording updated: "latest" build label removed and UI now explicitly notes you can send the render pipeline to Art‑Net/DMX.
  • Documentation

    • Streamlined and clarified many module and UI docs for readability.
    • Added standardized "Source" references and embedded UI asset notes.
    • Clarified agent authorship vs. product‑owner roles and updated historical/prior‑art tracking.

Trims the docs/moonmodules spec pages to complement the source rather than restate it (~3,400 → ~2,000 lines, no information lost), links each spec back to its code, and records in the README + release notes that projectMM is authored entirely by agents.

Docs / CI:
- README + release-notes-v1.0.0: state that all code, installer, MoonDeck, docs, tests, and images are agent-authored — the product owner authors process/architecture/specs and controls every commit, merge, and release; call out unit + scenario tests as a strongpoint.
- docs/moonmodules: removed prose that duplicated the .h (method signatures, control mechanics, validation rules) across all 40 spec pages; kept wire contracts, cross-domain wiring, and prior art per the CLAUDE.md spec-doc rule. Fixed two present-tense violations (BlendMap "what worked/needs improvement", Layouts "what needs improvement") and a stale BlendMap blend-path description.
- docs/moonmodules: added a "## Source" section linking every spec to its .h/.cpp (UI + LightConfig to their multi-file sources); consolidated the REST API into HttpServerModule (ui.md links to it) and removed ui.md's self-recap "Feature summary".
- docs/backlog: moved leddriver-analysis-{top-down,bottom-up}.md out of moonmodules (forward-looking design studies, not module specs); repointed the architecture.md link and the docs' internal relative links.
- check_specs.py: enforce the source-link contract — every spec page must carry a "## Source" section whose relative links resolve, catching renamed-source drift and Source-less new pages at commit gate 1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ewowi, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 25 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 444049b2-dbdd-4707-9005-10a62c327abf

📥 Commits

Reviewing files that changed from the base of the PR and between ce0187d and 537f7f9.

📒 Files selected for processing (2)
  • docs/history/README.md
  • docs/history/repo-transfer.md
📝 Walkthrough

Walkthrough

This PR consolidates and refactors documentation across 50+ moonmodule specifications by adding "Source" sections linking to implementation headers, streamlining content descriptions, and introducing a validation script. Four new external-project activity digests expand the history folder, while navigation and process docs clarify AI agent authorship and prior-art study practices.

Changes

Documentation Audit and Source Link Integration

Layer / File(s) Summary
All documentation, history, README, and validation changes
docs/**/*, scripts/check/check_specs.py, README.md, CLAUDE.md, docs/backlog/*, docs/history/*
Consolidated documentation rewrites across core and light moonmodules with added “## Source” sections linking to implementation headers, updated architecture/backlog link paths, four new history digests, README/CLAUDE/backlog wording edits, and a new check_source_links() validation added to scripts/check/check_specs.py.

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly Related PRs

  • ewowi/projectMM#9: Documentation and architecture alignment work related to markWiredByCode() and build-hook lifecycle framing.
  • ewowi/projectMM#7: Adds similar "Source" sections and spec-validator changes tied to OTA/Improv/HTTP server docs and headers.

Poem

🐰 A tidy rabbit pipes a rhyme,
Linking specs in orderly time.
Headers found where docs now say,
History chronicles the pathway.
A script checks links to keep them bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically summarizes the main changes: simplifying module specs, adding source links, and documenting agent-built provenance, which are the core factual changes across the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-prep

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/moonmodules/light/effects/NoiseEffect.md`:
- Line 16: In the NoiseEffect documentation paragraph that describes 2D/3D
behavior (the line containing the phrase "z axis"), replace the non-hyphenated
term "z axis" with the hyphenated compound "z-axis" to match the surrounding
technical style; locate the sentence that currently reads "in 3D the z axis
scrolls at 1/5 the x-rate..." and update it to "in 3D the z-axis scrolls at 1/5
the x-rate..." so the compound noun is consistently hyphenated across the
NoiseEffect.md text.

In `@scripts/check/check_specs.py`:
- Around line 84-91: The current regex in check_specs.py (the re.search that
assigns m for '^## Source') captures to EOF so links in later sections can be
mistaken as part of Source; narrow the match to only the Source section by
changing the search to capture up to the next top-level header or end-of-file
(e.g. use a non-greedy dotall with a lookahead like "(?=^##\\s|\\Z)"), then
continue using m.group(1) for re.findall (links/rel_links) and the existing
issues logic so only links inside the actual Source section are checked.
- Around line 96-98: The current link-resolution logic accepts absolute or
out-of-repo paths because it only checks filesystem existence; change it to
reject any href target that is absolute or escapes the repository root: compute
target = href.split("#",1)[0] as before, immediately reject if target
startswith("/") or startswith("..") (or contains ".." path components), then
resolve the candidate = (md.parent / target).resolve() and ensure candidate is
inside the repository root (e.g., compare candidate with repo_root.resolve() via
is_relative_to or by checking candidate.parts startswith repo_root.parts); only
if the candidate exists and is inside the repo should you append the link to
issues as valid—otherwise append the same "source link does not resolve" error.
Ensure you update the logic around the existing target/href/md.parent resolution
and the issues.append call.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8801669e-84ab-44b7-aa08-f19b1d649abe

📥 Commits

Reviewing files that changed from the base of the PR and between 08c2981 and e135190.

📒 Files selected for processing (46)
  • README.md
  • docs/architecture.md
  • docs/backlog/leddriver-analysis-bottom-up.md
  • docs/backlog/leddriver-analysis-top-down.md
  • docs/history/release-notes-v1.0.0.md
  • docs/moonmodules/core/BoardModule.md
  • docs/moonmodules/core/Control.md
  • docs/moonmodules/core/FilesystemModule.md
  • docs/moonmodules/core/FirmwareUpdateModule.md
  • docs/moonmodules/core/HttpServerModule.md
  • docs/moonmodules/core/ImprovProvisioningModule.md
  • docs/moonmodules/core/MoonModule.md
  • docs/moonmodules/core/NetworkModule.md
  • docs/moonmodules/core/Scheduler.md
  • docs/moonmodules/core/SystemModule.md
  • docs/moonmodules/core/ui.md
  • docs/moonmodules/light/BlendMap.md
  • docs/moonmodules/light/Buffer.md
  • docs/moonmodules/light/Drivers.md
  • docs/moonmodules/light/EffectBase.md
  • docs/moonmodules/light/Layer.md
  • docs/moonmodules/light/Layers.md
  • docs/moonmodules/light/Layouts.md
  • docs/moonmodules/light/LightConfig.md
  • docs/moonmodules/light/MappingLUT.md
  • docs/moonmodules/light/drivers/ArtNetSendDriver.md
  • docs/moonmodules/light/drivers/PreviewDriver.md
  • docs/moonmodules/light/effects/CheckerboardEffect.md
  • docs/moonmodules/light/effects/FireEffect.md
  • docs/moonmodules/light/effects/GameOfLifeEffect.md
  • docs/moonmodules/light/effects/GlowParticlesEffect.md
  • docs/moonmodules/light/effects/LavaLampEffect.md
  • docs/moonmodules/light/effects/LinesEffect.md
  • docs/moonmodules/light/effects/MetaballsEffect.md
  • docs/moonmodules/light/effects/NoiseEffect.md
  • docs/moonmodules/light/effects/ParticlesEffect.md
  • docs/moonmodules/light/effects/PlasmaEffect.md
  • docs/moonmodules/light/effects/PlasmaPaletteEffect.md
  • docs/moonmodules/light/effects/RainbowEffect.md
  • docs/moonmodules/light/effects/RipplesEffect.md
  • docs/moonmodules/light/effects/SpiralEffect.md
  • docs/moonmodules/light/layouts/GridLayout.md
  • docs/moonmodules/light/layouts/SphereLayout.md
  • docs/moonmodules/light/modifiers/CheckerboardModifier.md
  • docs/moonmodules/light/modifiers/MultiplyModifier.md
  • scripts/check/check_specs.py

Comment thread docs/moonmodules/light/effects/NoiseEffect.md Outdated
Comment thread scripts/check/check_specs.py Outdated
Comment thread scripts/check/check_specs.py
ewowi and others added 3 commits June 8, 2026 13:16
Adds four friend-repo activity digests, reframes how the docs describe learning from other projects (study designs, don't copy code; credit by name), and folds in the CodeRabbit review fixes on the spec-source-link checker.

Docs / CI:
- history: added digests for troyhacks/WLED (PixelForge, RMTHI, audio-reactive hardening + a per-month experimental-branches line for the HDMI/ESP32-P4/W5500/voice branches), hpwit/I2SClocklessLedDriver (IDF5.5, RGBCCT, >65K LEDs, arduino-less ESP-IDF — recent work authored mostly by projectMM), hpwit/ESPLiveScript (work lives on version branches, not main), and hpwit/I2SClocklessVirtualLedDriver (dormant since 2024).
- history: renamed the four owner-less digests to owner-repo.md (FastLED-FastLED, wled-WLED, MoonModules-WLED-MM, PlummersSoftwareLLC-NightDriverStrip) for consistency with the new files; fixed the index cross-refs; extended cross-repo trends (parallel DMA output, HDMI/display output, on-device live scripting) and repointed the LED-driver-analysis link to backlog.
- CLAUDE.md + README: reworded the "cherry-pick" language to study-their-designs-don't-copy-their-code; replaced an overstated "ideas aren't copyrightable" claim with a license-respecting, attribution-by-name commitment ("a good idea doesn't care who has it").
- backlog: added docs/backlog/README.md as the folder index (list + draft specs + design studies) and referenced it from the CLAUDE.md doc tree.
- NoiseEffect: hyphenated "z-axis" for consistency with surrounding text.

Reviews:
- 🐇 NoiseEffect "z axis" → "z-axis": fixed.
- 🐇 check_specs.py Source-section regex captured to EOF: fixed — bounded the match to the section with a next-header/EOF lookahead so links in any later section aren't scanned as source links.
- 🐇 check_specs.py accepted absolute/out-of-repo source links: fixed — now rejects absolute paths and any link whose resolved target escapes the repo root.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…unt fix

Sharpens architecture.md into an explicit up-front contract (committed-but-unbuilt designs marked 🚧), tightens the core/light-domain boundary in both directions, and corrects the now-stale "three UI files" claim across the docs.

Docs / CI:
- architecture.md: added a 🚧 legend (designed, not implemented yet, high-prio for release 2) and applied it to the two-core double-buffer handover, multi-device clock sync, light distribution, and multi-layer composition — written in their proper sections rather than a catch-all "undesigned" list.
- architecture.md: corrected the "no locks on the hot path" overclaim (single-threaded today; the cross-core hand-off needs an atomic double-buffer swap, scoped lock-free pull to the small-POD-struct case only); first-mention links for MoonModule / Scheduler / controls / UI / ModuleFactory / check_platform_boundary.py; explained "the engine" as the running module tree; clarified markWiredByCode / setLoadAllHook; fixed the Olimex-runs-all-four claim (Gateway runs the two eth variants; S3 firmware is S3-only); "32 channels per light" → runtime uint8_t (1–255), no pre-allocated array.
- architecture.md: pulled light-domain specifics out of core sections (brightness/LUT examples) and moved the discovery + clock-sync mechanism into a core § Multi-device runtime, leaving only the light payoff in § Multi-device sync; moved per-module reporting (classSize/dynamicBytes/loopTimeUs) to core as a base-class feature.
- "Three hand-maintained UI files" was stale — src/ui embeds five (index.html, app.js, style.css, preview3d.js, install-picker.js). Fixed in architecture.md, ui.md (×3), building.md (ui_embed inputs), performance.md (embedded-assets row).
- release-notes-v1.0.0: compressed "Under the hood" (was near-verbatim README) to a summary + link, keeping the release-worthy test-layers and built-by-agents highlights; dropped the stale RMT/SPI mention to match README.
- README: "Up to 16,384 LEDs (other devices even more)", Art-Net/DMX wording, "native LED drivers", pipeline "send it to Art-Net, and save it", dropped the 2.0-item aside and the (beta) label.

Reviews:
- 👤 Product-owner doc review across architecture.md, README, release notes, ui.md — all items processed (linking, boundary, 🚧 marking, stale-claim fixes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A staged handoff plan for moving the repo from the ewowi personal account to the MoonModules org and cutting the web-installer URLs over to moonmodules.org. Written for a fresh Claude Code session in the post-transfer clone, which won't have the planning context.

Docs / CI:
- docs/history/repo-transfer.md: new runbook. Two-stage plan (rename repo references first, prove it works via GitHub's 301 redirect, then cut installer URLs to the canonical moonmodules.org as the one CORS-sensitive step), pre-transfer baselines to diff against, exact rewrite scope (~82 occ/28 files for ewowi/projectMM, ~11/9 for ewowi.github.io), the Pages setup (Source=Actions, custom domain blank — and why it differs from MoonLight's branch deploy), the do-not-rewrite exclusions (ewowi/StarLight, projectMM-v1/v2, author names, and this file itself), and the Stage-3 release finish.
- docs/history/README.md: index the runbook under a new "Runbooks" heading.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant