📖 [Docs]: Agent context resolves through organization repositories - #194
📖 [Docs]: Agent context resolves through organization repositories#194Marius Storhaug (MariusStorhaug) wants to merge 20 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the agentic-development “canonical context” model to be repository-addressable by identity (e.g., MSXOrg/docs, PSModule/Process-PSModule) and to support multiple delivery methods (CLI/web/published site/refreshed local clones), while explicitly failing closed on the former ~/.msx/ layout.
Changes:
- Refactors the bootstrap contract from project-based (
-Project,DocsUrl/MemoryUrl) to repository-based (-Repository,Name/Path/Url/Kind) coordinates, including updated tests. - Introduces canonical org clone roots under
~/.msxorg/and~/.psmodule/, and adds explicit diagnostics + non-fallback behavior for recognized former~/.msx/paths. - Updates agentic-development documentation and router examples to describe repository identity, entry files, published docs URLs, privacy status, and preferred clone paths.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Initialize-MsxWorkspace.Tests.ps1 | Updates test suite to validate repository-coordinate bootstrap behavior, canonical paths, and legacy-layout diagnostics. |
| bootstrap/Initialize-MsxWorkspace.ps1 | Implements repository-addressable bootstrap inputs, path normalization/collision checks, and former-layout warnings. |
| bootstrap/AGENTS.template.md | Updates the seed/refresh instructions and environment variables to the new canonical clone layout and repository list. |
| bootstrap/README.md | Rewrites bootstrap docs to describe repository identity, canonical sources, and legacy layout non-fallback behavior. |
| AGENTS.md | Updates repo router to the new directive + source-repository addressing format. |
| CONTRIBUTING.md | Updates contributor guidance to the new canonical memory location under ~/.msxorg/memory. |
| src/docs/Capabilities/index.md | Updates the capability index description for Agentic Development (within generated index table markers). |
| src/docs/Capabilities/agentic-development/index.md | Updates capability overview and frontmatter to match repository-addressable context model. |
| src/docs/Capabilities/agentic-development/spec.md | Updates requirements terminology from “docs repo” to designated documentation source repositories + repository-identity rules. |
| src/docs/Capabilities/agentic-development/design.md | Updates design guidance, pointer-file examples, and canonical topology to org-addressable local roots. |
| src/docs/Capabilities/agentic-development/conformance.md | Updates conformance requirements to reflect repository-addressable sources and freshness expectations. |
| src/docs/Capabilities/agentic-development/memory-template.md | Updates template wording to align with “memory source repository” and documentation-source terminology. |
| src/docs/Ways-of-Working/Git-Worktrees.md | Updates worktree layout examples to the new canonical clone roots and PSModule documentation repo. |
| src/docs/Ways-of-Working/Repository-Standard.md | Updates example references from PSModule/docs to PSModule/Process-PSModule. |
| src/docs/Initiatives/PSModule.md | Updates PSModule initiative framing to make PSModule/Process-PSModule the canonical docs source. |
| .github/plugin/msx/skills/msx-ways-of-working-agentic-development/SKILL.md | Updates skill link target to the new Agentic Development capability location. |
Suppressed comments (2)
bootstrap/Initialize-MsxWorkspace.ps1:402
- These
Test-Pathchecks validate repository-controlled paths, but they use-Path(wildcard-aware). Use-LiteralPathso that path validation and origin verification can’t be confused by wildcard characters in configured repository paths.
$contextPath = Join-Path $Root $repository.RelativePath
$gitEntry = Join-Path $contextPath '.git'
if ($repository.Kind -eq 'memory' -and (Test-Path $gitEntry -PathType Container)) {
Assert-ContextOrigin -GitPath $contextPath -RepositoryUrl $repository.Url
} elseif ($repository.Kind -eq 'docs') {
bootstrap/Initialize-MsxWorkspace.ps1:392
Test-Pathis called with-Pathon repository-controlled paths. Because-Pathtreats wildcards, a repositoryPathcontaining characters like[/]/?/*could cause the safety checks to test a different filesystem location than the later git operations. Use-LiteralPathfor these validations to avoid wildcard expansion.
This issue also appears on line 398 of the same file.
$memoryGitEntry = Join-Path $memoryPath '.git'
if (Test-Path $memoryGitEntry -PathType Leaf) {
throw "Memory context '$memoryPath' is a worktree, but memory requires a simple checkout with a .git directory."
}
if ((Test-Path $memoryPath) -and -not (Test-Path $memoryGitEntry -PathType Container)) {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Suppressed comments (4)
Previously missed (2) — in code that hasn't changed since the last review.
AGENTS.md:5
- The repository router no longer states the conformance-required precedence rule that local files must not override an organization standard.
Read nearest firstplus the source list can be read as a "local overrides" policy unless the conflict precedence is explicit (and conformance.md still requires it).
Read nearest first, prefer documentation over memory, and always use the newest version.
This repository is `github.com/MSXOrg/docs`. Read these sources in order:
src/docs/Capabilities/agentic-development/design.md:185
- The router examples don’t include the conformance-required precedence statement (that local files never override an organization standard, and memory never overrides documentation). Since these examples are copy/paste scaffolds, omitting precedence here encourages non-conformant routers.
This issue also appears on line 212 of the same file.
Use a CLI, the web, published documentation, or a refreshed local clone, whichever
provides the newest accessible source.
bootstrap/Initialize-MsxWorkspace.ps1:564
- This uses
New-Item -Path, which treats wildcard characters (like[and]) as patterns. Since repository paths are intended to be treated literally, this should use-LiteralPath(and the same applies to otherNew-Itemcalls that build parent directories from configured paths).
New-Item -ItemType Directory -Path (Split-Path -Parent $backingPath) -Force | Out-Null
src/docs/Capabilities/agentic-development/design.md:213
- Same as the MSXOrg example above: the PSModule router example should include the explicit conflict precedence line required by conformance, so a copied router doesn’t imply that repository-local files override standards.
Use a CLI, the web, published documentation, or a refreshed local clone, whichever
provides the newest accessible source.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/Initialize-MsxWorkspace.Tests.ps1:394
- The literal-path preflight test uses
New-Item -Pathto create directories under$literalRoot(which contains[/]).-Pathperforms wildcard expansion, soliteral-path-workspace[1]can matchliteral-path-workspace1, undermining the test's intent and potentially creating the fixture in the wrong location. Use literal directory creation instead (same approach used in the bootstrap implementation).
New-Item -ItemType Directory -Path (Join-Path $literalRoot 'context1/docs/.git') -Force | Out-Null
New-Item -ItemType Directory -Path (Join-Path $literalRoot 'context1/memory/.git') -Force | Out-Null
…context-paths # Conflicts: # .github/CONTRIBUTING.md # AGENTS.md # bootstrap/AGENTS.template.md # bootstrap/Initialize-MsxWorkspace.ps1 # bootstrap/README.md # src/docs/Capabilities/agentic-development/conformance.md # src/docs/Capabilities/agentic-development/design.md # src/docs/Capabilities/agentic-development/index.md # src/docs/Capabilities/agentic-development/memory-template.md # src/docs/Capabilities/agentic-development/spec.md # src/docs/Capabilities/index.md # src/docs/Ways-of-Working/Git-Worktrees.md # tests/Initialize-MsxWorkspace.Tests.ps1
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/docs/Capabilities/agentic-development/spec.md:56
- This requirement says sources are named as
<organization>/<repository>, but the spec also describes resolving project scope by Git host and uses fully qualified examples likegithub.com/MSXOrg. Adding a short clarification that the host is already resolved (and therefore implied) would prevent readers from thinking host is intentionally excluded from identity.
- **Repository identity is authoritative.** A router MUST name each source as `<organization>/<repository>`. CLI, web, published-site, and refreshed-local-clone access are interchangeable delivery methods.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
src/docs/Capabilities/agentic-development/spec.md:69
- Grammar: “MUST stop local resolution rather than become stale fallbacks” is ungrammatical. Use “rather than becoming …” (or rephrase) so the requirement reads cleanly.
- **Fresh context before use.** Agents MUST use the newest accessible source version. Remote CLI, web, and published documentation MAY satisfy this directly. A local clone MUST be fetched and exactly synchronized with its remote default branch before its contents are read. Dirty, locally ahead, diverged, wrong-branch, or unreachable local clones MUST stop local resolution rather than become stale fallbacks.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
src/docs/Capabilities/agentic-development/spec.md:86
- The success-criteria bullet still references
docs/index.md, but this PR changes the model to “start at the designated documentation repository’s entry index” (and the canonical source may not be a repo nameddocs). This line should be updated to avoid contradicting the revised contract.
- A new product repository can adopt the framework by adding a router and the client routes that reach it, without copying standards pages.
- An agent reads the repository's own README and CONTRIBUTING before it reads an organization standard, and still applies the organization standard when the two disagree.
- A human or agent can follow `docs/index.md` → Ways of Working → Workflow → the current stage procedure without knowing a file path in advance.
- A prompt such as `Review this PR <link>` reaches the Review procedure directly, while `Make this issue <description>` reaches Define, without a parallel process definition.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
src/docs/Capabilities/agentic-development/spec.md:85
- The success criteria still hard-codes
docs/index.mdas the entry point. With the updated contract (designated documentation repository + its entry index), this should refer to the documentation repository’s entry index instead of a fixed path that may not exist (and may not be underdocs/).
- An agent working in `<host>/<org>/<repo>` for any adopting organization resolves its designated documentation repository as the canonical project context, with no change to the framework.
- A new product repository can adopt the framework by adding a router and the client routes that reach it, without copying standards pages.
- An agent reads the repository's own README and CONTRIBUTING before it reads an organization standard, and still applies the organization standard when the two disagree.
- A human or agent can follow `docs/index.md` → Ways of Working → Workflow → the current stage procedure without knowing a file path in advance.
Agents resolve canonical MSXOrg and PSModule documentation through the repositories that own it.
Changed: Documentation sources use real repository identities
The Agentic Development design identifies
MSXOrg/docsandPSModule/Process-PSModulewithout prescribing where either repository is cloned locally.Changed: Shared context is documentation-only
Obsolete context-store guidance is removed. Runtime and development setup own local checkout placement. The newly agreed root router and canonical
AGENTS.mdtemplate frommainremain unchanged.Technical details
mainis integrated in merge commit a4dc148.AGENTS.md,AGENTS.template.md, conformance, and runtime integration frommain.docs.src/docs/Capabilities/agentic-development/{index,spec,design}.md.github/plugin/**,src/docs/Initiatives/PSModule.mdRelevant issues (or links)