agentleFS
diriendirien/yet-another-agent-harness/.github/workflows/AGENTS.md

yet-another-agent-harness / workflows

AGENTS.md19 starsChanged 8 months agoMITView on GitHub

The file

We split this AGENTS.md into the rules it gives an agent

9 rules. About 1 is common, 2 are distinctive, and 6 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Minimal permissions: Use permissions: block, never use permissions: write-all

    line 42
  2. Very specific:

    Job dependencies: Use needs: to express dependencies

    line 44
  3. Very specific:

    Caching: Use actions/cache for dependencies (npm, composer, go)

    line 45
  4. Very specific:

    Minimal permissions: Start with contents: read, add only what's needed

    line 137
  5. Distinctive:

    Environment protection: Use environments with required reviewers for deploys

    line 138
  6. Very specific:

    Dependency review: Use actions/dependency-review-action for PRs

    line 140
  7. Common:

    OIDC: Prefer OIDC over long-lived secrets for cloud providers <!-- AGENTS-GENERATED:END security -->

    line 141
  8. Very specific:

    Use act for local testing: https://github.com/nektos/act

    line 165
  9. Distinctive:

    Check existing workflows in this repo for patterns <!-- AGENTS-GENERATED:END help -->

    line 166

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md
<!-- Managed by agent: keep sections and order; edit content, not structure. Last updated: 2026-04-03 -->

AGENTS.md — workflows

<!-- AGENTS-GENERATED:START overview -->

Overview

GitHub Actions workflows and CI/CD automation

<!-- AGENTS-GENERATED:END overview --><!-- AGENTS-GENERATED:START filemap -->

Key Files

FilePurpose
ci.yamlbuild-binary
deploy-pages.yamldeploy-pages
<!-- AGENTS-GENERATED:END filemap --><!-- AGENTS-GENERATED:START golden-samples -->

Workflow files

  • Workflows: 2 workflow file(s)
<!-- AGENTS-GENERATED:END setup --><!-- AGENTS-GENERATED:START structure -->

Directory structure

.github/
  workflows/
    ci.yml              → Main CI workflow (lint, test, build)
    release.yml         → Release/deploy workflow
    dependabot.yml      → Dependency updates
  actions/
    <action-name>/      → Composite actions (reusable)
      action.yml
  CODEOWNERS            → Code ownership rules
  pull_request_template.md
<!-- AGENTS-GENERATED:END structure --><!-- AGENTS-GENERATED:START code-style -->

Workflow conventions

  • Pin action versions with full SHA, not tags (uses: actions/checkout@abc123...)
  • Minimal permissions: Use permissions: block, never use permissions: write-all
  • Reusable workflows: Extract common patterns to .github/workflows/reusable-*.yml
  • Job dependencies: Use needs: to express dependencies
  • Caching: Use actions/cache for dependencies (npm, composer, go)

Naming conventions

TypeConventionExample
Workflow file<purpose>.ymlci.yml, release.yml
Workflow nameTitle CaseCI Pipeline, Release
Job IDkebab-casebuild-and-test, deploy-staging
Step nameSentence caseInstall dependencies
SecretSCREAMING_SNAKEDEPLOY_TOKEN, NPM_TOKEN
<!-- AGENTS-GENERATED:END code-style --><!-- AGENTS-GENERATED:START patterns -->

Common patterns

Basic CI workflow

name: CI
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npm test

Matrix builds

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        node: ['18', '20', '22']
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
        with:
          node-version: ${{ matrix.node }}

Reusable workflow

# .github/workflows/reusable-test.yml
on:
  workflow_call:
    inputs:
      node-version:
        type: string
        default: '20'

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ inputs.node-version }}

Conditional deployment

jobs:
  deploy:
    if: github.ref == 'refs/heads/main' && github.event_name == 'push'
    needs: [test, build]
    environment: production
    steps:
      - name: Deploy
        run: ./deploy.sh
<!-- AGENTS-GENERATED:END patterns --><!-- AGENTS-GENERATED:START security -->

Security & safety

  • NEVER expose secrets in logs: use ::add-mask:: for dynamic secrets
  • Pin actions to full commit SHA, not mutable tags
  • Minimal permissions: Start with contents: read, add only what's needed
  • Environment protection: Use environments with required reviewers for deploys
  • Secret scanning: Enable in repository settings
  • Dependency review: Use actions/dependency-review-action for PRs
  • OIDC: Prefer OIDC over long-lived secrets for cloud providers
<!-- AGENTS-GENERATED:END security --><!-- AGENTS-GENERATED:START checklist -->

PR/commit checklist

  • Actions pinned to full SHA (not tags)
  • Permissions block uses minimal required permissions
  • Secrets are not exposed in logs
  • Workflow syntax valid: actionlint or GitHub UI validation
  • Matrix strategy covers required versions/platforms
  • Caching configured for dependencies
<!-- AGENTS-GENERATED:END checklist --><!-- AGENTS-GENERATED:START examples -->

Patterns to Follow

Prefer looking at real code in this repo over generic examples. See Golden Samples section above for files that demonstrate correct patterns.

<!-- AGENTS-GENERATED:END examples --><!-- AGENTS-GENERATED:START help -->

When stuck

<!-- AGENTS-GENERATED:END help -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.