Skip to content

chore(org-sync): sync Heretek-AI/.github@f27b1cc standards (tier-1 / node-zerodep) - #75

Open
BillyOutlast wants to merge 1 commit into
mainfrom
chore/sync-org-standards
Open

BillyOutlast wants to merge 1 commit into
mainfrom
chore/sync-org-standards

Conversation

@BillyOutlast

@BillyOutlast BillyOutlast commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Automated organization standardization sync from Heretek-AI/.github@f27b1cc01ec712c15e73e14e363457dcddd1f524 (tier: 1, profile: node-zerodep).

  • Updates lefthook.yml to the node-zerodep Lefthook v2 job profile
  • Seeds .editorconfig (missing) or refreshes it (fleet-managed marker; custom files kept)
  • Seeds biome.jsonc (bun-biome) / ruff.toml (python-uv) when the repo has no formatter config
  • Seeds .coderabbit.yaml with inheritance: true and the chore(org-sync) title keyword so org-sync PRs are excluded from CodeRabbit auto-review (custom files without the managed marker are left alone)
  • Syncs shared Agent Skills under .agents/skills/ (with .opencode/skills, .claude/skills, and .github/skills discovery symlinks)
  • Syncs Claude Code hooks (.claude/hooks/*.sh + marker-gated .claude/settings.json; .claude/settings.local.json is never touched)
  • Ensures baseline hygiene.yml / ocr.yml / dead-code-and-deps.yml / code-quality.yml callers and bumps reusable workflow pins (Heretek-AI/.github/.github/workflows/*) to f27b1cc01ec712c15e73e14e363457dcddd1f524 (skipped when the repository sets sync_workflows: false)
  • Pins third-party action and reusable-workflow uses: refs to full-length commit SHAs (org sha_pinning_required)

Evidence

Source commit: Heretek-AI/.github@f27b1cc01ec712c15e73e14e363457dcddd1f524
Target tier: 1
Target profile: node-zerodep
Validated by: Heretek-AI/.github CI (hygiene, zizmor, validate-skills.sh, shellcheck)

Linked issues

Tracked by Heretek-AI/.github organization standardization.

Summary by Sourcery

Adopt the organization’s updated Node zero-dependency standards for agent guidance and reusable workflow pins.

New Features:

  • Add shared adversarial-audit and spoonfeeder agent skills for producing evidence-based audit prompts and implementation briefs.

Bug Fixes:

  • Correct the documented Gitleaks commit-range command to pass the revision range directly to --log-opts.

Enhancements:

  • Update the existing security-review skill's Gitleaks guidance to use the corrected commit-range syntax.

Chores:

  • Pin the hygiene, OCR review, dead-code-and-dependencies, and code-quality reusable workflows to the organization standards commit.

Signed-off-by: BillyOutlast <172061051+BillyOutlast@users.noreply.github.com>
@BillyOutlast BillyOutlast added the org-sync Automated standardization PR from Heretek-AI/.github label Dec 4, 2026
@sourcery-ai

sourcery-ai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Pin the four reusable GitHub workflows to the organization’s standardized commit so these callers use the same shared workflow revision.

  • .github/workflows/code-quality.yml L23
  • .github/workflows/dead-code-and-deps.yml L30
  • .github/workflows/hygiene.yml L13
  • .github/workflows/ocr.yml L40

Documentation

Add the adversarial-audit skill, which guides agents in producing a repository-specific three-subagent audit prompt grounded in real integrations and testable claims.

  • .agents/skills/adversarial-audit-prompt/SKILL.md L1-255

Add the Spoonfeeder skill, which guides agents through verifying assumptions and writing a milestone-based implementation brief for another agent.

  • .agents/skills/spoonfeeder/SKILL.md L1-131

Update the security-review skill’s PR-range Gitleaks command to pass the commit range directly, without the --diff-merges=separate option.

  • .agents/skills/security-review/SKILL.md L31

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords: 1

  • chore(org-sync)

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@sourcery-ai sourcery-ai 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.

Hey - I've found 10 issues

Sourcery assessment

Needs a human reviewer. 10 findings to address first, and the new commit pins change which reusable GitHub Actions workflows execute, including the OCR review workflow that receives OCR_LLM_TOKEN. If the new revision mishandles that token or performs an unintended external action, reverting the pins stops future runs but cannot undo access or actions that already occurred.

Blocking findings: .agents/skills/security-review/SKILL.md:31, .agents/skills/adversarial-audit-prompt/SKILL.md:151, .agents/skills/spoonfeeder/SKILL.md:30, .agents/skills/spoonfeeder/SKILL.md:81, .agents/skills/adversarial-audit-prompt/SKILL.md:151, and 5 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

- Secrets & hygiene — pick the scanner mode that matches what you are reviewing:
- Pre-commit or staged-change check: `gitleaks protect --staged --redact --no-banner`
- PR branch or repository review (scans commits in range, not just the index): `gitleaks detect --source . --log-opts="--diff-merges=separate $(git merge-base origin/main HEAD)..HEAD" --redact --no-banner`. Substitute the real upstream base ref (for example `origin/trunk`) and omit `--log-opts` only when you intend to scan the entire history. `--no-git` (directory mode) remains available for non-git artifacts such as release tarballs.
- PR branch or repository review (scans commits in range, not just the index): `gitleaks detect --source . --log-opts="$(git merge-base origin/main HEAD)..HEAD" --redact --no-banner`. Substitute the real upstream base ref (for example `origin/trunk`) and omit `--log-opts` only when you intend to scan the entire history. `--no-git` (directory mode) remains available for non-git artifacts such as release tarballs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Merge-resolution secrets go undetected

When the reviewed range contains a merge commit whose resolution introduces a secret absent from its parent commits, gitleaks detect passes the revision range to Git without requesting merge diffs, so Git omits the merge-resolution changes and Gitleaks reports no finding for the secret.

Restore --diff-merges=separate in the --log-opts revision range.

- {{SPEC_ORIGIN}} Build gates that only check spec compliance cannot catch invented facts (API names, image tags, config shapes) in the spec. Matching the spec is not the same as working. Where the spec and reality disagree, reality wins and the spec is the defect.

### The Third Rule: SABOTAGE EVERY CRITICAL INVARIANT
- For each invariant marked **[S]** in section 3, break it with a one-line change in `$AUDIT_TMP/wt`, run the full suite there, and record whether the suite went red. Restore the line after each run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High · Repository commands access host resources

When a repository being audited contains a malicious test, install, or lifecycle script, a Git worktree isolates file edits but not process execution. A repository-controlled test suite or package lifecycle script therefore runs with the auditor’s filesystem, network, and environment access, allowing it to read or exfiltrate credentials or alter files outside the scratch area.

Require all repository-controlled commands and package installs to run in a disposable OS/container sandbox with credentials removed, host files unmounted, and network access disabled or explicitly restricted.

Also at .agents/skills/spoonfeeder/SKILL.md:26.


1. Read everything the user pointed at: repos, prior art, other models' proposals.
2. **Fact-check every claim you were handed**: CLI flags, API names, version numbers, counts. Check them against the installed tool, its `--help`, its type definitions or its source, never against memory or docs websites, which often describe an older major version.
- Install the exact pinned version if you can (`npm i <pkg>@<ver>`, `pip install`, and so on).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High · Dependency install exposes host credentials

When an agent follows the installation advice for a package selected from an untrusted repository or specification, the package manager executes the dependency’s install or build scripts with the agent’s local permissions, letting a malicious or compromised package read accessible credentials or alter files on the host.

Require dependency installs and package-supplied commands to run in a disposable, credential-free sandbox, or verify the package’s trustworthiness before running them on the host.

- stop after 3 failed attempts on the same error and write down what was tried,
- any hard "never do X" rules the spike uncovered.
3. **Paths and setup.**
- The exact absolute paths on the user's machine, as the user gave them.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Machine paths leak into PR

When a user supplies a sensitive local path and the target repository or PR is visible to other people, the brief includes the user’s exact local paths, and the delivery instructions then publish that brief in a PR, exposing usernames or sensitive directory names to repository viewers.

Require explicit approval before publishing machine-specific paths, and replace them with placeholders in any brief committed to a shared repository.

Also at .agents/skills/spoonfeeder/SKILL.md:117.

- {{SPEC_ORIGIN}} Build gates that only check spec compliance cannot catch invented facts (API names, image tags, config shapes) in the spec. Matching the spec is not the same as working. Where the spec and reality disagree, reality wins and the spec is the defect.

### The Third Rule: SABOTAGE EVERY CRITICAL INVARIANT
- For each invariant marked **[S]** in section 3, break it with a one-line change in `$AUDIT_TMP/wt`, run the full suite there, and record whether the suite went red. Restore the line after each run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Concurrent sabotage results are unreliable

When subagents sabotage invariants or run tests in the shared worktree at the same time, the subagents can test each other's changes or restore another agent's sabotage, so the reported suite results do not establish whether the tested invariant was caught.

Give each subagent its own disposable worktree for sabotage and test runs.

Also at .agents/skills/adversarial-audit-prompt/SKILL.md:128, .agents/skills/adversarial-audit-prompt/SKILL.md:183.

**Auditor Formation**: three independent adversarial subagents (Alpha, Beta, Gamma), a cross-examination pass, and a synthesis pass
**Output**: `AUDIT_REPORT_FINDINGS.md` at the repository root

This prompt is designed to be re-run. Each run audits the current `HEAD`, re-verifies every finding of the previous run, and overwrites `AUDIT_REPORT_FINDINGS.md`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Older audit results replace newer findings

When audit runs overlap against the same checkout and the older run finishes last, both controllers write AUDIT_REPORT_FINDINGS.md without checking which baseline is current, so the older run overwrites the newer report and its findings disappear.

Publish reports separately per run and only update the shared report when its baseline is still current.

## 0. Preflight (the controller does this before spawning subagents)

1. **Baseline.** Record at the top of the report: `git rev-parse HEAD`, `git log -1 --format='%ci %s'`, the UTC date, and the versions of every tool you will use ({{TOOLS}}). If `git status --porcelain` shows changes other than this prompt file and a previous report, list the dirty files and audit a clean `git worktree` of `HEAD` instead of the working tree.
2. **Scratch space.** `export AUDIT_TMP="$(mktemp -d -t {{REPO}}-audit-XXXXXX)"`. Every clone, downloaded binary, packed tarball, sabotage copy, container volume and raw log goes under `$AUDIT_TMP`. Each subagent writes its raw notes to `$AUDIT_TMP/{alpha,beta,gamma}.md`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Audit setup fails for owner/repo names

When {{REPO}} is filled with the conventional GitHub repository identifier owner/repo, the generated mktemp -t template contains a slash, so mktemp treats owner/repo-audit-XXXXXX as a path with a nonexistent parent and exits before the audit starts.

Use a fixed slash-free mktemp prefix, or sanitize {{REPO}} to a slash-free slug before inserting it.

## 5. Execution Directives for OpenCode

1. **Independent exploration.** Spawn Alpha, Beta and Gamma concurrently as three separate subagents. Hand each one this entire file plus its role. They must not read each other's notes until step 4. Each one works through the claims it owns (ownership is marked `[A]`, `[B]`, `[G]` in section 3) and may file findings on any claim.
2. **Run things.** Prefer executing to reading. Use the recipes in section 4 and any further commands you need (`git ls-remote`, `curl`, `jq`, `rg`{{EXEC_EXTRA}}). Save the raw output of every command you cite under `$AUDIT_TMP/logs/`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Command logs cannot be saved

When an auditor saves a command's output under the prescribed path before creating the logs directory, the instructions direct auditors to save output under $AUDIT_TMP/logs/, but preflight creates only $AUDIT_TMP; a command that redirects output there fails because the logs directory does not exist, losing the required raw evidence.

Create $AUDIT_TMP/logs during preflight before directing auditors to write command output there.


## 0. Preflight (the controller does this before spawning subagents)

1. **Baseline.** Record at the top of the report: `git rev-parse HEAD`, `git log -1 --format='%ci %s'`, the UTC date, and the versions of every tool you will use ({{TOOLS}}). If `git status --porcelain` shows changes other than this prompt file and a previous report, list the dirty files and audit a clean `git worktree` of `HEAD` instead of the working tree.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Audit evidence can target another commit

When the checked-out branch advances after baseline capture but before worktree creation, the baseline records the current HEAD, but the later worktree command resolves HEAD again. If the branch advances between those steps, tests run against a different commit than the one recorded in the report, so the audit's evidence is attributed to the wrong revision.

Capture HEAD once in a variable and use that exact SHA for both the baseline and worktree creation.

Also at .agents/skills/adversarial-audit-prompt/SKILL.md:128.

- for upstream comparisons, the upstream file path and commit SHA you compared against.
4. **Cross-examination.** When all three are done, each finding is handed to a different subagent (Alpha's to Beta, Beta's to Gamma, Gamma's to Alpha), whose job is to refute it: re-run the proof, look for a misreading, a wrong upstream version, or an environment artifact. A refuted finding is dropped or downgraded, and the refutation is noted in the finding.
5. **Coverage gate.** Before synthesis, check that every claim ID in section 3 has a status. Any claim without one goes back to its owner.
6. **Synthesis.** The controller writes `AUDIT_REPORT_FINDINGS.md` in the structure below, then cleans up (`git worktree remove`, stop any containers or processes you started) and confirms the real checkout has no changes apart from the report and this prompt file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Audit scratch data persists

When an audit reaches the cleanup step, the cleanup removes the worktree but never deletes $AUDIT_TMP, so cloned source, downloaded artifacts, raw logs, and notes remain on disk after the audit.

After successfully removing the worktree and stopping processes, remove $AUDIT_TMP so the audit's scratch files do not persist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

org-sync Automated standardization PR from Heretek-AI/.github

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant