Skip to content

chore: repo setup for Claude workflows and doc cleanup - #913

Merged
dcoutinho1328 merged 8 commits into
developmentfrom
chore/claude-setup
Jul 20, 2026
Merged

chore: repo setup for Claude workflows and doc cleanup#913
dcoutinho1328 merged 8 commits into
developmentfrom
chore/claude-setup

Conversation

@dcoutinho1328

@dcoutinho1328 dcoutinho1328 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • CLAUDE.md: new Issue Tracker section (Jira, project DOPE; GitHub Issues stays for external reports) and Git Workflow section
  • Removed docs/outdated/ (archived, no inbound refs), docs/ports/ (superseded snapshot of src/middleware/shared/ports/) and the empty CONTRIBUTING.md stub
  • EtherCAT and debugger docs updated to the post-reorg source layout (~30 stale paths); removed the deleted IEC system-task feature from the EtherCAT doc
  • Pipeline diagram fixed (STruC++ compiles C++, not iec2c); strucpp migration overview gained a verified status note
  • README: Node requirement matches engines (>=22 <24); added test commands

🤖 Generated with Claude Code

https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9

Summary by CodeRabbit

  • Documentation

    • Updated preview/setup requirements to Node.js >=22 <24.
    • Added “Running tests” instructions for unit tests (watch mode) and end-to-end tests (including build prerequisite).
    • Refreshed architecture documentation, including debugger scalability analysis, EtherCAT architecture, and STruC++ migration status.
    • Removed multiple outdated/legacy setup, design, and deprecated port/API reference documents.
  • Chores

    • Added contributor and review guidelines, plus tooling configuration to standardize PR expectations.

dcoutinho1328 and others added 4 commits July 2, 2026 16:08
Ticket-based workflows need the tracker and project key documented in-repo.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9
The convention existed only in branch history; agents and new
contributors could not reproduce it from docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9
docs/outdated was archived in April with no inbound references;
docs/ports was a design snapshot superseded by src/middleware/shared/
ports; CONTRIBUTING.md was an empty stub; engines requires Node >=22.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9
EtherCAT and debugger docs still referenced the pre-reorg src/main and
src/renderer trees and a deleted IEC system-task helper; the pipeline
diagram claimed iec2c where STruC++ compiles; README gains the real
test commands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR updates documentation for the current architecture, tooling, EtherCAT behavior, compilation pipeline, and contributor workflow. It adds test and review guidance, refreshes debugger and STruC++ references, and removes a deprecated theme port reference.

Changes

Documentation and architecture reference updates

Layer / File(s) Summary
Repository guidance refresh
CLAUDE.md
Updates architecture and Zustand slice documentation, compilation flow, TypeScript and lint guidance, IEC address location, Node.js requirement, and workflow instructions.
Contributor setup and validation guidance
README.md, .claude/review-guidelines.md, .claude/settings.json, CONTRIBUTING.md
Adds test commands, review rules, command permissions, contribution workflow, and setup requirements.
Architecture and toolchain references
docs/debugger-scalability-analysis.md, docs/ethercat-architecture.md, docs/strucpp-migration/00-overview.md
Updates source paths, EtherCAT state and runtime configuration details, compiler integration, and STruC++ status.
Port reference cleanup
docs/ports/theme-port.ts
Removes the deprecated ThemeVariant and ThemePort declarations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit hopped through paths anew,
With EtherCAT notes polished too.
Tests now bloom in README light,
STruC++ guides the build just right.
Thump, thump—the docs are bright! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the summary, but it omits the required template sections for references and the full DOD checklist. Add the PR info references section, Jira/issue links if applicable, and complete the DOD checklist from the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main documentation and Claude workflow setup changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/claude-setup

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/ethercat-architecture.md (1)

336-360: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the state tree in sync with taskPriority.

The Project Persistence block above now includes taskPriority in EthercatConfig.masterConfig, but this diagram still shows only networkInterface, cycleTimeUs, and watchdogTimeoutCycles. That leaves the documented schema inconsistent.

Suggested fix
-      └── masterConfig: { networkInterface, cycleTimeUs, watchdogTimeoutCycles }
+      └── masterConfig: { networkInterface, cycleTimeUs, watchdogTimeoutCycles, taskPriority }
🤖 Prompt for 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.

In `@docs/ethercat-architecture.md` around lines 336 - 360, Update the EtherCAT
state tree diagram in the architecture doc so `EthercatConfig.masterConfig`
matches the persisted schema by including `taskPriority` alongside
`networkInterface`, `cycleTimeUs`, and `watchdogTimeoutCycles`. Keep the change
localized to the “Zustand Store Slices” section and the `Project Slice` /
`updateEthercatConfig()` description so the documented shape stays consistent
with the `Project Persistence` block.
🤖 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/strucpp-migration/00-overview.md`:
- Around line 3-10: Clarify the migration status wording in the overview so it
distinguishes the editor-side removal of the local iec2c binary from the
remaining Runtime v3 MatIEC recompilation path. Update the status text near
compiler-module.ts, scripts/download-binaries.ts, and
src/backend/shared/compile/pipeline.ts so it explicitly says the editor no
longer ships or invokes iec2c locally, while Runtime v3 still uploads program.st
for on-device MatIEC recompilation.

---

Outside diff comments:
In `@docs/ethercat-architecture.md`:
- Around line 336-360: Update the EtherCAT state tree diagram in the
architecture doc so `EthercatConfig.masterConfig` matches the persisted schema
by including `taskPriority` alongside `networkInterface`, `cycleTimeUs`, and
`watchdogTimeoutCycles`. Keep the change localized to the “Zustand Store Slices”
section and the `Project Slice` / `updateEthercatConfig()` description so the
documented shape stays consistent with the `Project Persistence` block.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 937c95a2-425d-4632-afe3-bd9afdd61f39

📥 Commits

Reviewing files that changed from the base of the PR and between 67a2fe1 and 5fc9d4c.

📒 Files selected for processing (33)
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
  • docs/debugger-scalability-analysis.md
  • docs/ethercat-architecture.md
  • docs/outdated/ARDUINO_UNO_Q_BINARY_SIZE_FIX.md
  • docs/outdated/HEADLESS_SETUP.md
  • docs/outdated/dead-code-inventory.md
  • docs/outdated/debugger-opcua-shared-utilities.md
  • docs/outdated/external-binaries-strategy.md
  • docs/outdated/name-type-linking-design.md
  • docs/outdated/opcua-server-configuration/01-design-overview.md
  • docs/outdated/opcua-server-configuration/02-ui-screen-specifications.md
  • docs/outdated/opcua-server-configuration/03-json-configuration-mapping.md
  • docs/outdated/opcua-server-configuration/04-implementation-phases.md
  • docs/outdated/opcua-server-configuration/README.md
  • docs/outdated/s7comm-server-implementation.md
  • docs/outdated/unified-frontend-serialization.md
  • docs/outdated/variable-id-audit.md
  • docs/ports/accelerator-port.ts
  • docs/ports/compiler-port.ts
  • docs/ports/debugger-port.ts
  • docs/ports/device-port.ts
  • docs/ports/index.ts
  • docs/ports/platform-capabilities.ts
  • docs/ports/project-port.ts
  • docs/ports/runtime-port.ts
  • docs/ports/simulator-port.ts
  • docs/ports/system-port.ts
  • docs/ports/theme-port.ts
  • docs/ports/types.ts
  • docs/ports/window-port.ts
  • docs/strucpp-migration/00-overview.md
💤 Files with no reviewable changes (27)
  • docs/outdated/opcua-server-configuration/README.md
  • docs/ports/system-port.ts
  • docs/outdated/opcua-server-configuration/01-design-overview.md
  • docs/outdated/opcua-server-configuration/02-ui-screen-specifications.md
  • docs/outdated/unified-frontend-serialization.md
  • docs/ports/accelerator-port.ts
  • docs/outdated/variable-id-audit.md
  • docs/outdated/debugger-opcua-shared-utilities.md
  • docs/ports/window-port.ts
  • docs/outdated/dead-code-inventory.md
  • docs/outdated/opcua-server-configuration/03-json-configuration-mapping.md
  • docs/outdated/external-binaries-strategy.md
  • docs/ports/device-port.ts
  • docs/ports/compiler-port.ts
  • docs/outdated/ARDUINO_UNO_Q_BINARY_SIZE_FIX.md
  • docs/ports/simulator-port.ts
  • docs/outdated/s7comm-server-implementation.md
  • docs/outdated/opcua-server-configuration/04-implementation-phases.md
  • docs/outdated/name-type-linking-design.md
  • docs/ports/platform-capabilities.ts
  • docs/ports/debugger-port.ts
  • docs/outdated/HEADLESS_SETUP.md
  • docs/ports/project-port.ts
  • docs/ports/types.ts
  • docs/ports/runtime-port.ts
  • docs/ports/index.ts
  • docs/ports/theme-port.ts

Comment thread docs/strucpp-migration/00-overview.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 @.claude/settings.json:
- Around line 3-8: The Bash auto-approval rules in the settings are too broad
and currently permit arbitrary npm/npx/git/gh commands. Tighten the
permissions.allow entries by replacing the wildcard patterns with only the
specific safe subcommands actually needed, and keep the scope limited within the
settings configuration so the policy remains least-privilege.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ed748572-67f5-4642-bb57-1039c2ecb5d7

📥 Commits

Reviewing files that changed from the base of the PR and between 5fc9d4c and 3e970ad.

📒 Files selected for processing (3)
  • .claude/review-guidelines.md
  • .claude/settings.json
  • CONTRIBUTING.md
✅ Files skipped from review due to trivial changes (1)
  • .claude/review-guidelines.md

Comment thread .claude/settings.json
Contribution rules, the PR checklist, and the tracker pointer existed
only in scattered or personal files; this surfaces them where GitHub
and the review tooling actually read them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9
Conventions covered style but not the practices that prevent real
bugs: type assertions and floating promises in TS, unchecked buffers
and scan-cycle blocking in C, broad excepts and event-loop blocking
in Python.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019thCMmxxVfACL7dBodtZB9
Comment thread .claude/settings.json Outdated
"permissions": {
"allow": [
"Bash(npm:*)",
"Bash(npx:*)",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This committed project-level allowlist auto-approves Bash(npx:*), Bash(git:*) and Bash(gh:*) for every collaborator's Claude session. npx:* is arbitrary remote package execution (any prompt-injected session can fetch and run code without a prompt), git:* includes push --force, and gh:* includes gh pr merge, gh release, gh repo delete — outward-facing/destructive operations. Consider narrowing to the specific subcommands the workflows need (e.g. Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(gh pr view:*), Bash(npx playwright test:*), Bash(npx tsx:*)) and leaving broader grants to each developer's untracked .claude/settings.local.json.

Comment thread CONTRIBUTING.md Outdated
## Workflow

1. Internal work is tracked in Jira, project DOPE (internal tracker). External contributors: open a GitHub issue using the provided templates.
2. Branch from `development`, named `<type>/DOPE-<n>-<kebab-slug>` (`<type>`: feature, bugfix, task, improvement). Maintenance without a ticket uses `chore/`, `ci/`, `docs/`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The branch-naming scheme <type>/DOPE-<n>-<kebab-slug> requires a Jira ticket number that external contributors (addressed in step 1) cannot obtain — the only ticket-less escape hatch offered is chore//ci//docs/, which doesn't cover an external bugfix or feature. Spell out what external contributors should do (e.g. reference the GitHub issue number in the branch name, or note that a maintainer will file the DOPE ticket).

Comment thread .claude/review-guidelines.md Outdated
- Layer dependencies respect ports and adapters: frontend, backend, and middleware only communicate through the ports in `src/middleware/shared/ports/`. `npm run validate:arch` must pass.
- DTOs cross layer boundaries, never domain entities.
- 100%-coverage directories stay at 100%; new behavior comes with tests (Jest for logic, Playwright for user flows).
- TypeScript strict: no `any`, named exports over default exports.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This bullet overlaps with the later "TypeScript Best Practices in CLAUDE.md apply to every diff" bullet, which already forbids any (CLAUDE.md: "never any"). Also, "named exports over default exports" is an export-style preference, not a strictness rule, and it does not appear in CLAUDE.md's TypeScript Best Practices. Consider dropping the duplicated any clause, making "named exports over default exports" its own bullet, and (if CLAUDE.md is meant to be the canonical style source) adding the export rule there too.

Comment thread CLAUDE.md Outdated

## Git Workflow

- Base branch: `development` — feature branches start from it and PRs target it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Git Workflow section duplicates CONTRIBUTING.md's Workflow section (base branch, branch naming, Conventional Commits) with slightly different wording — a drift risk for two docs landing in the same PR. Consider making one the source of truth and having the other reference it (e.g. CLAUDE.md: "Follow CONTRIBUTING.md; <type> maps from the Jira issue type: Story → feature, ...").

dcoutinho1328 and others added 2 commits July 20, 2026 13:44
- Narrow .claude/settings.json Bash allowlist to specific subcommands
- CONTRIBUTING.md: branch-naming escape hatch for external contributors
- CLAUDE.md: Git Workflow defers to CONTRIBUTING.md; add named-exports rule
- review-guidelines: dedupe any-clause, split named-exports bullet
- strucpp overview: separate local iec2c removal from Runtime v3 MatIEC path
- ethercat doc: add taskPriority to state-tree masterConfig

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LRdcPv4CCxEKR3N8nYKYp6

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 @.claude/settings.json:
- Line 4: Update the Bash permission entry in the settings configuration to
replace the wildcard npm script pattern with explicit allowlisted validation
commands required by the workflow. Exclude mutating or external-effect scripts
such as build, package, postinstall, prepare, and rebuild, and avoid permitting
arbitrary current or future npm scripts.

In `@CONTRIBUTING.md`:
- Line 5: Update the setup reference in CONTRIBUTING.md to say “full
step-by-step guide” instead of “full step by step,” preserving the existing
README.md link and surrounding wording.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 47c2cf54-e2bc-40e7-9243-342a60c7863e

📥 Commits

Reviewing files that changed from the base of the PR and between 3e970ad and 5f23712.

📒 Files selected for processing (6)
  • .claude/review-guidelines.md
  • .claude/settings.json
  • CLAUDE.md
  • CONTRIBUTING.md
  • docs/ethercat-architecture.md
  • docs/strucpp-migration/00-overview.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • .claude/review-guidelines.md
  • CLAUDE.md
  • docs/strucpp-migration/00-overview.md

Comment thread .claude/settings.json
{
"permissions": {
"allow": [
"Bash(npm run:*)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
python - <<'PY'
import json

with open("package.json", encoding="utf-8") as f:
    scripts = json.load(f).get("scripts", {})

print("\n".join(sorted(scripts)))
PY

Repository: Autonomy-Logic/openplc-editor

Length of output: 386


🏁 Script executed:

#!/bin/bash
sed -n '1,120p' .claude/settings.json
printf '\n--- package.json scripts ---\n'
python3 - <<'PY'
import json
with open("package.json", encoding="utf-8") as f:
    scripts = json.load(f).get("scripts", {})
for name in sorted(scripts):
    print(f"{name}: {scripts[name]}")
PY

Repository: Autonomy-Logic/openplc-editor

Length of output: 2697


Narrow Bash(npm run:*) to explicit scripts.
package.json includes mutating and external-effect scripts like build, package, postinstall, prepare, and rebuild, so this rule allows arbitrary repo scripts now and in the future. Allow only the specific validation commands the workflow needs.

🤖 Prompt for 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.

In @.claude/settings.json at line 4, Update the Bash permission entry in the
settings configuration to replace the wildcard npm script pattern with explicit
allowlisted validation commands required by the workflow. Exclude mutating or
external-effect scripts such as build, package, postinstall, prepare, and
rebuild, and avoid permitting arbitrary current or future npm scripts.

Comment thread CONTRIBUTING.md

## Setup

Requires Node.js >= 22 < 24. See README.md for the full step by step.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use “step-by-step” wording.

Change “full step by step” to “full step-by-step guide” for grammatical correctness.

🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Use a hyphen to join words.
Context: ...22 < 24. See README.md for the full step by step. ```bash npm install npm run dev ...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for 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.

In `@CONTRIBUTING.md` at line 5, Update the setup reference in CONTRIBUTING.md to
say “full step-by-step guide” instead of “full step by step,” preserving the
existing README.md link and surrounding wording.

Source: Linters/SAST tools

@dcoutinho1328
dcoutinho1328 merged commit 72adc40 into development Jul 20, 2026
15 checks passed
@dcoutinho1328
dcoutinho1328 deleted the chore/claude-setup branch July 20, 2026 21:59
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.

2 participants