Skip to content

Commit 1e9e210

Browse files
committed
update from COPILOT.md to AGENTS.md
Roll out beads
1 parent 1a42fa7 commit 1e9e210

File tree

143 files changed

+440
-349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+440
-349
lines changed
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# FieldWorks Copilot Instructions
1+
# FieldWorks Agentic Instructions
22

33
## Purpose & Scope
4-
- Give Copilot agents a fast, reliable playbook for FieldWorks—what the repo contains, how to build/test, and how to keep documentation accurate.
4+
- Give AI coding agents a fast, reliable playbook for FieldWorks—what the repo contains, how to build/test, and how to keep documentation accurate.
55
- Assume nothing beyond this file and linked instructions; only search the repo when a referenced step fails or is missing.
66

77
See `.github/AI_GOVERNANCE.md` for the documentation taxonomy and “source of truth” rules.
@@ -10,7 +10,7 @@ See `.github/AI_GOVERNANCE.md` for the documentation taxonomy and “source of t
1010
- Product: FieldWorks (FLEx) — Windows-first linguistics suite maintained by SIL International.
1111
- Languages & tech: C#, C++/CLI, native C++, WiX, PowerShell, XML, JSON, XAML/WinForms.
1212
- Tooling: Visual Studio 2022 (Desktop workloads), MSBuild Traversal (`FieldWorks.proj`), WiX 3.14.x, NUnit-style tests, Crowdin localization.
13-
- Docs: `ReadMe.md`https://github.com/sillsdev/FwDocumentation/wiki for deep dives; `.github/src-catalog.md` + per-folder `COPILOT.md` describe Src/ layout.
13+
- Docs: `ReadMe.md`https://github.com/sillsdev/FwDocumentation/wiki for deep dives; `.github/src-catalog.md` + per-folder `AGENTS.md` describe Src/ layout.
1414

1515
## Core Rules
1616
- Prefer `./build.ps1`; avoid ad-hoc project builds that skip traversal ordering.
@@ -49,19 +49,19 @@ See `.github/AI_GOVERNANCE.md` for the documentation taxonomy and “source of t
4949

5050
## Instruction & Prompt Expectations
5151
- Instruction files live under `.github/instructions/` with `applyTo`, `name`, and `description` frontmatter only; keep content ≤ 200 lines with Purpose/Scope, Key Rules, Examples.
52-
- Chat modes constrain role-specific behavior (managed/native/installer/technical-writer) and should be referenced when invoking Copilot agents.
52+
- Chat modes constrain role-specific behavior (managed/native/installer/technical-writer) and should be referenced when invoking agents.
5353

5454
**Context7 Guidance:** When requesting API references, code examples, or library-specific patterns, consult Context7 first (for example, call `resolve-library-id` then `get-library-docs` or `search-code`). Prefer the Context7 libraries listed in `.vscode/context7-configuration.json` and include the resolved library ID in your prompt when possible. Context7 lookups are considered safe and are configured for auto-approval in this workspace.
5555

56-
## COPILOT.md Maintenance
56+
## AGENTS.md Maintenance
5757
1. **Detect** stale folders: `python .github/detect_copilot_needed.py --strict --base origin/<branch> --json .cache/copilot/detect.json`.
5858
2. **Plan** diffs + reference groups: `python .github/plan_copilot_updates.py --detect-json .cache/copilot/detect.json --out .cache/copilot/diff-plan.json`.
5959
3. **Scaffold** (optional) when a file drifts from the canonical layout: `python .github/scaffold_copilot_markdown.py --folders Src/<Folder>`.
6060
4. **Apply** the auto change-log from the planner: `python .github/copilot_apply_updates.py --plan .cache/copilot/diff-plan.json --folders Src/<Folder>`.
6161
5. **Edit narrative sections** using the planner JSON (change counts, commit log, `reference_groups`), keeping human guidance short and linking to subfolder docs where possible.
62-
6. **Validate** with `python .github/check_copilot_docs.py --only-changed --fail` (or use `--paths Src/Foo/COPILOT.md` for targeted checks).
62+
6. **Validate** with `python .github/check_copilot_docs.py --only-changed --fail` (or use `--paths Src/Foo/AGENTS.md` for targeted checks).
6363
7. When documentation exceeds ~200 lines or acts as a parent index, migrate to `.github/templates/organizational-copilot.template.md` and keep the parent doc as a navigation index.
64-
8. Run `.github/prompts/copilot-folder-review.prompt.md` with the updated plan slice to simulate Copilot review before committing.
64+
8. Run `.github/prompts/copilot-folder-review.prompt.md` with the updated plan slice to simulate an agent review before committing.
6565

6666
## CI & Validation Requirements
6767
- GitHub Actions workflows live under `.github/workflows/`; keep them passing.
@@ -116,3 +116,4 @@ See `.github/AI_GOVERNANCE.md` for the documentation taxonomy and “source of t
116116
- [ ] Refer back to this guide whenever you need repo-wide ground truth.
117117

118118

119+

.GitHub/AI_GOVERNANCE.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Copilot and AI guidance governance
1+
# AI guidance governance
22

33
## Purpose
4-
This repo uses a **Copilot-first** documentation strategy:
5-
- Component knowledge lives with the component (`Src/**/COPILOT.md`).
4+
This repo uses a **tool-agnostic, agent-first** documentation strategy:
5+
- Component knowledge lives with the component (`Src/**/AGENTS.md`).
66
- A small set of scoped instruction files in `.github/instructions/` provides **prescriptive, enforceable constraints**.
7-
- `.github/copilot-instructions.md` is the short “front door” that links to the right places.
7+
- `.github/AGENTS.md` is the short “front door” that links to the right places.
88
- Agent definitions in `.github/agents/` and role chatmodes in `.github/chatmodes/` describe **behavior/persona**, not system architecture.
99

1010
## Source of truth
11-
- **Component architecture & entry points**: `Src/<Component>/COPILOT.md`
12-
- **Repo-wide workflow** (how to build/test, safety constraints): `.github/copilot-instructions.md`
11+
- **Component architecture & entry points**: `Src/<Component>/AGENTS.md`
12+
- **Repo-wide workflow** (how to build/test, safety constraints): `.github/AGENTS.md`
1313
- **Non-negotiable rules** (security, terminal restrictions, installer rules, etc.): `.github/instructions/*.instructions.md`
1414

1515
## No duplication rule
1616
- Do not copy component descriptions into `.github/instructions/`.
1717
- Do not restate rules in multiple places. Prefer linking.
18-
- If a rule must be enforced by Copilot for a subtree, add a scoped `.instructions.md`; otherwise document it in the relevant `COPILOT.md`.
18+
- If a rule must be enforced by agents for a subtree, add a scoped `.instructions.md`; otherwise document it in the relevant `AGENTS.md`.
1919

2020
## What goes where
2121

22-
### `.github/copilot-instructions.md`
22+
### `.github/AGENTS.md`
2323
Use for:
24-
- One-page onboarding for Copilot: build/test commands, repo constraints, and links.
24+
- One-page onboarding for agents: build/test commands, repo constraints, and links.
2525
- Pointers to the curated instruction set and the component docs.
2626

2727
### `.github/instructions/*.instructions.md`
@@ -41,26 +41,31 @@ Use for:
4141
- `terminal.instructions.md`
4242
- `testing.instructions.md`
4343

44-
### `Src/**/COPILOT.md`
44+
### `Src/**/AGENTS.md`
4545
Use for:
4646
- Where to start (entry points, key projects, typical workflows).
4747
- Dependencies and cross-component links.
4848
- Tests (where they live, how to run them).
4949

50-
Baseline expectations for a component COPILOT doc:
50+
Baseline expectations for a component agent doc:
5151
- **Where to start** (projects, primary entry points)
5252
- **Dependencies** (other components/layers)
5353
- **Tests** (test projects and the recommended `./test.ps1` invocation)
5454

5555
### `.github/agents/` and `.github/chatmodes/`
5656
Use for:
5757
- Role definitions, boundaries, and tool preferences.
58-
- Do not put component architecture here; link to the component `COPILOT.md`.
58+
- Do not put component architecture here; link to the component `AGENTS.md`.
59+
60+
## External standards alignment (post-2025)
61+
- **AGENTS.md**: Supported as a simple, vendor-neutral instruction format by multiple tools (for example, Cursor’s project rules). Use plain Markdown with clear headings and concise rules.
62+
- **MCP (Model Context Protocol)**: Use MCP for tool/data integration rather than vendor-specific plugins; MCP provides a standardized, versioned protocol for AI tool connectivity.
5963

6064
## Adding a new scoped instruction file
6165
Add a new `.github/instructions/<name>.instructions.md` only when:
6266
- The guidance is prescriptive (MUST/DO NOT), and
6367
- It applies broadly or to a subtree, and
6468
- It would be harmful if Copilot ignored it.
6569

66-
Otherwise, update the appropriate `Src/**/COPILOT.md`.
70+
Otherwise, update the appropriate `Src/**/AGENTS.md`.
71+

.GitHub/agents/fieldworks.avalonia-expert.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "FieldWorks Avalonia UI Expert"
33
description: "Avalonia UI specialist agent (XAML + .NET) with a strong bias toward using Context7 for up-to-date Avalonia APIs and patterns. Designed for FieldWorks-style repo constraints: minimal diffs, strong testing discipline, and localization-first UI strings."
4-
# target: github-copilot # optional
4+
# target: universal # optional
55
# model: gpt-5.2-preview # optional in VS Code
66
# tools: ["read", "search", "edit", "terminal", "mcp_io_github_ups_resolve-library-id", "mcp_io_github_ups_get-library-docs"]
77
---

.GitHub/agents/fieldworks.cpp-expert.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "FieldWorks C++ Expert"
33
description: "Native/C++ (and C++/CLI-adjacent) agent for FieldWorks (FLEx): fixes native build and test failures safely using the repo’s build order (native first), avoids risky interop changes, and validates via test.ps1 -Native and traversal builds."
4-
# target: github-copilot # optional
4+
# target: universal # optional
55
# model: gpt-5.2-preview # optional in VS Code
66
# tools: ["read", "search", "edit", "terminal"]
77
---

.GitHub/agents/fieldworks.csharp-expert.agent.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "FieldWorks C# Expert"
33
description: "Specialized C#/.NET (net48) agent for FieldWorks (FLEx): fixes managed test failures efficiently using build.ps1/test.ps1, follows repo conventions, and avoids dotnet build pitfalls in mixed native/managed solutions."
4-
# target: github-copilot # optional: enable if you only want this on GitHub
4+
# target: universal # optional: enable if you want a tool-specific target
55
# model: gpt-5.2-preview # optional in VS Code; pick from autocomplete if desired
66
# tools: ["read", "search", "edit", "terminal"]
77
---
@@ -39,7 +39,7 @@ Your top priorities:
3939
## Code and API design guidance (FieldWorks flavor)
4040
- Prefer internal/private. Avoid widening visibility to satisfy tests.
4141
- Don’t introduce new abstraction layers unless they clearly reduce duplication and are used immediately.
42-
- Follow existing patterns in the folder/component (read that folder’s `COPILOT.md` if present).
42+
- Follow existing patterns in the folder/component (read that folder’s `AGENTS.md` if present).
4343
- Avoid touching auto-generated code (`*.g.cs`, `*.Designer.cs` unless explicitly required and safe).
4444

4545
## Common FieldWorks constraints to respect
@@ -66,3 +66,4 @@ Your top priorities:
6666
- Root cause summary.
6767
- What changed and why.
6868
- Tests executed (scoped) and their results.
69+

.GitHub/agents/fieldworks.winforms-expert.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "FieldWorks WinForms Expert"
33
description: "WinForms-focused agent for FieldWorks (FLEx): safe changes to .NET Framework (net48) WinForms UI, Designer-safe edits, localization via .resx, and efficient test-driven fixes using build.ps1/test.ps1."
4-
# target: github-copilot # optional
4+
# target: universal # optional
55
# model: gpt-5.2-preview # optional in VS Code
66
# tools: ["read", "search", "edit", "terminal"]
77
---

.GitHub/agents/speckit.plan.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ You **MUST** consider the user input before proceeding (if not empty).
7575
- Output OpenAPI/GraphQL schema to `/contracts/`
7676

7777
3. **Agent context update**:
78-
- Run `.specify/scripts/powershell/update-agent-context.ps1 -AgentType copilot`
78+
- Run `.specify/scripts/powershell/update-agent-context.ps1 -AgentType universal`
7979
- These scripts detect which AI agent is in use
8080
- Update the appropriate agent-specific context file
8181
- Add only new technology from current plan

.GitHub/chatmodes/coding-agent.chatmode.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: 'Copilot coding agent mode for autonomous task completion'
2+
description: 'AI coding agent mode for autonomous task completion'
33
tools: ['search', 'editFiles', 'runTasks', 'runTerminal', 'problems', 'testFailure']
44
---
5-
You are a GitHub Copilot coding agent working autonomously on FieldWorks. You complete tasks end-to-end without human intervention.
5+
You are an AI coding agent working autonomously on FieldWorks. You complete tasks end-to-end without human intervention.
66

77
## Operating Mode
88
- Execute tasks completely—from understanding requirements to validated implementation
@@ -18,7 +18,7 @@ You are a GitHub Copilot coding agent working autonomously on FieldWorks. You co
1818

1919
## Decision Framework
2020
1. Read `AGENTS.md` for high-level guidance
21-
2. Read relevant `COPILOT.md` files in folders you'll modify
21+
2. Read relevant `AGENTS.md` files in folders you'll modify
2222
3. Follow `.github/instructions/*.instructions.md` for domain-specific rules
2323
4. Match existing patterns in the codebase
2424
5. Validate changes compile and tests pass
@@ -40,4 +40,5 @@ Before marking a task complete:
4040
- [ ] Relevant tests pass
4141
- [ ] Whitespace check passes
4242
- [ ] Changes follow existing patterns
43-
- [ ] COPILOT.md updated if contracts changed
43+
- [ ] AGENTS.md updated if contracts changed
44+

.GitHub/instructions/terminal.instructions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: "Terminal command patterns for auto-approval in FieldWorks"
88

99
Commands with pipes (`|`), `&&`, or `2>&1` require manual approval. Use `scripts/Agent/` wrappers instead.
1010

11-
**MCP-first:** When the `ps-tools` MCP server is running, prefer MCP tools (`Git-Search`, `Read-FileContent`, `Invoke-AgentTask`, `build`, `test`, Copilot tools) instead of direct terminal commands. Use wrappers only when MCP is unavailable.
11+
**MCP-first:** When the `ps-tools` MCP server is running, prefer MCP tools (`Git-Search`, `Read-FileContent`, `Invoke-AgentTask`, `build`, `test`, agent tools) instead of direct terminal commands. Use wrappers only when MCP is unavailable.
1212

1313
## Transformations
1414

@@ -27,4 +27,8 @@ Commands with pipes (`|`), `&&`, or `2>&1` require manual approval. Use `scripts
2727
| `Git-Search.ps1` | git show/diff/log/grep/blame |
2828
| `Read-FileContent.ps1` | File reading with filtering |
2929

30-
**Build/test**: Run `.\build.ps1` or `.\test.ps1` directly—they're auto-approvable.
30+
**Build/test**: Run `.\build.ps1` or `.\test.ps1` directly—they're auto-approvable.
31+
## Beads CLI (auto-approvable patterns)
32+
- `br` and `bv --robot-*` commands are auto-approvable **when they do not use pipes, `&&`, or redirection**.
33+
- Prefer `--json`/`--robot` output and parse in the agent instead of piping to `jq`.
34+
- `br sync --flush-only` does **not** run git; you must run git commands separately.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ This plan is mothballed for now. It captures the steps to bring our agent workfl
99

1010
## Steps
1111

12-
### 1) Copilot CLI and APM scaffold
13-
- Add `apm.yml` with scripts mapping to our prompts (e.g., `copilot-feature-spec` → feature-spec.prompt.md)
12+
### 1) Agent CLI and APM scaffold
13+
- Add `apm.yml` with scripts mapping to our prompts (e.g., `agent-feature-spec` → feature-spec.prompt.md)
1414
- Include MCP dependencies (e.g., `ghcr.io/github/github-mcp-server`)
15-
- Document local usage in README: `apm install`, `apm run copilot-feature-spec --param specFile=...`
15+
- Document local usage in README: `apm install`, `apm run agent-feature-spec --param specFile=...`
1616

1717
### 2) GitHub Action to run a prompt on PR
1818
- Create `.github/workflows/agent-workflow.yml`
@@ -26,14 +26,14 @@ This plan is mothballed for now. It captures the steps to bring our agent workfl
2626
- Maintain a curated list in `.github/context/mcp.servers.md` (to be created when piloting)
2727

2828
### 4) Security and secrets
29-
- Use `secrets.COPILOT_CLI_PAT` for Copilot CLI (if needed)
29+
- Use `secrets.AGENT_CLI_PAT` for agent CLI (if needed)
3030
- Principle of least privilege for tokens and tool scopes
3131
- Add a security review checklist for new tools/servers
3232

3333
### 5) Governance and validation
3434
- Add a `lint-docs` CI job to verify presence and links for:
3535
- `.github/instructions/*.instructions.md`
36-
- `Src/*/COPILOT.md`
36+
- `Src/*/AGENTS.md`
3737
- `.github/src-catalog.md`
3838
- Add a `prompt-validate` job: checks frontmatter structure for `.prompt.md`
3939

@@ -42,8 +42,9 @@ This plan is mothballed for now. It captures the steps to bring our agent workfl
4242
- Gather feedback and iterate before enabling write-capable workflows
4343

4444
## References
45-
- `.github/copilot-instructions.md` (entry points)
45+
- `.github/AGENTS.md` (entry points)
4646
- `.github/prompts/` (agent workflows)
4747
- `.github/instructions/` (domain rules)
4848
- `.github/chatmodes/` (role boundaries)
4949
- `.github/context/` and `.github/memory.md` (signals and decisions)
50+

0 commit comments

Comments
 (0)