githubnext / githubnext/gh-aw-cao

[ambient-context:agents-md-curator] AGENTS.md carries ~9,900 tokens of unrelated github/gh-aw monorepo content (skills, Go build, pkg/workflow)

Closed Beginner friendly
#1,788 0 comments 0 reactions 0 assignees View on GitHub
ambient-context ambient-context:agents-md-curator
Dominant language
JavaScript
Stars
3
Forks
1
Avg merge
49m
Merged PRs (30d)
837

Description

`github/gh-aw-actions` is the small "Shared Library of Actions" repo (only `setup/` action scripts and `setup-cli/`, no Go build system, no `pkg/workflow`, no `skills/` directory). Its 44,555-byte / 1,162-line / ~11,139-token `AGENTS.md` was copied verbatim from the main `github/gh-aw` monorepo and is now almost entirely about a codebase that isn't here.

**Action:** Assign the linked prompt below to Copilot (or a maintainer) to trim `AGENTS.md` to what this repo actually contains. Acceptance check: the merged file references only paths/commands that exist in `github/gh-aw-actions`, stays under 200 lines / 10 KB, and is at least 10% smaller in estimated tokens.

### Ambient context health

| Metric | Value | Target | Status |
|---|---|---|---|
| Lines | 1,162 | < 200 | ❌ over by ~6x |
| Bytes | 44,555 | < 10,240 | ❌ over by ~4.3x |
| Estimated tokens | 11,139 | — | very high, loaded every session |
| Days since last AGENTS.md change | 204 | < 90 | ❌ stale |
| Commits since last change | 210 | — | repo has moved on without the file |
| Broken referenced paths | 24 of 32 checked | 0 | ❌ |
| Broken command references | 0 | 0 | ✅ |
| Cross-file conflicts | 0 | 0 | ✅ (no companion instruction files exist) |

`verification.missing_referenced_paths` includes `skills`, `pkg/workflow`, `pkg/workflow/js`, `pkg/workflow/sh`, `pkg/workflow/compiler_yaml.go`, `pkg/constants`, `audit_command.go`, `flags.go`, `.go`, `.lock.yml` context, `api.github.com`, `os.Stderr`, `core.info`/`core.error`, and Go dependency modules (`goccy/go-yaml`, `github.com/cli/go-gh/v2`, etc.) — all of these are main-repo (`github/gh-aw`) concepts. This repository's actual tree is `setup/js/*.cjs`, `setup/sh/*.sh`, `setup-cli/`, and one stray `setup/sh/validate_multi_secret_test.go`; there is no `skills/` directory (`companion_context.skill_files` is empty) and no `.github/aw/runbooks/` directory, so the "Available Skills Reference" and "Operational Runbooks" sections point nowhere.

### Estimated gain

The current file is dominated by Go-monorepo content (Channel Lifecycle Guidelines, YAML Library Usage, Type Patterns and Best Practices, Frontmatter Configuration Types, CLI Command Patterns, Console Message Formatting, Debug Logging, Key Features, Testing Strategy, Release Process, the Go pre-commit/build-tag/lint checklist, and the Skills/Runbooks pointers to non-existent paths) that does not describe this repository at all. Replacing roughly 1,000 of the 1,162 lines (~9,900 of ~11,139 estimated tokens) with a ~120-line, ~1,000-token summary of the actual `setup/js` and `setup/sh` toolchain is a net reduction of **~8,900 tokens, ~80% of the current size** — far above the 10% threshold. Every future agent session on this repo currently pays for reading Go-CLI instructions that cannot apply to any file it will touch.

- Tokens removed (estimate): ~9,900
- Tokens added (estimate): ~1,000
- Net tokens removed: ~8,900
- Net as % of current (11,139): **~80%**
- Projected post-change size: ~1,200-1,500 tokens, ~120-150 lines

### Proposed edits

1. **"Important: Using Skills" (lines 13-30) and "Available Skills Reference" (lines 1121-1160)** — action: `delete`. Evidence: `companion_context.skill_files` is empty and `verification.missing_referenced_paths` includes `skills`; there is no `skills/` directory in this repository, so every linked `skills/*/SKILL.md` reference is dead.
2. **"⚠️ MANDATORY PRE-COMMIT VALIDATION ⚠️" (lines 33-163) and "Quick Reference for AI Agents" pre-commit checklist (lines 1096-1115)** — action: `delete` the Go-build/lint parts (`make agent-finish`, `make fmt`, `make build`, `pkg/parser/schemas`, `go fmt`, `unused`/`testifylint` lint guidance); action: `correct`/`compress` the test-file build-tag rule to apply only to the one Go file this repo actually has. Evidence: no `Makefile` or `go.mod` exists in `github/gh-aw-actions`; `verification.missing_referenced_paths` includes `audit_command.go`, `audit_command_test.go`, `flags.go`, `pkg/workflow`. Replacement text: "This repo has one Go file (`setup/sh/validate_multi_secret_test.go`); keep its `(go/redacted):build !integration` tag if you touch it. There is no Makefile here — JS/shell tooling lives under `setup/js/` (see below)."
3. **"Build System" (lines 202-245)** — action: `correct`. Evidence: the section already says the source of truth is `actions/setup/js/*.cjs` and `actions/setup/sh/*.sh`, but this checkout has no `actions/` prefix — the real paths are `setup/js/*.cjs` and `setup/sh/*.sh` (`verification.missing_referenced_paths` lists `actions/setup/js`, `actions/setup/sh`, `actions/setup` as missing, while `setup/js` and `setup/sh` exist). Also delete the `pkg/workflow/js` / `pkg/workflow/sh` bullets since that directory does not exist in this repo. Replacement text: state that `setup/js/*.cjs` and `setup/sh/*.sh` are copied to `/tmp/gh-aw/actions` at runtime by the `setup` action, and that there is no `pkg/workflow` in this repository.
4. **"Development Workflow" through "Development Guidelines" (lines 246-1039: Build & Test Commands, Testing, Repository Structure, Validation Complexity Guidelines, Console Message Formatting, Debug Logging, CLI Command Patterns, Channel Lifecycle Guidelines, YAML Library Usage, Type Patterns and Best Practices, Frontmatter Configuration Types, GitHub Actions Integration, Schema Changes, Build Times, Legacy Support, Workflow Artifacts and Cache-Memory)** — action: `delete`, `add` short replacement. Evidence: these sections describe the Go CLI compiler and console-rendering system that live in `github/gh-aw`, not in this actions-only repo (`pkg/workflow`, `pkg/workflow/frontmatter_types.go`, `pkg/constants` are all in `missing_referenced_paths`). Replacement text (add): "**JS/TS tooling** (`setup/js/`): `npm run typecheck`, `npm test` (typecheck + vitest, `--no-file-parallelism`), `npm run format:cjs` / `npm run lint:cjs` (prettier over `**/*.cjs`, `**/*.ts`, `**/*.json`). **Shell scripts** (`setup/sh/*.sh`): edited directly, no build step." (paths and script names verified against `setup/js/package.json`).
5. **"Key Features" / "Testing Strategy" / "Release Process" (lines 1040-1095)** — action: `delete`. Evidence: MCP Server Management, AI Engine Support, and Playwright Integration describe `gh-aw` CLI features, not this actions repo; this repo has no release process of its own (`README.md`/`CONTRIBUTING.md` both state version tags mirror `github/gh-aw` and defer contribution guidance there).
6. **"Operational Runbooks" (lines 1116-1120)** — action: `delete`. Evidence: `.github/aw/runbooks/workflow-health.md` does not exist in this repository's tree (only `.github/workflows/` and `.github/aw/agentic-chat.md`-style files are relevant here, and none is a runbook).
7. **New short "Repository scope" note near the top (after line 4)** — action: `add`. Evidence: `README.md`/`CONTRIBUTING.md` state this repo is the shared actions library for `gh-aw`, version-aligned with the main repo, with contribution guidance deferred there; making that explicit prevents re-adding main-repo-only instructions later. Replacement text: "This repo only contains the `setup` (JS/shell runtime action) and `setup-cli` (CLI installer action) used by compiled `gh-aw` workflows. It has no Go build system of its own; see `github/gh-aw` for the compiler, schemas, and skills."

### Agentic update prompt

````markdown
You may edit only `AGENTS.md` in this repository (`github/gh-aw-actions`). Do not touch any other file, and do not create a new root instruction file.

Before applying any edit below, verify the claim against the current repository state (paths, `setup/js/package.json` scripts, presence/absence of `skills/`, `Makefile`, `go.mod`, `.github/aw/runbooks/`). Skip any instruction whose premise no longer holds, and note what you skipped in the PR description.

Apply these edits in order:

1. Delete the "Important: Using Skills" section and the "Available Skills Reference" section (including all `skills/*/SKILL.md` links) — this repository has no `skills/` directory.
2. In "Critical Requirements" / "⚠️ MANDATORY PRE-COMMIT VALIDATION ⚠️" and the "🚨 CRITICAL - Pre-Commit Checklist" under "Quick Reference for AI Agents": delete all `make agent-finish`, `make fmt`, `make build`, `make lint`, schema-rebuild, and Go-linting guidance (there is no Makefile or go.mod here). Keep only a short note that the single Go file in this repo, `setup/sh/validate_multi_secret_test.go`, needs its `(go/redacted):build !integration` tag preserved if edited.
3. In "Build System": replace `actions/setup/js/*.cjs` / `actions/setup/sh/*.sh` path references with the real paths `setup/js/*.cjs` and `setup/sh/*.sh` (verify these exist; the `actions/` prefix does not). Delete references to `pkg/workflow/js` and `pkg/workflow/sh` since `pkg/workflow` does not exist in this repository.
4. Delete "Development Workflow", "Testing", "Repository Structure", "Validation Complexity Guidelines", "Console Message Formatting", "Debug Logging", "CLI Command Patterns" (and its subsections), "Development Guidelines" (Code Organization, Go Code Style, Channel Lifecycle Guidelines, YAML Library Usage, YAML File Editing, Type Patterns and Best Practices, Frontmatter Configuration Types, GitHub Actions Integration, Schema Changes, Build Times, Legacy Support, Workflow Artifacts and Cache-Memory) — these describe the `pkg/workflow` Go compiler in `github/gh-aw`, which is not part of this repository. Replace with a short section listing the actual npm scripts in `setup/js/package.json` (`typecheck`, `test`, `format:cjs`, `lint:cjs`) and a one-line note that `setup/sh/*.sh` scripts are edited directly with no build step. Verify the script names against `setup/js/package.json` before writing them.
5. Delete "Key Features", "Testing Strategy", and "Release Process" — these describe `gh-aw` CLI features (MCP server management, AI engine support, Playwright integration) that do not live in this repository.
6. Delete "Operational Runbooks" — `.github/aw/runbooks/workflow-health.md` does not exist in this repository.
7. Add a short "Repository scope" note near the top (after the first paragraph) stating this repo contains only the `setup` and `setup-cli` actions used by compiled `gh-aw` workflows, has no Go build system of its own, and that contribution/version guidance is in the main `github/gh-aw` repository (per `README.md` and `CONTRIBUTING.md`).

Requirements:
- The result must be under 200 lines and under 10 KB, and at least 10% smaller in estimated tokens (characters/4) than the current ~11,139-token file. If skipped instructions make this reduction fall short, say so explicitly in the PR description rather than padding the diff.
- Do not reformat or reword any section not listed above.
- Do not duplicate content already in `README.md` or `CONTRIBUTING.md`; if you need to reference the main repo's contribution process, use a short pointer, not a copy.
- Open a pull request. Its description must list each edit actually applied, the evidence used to verify it, and explicitly call out any listed edit you skipped and why.
````

### Verification

A reviewer can confirm the applied change by checking: the merged `AGENTS.md` is under 200 lines and 10 KB; `wc -c AGENTS.md` divided by 4 is at least 10% below 11,139; every remaining file path it references (`setup/js/...`, `setup/sh/...`, `setup-cli/...`, `README.md`, `CONTRIBUTING.md`) resolves in the repository; every remaining command (`npm run typecheck`, `npm test`, `npm run format:cjs`, `npm run lint:cjs`) matches a script in `setup/js/package.json`; there is no remaining reference to `skills/`, `pkg/workflow`, `Makefile`, or `.github/aw/runbooks/`; and the file does not duplicate the version/contribution pointers already stated in `README.md`/`CONTRIBUTING.md`.

### Control Plane
- Correlation ID: 33912570796-48
- Central repository: githubnext/gh-aw-cao
- Control plane run URL: https://github.com/githubnext/gh-aw-cao/actions/runs/33912570796

> Generated by [:compass: Ambient Context / AGENTS.md](https://github.com/githubnext/gh-aw-cao/actions/runs/33912570796) · copilot · auto · 99 AIC · ⌖ 9.93 AIC · ⊞ 16.3K · [◷](https://github.com/search?q=repo%3Agithubnext%2Fgh-aw-cao+is%3Aissue+%22gh-aw-workflow-call-id%3A+githubnext%2Fgh-aw-cao%2Fambient-context-agents-md-curator%22&type=issues)
> - [x] expires on Oct 4, 2026, 7:56 PM UTC

Contributor guide

Open the contributing guide

Research direction

Start with AGENTS.md, then check README.md, CONTRIBUTING.md, and the scripts in setup/js/package.json against the repository tree. Remove the unrelated monorepo guidance while preserving only valid setup/setup-cli instructions and the verified npm commands; done means AGENTS.md is under 200 lines and 10 KB with no references to missing paths such as skills/, pkg/workflow, Makefile, or runbooks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.