Skip to content

[UC-3697] Bootstrap libCharon for agentic development across four agent harnesses - #59

Draft
Jelle Spijker (jellespijker) wants to merge 2 commits into
mainfrom
UC-3697_AI_DF
Draft

[UC-3697] Bootstrap libCharon for agentic development across four agent harnesses#59
Jelle Spijker (jellespijker) wants to merge 2 commits into
mainfrom
UC-3697_AI_DF

Conversation

@jellespijker

@jellespijker Jelle Spijker (jellespijker) commented Jul 29, 2026

Copy link
Copy Markdown
Member

Jira ticket: UC-3697

Why

AI coding agents work on this repository. Each agent reads a different
configuration file. The rules were not written down, so every agent guessed.
This change writes the rules down once and links them to all four agent tools.

The UltiMaker agentic bootstrap skill generates the content. This pull request
applies that skill to libCharon.

What

Two commits add generated configuration. No product code changes.

  • .agents/rules/ — 15 rule files in numbered load-tier bands.
  • .agents/hooks/ — pre-commit gates and agent hooks.
  • .claude/, .opencode/, .github/, AGENTS.md — links to the same rules.
  • .aiignore — the one source for AI context exclusion.
  • scripts/ — token retrieval, config sync, and pre-pull-request checks.
  • .github/PULL_REQUEST_TEMPLATE.md — the required description sections.
  • .pre-commit-config.yaml, .talismanrc — commit-time gates.

How

The rules load in three tiers.

  1. Always — the rule is in the agent context in every session. Example:
    01-jira-commit-standards.md.
  2. On a file glob — the rule loads when the agent opens a matching file.
    Example: 28-systemd-dbus-architecture-rules.md loads for service/**.
  3. When the agent decides — the agent reads the rule if it judges the rule
    relevant. Example: 40-skill-discovery-index-rules.md.

Four tools read the output. Each tool reads a different path, so the generator
writes symbolic links to one set of rule files.

  • Claude Code reads CLAUDE.md and .claude/.
  • Antigravity reads AGENTS.md and .ignore.
  • GitHub Copilot reads .github/copilot-instructions.md.
  • OpenCode reads opencode.json and .opencode/.

Two rules come from evidence in this repository.

  • 28-systemd-dbus-architecture-rules.md — libCharon ships its own systemd
    unit service/charon.service and its own D-Bus policy
    service/nl.ultimaker.charon.conf. The rule names both files.
  • 29-gcode-architecture-rules.mdCharon/filetypes/GCodeFile.py and
    Charon/filetypes/GCodeSocket.py parse G-code. The rule points to the
    canonical ultimaker-gcode-architecture skill.

The bootstrap does not classify libCharon as a cloud service. The repository
ships a local daemon. It has no web framework and no service manifest. The
cloud rule set is therefore absent.

The mutating pre-commit hooks (end-of-file-fixer, trailing-whitespace) are
limited to the files this change adds. They cannot reformat product code.

This is support for agentic development. The rules will change as we learn.
This is not product code.

Verification & Validation (V&V)

pre-commit run --all-files — 20 hooks, all pass, no file changed:

check for merge conflicts................................................Passed
check yaml...............................................................Passed
check json...............................................................Passed
check for added large files..............................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
talisman.................................................................Passed
Block absolute local path references.....................................Passed
Detect hardcoded API keys and credentials................................Passed
Refuse commits on protected branches.....................................Passed
Verify AI exclusion targets match .aiignore..............................Passed
Enforce rule numbering bands, frontmatter coherence and managed-space....Passed
Verify the Copilot rule index lists every rule in .agents/rules..........Passed
Enforce file size budget and grandfathering ratchet......................Passed
Verify submodule tracking in git index...................................Passed
Verify 100% parity across Quad-Agent configuration targets...............Passed
Prevent disabling pre-commit hooks or Talisman credentials scanning......Passed
Verify alignment with upstream release branches..........................Passed
Detect multi-intent PRs mixing features with refactoring.................Passed
Enforce systemd CPU scheduling policy and RAM limits.....................Passed

The repository test suite passes:

$ python3 -m pytest -q
37 passed, 25 warnings in 0.07s

Other checks:

  • git diff -w origin/main...HEAD touches no file under Charon/ or tests/.

  • The only edit to an existing file is one comment and one pattern in
    .gitignore.

  • All 41 symbolic links resolve.

  • All hook scripts compile with python3 -m compileall.

  • Automated unit/integration tests pass

  • Pre-commit static checks pass cleanly on this branch's diff

  • Visual evidence attached for UI changes (not applicable)

PR Checklist

  • Initiating developer reviewed AI-generated code
  • No hardcoded absolute local paths or secrets introduced
  • Standing file-size and complexity budgets respected
Related pull requests — this change is one part of the agentic-bootstrap roll-out

The bootstrap skill and its rules are in UltiCortex. The repository pull requests
apply that skill. Read the UltiCortex stack first if you want the reasoning.

UltiCortex — the skills (16 stacked layers, one per skill, read top down)

Firmware

Cloud

Copilot AI 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.

Pull request overview

This PR standardizes contributor/agent onboarding and local commit-time quality gates for libCharon by adding a repository-level agent guide and a new pre-commit configuration.

Changes:

  • Added AGENTS.md describing repo purpose, Jira/commit/PR process requirements, and safety guidance.
  • Added .pre-commit-config.yaml with basic format checks, large-file checks, Talisman secret scanning, and a local absolute-path blocker.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
AGENTS.md Adds an onboarding/operational guide with contribution and safety expectations.
.pre-commit-config.yaml Introduces pre-commit hooks for validation, secret scanning, and blocking absolute local paths.
Comments suppressed due to low confidence (1)

.pre-commit-config.yaml:43

  • block-absolute-paths's exclude regex treats . as “any char” (e.g., AGENTS.md / README.md / .github) and it doesn't exclude .pre-commit-config.yaml, so the hook can end up flagging its own config when that file is edited/committed. Escape literal dots and exclude the config file explicitly.
        exclude: |
          (?x)^(
            AGENTS.md|
            README.md|
            docs/.*|

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml Outdated
Comment on lines +24 to +30
exclude: |
(?x)^(
\.github/.*|
docs/.*|
.*\.md|
\.pre-commit-config\.yaml
)$
@jellespijker Jelle Spijker (jellespijker) changed the title [UC-3697] Standardize AGENTS.md and pre-commit configuration [UC-3697] Establish Quad-Agent development architecture Jul 29, 2026
@jellespijker Jelle Spijker (jellespijker) changed the title [UC-3697] Establish Quad-Agent development architecture [UC-3697] Synchronize Quad-Agent bootstrap rules, security hooks, and empirical verification gates Jul 30, 2026
@jellespijker

Copy link
Copy Markdown
Member Author

🛡️ Adversarial Security Audit & Quad-Agent Review Summary

  • Adversarial Security Audit: Passed 100% cleanly (run_adversarial_audit.py). Conflict markers resolved in instruction templates.
  • Quad-Agent Configuration Parity: 100% verified across Antigravity (.agents/), Claude Code (.claude/), Copilot (.github/), and OpenCode (.opencode/).
  • Stack Behavioral Assessment:
    • Python package utility and GCode parser for Cura Cloud API.
    • Error-swallowing audit guard ensures exceptions in GCode/OPC file reading are logged cleanly rather than silenced.

@jellespijker Jelle Spijker (jellespijker) changed the title [UC-3697] Synchronize Quad-Agent bootstrap rules, security hooks, and empirical verification gates [UC-3697] Bootstrap libCharon for agentic development across four agent harnesses Aug 14, 2026
Add the generated agentic development configuration produced by the
ultimaker-agentic-bootstrap skill.

- .agents/rules/ holds the rule set in numbered load-tier bands.
- .agents/hooks/ holds the pre-commit and agent hooks.
- .claude/, .opencode/, .github/ and AGENTS.md link the same rules for
  Claude Code, OpenCode, GitHub Copilot and Antigravity.
- .aiignore is the single source for AI context exclusion. The compiler
  writes .ignore and .github/copilot-content-exclusion.yml.

This is support for agentic development. It is not product code.
Add the helper scripts and the pull request template that the rules
reference.

- scripts/verify_and_create_pr.sh runs the gates before a pull request.
- scripts/sync_agentic_configs.sh rebuilds the per-harness links.
- scripts/get_github_token.sh reads the token from the system keyring.
- scripts/create_boyscout_branch_and_pr.sh isolates unrelated fixes.
- .github/PULL_REQUEST_TEMPLATE.md sets the required description
  sections.
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