agentleFS
ImYourBoyRoyImYourBoyRoy/Portable_Web_toolkit/AGENTS.md

Portable_Web_toolkit

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

Blind agents: read START_HERE.md first — zero research required. Repo-local rules for AI agents using the Portable Astro + Cloudflare Web Toolkit (Web_Toolkit/). 1. The active client repository's applicable instructions when operating on a client site 2. START_HERE.md for toolkit orientation 3. The narrow installed skill in skills/ 4. Web_Toolkit/OPERATIONS.md only when detailed operations are relevant 5. Current source, manifests, profiles, tests, and runtime evidence Do not load docs/templates/AGENT.template.md for toolkit work — that template is for other projects. All…

  • Reads credentials

The file

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

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All operator modules live under:

    line 20
  2. Distinctive:

    Follow the host's actual system, administrator, user, repository, and nested instruction precedence.

    line 30
  3. Distinctive:

    When operating on a client site:

    line 33
  4. Distinctive:

    Spec-driven: read the site profile before deploy, DNS, or branding changes.

    line 54
  5. Very specific:

    Runtime artifacts: keep generated output in Web_Toolkit/.runtime/, not in publishable source.

    line 56
  6. Very specific:

    Discovery layer: use the established toolkit generators and discovery-doctor when the client repository adopts that contract.

    line 57
  7. Very specific:

    Assets: no stock/placeholder favicons or heroes.

    line 65
  8. Distinctive:

    Workers-over-external: prefer Cloudflare Workers/bindings (KV, D1, R2, Vectorize) before adding SaaS.

    line 66
  9. Very specific:

    Version truth: verify Astro/Wrangler/Node from repo + registry — never trust stale model memory.

    line 67
  10. Very specific:

    Before sharing toolkit: toolkit-purge --apply, privacy-check, toolkit-verify

    line 88

≈ “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

Portable Web Toolkit — Agent Instructions

Blind agents: read START_HERE.md first — zero research required.

Repo-local rules for AI agents using the Portable Astro + Cloudflare Web Toolkit (Web_Toolkit/).

Read first (in order)

  1. The active client repository's applicable instructions when operating on a client site
  2. START_HERE.md for toolkit orientation
  3. The narrow installed skill in skills/
  4. Web_Toolkit/OPERATIONS.md only when detailed operations are relevant
  5. Current source, manifests, profiles, tests, and runtime evidence

Do not load docs/templates/AGENT.template.md for toolkit work — that template is for other projects.

Toolkit root

All operator modules live under:

Web_Toolkit/

Site-specific behavior comes from site-profiles/*.json (or a private profile path passed with --site-profile). Live secrets belong in the target project root .env, not in the toolkit tree.

Authority and precedence

Follow the host's actual system, administrator, user, repository, and nested instruction precedence.

When operating on a client site:

  1. client-repository instructions and approved runbooks govern that site
  2. current source, manifests, tests, and runtime evidence establish state
  3. Portable Web Toolkit skills supply subordinate domain procedures
  4. toolkit documentation supplies conditional reference material

This file governs work on the toolkit repository itself. It does not outrank a client repository merely because Web_Toolkit is linked into that project.

Configuration has scoped authority, not instruction precedence:

  • a site profile owns its declared deployment configuration
  • a Brand Guide owns approved visual identity and voice
  • .env supplies local values and bindings
  • manifests and lockfiles own package state

None of these override safety policy or explicit repository constraints.

Core rules

  • Spec-driven: read the site profile before deploy, DNS, or branding changes.
  • Dry-run first: infrastructure and Cloudflare mutations → audit → dry-run → --apply.
  • Runtime artifacts: keep generated output in Web_Toolkit/.runtime/, not in publishable source.
  • Discovery layer: use the established toolkit generators and discovery-doctor when the client repository adopts that contract. The doctor requires the core llms/humans/security/content discovery artifacts by default; explicitly relaxed or runtime-only resources are INFO when absent, while present-but-invalid resources fail. Do not create a parallel generator.
  • Styles: external CSS in src/styles/ with tokens; run stylesheet-check scan --root <project> when changing UI CSS.
  • Accessibility: toolkit sites use Web_Toolkit/wcag_auditor (WCAGate wrapper) only — never resolve AI/wcag-auditor. Engine is github:imyourboyroy/WCAGate in Web_Toolkit/node_modules. Evidence gate — not a conformance certificate.
  • Assets: no stock/placeholder favicons or heroes; Astro Image/Picture (astro:assets, imageService: 'compile' on Workers) for content photos — prefer OptimizedPicture with AVIF+WebP. image-pipeline only for leftover public/ rasters. SVG masters for icons/logos.
  • Workers-over-external: prefer Cloudflare Workers/bindings (KV, D1, R2, Vectorize) before adding SaaS.
  • Version truth: verify Astro/Wrangler/Node from repo + registry — never trust stale model memory.
  • Automatic freshness: toolkit entrypoints perform a throttled update check; only a clean public main checkout may fast-forward, while WCAGate follows its unpinned public main dependency. Dirty or unmanaged state is reported and preserved.

Canonical sequence (summary)

For material work without current readiness evidence, start with:

node ./Web_Toolkit/site_readiness/bin/site-readiness.mjs run --project-root <site> --site-profile <profile>

See Web_Toolkit/OPERATIONS.md for the full numbered list. Short form:

  1. Toolkit freshness preflight (automatic; inspect .runtime/toolkit-auto-update.json on warning/error)
  2. site-readiness run (or project-init apply-safe on fresh folders)
  3. init_site_profile or load existing profile
  4. Build: npm run check → npm run build
  5. discovery-doctor on ./dist before deploy (with --site-profile for the active discovery contract); again on live URL after prod
  6. Staging deploy + smoke before production
  7. cf-agent audits — dry-run hardening first
  8. Before sharing toolkit: toolkit-purge --apply, privacy-check, toolkit-verify

Key CLI entry points

ModuleBinary
Cloudflare agentWeb_Toolkit/cloudflare-agent-toolkit/bin/cf-agent.mjs
Discovery doctorWeb_Toolkit/discovery_doctor/bin/discovery-doctor.mjs
WCAG auditorWeb_Toolkit/wcag_auditor/bin/wcag-auditor.mjs (wrapper; engine in Web_Toolkit/node_modules/@imyourboyroy/wcagate)
Project initWeb_Toolkit/project_init/bin/project-init.mjs
Site readinessWeb_Toolkit/site_readiness/bin/site-readiness.mjs
Toolkit reportWeb_Toolkit/toolkit_report/bin/toolkit-report.mjs
Stylesheet checkWeb_Toolkit/stylesheet_check/bin/stylesheet-check.mjs
Site doctorWeb_Toolkit/site_doctor/bin/site-doctor.mjs

Pass --site-profile <path> whenever the target site is not the default example profile.

Verification before completion

  • Site profile loaded and respected
  • Dry-run outputs reviewed before any --apply
  • discovery-doctor passes on dist/ (and live URL if deployed)
  • No secrets in committed files or toolkit export
  • Client project MEMORY.md updated when versions/deploy change (when applicable)

Skill distribution

See docs/agent-skills/README.md

Inspect and install the selected Portable Web Toolkit skills from the repository
manifest. Check existing client skill directories first, preserve conflicts,
and change only explicitly selected clients and skills.

Core: portable-web-toolkit-router (global default), site-onboarding, portable-web-toolkit, site-readiness, site-starter, site-maintenance, wcag-auditor, pagespeed-diagnostics, discovery-doctor, toolkit-update

Optional: brand-doctor, image-pipeline, instagram-clone, vectorize-pipeline

Optional helper scripts default to status. Agent-driven installation remains the primary path.

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.