Skip to content

Commit 9d53e9b

Browse files
Capture lingering guidance edits
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 3b8a7de commit 9d53e9b

2 files changed

Lines changed: 69 additions & 26 deletions

File tree

AGENTS.md

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,72 @@
1-
# Agents
1+
# Agent Instructions
22

33
## Main directive
44

5-
Everything is a work in progress and can be updated and improved.
6-
If you find a problem, fix it if it's small; otherwise, register it as an issue in the respective repo.
5+
Everything is a work in progress and can be updated and improved. Fix a small problem when it is directly in scope; register a larger or unrelated problem as an issue in the repository that owns it.
76

8-
## Install the ecosystem
7+
This repository belongs to `github.com/MSXOrg`.
98

10-
1. Create a folder in the home directory called `.msx`:
11-
2. Clone the ecosystem locally:
12-
1. <https://github.com/MSXOrg/docs> — requires PRs to be updated.
13-
- Clone as bare and use worktrees.
14-
- Create a worktree for all branches - worktree = name of the branch.
15-
2. <https://github.com/MSXOrg/memory/> — work directly towards main.
16-
- Simple clone, only main.
9+
## Install and synchronize the ecosystem
1710

18-
To install:
19-
- Clone the repos in the users home folder under a sub-folder named `.msx`.
20-
- Set configs locally to each of these repos using the GitHub username and email.
11+
The agent workspace lives under `~/.msx`:
2112

22-
## Working with the ecosystem
13+
| Repository | Local path | Purpose | Change model |
14+
| --- | --- | --- | --- |
15+
| `MSXOrg/docs` | `~/.msx/docs.git` + `~/.msx/docs` | Bare backing repository plus clean readable main worktree for reviewed organization context. | Pull requests through topic worktrees only. |
16+
| `MSXOrg/memory` | `~/.msx/memory` | Durable organization memory: prior decisions, gotchas, and reusable working knowledge. | Commit and push directly to `main`, per that repository's policy. |
2317

24-
1. Get to know this repo first:
25-
- [README](README.md) for what this repository is and how it builds.
26-
- [CONTRIBUTING](CONTRIBUTING.md) for how to contribute and the review process.
27-
2. Read `~/.msx/docs` - start with the index to get an overview of what is here.
28-
3. Read `~/.msx/memory` - start with the index to get an overview of what is here. Use this while working - commit your memories here for work inside the PSModule organization.
29-
4. While working with the code, do small micro commits and push on every commit. This will make it easier to review and merge your changes.
18+
From this repository, install missing context repositories and synchronize every existing clone before use:
19+
20+
```powershell
21+
pwsh bootstrap/Initialize-MsxWorkspace.ps1 `
22+
-UserName '<github-user>' `
23+
-UserEmail '<github-noreply-email>'
24+
```
25+
26+
Projects that add their own docs and memory provide plug-in coordinates without changing the synchronization implementation:
27+
28+
```powershell
29+
$projects = @(
30+
@{
31+
Name = 'MSXOrg'
32+
Path = ''
33+
DocsUrl = 'https://github.com/MSXOrg/docs.git'
34+
MemoryUrl = 'https://github.com/MSXOrg/memory.git'
35+
}
36+
@{
37+
Name = 'PSModule'
38+
Path = 'projects/PSModule'
39+
DocsUrl = 'https://github.com/PSModule/docs.git'
40+
MemoryUrl = 'https://github.com/PSModule/memory.git'
41+
}
42+
)
43+
& ./bootstrap/Initialize-MsxWorkspace.ps1 -Project $projects
44+
```
45+
46+
The bootstrap writes identity only to each context repository's local git configuration. It must succeed before any context is read; do not continue with missing, dirty, diverged, wrong-branch, unreachable, or stale context.
47+
48+
Use a dedicated worktree for every topic branch. Follow [Git Worktrees](src/docs/Ways-of-Working/Git-Worktrees.md) for the local layout and [Branching and Merging](src/docs/Ways-of-Working/Branching-and-Merging.md) for `<type>/<issue>-<slug>` branch names.
49+
50+
## Canonical context
51+
52+
- Docs root: [src/docs/index.md](src/docs/index.md)
53+
- Organization memory: `~/.msx/memory/index.md`
54+
55+
## Before acting
56+
57+
1. Segment the work by host, organization, repository, path, and task.
58+
2. Synchronize every canonical context repository to its remote default branch; stop if any context may be stale.
59+
3. Start at the docs root index and follow [Ways of Working](src/docs/Ways-of-Working/index.md) to the canonical [Workflow](src/docs/Ways-of-Working/Workflow.md).
60+
4. Infer the current stage from the task and its artifacts, then read the linked stage procedure.
61+
5. Read [README.md](README.md), [CONTRIBUTING.md](CONTRIBUTING.md), relevant standards, and organization memory.
62+
6. Apply path-specific local rules only when they match the files in scope.
63+
64+
## Working in this repository
65+
66+
1. Use [README.md](README.md) to understand what this repository is and how it builds.
67+
2. Use [CONTRIBUTING.md](CONTRIBUTING.md) for its contribution and review contract.
68+
3. Keep work reviewable with small, descriptive micro-commits.
69+
4. Push every commit so the remote branch, CI, and draft pull request reflect current work.
70+
5. Improve organization memory when a verified lesson is likely to matter again; commit and push MSXOrg memory directly to `main`.
71+
72+
This file owns bootstrap and repository-specific operating instructions. The linked documentation owns reusable process knowledge; this file does not redefine a workflow stage, coding standard, or review convention.

src/docs/Ways-of-Working/Branching-and-Merging.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Branching and Merging
3-
description: Topic branches, pull-request-only integration, and merge models.
3+
description: Delivery-leaf topic branches, pull-request-only integration, and merge models.
44
---
55

66
# Branching and Merging
@@ -9,7 +9,7 @@ How changes move from a working branch into a protected branch. The model is sma
99

1010
## Topic branches
1111

12-
- Work happens on short-lived branches — one per issue, each in its own [worktree](Git-Worktrees.md). A branch is cut from the default branch unless a different base is explicitly given; an agent follows the same default.
12+
- Repository delivery happens on short-lived branches — one per Task or Bug, each in its own [worktree](Git-Worktrees.md). Epic and PBI aggregates do not own branches, and an operational Task has no branch. A branch is cut from the default branch unless a different base is explicitly given; an agent follows the same default.
1313
- Name branches `<type>/<issue>-<short-slug>`, e.g. `feat/42-pagination` or `fix/99-null-context`. The type matches the change type.
1414
- Branches stay short-lived. The longer a branch lives, the further it diverges and the harder it is to merge.
1515

@@ -22,7 +22,7 @@ How changes move from a working branch into a protected branch. The model is sma
2222

2323
## Stacked pull requests
2424

25-
Use a stack when several reviewable changes depend on one another and cannot land independently. Each layer remains one Task issue, one branch, and one pull request; the stack only records their dependency and order. Independent changes use separate branches from the default branch instead.
25+
Use a stack when several reviewable changes depend on one another and cannot land independently. Each layer remains one Task or Bug, one branch, and one pull request; the stack only records their dependency and order. Independent changes use separate branches from the default branch instead.
2626

2727
Build the stack from its destination upward:
2828

@@ -33,9 +33,9 @@ Build the stack from its destination upward:
3333

3434
Every layer follows the ordinary [Contribution Workflow](Contribution-Workflow.md):
3535

36-
1. **Plan the dependency.** Give each layer its own Task issue. Record `Blocked by: #N` on dependent issues as described in [Issue Hierarchy](Issue-Hierarchy.md#how-to-express-the-hierarchy), and order the implementation so the shared foundation is the first layer.
36+
1. **Plan the dependency.** Give each layer its own Task or Bug issue. Add a native blocked-by edge from every dependent leaf to its prerequisite as described in [Issue Relationships](Issues/Process/Relationships.md#execution-order); prose, sub-issue order, and stack position do not create the gate.
3737
2. **Open every layer as a draft.** After the initial commit, push the branch and open its pull request immediately. Use the standard user-facing title and description from [PR Format](PR-Format.md); do not add stack position or an internal branch name to the title.
38-
3. **Link the stack in Technical Details.** Add fully qualified pull request links for the immediate dependency and dependent, using `Depends on Owner/Repo#N` and `Followed by Owner/Repo#N`. Each pull request closes only its own Task issue.
38+
3. **Link the stack in Technical Details.** Add fully qualified pull request links for the immediate dependency and dependent, using `Depends on Owner/Repo#N` and `Followed by Owner/Repo#N`. Each pull request closes only its own Task or Bug.
3939
4. **Keep each delta isolated.** The pull request diff against its current base contains only that layer's change. Run its tests, checks, and automated review even when an earlier layer already exercised the combined code.
4040
5. **Make one layer ready at a time.** Only the lowest unmerged layer is marked ready and given auto-merge. Every later layer stays draft, even when its current checks are green.
4141
6. **Advance after merge.** When the lowest layer lands, refresh the next branch against the landed target, retarget its pull request to that target, and verify that the diff still contains only its intended change. Run CI and the automated review loop again before marking it ready.

0 commit comments

Comments
 (0)