Skip to content

Use claude-sandbox and tidy up claude skills.#57

Merged
ggayDiamond merged 10 commits into
mainfrom
tidy-llm-use
May 21, 2026
Merged

Use claude-sandbox and tidy up claude skills.#57
ggayDiamond merged 10 commits into
mainfrom
tidy-llm-use

Conversation

@gilesknap
Copy link
Copy Markdown
Contributor

@gilesknap gilesknap commented May 21, 2026

Summary

Stand up the bwrap-based claude-sandbox for this repo and replace the
old monolithic agent docs with a proper CLAUDE.md + per-skill files
under .claude/skills/. A handful of unrelated tidy-ups ride along.

Sandbox & agent context (main theme)

  • initial .claude addition (7c87445) — embed the
    claude-sandbox snapshot under .devcontainer/claude-sandbox/
    (claude-shadow, install.sh, promote.sh), wire it through
    devcontainer.json + postCreate.sh, and add .claude/ scaffolding
    (settings.json, verify-sandbox + memo commands, sandbox-check
    hook, statusline, justfile).
  • Restructure agent context: CLAUDE.md + .claude/skills/
    (8535007) — delete AGENTS.md / SKILLS.md / CLAUDE_NOTES.md
    (623 lines combined) in favour of a 66-line CLAUDE.md with
    project-specific rules only, plus three skills that surface
    automatically via frontmatter: beckhoff-xml,
    ads-simulator-testing, mermaid-diagrams.
  • add more skills for catio (44753c6) — two more skills:
    fastcs-controller-connect (the await super().connect() gotcha)
    and test-system-preflight (port-collision diagnostics for
    test_system.py).
  • add AdsSymbolTypePattern notes to beckhoff skill (f2f6621) —
    extends the beckhoff-xml skill with AdsSymbolTypePattern notes.
  • forward VIRTUAL_ENV + uv/pre-commit vars into the sandbox
    (6395500) — temporary local mirror of upstream
    gilesknap/claude-sandbox#27 so uv run / ruff / pytest
    resolve on PATH inside the sandbox instead of falling back to a
    parallel .venv/. Will be reverted on next re-promote once fix simulator to accept all CoE #27
    merges upstream.

Other tidy-ups bundled in

  • update to fastcs 0.14.0 (0c4c609) — bump
    pyproject.toml + uv.lock from a beta to the 0.14.0 release.
  • update pyright (cfa702e) — uv.lock only.
  • quiet down three startup log issues (45d7731) — three
    unrelated noise fixes at startup: render the I/O device dict as a
    list so loguru doesn't crash on {...} braces (client.py);
    demote intentional compound-type CoE skips from WARNING to DEBUG
    and drop an unreachable guard (catio_dynamic_coe.py); suppress
    the attribute-map warning for ._unreferenced_. notification
    paths like WcState (catio_controller.py).
  • enable input channels on EL3314 (4875812) — flip six
    selected: flags in terminal_types.yaml to enable the EL3314
    input channels.

Test plan

  • uv run pytest green locally
  • uv run ruff check && uv run pyright src tests clean
  • Sandbox: just verify-sandbox passes (16-check battery + 10
    adversarial probes)
  • Confirm uv resolves on PATH inside the sandbox (no stray
    .venv/ created in CWD)
  • Smoke-test the IOC against real hardware — user-only, since
    fastcs-catio ioc needs the EtherCAT network

gilesknap and others added 9 commits May 19, 2026 11:14
Replace AGENTS.md + SKILLS.md + CLAUDE_NOTES.md with a much smaller
CLAUDE.md (project-specific rules only) and three proper Claude skills
under .claude/skills/ (beckhoff-xml, ads-simulator-testing,
mermaid-diagrams). Skills surface automatically via frontmatter
descriptions; activation prompts no longer needed.
- client.py: render I/O device dict as a list so loguru's formatter
  doesn't crash on the outer '{...}' braces
- catio_dynamic_coe.py: demote deliberate compound-type CoE skips from
  WARNING to DEBUG and drop the unreachable second guard
- catio_controller.py: suppress the attribute-map warning for
  notification paths containing '._unreferenced_.' (e.g. WcState)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors gilesknap/claude-sandbox#27 (Shape B) onto this repo's
embedded snapshot so `uv run`/`ruff`/`pytest` resolve on PATH inside
the claude sandbox, matching how they resolve in the regular
devcontainer shell. Without this, `uv` falls back to creating a
parallel `.venv/` in CWD instead of using the /cache-backed venv
that the devcontainer's remoteEnv points to.

- claude-shadow: existence-guard `$VIRTUAL_ENV/bin` and append it to
  the sandbox PATH (still after `$HOME/.local/bin` so the
  `/usr/local/bin/claude` shadow keeps winning resolution).
- claude-shadow: pass VIRTUAL_ENV, UV_PROJECT_ENVIRONMENT,
  UV_CACHE_DIR, UV_PYTHON_CACHE_DIR, PRE_COMMIT_HOME through
  --clearenv (only when set).

This is a temporary local mirror of an unmerged upstream patch
(issue #27); on next re-promote from claude-sandbox after that
lands, the snapshot will pick up the canonical version.

Verified: all 88 cases pass in a patched copy of claude-sandbox's
tests/bwrap_argv.sh (77 existing + 11 new for the venv passthrough).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.91%. Comparing base (ec3cbef) to head (2f42068).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/fastcs_catio/catio_controller.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
- Coverage   73.92%   73.91%   -0.01%     
==========================================
  Files          19       19              
  Lines        4130     4129       -1     
==========================================
- Hits         3053     3052       -1     
  Misses       1077     1077              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gilesknap
Copy link
Copy Markdown
Contributor Author

@ggayDiamond I'd like to merge this - its only claude things and some changing of log-levels for some log items that were deemed incorrectly levelled.

Reason is I have the big refactor of symbols.py ready to PR over it - and its fully working already!

@gilesknap gilesknap requested a review from coretl May 21, 2026 11:15
@gilesknap
Copy link
Copy Markdown
Contributor Author

@coretl I have removed the generic skills from .claude

@ggayDiamond ggayDiamond merged commit 460f5ff into main May 21, 2026
9 of 11 checks passed
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