Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d9f4aaf
Migrate all the .csproj files to SDK format
jasonleenaylor Feb 17, 2026
1c3b014
Enable GeneratePathPropery for SIL.LCModel.Core
johnml1135 Feb 17, 2026
2d96791
Update COPILOT.md files - AppCore and CacheLight reviewed
Copilot Feb 17, 2026
14d4f14
Fix bitmap resource management in VwDrawRootBuffered
Copilot Feb 17, 2026
4269448
Fix the solution project mappings (remove AnyCPU mappings)
jasonleenaylor Feb 17, 2026
21361d0
feat: Serena MCP setup, Docker container builds, and VSTest migration
johnml1135 Feb 17, 2026
b19367a
fix(tests): clean NUnit 3->4 conversion from release/9.3 baseline
johnml1135 Feb 17, 2026
07850ef
fix(tests): apply VSTest and test failure fixes from branch
johnml1135 Feb 17, 2026
7a45ee0
Build: stabilize container/native pipeline and test stack
johnml1135 Feb 17, 2026
363034d
Fix build issues
johnml1135 Feb 17, 2026
8233a9a
update from COPILOT.md to AGENTS.md
johnml1135 Feb 17, 2026
2469bc6
Fixes for:
johnml1135 Feb 17, 2026
f1a62f2
fix: Use XPath-safe quoting for XML predicate lookups
johnml1135 Feb 17, 2026
6c77661
LT-22382: Unify stale-DLL detection into single-pass pre-build + inst…
johnml1135 Feb 17, 2026
9456e58
Update stale DLL check:
johnml1135 Feb 17, 2026
799ae65
feat: migrate NuGet packages to Central Package Management (CPM)
johnml1135 Feb 17, 2026
e3d40f5
Strip manual binding redirects; delete stale CPM migration artifacts
johnml1135 Feb 17, 2026
210230a
LT-22382: Unify stale-DLL detection into single-pass pre-build + inst…
johnml1135 Feb 17, 2026
4dfa1cf
Remove dead TeamCity download targets from mkall.targets
johnml1135 Feb 17, 2026
66d80df
TDD guidance
johnml1135 Feb 17, 2026
a46204c
Fix and refine MCP servers
johnml1135 Feb 17, 2026
1967a66
LT-22414: Rebuild Morph Type slice after SwapValues to prevent disapp…
johnml1135 Feb 17, 2026
334eb72
VSCode updates
johnml1135 Feb 17, 2026
6be9832
details-controls-testability plan
johnml1135 Feb 17, 2026
701b908
Shorten and update SDK_MIGRATION.md
johnml1135 Feb 17, 2026
66517e8
SDK_MIGRATION more managable
johnml1135 Feb 17, 2026
951cae7
Build cleanup pre-merge
johnml1135 Feb 17, 2026
de88cc9
Reinstate gecko downloads through GitHub
johnml1135 Feb 17, 2026
c960a13
Switch to Resharpier in VSCode
johnml1135 Feb 17, 2026
52d8b79
Stabilize ReSharper test discovery/build
johnml1135 Feb 17, 2026
b7594ff
fix(tests): Repair InstallValidatorTests build and runtime failures
johnml1135 Feb 17, 2026
1c91fae
Minot test script fixes
johnml1135 Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
143 changes: 143 additions & 0 deletions .GitHub/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# FieldWorks Agentic Instructions

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

See `.github/AI_GOVERNANCE.md` for the documentation taxonomy and “source of truth” rules.

## Repository Snapshot
- Product: FieldWorks (FLEx) — Windows-first linguistics suite maintained by SIL International.
- Languages & tech: C#, C++/CLI, native C++, WiX, PowerShell, XML, JSON, XAML/WinForms.
- Tooling: Visual Studio 2022 (Desktop workloads), MSBuild Traversal (`FieldWorks.proj`), WiX 3.14.x, NUnit-style tests, Crowdin localization.
- Docs: `ReadMe.md` → https://github.com/sillsdev/FwDocumentation/wiki for deep dives; `.github/src-catalog.md` + per-folder `AGENTS.md` describe Src/ layout.

## Core Rules
- Prefer `./build.ps1`; avoid ad-hoc project builds that skip traversal ordering.
- Run tests relevant to your change before pushing; do not assume CI coverage.
- For bug fixes, default to TDD (Red-Green-Refactor): write a failing test first, then implement the minimal fix.
- If you need to pause current edits to stay test-first, use `git stash` to hold changes while implementing the tests to fail, then restore with `git stash apply`.
- Keep localization via `.resx` and respect `crowdin.json`; never hardcode translatable strings.
- Avoid COM/registry edits without a test plan.
- Stay within documented tooling—no surprise dependencies or scripts without updating instructions.
- **Terminal commands**: **ALWAYS use `scripts/Agent/` wrapper scripts** for git or file reading requiring pipes/filters. See `.github/instructions/terminal.instructions.md` for the transformation table.

## Build & Test Essentials
- Prerequisites: install VS 2022 Desktop workloads, WiX 3.14.x (pre-installed on windows-latest), Git, LLVM/clangd + standalone OmniSharp (for Serena C++/C# support), and optional Crowdin CLI only when needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're trying to avoid Crowdin CLI to avoid its dependency on Java. Our preferred Crowdin client is https://github.com/sillsdev/Overcrowdin.

- Verify your environment: `.\Build\Agent\Verify-FwDependencies.ps1 -IncludeOptional`
- Common commands:
```powershell
# Full traversal build (Debug/x64 defaults)
.\build.ps1

# Run tests
.\test.ps1
```
- Tests: follow `.github/instructions/testing.instructions.md`; use VS Test Explorer or `vstest.console.exe` for managed tests.
- Installer edits must follow `.github/instructions/installer.instructions.md` plus WiX validation before PR.
- Installer builds: use `.\Build\Agent\Setup-InstallerBuild.ps1 -ValidateOnly` to check prerequisites, `-SetupPatch` for patch builds.

## Workflow Shortcuts
| Task | Reference |
| --- | --- |
| Build/test rules | `.github/instructions/build.instructions.md`, `.github/instructions/testing.instructions.md` |
| Debugging | `.github/instructions/debugging.instructions.md` |
| Managed / Native / Installer guidance | `.github/instructions/managed.instructions.md`, `.github/instructions/native.instructions.md`, `.github/instructions/installer.instructions.md` |
| Security & PowerShell rules | `.github/instructions/security.instructions.md`, `.github/instructions/powershell.instructions.md` |
| Guidance governance | `.github/AI_GOVERNANCE.md` |
| **Agent wrapper scripts** | `scripts/Agent/` - build, test, and git helpers for auto-approval |
| Prompts & specs | `.github/prompts/*.prompt.md`, `.github/spec-templates/`, `.github/recipes/` |
| Chat modes | `.github/chatmodes/*.chatmode.md` |

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

**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.

## AGENTS.md Maintenance
1. **Detect** stale folders: `python .github/detect_copilot_needed.py --strict --base origin/<branch> --json .cache/copilot/detect.json`.
2. **Plan** diffs + reference groups: `python .github/plan_copilot_updates.py --detect-json .cache/copilot/detect.json --out .cache/copilot/diff-plan.json`.
3. **Scaffold** (optional) when a file drifts from the canonical layout: `python .github/scaffold_copilot_markdown.py --folders Src/<Folder>`.
4. **Apply** the auto change-log from the planner: `python .github/copilot_apply_updates.py --plan .cache/copilot/diff-plan.json --folders Src/<Folder>`.
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.
6. **Validate** with `python .github/check_copilot_docs.py --only-changed --fail` (or use `--paths Src/Foo/AGENTS.md` for targeted checks).
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.
8. Run `.github/prompts/copilot-folder-review.prompt.md` with the updated plan slice to simulate an agent review before committing.

## CI & Validation Requirements
- GitHub Actions workflows live under `.github/workflows/`; keep them passing.
- Local parity checks:
```powershell
# Commit messages (gitlint)
python -m pip install --upgrade gitlint
git fetch origin
gitlint --ignore body-is-missing --commits origin/<base>..

# Whitespace
git log --check --pretty=format:"---% h% s" origin/<base>..
git diff --check --cached
```
- Before PRs, ensure:
- Build + relevant tests succeed locally.
- Installer/config changes validated with WiX tooling.
- Analyzer/lint warnings addressed.

### Build & Test Commands (ALWAYS use the scripts)
```powershell
# Build
.\build.ps1
.\build.ps1 -Configuration Release
.\build.ps1 -BuildTests

# Test
.\test.ps1
.\test.ps1 -TestFilter "TestCategory!=Slow"
.\test.ps1 -TestProject "Src/Common/FwUtils/FwUtilsTests"
.\test.ps1 -NoBuild # Skip build, use existing binaries

# Both scripts automatically:
# - Clean stale obj/ folders and conflicting processes
# - Set up VS environment
```

**DO NOT** use raw `msbuild` directly - let the scripts handle it.

## Where to Make Changes
- Source: `Src/` contains managed/native projects—mirror existing patterns and keep tests near the code (`Src/<Component>.Tests`).
- Installer: `FLExInstaller/` with WiX artifacts.
- Shared headers/libs: `Include/`, `Lib/` (avoid committing large binaries unless policy allows).
- Localization: update `.resx` files; never edit `crowdin.json` unless you understand Crowdin flows.
- Build infrastructure: `Build/` + `Bld/` orchestrate targets/props—change sparingly and document impacts.

## JIRA Integration

**LT-prefixed tickets** (e.g., `LT-22382`) are JIRA issues from `https://jira.sil.org/`.

⚠️ **NEVER browse to `jira.sil.org` URLs** - requires authentication. **ALWAYS use Python scripts:**

```powershell
# Get issue details (inline Python)
python -c "import sys; sys.path.insert(0, '.github/skills/atlassian-readonly-skills/scripts'); from jira_issues import jira_get_issue; print(jira_get_issue('LT-22382'))"

# Or export your assigned issues to JSON
python .github/skills/jira-to-beads/scripts/export_jira_assigned.py
```

| Scenario | Skill |
|----------|-------|
| Read issue details | `atlassian-readonly-skills` (default) |
| Create/update/comment | `atlassian-skills` (only when user explicitly requests) |
| Bulk import to Beads | `jira-to-beads` |

See `/AGENTS.md` → "Atlassian / JIRA Skills" section for full configuration and details.

## Confidence Checklist
- [ ] Prefer traversal builds over per-project compile hacks.
- [ ] Keep coding style aligned with `.editorconfig` and existing patterns.
- [ ] Validate installer/localization changes before PR.
- [ ] Record uncertainties with `FIXME(<topic>)` and resolve them when evidence is available.
- [ ] Refer back to this guide whenever you need repo-wide ground truth.



71 changes: 71 additions & 0 deletions .GitHub/AI_GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# AI guidance governance

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

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

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

## What goes where

### `.github/AGENTS.md`
Use for:
- One-page onboarding for agents: build/test commands, repo constraints, and links.
- Pointers to the curated instruction set and the component docs.

### `.github/instructions/*.instructions.md`
Use for:
- Prescriptive constraints that must be applied during editing/review.
- Cross-cutting rules that prevent expensive mistakes (security, terminal command restrictions, installer rules, managed/native boundary rules).

**Curated keep set (intentionally small):**
- `build.instructions.md`
- `debugging.instructions.md`
- `installer.instructions.md`
- `managed.instructions.md`
- `native.instructions.md`
- `powershell.instructions.md`
- `repo.instructions.md`
- `security.instructions.md`
- `terminal.instructions.md`
- `testing.instructions.md`

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

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

### `.github/agents/` and `.github/chatmodes/`
Use for:
- Role definitions, boundaries, and tool preferences.
- Do not put component architecture here; link to the component `AGENTS.md`.

## External standards alignment (post-2025)
- **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.
- **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.

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

Otherwise, update the appropriate `Src/**/AGENTS.md`.

Loading
Loading