Skip to content

Commit a1821e3

Browse files
docs(context): use official Rstack agent plugin
1 parent 8a45c60 commit a1821e3

25 files changed

Lines changed: 95 additions & 1031 deletions

File tree

‎.agents/plugins/marketplace.json‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎.agents/skills/release-rstack/SKILL.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: release-rstack
3-
description: Create a coordinated release pull request for the `rstack` and `create-rstack` npm packages. Use when asked to prepare, create, or open an rstack package release PR.
3+
description: Create a coordinated release pull request for the `rstack`, `@rstackjs/context`, and `create-rstack` npm packages. Use when asked to prepare, create, or open an rstack package release PR.
44
---
55

66
# Release Rstack
@@ -13,7 +13,8 @@ If the version is missing, ask for it before making changes.
1313

1414
## Version rules
1515

16-
- Read both package versions before editing. Require the rstack target to be a valid, increasing SemVer version.
16+
- Read all three package versions before editing. Require the rstack target to be a valid, increasing SemVer version.
17+
- Keep `@rstackjs/context` on exactly the same version as `rstack`.
1718
- Keep the package version lines independent. Apply the rstack bump type to the current `create-rstack` version:
1819
- Patch: increment the patch version.
1920
- Minor: increment the minor version and reset patch to `0`.
@@ -29,13 +30,13 @@ If the version is missing, ask for it before making changes.
2930

3031
3. Create and switch to `release/v<version>` from the clean default-branch HEAD.
3132

32-
4. Update the `version` field in `packages/rstack/package.json` to `<version>` and the `version` field in `packages/create-rstack/package.json` to the derived `create-rstack` version.
33+
4. Update the `version` fields in `packages/rstack/package.json` and `packages/context/package.json` to `<version>`. Update the `version` field in `packages/create-rstack/package.json` to the derived `create-rstack` version.
3334

3435
5. In every `packages/create-rstack/template-*/package.json`, set the `rstack` dependency to `^<version>`. Update only that dependency entry and verify every template package manifest uses the same target version.
3536

3637
6. Run `pnpm --filter rstack build:native` to regenerate `packages/rstack/binding.cjs` and `packages/rstack/binding.d.cts` for the new version. Do not edit generated binding files manually.
3738

38-
7. Review the diff and confirm it contains only both package version changes, the template `rstack` dependency updates, and the regenerated binding files above. Verify the two package version changes use the intended matching bump type and no template retains an older rstack version.
39+
7. Review the diff and confirm it contains only the three package version changes, the template `rstack` dependency updates, and the regenerated binding files above. Verify `rstack` and `@rstackjs/context` have the same target version, `create-rstack` uses the intended matching bump type, and no template retains an older rstack version.
3940

4041
8. Create a commit with this exact message: `release: v<version>`.
4142

‎docs/rfcs/0001-rstack-context-engine.md‎

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ This is deliberately a lean, file-based design:
2121
- no coordinator daemon, task-runner integration, package-process discovery service, or development
2222
server route is required;
2323
- Rslint and Rstest execute only through explicit one-shot MCP tools;
24-
- Codex and Claude Code bundles register the same `rs mcp` command and provide the same six workflow
25-
skills; and
24+
- the repository-based `rstack` plugin in `rstackjs/agent-skills` registers `rs mcp` for Codex and
25+
Claude Code and provides six context workflows; and
2626
- rich build visualization continues to use an existing Rsdoctor report through `report_link`.
2727

2828
The unused-code feature is intentionally artifact-scoped. It identifies modules that are not
@@ -94,17 +94,20 @@ flowchart LR
9494
Report["Existing Rsdoctor report"]
9595
MCP["rs mcp<br/>stdio query server"]
9696
97+
Plugin["rstackjs/agent-skills<br/>one rstack plugin + six context skills"]
98+
9799
subgraph Hosts["Agent hosts"]
98-
Codex["Codex bundle + six skills"]
99-
Claude["Claude Code bundle + six skills"]
100+
Codex["Codex"]
101+
Claude["Claude Code"]
100102
end
101103
102104
AppObserver -->|publish| Store
103105
LibObserver -->|publish| Store
104106
Rslint -->|publish| Store
105107
Rstest -->|publish| Store
106-
Codex -->|stdio| MCP
107-
Claude -->|stdio| MCP
108+
Codex --> Plugin
109+
Claude --> Plugin
110+
Plugin -->|stdio| MCP
108111
MCP -->|read completed records| Store
109112
MCP -->|read selected file| Artifact
110113
MCP -->|resolve report_link| Report
@@ -129,6 +132,11 @@ publish their results after the one-shot command completes.
129132
| MCP server | Expose the query and explicit-capture tools over stdio. |
130133
| Plugin skills | Select the relevant tools and present their evidence boundaries to the model. |
131134

135+
The runtime is packaged separately from the CLI facade. `@rstackjs/context` owns the store,
136+
producer adapters, normalized evidence, queries, and MCP implementation. `rstack` owns command and
137+
configuration integration, exposes the runtime through `rstack/context`, and supplies the Rstack
138+
config adapter when `rs mcp` runs explicit lint or test captures.
139+
132140
### Monorepo process model
133141

134142
The MCP process does not use its launch directory as a package or build identifier. `rs mcp` starts
@@ -381,7 +389,8 @@ flowchart LR
381389

382390
### Server lifecycle
383391

384-
Both plugin bundles register one local stdio server named `rstack`. Their Node launcher first
392+
The official `rstack` plugin in `rstackjs/agent-skills` registers one local stdio server named
393+
`rstack` for both Codex and Claude Code. Its Node launcher first
385394
resolves the workspace-root local `rstack` package and invokes its `rs` binary directly. When that
386395
package is unavailable from the workspace root, the launcher falls back to `rs mcp` from the MCP
387396
host `PATH`, inheriting standard input, output, and error and propagating the delegated process
@@ -438,35 +447,18 @@ The reachability tools use four classifications:
438447
An `unreachable-module-candidate` is a request for source and runtime verification, not a deletion
439448
decision. Export-level and local-symbol conclusions remain outside this branch.
440449

441-
## Plugin bundles
450+
## Agent plugin distribution
442451

443-
### Codex bundle
452+
The installable host integration lives in
453+
[`rstackjs/agent-skills`](https://github.com/rstackjs/agent-skills), not in this runtime repository.
454+
It extends that repository's existing `rstack` plugin rather than creating another plugin or
455+
marketplace:
444456

445457
```text
446-
plugins/rstack-codex/
458+
agent-skills/
447459
├── .codex-plugin/
448-
│ └── plugin.json
449-
├── .mcp.json
450-
└── skills/
451-
├── analyze-build/
452-
├── assess-change-impact/
453-
├── debug-dev-cycle/
454-
├── explain-dead-code/
455-
├── find-unused-code/
456-
└── review-context-change/
457-
```
458-
459-
The Codex manifest describes the plugin, points to the six skills, and references `.mcp.json`. The
460-
repository marketplace entry points at this local bundle. The bundle uses the workspace-root local
461-
`rstack` package when available and otherwise expects `rs` on the MCP host `PATH`; it does not carry
462-
another copy of the context runtime.
463-
464-
### Claude code bundle
465-
466-
```text
467-
plugins/rstack-claude/
468460
├── .claude-plugin/
469-
│ └── plugin.json
461+
├── .agents/plugins/marketplace.json
470462
├── .mcp.json
471463
└── skills/
472464
├── analyze-build/
@@ -477,8 +469,10 @@ plugins/rstack-claude/
477469
└── review-context-change/
478470
```
479471

480-
The Claude Code bundle uses the same command, schemas, and workflow text. This branch does not add
481-
Claude-specific hooks, agents, workflows, or a second server implementation.
472+
The Codex and Claude manifests discover the same root `skills/` directory and `.mcp.json`. The
473+
launcher uses the workspace-root local `rstack` package when available and otherwise expects `rs`
474+
on the host `PATH`. The plugin contains no copy of `@rstackjs/context`, compiler graph, store, or MCP
475+
implementation.
482476

483477
### Skill catalog
484478

@@ -518,7 +512,7 @@ candidates.
518512
```mermaid
519513
flowchart LR
520514
P01["Phase 0/1<br/>foundation, passive build records,<br/>Rsdoctor analysis, report links<br/>implemented"]
521-
P2["Phase 2<br/>module artifact reachability<br/>and plugin bundles<br/>implemented"]
515+
P2["Phase 2<br/>module artifact reachability<br/>and official plugin workflows<br/>implemented"]
522516
P3["Phase 3<br/>explicit one-shot Rslint/Rstest<br/>snapshots and queries<br/>implemented"]
523517
P4["Phase 4<br/>compatible diffs, exact-path evidence,<br/>and six skills<br/>implemented"]
524518
P5["Phase 5<br/>no custom GUI or remote transport;<br/>reuse headless MCP + Rsdoctor GUI<br/>resolved"]
@@ -546,7 +540,7 @@ Implemented downstream:
546540
- application entries, library contract targets, and conservative roots;
547541
- bounded root reachability, shortest explanations, and impact traversal;
548542
- the four module-analysis MCP tools; and
549-
- matching Codex and Claude Code plugin bundles.
543+
- one shared Codex and Claude Code integration in `rstackjs/agent-skills`.
550544

551545
The implementation reports module candidates only. Export usage and local-symbol dead-code claims
552546
were not added.
@@ -572,7 +566,7 @@ Implemented downstream:
572566
- stored lint fixed-output previews without apply;
573567
- the `code_evidence` exact-path composition query;
574568
- `debug-dev-cycle` and `review-context-change`; and
575-
- the complete six-skill set in both plugin bundles.
569+
- the complete six-skill set in the official `rstack` plugin.
576570

577571
CI artifact exchange, performance budgets, apply tools, automatic verification, and export-level
578572
diffs remain deferred.

‎docs/superpowers/plans/2026-08-13-context-package-agent-skills.md‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Rstack Context Package And Agent Plugin Implementation Plan
1+
<!-- cspell:ignore evals dogfood -->
2+
3+
# Rstack context package and agent plugin implementation plan
24

35
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
46
@@ -8,7 +10,7 @@
810

911
**Tech Stack:** TypeScript, Rslib, Rstest, Rslint, MCP SDK, Zod, Codex plugins, Claude Code plugins, Agent Skills.
1012

11-
## Global Constraints
13+
## Global constraints
1214

1315
- Keep work on `codex/rstack-mcp-observability` in `rstack-cli` and `codex/rstack-context-plugin` in `agent-skills`.
1416
- Do not create another marketplace or another plugin identity; extend the existing `rstack` plugin.
@@ -20,7 +22,7 @@
2022

2123
---
2224

23-
### Task 1: Extend the official Rstack plugin
25+
### Task 1: extend the official Rstack plugin
2426

2527
**Files:**
2628

@@ -64,9 +66,9 @@ Run:
6466

6567
```bash
6668
node scripts/test-rstack-context-plugin.mjs
67-
python3 /home/zack/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
69+
python3 ~/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
6870
for skill in skills/analyze-build skills/assess-change-impact skills/debug-dev-cycle skills/explain-dead-code skills/find-unused-code skills/review-context-change; do
69-
python3 /home/zack/.codex/skills/.system/skill-creator/scripts/quick_validate.py "$skill"
71+
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py "$skill"
7072
done
7173
pnpm lint
7274
```
@@ -78,7 +80,7 @@ git add .mcp.json .codex-plugin .claude-plugin skills README.md scripts/test-rst
7880
git commit -m "feat(plugin): add Rstack Context workflows"
7981
```
8082

81-
### Task 2: Create the separated context package
83+
### Task 2: create the separated context package
8284

8385
**Files:**
8486

@@ -140,7 +142,7 @@ git add packages/context packages/rstack pnpm-workspace.yaml pnpm-lock.yaml
140142
git commit -m "refactor(context): extract context runtime package"
141143
```
142144

143-
### Task 3: Remove duplicate plugin distribution from Rstack CLI
145+
### Task 3: remove duplicate plugin distribution from Rstack CLI
144146

145147
**Files:**
146148

@@ -189,7 +191,7 @@ git add -A plugins .agents/plugins packages/rstack/tests/context docs website
189191
git commit -m "docs(context): use the official Rstack agent plugin"
190192
```
191193

192-
### Task 4: Install and dogfood the coordinated result
194+
### Task 4: install and dogfood the coordinated result
193195

194196
**Files:**
195197

‎packages/context/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Rstack Context
1+
# Rstack context
22

33
`@rstackjs/context` is the runtime behind the Rstack project-context MCP. It records and queries
44
checkout-local build, lint, test, coverage, and Rsdoctor evidence while keeping freshness,

0 commit comments

Comments
 (0)