Why: ADR-0015 established that Microsoft APM (apm.yml + .apm/) should replace this repo's hand-authored plugin.json/marketplace.json model, with those files becoming compiled output of `apm pack` instead of files edited by hand via the (now-retired) plugin-author/marketplace-author skills. Issue #90 was the deferred execution of that decision, gated on #88 (apm tooling) and #89 (apm-native agent-author/skill-author routing). Implementation notes: - All six plugins (bin, core, git, gitea, kyberforge, lint) now carry apm.yml + .apm/{skills,agents,hooks} as their authoring source. Skills moved with a plain git mv (content-identical across targets). Agents were re-authored, not moved: per ADR-0016, .apm/agents/*.agent.md compiles verbatim to both Claude and Copilot, so plugin-scope agents now carry only name/description/model/source_keys -- no tools: field, no Claude-only knobs (isolation, maxTurns, effort, memory, permissionMode). - Root apm.yml registers all 7 marketplace packages (6 local plus mattpocock-skills as a remote entry) under versioning: per_package, matching this repo's existing independent-plugin-versioning practice. - .claude-plugin/marketplace.json and every plugin's plugin.json are now apm-pack-compiled output, verified against the prior hand-maintained content: same names/descriptions/versions/licenses/authors, only cosmetic serialization differences (JSON key order, owner email vs. url, Unicode escaping). - plugin-author and marketplace-author are retired now that apm-based authoring fully replaces their job; kyberforge bumped 1.3.1 -> 1.4.0 for that removal, and the root marketplace catalog bumped 0.3.1 -> 0.3.2 to match, per the version-bump convention now documented in apm-workflow's reference docs instead of a dedicated script (apm has no native version-bump automation). - Fixed hardcoded pre-.apm/ path assumptions across .pre-commit-config.yaml, .pre-commit-hooks.yaml, scripts/check-scope-walkup-sync.sh, scripts/sync-vale-styles.sh, scripts/check-vale-style-sync.sh, six plugins' root plugin.json (stale skills/hooks/agents pointer fields that check-manifests.sh validates), and several tests/*.bats and tests/*.sh fixtures -- including a bats REPO_ROOT relative-path depth bug (10 files, one extra .apm/ directory level to walk up) and a vale probe-path isolation regression introduced mid-fix. - Corrected empirically-wrong assumptions surfaced this session in apm-workflow/apm-install's own reference docs: `apm marketplace package add` does not accept local paths (only owner/repo remote shorthand -- local packages are registered by editing apm.yml's marketplace.packages[] directly); `apm compile` is a consumer-side AGENTS.md/CLAUDE.md generator, not the plugin.json producer, and hard-fails on skill/agent-only packages without --clean; `apm plugin init <name>` nests a stray subdirectory when run with a positional name arg from inside a same-named directory; no native Copilot marketplace output profile exists; .mcp.json is merged into the compiled plugin.json content-aware and target-scoped, with no dependencies.mcp entry needed for simple passthrough; pipx is the correct pip fallback on externally-managed Python environments. - Renamed agent-author's copilot.agent.md template asset to copilot.agent.md.template so apm compile's recursive *.agent.md glob stops misparsing the placeholder template as a real agent primitive. Impact: plugin.json and marketplace.json are compiled artifacts from here on -- editing them by hand is no longer the workflow; edit apm.yml/.apm/ and run apm pack. CONTEXT.md's Plugin/Plugin marketplace glossary entries reflect this. ADR-0001 is marked superseded, ADR-0006 moot, and ADR-0010 updated for the new .apm/agents/ path (project/user scope unaffected, per ADR-0016). Full local verification: claude plugin validate --strict on all 6 plugins, apm audit --ci, apm marketplace check, check-manifests.sh, and the full test suite (165/165 bats, 13/13 shell scripts) all pass clean. Fixes: #90 Refs: #88, #89 ADR: 0015 ADR: 0016 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ub96PyaSRD9BHPktotj1pC
78 lines
3.1 KiB
Markdown
78 lines
3.1 KiB
Markdown
# CONTEXT.md Format
|
|
|
|
## Structure
|
|
|
|
```md
|
|
# {Context Name}
|
|
|
|
{One or two sentence description of what this context is and why it exists.}
|
|
|
|
## Language
|
|
|
|
**Order**:
|
|
{A concise description of the term}
|
|
_Avoid_: Purchase, transaction
|
|
|
|
**Invoice**:
|
|
A request for payment sent to a customer after delivery.
|
|
_Avoid_: Bill, payment request
|
|
|
|
**Customer**:
|
|
A person or organization that places orders.
|
|
_Avoid_: Client, buyer, account
|
|
|
|
## Relationships
|
|
|
|
- An **Order** produces one or more **Invoices**
|
|
- An **Invoice** belongs to exactly one **Customer**
|
|
|
|
## Example dialogue
|
|
|
|
> **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
|
|
> **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed."
|
|
|
|
## Flagged ambiguities
|
|
|
|
- "account" was used to mean both **Customer** and **User** — resolved: these are distinct concepts.
|
|
```
|
|
|
|
## Rules
|
|
|
|
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
|
|
- **Flag conflicts explicitly.** If a term is used ambiguously, call it out in "Flagged ambiguities" with a clear resolution.
|
|
- **Keep definitions tight.** One sentence max. Define what it IS, not what it does.
|
|
- **Show relationships.** Use bold term names and express cardinality where obvious.
|
|
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
- **Write an example dialogue.** A conversation between a dev and a domain expert that demonstrates how the terms interact naturally and clarifies boundaries between related concepts.
|
|
|
|
## Single vs multi-context repos
|
|
|
|
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
|
|
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
|
|
```md
|
|
# Context Map
|
|
|
|
## Contexts
|
|
|
|
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
|
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
|
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
|
|
|
|
## Relationships
|
|
|
|
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
```
|
|
|
|
The skill infers which structure applies:
|
|
|
|
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
- If only a root `CONTEXT.md` exists, single context
|
|
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
|
|
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|