Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "https://github.com/reqstool"
},
"metadata": {
"version": "0.2.0",
"version": "0.3.0",
"description": "AI-assisted reqstool requirements traceability — skills and commands for managing requirements, SVCs, and filters, with optional OpenSpec integration."
},
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/reqstool"
},
"metadata": {
"version": "0.2.0",
"version": "0.3.0",
"description": "AI-assisted reqstool requirements traceability — skills and commands for managing requirements, SVCs, and filters, with optional OpenSpec integration."
},
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ copilot plugin install --path ./plugins/reqstool-openspec

## Pre-commit checks

Run `claude plugin validate .` before committing to catch manifest errors, missing fields, and path issues.
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full testing and contribution process.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ modules:
| `/reqstool:init` | Create or update `.reqstool-ai.yaml` configuration interactively |
| `/reqstool:add-req` | Add a new requirement and update subproject filters |
| `/reqstool:add-svc` | Add a new Software Verification Case and update filters |
| `/reqstool:status` | Show requirements traceability status for system or a module |
| `/reqstool:status` | Show requirements traceability status (uses MCP server if configured, falls back to CLI) |
### Skills (auto-applied)

| When you're... | Skill |
Expand Down Expand Up @@ -129,7 +129,9 @@ Add a new Software Verification Case (SVC) to the system-level `software_verific

### `/reqstool:status`

Run `reqstool status local` for the system or a specific module. Accepts an optional module name (e.g., `/reqstool:status core`); defaults to the system-level path from `.reqstool-ai.yaml`. Reqstool traverses imports and implementation config automatically.
Show requirements traceability status for the system or a specific module. Accepts an optional module name (e.g., `/reqstool:status core`); defaults to the system-level path from `.reqstool-ai.yaml`.

Uses the `reqstool` MCP server (`get_status` tool) when configured. Falls back to `reqstool status local` CLI if the server is not available, notifying you immediately when it does.

## Skill details

Expand All @@ -150,6 +152,25 @@ OpenSpec integration conventions, auto-applied when working with spec.md files:
- **reqstool-openspec-conventions.md** — how to reference reqstool IDs in OpenSpec specs
- **config-rules.yaml** — reqstool rules for openspec/config.yaml

## MCP server

The [reqstool MCP server](https://github.com/reqstool/reqstool-client) (reqstool ≥ 0.9.0) exposes structured tools for AI agents: `get_status`, `list_requirements`, `get_requirement_status`, and more.

The `/reqstool:init` command can configure it automatically. To set it up manually, add to `.mcp.json` in your project root (project-scoped) or `~/.config/claude/mcp.json` (global):

```json
{
"mcpServers": {
"reqstool": {
"command": "reqstool",
"args": ["mcp", "local", "-p", "<your-system-path>"]
}
}
}
```

When configured, skills like `/reqstool:status` use MCP for structured data. If the server is not available they fall back to `reqstool status local` automatically, notifying you when they do.

## Prerequisites

- [reqstool CLI](https://github.com/reqstool/reqstool-client) (`pipx install reqstool`)
Expand Down
2 changes: 1 addition & 1 deletion plugins/reqstool/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "reqstool",
"description": "AI-assisted reqstool requirements traceability — skills and commands for managing requirements, SVCs, and filters.",
"version": "0.2.0",
"version": "0.3.0",
"author": {
"name": "reqstool",
"url": "https://github.com/reqstool"
Expand Down
5 changes: 3 additions & 2 deletions plugins/reqstool/skills/reqstool/add-req/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ For reqstool fundamentals (imports, filters, implementations), see `reqstool-ove
Add the new requirement ID to the `filters.<urn>.requirement_ids.includes` list in the
relevant module's `<module.path>/requirements.yml`.

6. **Verify with reqstool**
6. **Verify the new requirement is tracked**

Run `reqstool status local -p <module.path>` and confirm the new requirement appears.
- **If MCP is available**: call `get_requirement_status(<new_req_id>)` on the `reqstool` MCP server and confirm the requirement is returned.
- **Otherwise**: run `reqstool status local -p <module.path>` and confirm the new requirement appears.

7. **Report**

Expand Down
6 changes: 3 additions & 3 deletions plugins/reqstool/skills/reqstool/add-svc/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ For reqstool fundamentals (imports, filters, implementations), see `reqstool-ove
Add the new SVC ID to the `filters.<urn>.svc_ids.includes` list in the relevant module's
`<module.path>/software_verification_cases.yml`.

7. **Verify with reqstool**
7. **Verify the new SVC is tracked**

Run `reqstool status local -p <module.path>` and confirm the new SVC appears
under the linked requirement.
- **If MCP is available**: call `get_svc(<new_svc_id>)` on the `reqstool` MCP server and confirm the SVC is returned.
- **Otherwise**: run `reqstool status local -p <module.path>` and confirm the new SVC appears under the linked requirement.

8. **Report**

Expand Down
37 changes: 34 additions & 3 deletions plugins/reqstool/skills/reqstool/init/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,51 @@ Create or update `.reqstool-ai.yaml` configuration for this project.
structure, comments, and formatting. Replace placeholder values with the
user's inputs and include only the modules the user defined.

5. **Verify (if possible)**
5. **Configure MCP server (optional)**

Offer to configure the reqstool MCP server (requires reqstool ≥ 0.9.0):

> The reqstool MCP server gives AI tools structured access to your requirements.
> Would you like me to add the MCP server configuration?

If yes, use **AskUserQuestion** to ask the scope:
- **Project** — `.mcp.json` in the project root (shared with the team via version control)
- **Global** — `~/.config/claude/mcp.json` (just for you, not committed)

Read the chosen file (create if missing) and add or update the `reqstool` entry:

```json
{
"mcpServers": {
"reqstool": {
"command": "reqstool",
"args": ["mcp", "local", "-p", "<system.path>"]
}
}
}
```

If the chosen file already has a `reqstool` entry, show it and ask before overwriting.

If `reqstool` is not yet installed, skip this step and tell the user:
> Install reqstool first (`pipx install reqstool`), then re-run `/reqstool:init`
> or add the MCP config manually.

6. **Verify (if possible)**

If `reqstool` CLI is installed **and** the system path contains existing reqstool files,
run `reqstool status local -p <system.path>` to verify the config.

If reqstool is not installed or files don't exist yet, skip verification and
tell the user they can run `/reqstool:status` later once their reqstool files are in place.

6. **Report**
7. **Report**

Show the user:
- The created/updated config (print the file contents)
- Whether this was a new file or an update
- Remind them to add `.reqstool-ai.yaml` to version control
- Whether the MCP server was configured and in which scope
- Remind them to add `.reqstool-ai.yaml` to version control (and `.mcp.json` if project-scoped)
- Next steps: "Run `/reqstool:add-req` to add your first requirement,
or `/reqstool:status` to check traceability status."

Expand Down
32 changes: 24 additions & 8 deletions plugins/reqstool/skills/reqstool/status/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
version: "1.0"
---

Run `reqstool status local` for a reqstool directory in this project.
Show requirements traceability status. Uses the reqstool MCP server if configured, falls back to the CLI.

---

Expand All @@ -30,7 +30,22 @@ Read `.reqstool-ai.yaml` — see `reqstool-conventions.md` for field reference.
- If the user is working inside a module directory (e.g., a Gradle subproject),
ask whether they want to run status for that module or for the system level.

3. **Run reqstool status**
3. **Try MCP first**

Call the `reqstool` MCP server `get_status` tool.

- If it succeeds: present the returned status (requirements met/total, test summary).
Note: the MCP server always reflects the system-level path it was started with.
If the user asked for a specific module and the MCP result does not scope to that path,
note this limitation and proceed to the CLI fallback for the module path.

4. **Fall back to CLI**

If the MCP server is not configured or the call fails, immediately tell the user:

> The reqstool MCP server is not configured — falling back to CLI.

Then run:

```bash
reqstool status local -p <path>
Expand All @@ -39,14 +54,15 @@ Read `.reqstool-ai.yaml` — see `reqstool-conventions.md` for field reference.
Show the output directly — reqstool traverses imports and implementation
configuration automatically, so no further summarization is needed.

4. **If reqstool is not installed**
5. **If neither works**

If the command fails with "not found", tell the user:
```
reqstool is not installed. Install with: pipx install reqstool
```
If `reqstool` CLI is also not found, tell the user:

> Both the reqstool MCP server and CLI are unavailable.
> - To install the CLI: `pipx install reqstool`
> - To configure the MCP server: run `/reqstool:init`

**Guardrails**
- Always run from the project root directory
- Do not modify any files — this is a read-only status command
- Do not summarize or reformat reqstool output — show it as-is
- Do not summarize or reformat reqstool CLI output — show it as-is
Loading