|
1 | 1 | # AGENTS.md |
2 | 2 |
|
3 | | -## Repository Role |
| 3 | +Use this file for durable repo-local guidance that Codex should follow before changing code, docs, or project workflow surfaces in this repository. |
| 4 | + |
| 5 | +## Repository Scope |
| 6 | + |
| 7 | +### What This File Covers |
4 | 8 |
|
5 | 9 | - This repository is the canonical home for Gale's Apple, Swift, and Xcode workflow skills. |
6 | 10 | - Treat `productivity-skills` as the default baseline maintainer layer for general repo docs and maintenance work; this repo is the narrower specialist layer when Apple-specific behavior should change the workflow. |
7 | 11 | - Root `skills/` is the canonical authored and exported surface. |
8 | 12 | - Keep shared reusable assets in [`shared/`](./shared/) and maintainer tests in [`tests/`](./tests/). |
9 | 13 |
|
10 | | -## Apple-specific Rules |
| 14 | +### Where To Look First |
| 15 | + |
| 16 | +- Start with [`README.md`](./README.md), [`CONTRIBUTING.md`](./CONTRIBUTING.md), [`ROADMAP.md`](./ROADMAP.md), [`docs/maintainers/workflow-atlas.md`](./docs/maintainers/workflow-atlas.md), and [`docs/maintainers/reality-audit.md`](./docs/maintainers/reality-audit.md). |
| 17 | +- When a task touches one shipped workflow, read the corresponding directory under [`skills/`](./skills/) before inferring policy from sibling skills or older maintainer notes. |
| 18 | +- Use [`.github/scripts/validate_repo_docs.sh`](./.github/scripts/validate_repo_docs.sh) and the pytest suite as the enforced source-of-truth checks for public-doc drift. |
| 19 | + |
| 20 | +## Working Rules |
| 21 | + |
| 22 | +### Change Scope |
| 23 | + |
| 24 | +- Keep work bounded to the smallest coherent docs, skill, validator, and test surface that resolves the real drift. |
| 25 | +- If a task starts needing a new active skill, a new export surface, or a broad repo-structure change, stop and surface that scope change before continuing. |
| 26 | +- Collapse retired historical planning notes into `ROADMAP.md` or still-live maintainer docs instead of preserving stale standalone docs. |
| 27 | + |
| 28 | +### Source of Truth |
11 | 29 |
|
12 | 30 | - For Swift, Apple framework, Apple platform, SwiftUI, SwiftData, Observation, AppKit, UIKit, Foundation-on-Apple, or Xcode-related guidance, require reading the relevant Apple documentation before proposing implementation changes. |
13 | 31 | - State the documented Apple behavior being relied on before design or code changes are proposed. |
|
21 | 39 | - Keep `Package.swift` explicit about its package-wide Swift language mode. On current Swift 6-era manifests, prefer `swiftLanguageModes: [.v6]` as the default declaration and treat `swiftLanguageVersions` as a legacy alias used only when an older manifest surface requires it. |
22 | 40 | - Treat `Package.resolved` and similar package-manager outputs as generated files. Do not tell agents to hand-edit them. |
23 | 41 |
|
24 | | -## Export Boundaries |
| 42 | +### Communication and Escalation |
| 43 | + |
| 44 | +- Surface non-obvious tradeoffs before widening a change from one skill or one doc into repo-wide wording or policy. |
| 45 | +- When docs, validator rules, and tests disagree, explain which surface is stale and what you are changing to bring them back into alignment. |
| 46 | +- If a historical maintainer doc still contains live decisions, move those decisions into the active docs before deleting the old file. |
| 47 | + |
| 48 | +## Commands |
| 49 | + |
| 50 | +### Setup |
| 51 | + |
| 52 | +```bash |
| 53 | +uv sync --dev |
| 54 | +``` |
| 55 | + |
| 56 | +### Validation |
| 57 | + |
| 58 | +```bash |
| 59 | +bash .github/scripts/validate_repo_docs.sh |
| 60 | +uv run pytest |
| 61 | +``` |
| 62 | + |
| 63 | +### Optional Project Commands |
| 64 | + |
| 65 | +```bash |
| 66 | +uv run python .github/scripts/validate_skill_creator_contract.py |
| 67 | +``` |
| 68 | + |
| 69 | +Use the extra validator when a change touches the skill-creator contract or repo-doc rules that mention it. |
| 70 | + |
| 71 | +## Review and Delivery |
| 72 | + |
| 73 | +### Review Expectations |
| 74 | + |
| 75 | +- Explain which shipped docs, validator rules, and tests changed and why. |
| 76 | +- Call out deleted or consolidated maintainer docs explicitly so reviewers can see where their durable conclusions moved. |
| 77 | +- Keep docs-only cleanup distinct from behavior-changing skill work when that split helps review. |
| 78 | + |
| 79 | +### Definition of Done |
| 80 | + |
| 81 | +- The changed root docs, maintainer docs, validator rules, and tests all describe the same live repository behavior. |
| 82 | +- Grounded validation has been run or any skipped checks are called out plainly. |
| 83 | +- Nearby docs and roadmap history have been updated when the change retires stale planning notes or changes the public workflow contract. |
| 84 | + |
| 85 | +## Safety Boundaries |
| 86 | + |
| 87 | +### Never Do |
25 | 88 |
|
26 | | -- Keep root `skills/` as the canonical authored surface even though the repo ships plugin packaging metadata. |
27 | 89 | - Do not reintroduce nested packaged plugin trees or alternate export surfaces under `plugins/`. |
| 90 | +- Do not weaken the Apple docs-first rule or present Apple behavior from memory when current docs are available. |
| 91 | +- Do not tell maintainers to hand-edit generated package-manager state such as `Package.resolved`. |
| 92 | +- Do not preserve stale historical planning docs as live guidance once their durable conclusions have already been absorbed elsewhere. |
| 93 | + |
| 94 | +### Ask Before |
| 95 | + |
| 96 | +- Ask before adding or removing active skills, changing the top-level export shape, or broadening the repository into a new product surface. |
| 97 | +- Ask before deleting a maintainer doc whose decisions have not yet been folded into `ROADMAP.md` or a still-live maintainer reference. |
| 98 | +- Ask before changing repo-wide policy that would affect downstream synced or bootstrapped guidance assets. |
| 99 | + |
| 100 | +## Local Overrides |
| 101 | + |
| 102 | +This repository does not currently use deeper `AGENTS.md` files under `skills/` or `docs/`. Treat this root file as the repo-wide agent contract, and use the individual skill docs plus maintainer references to refine behavior for the specific surface you are editing. |
0 commit comments