Skip to content
Open
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ Subcommands include `prompt`, `repl`, `doctor`, `status`, `session`, `index`, `m
| [docs/tools.md](docs/tools.md) | Tool registry, executor behavior, and built-ins |
| [docs/permissions.md](docs/permissions.md) | Permission modes, policies, and approvals |
| [docs/agents.md](docs/agents.md) | Agent Framework integration |
| [docs/external-agents.md](docs/external-agents.md) | External agent adapters and supervised CLI runs |
| [docs/skills.md](docs/skills.md) | Skill packs, built-in workflows, and install/run commands |
| [docs/work-items.md](docs/work-items.md) | GitHub and generic work-item import/export |
| [docs/workbench.md](docs/workbench.md) | Static runtime workbench/status surfaces |
| [docs/mcp.md](docs/mcp.md) | MCP registration, lifecycle, and orchestration |
| [docs/acp.md](docs/acp.md) | ACP stdio host and protocol notes |
| [docs/plugins.md](docs/plugins.md) | Plugin discovery, trust, and CLI flows |
Expand Down
30 changes: 30 additions & 0 deletions SharpClawCode.sln
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpClaw.Testing.Cli", "sr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpClaw.Testing.Xunit", "src\SharpClaw.Testing.Xunit\SharpClaw.Testing.Xunit.csproj", "{C45BBEA7-5970-40BB-AE6D-B8F09D1E2EE1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpClaw.Code.ExternalAgents", "src\SharpClaw.Code.ExternalAgents\SharpClaw.Code.ExternalAgents.csproj", "{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpClaw.Code.WorkItems", "src\SharpClaw.Code.WorkItems\SharpClaw.Code.WorkItems.csproj", "{9C45962D-F544-474F-B67A-1736807EEC7E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -467,6 +471,30 @@ Global
{C45BBEA7-5970-40BB-AE6D-B8F09D1E2EE1}.Release|x64.Build.0 = Release|Any CPU
{C45BBEA7-5970-40BB-AE6D-B8F09D1E2EE1}.Release|x86.ActiveCfg = Release|Any CPU
{C45BBEA7-5970-40BB-AE6D-B8F09D1E2EE1}.Release|x86.Build.0 = Release|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Debug|x64.ActiveCfg = Debug|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Debug|x64.Build.0 = Debug|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Debug|x86.ActiveCfg = Debug|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Debug|x86.Build.0 = Debug|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Release|Any CPU.Build.0 = Release|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Release|x64.ActiveCfg = Release|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Release|x64.Build.0 = Release|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Release|x86.ActiveCfg = Release|Any CPU
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A}.Release|x86.Build.0 = Release|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Debug|x64.ActiveCfg = Debug|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Debug|x64.Build.0 = Debug|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Debug|x86.ActiveCfg = Debug|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Debug|x86.Build.0 = Debug|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Release|Any CPU.Build.0 = Release|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Release|x64.ActiveCfg = Release|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Release|x64.Build.0 = Release|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Release|x86.ActiveCfg = Release|Any CPU
{9C45962D-F544-474F-B67A-1736807EEC7E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -504,5 +532,7 @@ Global
{A78CD9D6-54CF-422C-B5D8-B3BC4D99323E} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{425E2495-940F-46A6-9F3E-ED05301504BD} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{C45BBEA7-5970-40BB-AE6D-B8F09D1E2EE1} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{C76D91F9-EAED-4C8B-A07C-70A3BF65E42A} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
{9C45962D-F544-474F-B67A-1736807EEC7E} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
EndGlobalSection
EndGlobal
41 changes: 41 additions & 0 deletions docs/external-agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# External Agents

SharpClaw can run external agent CLIs as supervised, session-aware operations. External agents do not replace SharpClaw's runtime; they are child processes that must pass permission policy before mutating runs.

## Configure

Use `.sharpclaw/config.jsonc`:

```jsonc
{
"externalAgents": {
"enabled": true,
"requireApprovalForMutatingRuns": true,
"adapters": {
"codex": {
"executablePath": "codex",
"defaultArgs": []
}
}
}
}
```

Built-in adapters are `claude`, `opencode`, `gemini`, and `codex`.

## Use

```bash
sharpclaw external list
sharpclaw external status
sharpclaw external run --adapter codex --prompt "Review this repository"
```

In the REPL:

```text
/agents external list
/agents external run codex Review this repository
```

MVP support is text-mode process execution. Structured streaming is deferred until external CLIs expose stable machine-readable streams.
44 changes: 44 additions & 0 deletions docs/skills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Skill Packs

Skill packs package reusable prompts, checklists, command templates, recommended tools, and compatible modes. Legacy workspace skills under `.sharpclaw/skills` are still supported; skill packs live under `.sharpclaw/skillpacks`.

## Manifest

`skillpack.json`:

```json
{
"id": "pr-review",
"name": "PR Review",
"version": "1.0.0",
"description": "Reviews diffs for correctness, tests, security, and maintainability.",
"author": "team",
"tags": ["review"],
"commands": [
{
"name": "run",
"description": "Run the review",
"promptTemplate": "Review this diff: {{arguments}}"
}
],
"prompts": [],
"checklists": [],
"recommendedTools": [],
"requiredPermissions": ["toolExecution"],
"compatibleModes": ["plan", "build"],
"entryPointPrompt": "Review this diff: {{arguments}}"
}
```

## Use

```bash
sharpclaw skills list
sharpclaw skills show --id pr-review
sharpclaw skills install --path ./skillpack.json
sharpclaw skills enable --id pr-review
sharpclaw skills disable --id pr-review
sharpclaw skills run --id pr-review --args "main...feature"
```

Built-in packs include PR Review, Architecture Review, Release Notes, EFH Recovery, and Figma Handoff.
28 changes: 28 additions & 0 deletions docs/work-items.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Work Items

Work-item integrations import real tasks into SharpClaw sessions and export session summaries without posting back automatically.

## GitHub

```bash
sharpclaw work import https://github.com/owner/repo/issues/123
sharpclaw work import https://github.com/owner/repo/pull/123
```

Public issues and PRs work unauthenticated. Set `GITHUB_TOKEN` for private repositories or higher rate limits.

## Generic JSON

```bash
sharpclaw work import ./task.json --provider generic
```

The JSON shape matches `GenericWorkItemFixture`: provider, id, title, description, url, status, labels, assignee, and metadata.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace internal fixture reference with a concrete JSON example.

GenericWorkItemFixture looks internal and is not useful to CLI users. Document the expected payload directly so users can import without reading source.

📄 Suggested doc update
-The JSON shape matches `GenericWorkItemFixture`: provider, id, title, description, url, status, labels, assignee, and metadata.
+Expected JSON fields: `provider`, `id`, `title`, `description`, `url`, `status`, `labels`, `assignee`, and `metadata`.
+
+Example:
+```json
+{
+  "provider": "generic",
+  "id": "task-123",
+  "title": "Investigate flaky test",
+  "description": "Repro and fix intermittent timeout in CI",
+  "url": "https://tracker.example.com/tasks/task-123",
+  "status": "open",
+  "labels": ["ci", "tests"],
+  "assignee": "alice",
+  "metadata": { "priority": "high" }
+}
+```
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The JSON shape matches `GenericWorkItemFixture`: provider, id, title, description, url, status, labels, assignee, and metadata.
Expected JSON fields: `provider`, `id`, `title`, `description`, `url`, `status`, `labels`, `assignee`, and `metadata`.
Example:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/work-items.md` at line 20, Replace the internal reference
GenericWorkItemFixture with a concrete JSON example in the docs: update the
sentence that currently reads "The JSON shape matches
`GenericWorkItemFixture`..." to include the provided JSON payload example
(provider, id, title, description, url, status, labels, assignee, metadata) so
CLI users can copy/import directly; ensure the example is fenced as JSON and
matches the suggested keys/values exactly.


## Export

```bash
sharpclaw work export-summary --session session_123
```

Export creates Markdown or JSON text in command output. It does not post comments to GitHub or Jira.
21 changes: 21 additions & 0 deletions docs/workbench.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Workbench

The workbench is a static terminal status surface focused on SharpClaw runtime state. It is not a terminal emulator or live dashboard.

```bash
sharpclaw workbench
```

REPL commands:

```text
/workbench
/sessions
/approvals
/checkpoints
/agent-status
```

The report includes the current session, goal, primary mode, active agent, approval summary, latest checkpoint, recent runtime activity, external adapter health, and warnings from operational status checks.

Use `--output-format json` for stable machine-readable output.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static IServiceCollection AddSharpClawCli(this IServiceCollection service
services.AddSingleton<ScheduleCommandHandler>();
services.AddSingleton<EvolutionCommandHandler>();
services.AddSingleton<ModelsCommandHandler>();
services.AddSingleton<AgentsCommandHandler>();
services.AddSingleton<ICommandHandler, PromptCommandHandler>();
services.AddSingleton<ICommandHandler, StatusCommandHandler>();
services.AddSingleton<ICommandHandler, DoctorCommandHandler>();
Expand All @@ -58,8 +59,11 @@ public static IServiceCollection AddSharpClawCli(this IServiceCollection service
services.AddSingleton<ICommandHandler, HooksCommandHandler>();
services.AddSingleton<ICommandHandler, MemoryCommandHandler>();
services.AddSingleton<ICommandHandler, SkillsCommandHandler>();
services.AddSingleton<ICommandHandler, AgentsCommandHandler>();
services.AddSingleton<ICommandHandler>(serviceProvider => serviceProvider.GetRequiredService<AgentsCommandHandler>());
services.AddSingleton<ICommandHandler, ExternalCommandHandler>();
services.AddSingleton<ICommandHandler, TodoCommandHandler>();
services.AddSingleton<ICommandHandler, WorkCommandHandler>();
services.AddSingleton<ICommandHandler, WorkbenchCommandHandler>();
services.AddSingleton<ICommandHandler, ShareCommandHandler>();
services.AddSingleton<ICommandHandler, UnshareCommandHandler>();
services.AddSingleton<ICommandHandler, CompactCommandHandler>();
Expand Down Expand Up @@ -93,8 +97,12 @@ public static IServiceCollection AddSharpClawCli(this IServiceCollection service
services.AddSingleton<ISlashCommandHandler, HooksCommandHandler>();
services.AddSingleton<ISlashCommandHandler, MemoryCommandHandler>();
services.AddSingleton<ISlashCommandHandler, SkillsCommandHandler>();
services.AddSingleton<ISlashCommandHandler, AgentsCommandHandler>();
services.AddSingleton<ISlashCommandHandler>(serviceProvider => serviceProvider.GetRequiredService<AgentsCommandHandler>());
services.AddSingleton<ISlashCommandHandler, TodoCommandHandler>();
services.AddSingleton<ISlashCommandHandler, WorkCommandHandler>();
services.AddSingleton<ISlashCommandHandler, WorkbenchCommandHandler>();
services.AddSingleton<ISlashCommandHandler, AgentStatusSlashCommandHandler>();
services.AddSingleton<ISlashCommandHandler, CheckpointsSlashCommandHandler>();
services.AddSingleton<ISlashCommandHandler, ShareCommandHandler>();
services.AddSingleton<ISlashCommandHandler, UnshareCommandHandler>();
services.AddSingleton<ISlashCommandHandler, CompactCommandHandler>();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using SharpClaw.Code.Commands.Models;

namespace SharpClaw.Code.Commands;

/// <summary>
/// REPL alias for external agent status.
/// </summary>
public sealed class AgentStatusSlashCommandHandler(AgentsCommandHandler agentsCommandHandler) : ISlashCommandHandler
{
/// <inheritdoc />
public string CommandName => "agent-status";

/// <inheritdoc />
public string Description => "Shows external agent adapter status.";

/// <inheritdoc />
public Task<int> ExecuteAsync(SlashCommandParseResult command, CommandExecutionContext context, CancellationToken cancellationToken)
=> agentsCommandHandler.ExecuteAsync(new SlashCommandParseResult(true, "agents", ["external", "status"]), context, cancellationToken);
}
Loading
Loading