diff --git a/.opencode/agents/divisor-curator.md b/.opencode/agents/divisor-curator.md index 59cc394..285db4f 100644 --- a/.opencode/agents/divisor-curator.md +++ b/.opencode/agents/divisor-curator.md @@ -78,7 +78,7 @@ Classify files as user-facing or internal based on path patterns: **User-facing paths** (trigger documentation checks): - `cmd/` — CLI commands and flags - `.opencode/agents/` — agent capabilities -- `.opencode/command/` — slash commands +- `.opencode/commands/` — slash commands - `.opencode/skill/` — swarm skills - `internal/scaffold/` — scaffold output (affects what `uf init` deploys) - `AGENTS.md` — project documentation diff --git a/.opencode/command/cobalt-crush.md b/.opencode/commands/cobalt-crush.md similarity index 96% rename from .opencode/command/cobalt-crush.md rename to .opencode/commands/cobalt-crush.md index b610752..6547c0f 100644 --- a/.opencode/command/cobalt-crush.md +++ b/.opencode/commands/cobalt-crush.md @@ -64,7 +64,7 @@ implementation command to the `cobalt-crush-dev` agent: `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` from the repo root. If it succeeds and returns a `FEATURE_DIR` with a `tasks.md`, this is a Speckit strategic workflow. - Read the full contents of `.opencode/command/speckit.implement.md` + Read the full contents of `.opencode/commands/speckit.implement.md` and delegate it to the `cobalt-crush-dev` agent via the Task tool — pass the command file's instructions as the agent's prompt so the agent executes the implementation workflow. @@ -80,7 +80,7 @@ implementation command to the `cobalt-crush-dev` agent: > ``. Run: `git checkout opsx/`" If on the correct branch, read the full contents of - `.opencode/command/opsx-apply.md` and delegate it to the + `.opencode/commands/opsx-apply.md` and delegate it to the `cobalt-crush-dev` agent via the Task tool — pass the command file's instructions as the agent's prompt so the agent executes the apply workflow. diff --git a/.opencode/command/constitution-check.md b/.opencode/commands/constitution-check.md similarity index 100% rename from .opencode/command/constitution-check.md rename to .opencode/commands/constitution-check.md diff --git a/.opencode/command/dewey-index.md b/.opencode/commands/dewey-index.md similarity index 100% rename from .opencode/command/dewey-index.md rename to .opencode/commands/dewey-index.md diff --git a/.opencode/command/dewey-reindex.md b/.opencode/commands/dewey-reindex.md similarity index 100% rename from .opencode/command/dewey-reindex.md rename to .opencode/commands/dewey-reindex.md diff --git a/.opencode/command/finale.md b/.opencode/commands/finale.md similarity index 100% rename from .opencode/command/finale.md rename to .opencode/commands/finale.md diff --git a/.opencode/command/gaze-fix.md b/.opencode/commands/gaze-fix.md similarity index 97% rename from .opencode/command/gaze-fix.md rename to .opencode/commands/gaze-fix.md index 3fdedae..23c434a 100644 --- a/.opencode/command/gaze-fix.md +++ b/.opencode/commands/gaze-fix.md @@ -48,7 +48,7 @@ implementation command: `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` from the repo root. If it succeeds and returns a `FEATURE_DIR` with a `tasks.md`, this is a Speckit strategic workflow. - Read the full contents of `.opencode/command/speckit.implement.md` + Read the full contents of `.opencode/commands/speckit.implement.md` and execute its instructions directly — follow the implementation workflow it describes. @@ -64,7 +64,7 @@ implementation command: > ``. Run: `git checkout opsx/`" If on the correct branch, read the full contents of - `.opencode/command/opsx-apply.md` and execute its instructions + `.opencode/commands/opsx-apply.md` and execute its instructions directly. 3. **If neither is detected**: Ask the user using the question tool: diff --git a/.opencode/command/gaze.md b/.opencode/commands/gaze.md similarity index 100% rename from .opencode/command/gaze.md rename to .opencode/commands/gaze.md diff --git a/.opencode/command/opsx-apply.md b/.opencode/commands/opsx-apply.md similarity index 100% rename from .opencode/command/opsx-apply.md rename to .opencode/commands/opsx-apply.md diff --git a/.opencode/command/opsx-archive.md b/.opencode/commands/opsx-archive.md similarity index 100% rename from .opencode/command/opsx-archive.md rename to .opencode/commands/opsx-archive.md diff --git a/.opencode/command/opsx-explore.md b/.opencode/commands/opsx-explore.md similarity index 100% rename from .opencode/command/opsx-explore.md rename to .opencode/commands/opsx-explore.md diff --git a/.opencode/command/opsx-propose.md b/.opencode/commands/opsx-propose.md similarity index 100% rename from .opencode/command/opsx-propose.md rename to .opencode/commands/opsx-propose.md diff --git a/.opencode/command/review-council.md b/.opencode/commands/review-council.md similarity index 99% rename from .opencode/command/review-council.md rename to .opencode/commands/review-council.md index e82f1a1..9b42703 100644 --- a/.opencode/command/review-council.md +++ b/.opencode/commands/review-council.md @@ -54,7 +54,7 @@ examining the current branch and workspace: `data-model.md`, `research.md` - **Code files**: everything else (`.go`, `.ts`, `.js`, `.py`, `go.mod`, `go.sum`, `Makefile`, `internal/`, - `cmd/`, `.opencode/agents/`, `.opencode/command/`, + `cmd/`, `.opencode/agents/`, `.opencode/commands/`, `.opencode/skill/`, `.opencode/uf/packs/`, etc.) diff --git a/.opencode/command/speckit.analyze.md b/.opencode/commands/speckit.analyze.md similarity index 100% rename from .opencode/command/speckit.analyze.md rename to .opencode/commands/speckit.analyze.md diff --git a/.opencode/command/speckit.checklist.md b/.opencode/commands/speckit.checklist.md similarity index 100% rename from .opencode/command/speckit.checklist.md rename to .opencode/commands/speckit.checklist.md diff --git a/.opencode/command/speckit.clarify.md b/.opencode/commands/speckit.clarify.md similarity index 100% rename from .opencode/command/speckit.clarify.md rename to .opencode/commands/speckit.clarify.md diff --git a/.opencode/command/speckit.constitution.md b/.opencode/commands/speckit.constitution.md similarity index 100% rename from .opencode/command/speckit.constitution.md rename to .opencode/commands/speckit.constitution.md diff --git a/.opencode/command/speckit.implement.md b/.opencode/commands/speckit.implement.md similarity index 100% rename from .opencode/command/speckit.implement.md rename to .opencode/commands/speckit.implement.md diff --git a/.opencode/command/speckit.plan.md b/.opencode/commands/speckit.plan.md similarity index 100% rename from .opencode/command/speckit.plan.md rename to .opencode/commands/speckit.plan.md diff --git a/.opencode/command/speckit.specify.md b/.opencode/commands/speckit.specify.md similarity index 100% rename from .opencode/command/speckit.specify.md rename to .opencode/commands/speckit.specify.md diff --git a/.opencode/command/speckit.tasks.md b/.opencode/commands/speckit.tasks.md similarity index 100% rename from .opencode/command/speckit.tasks.md rename to .opencode/commands/speckit.tasks.md diff --git a/.opencode/command/speckit.taskstoissues.md b/.opencode/commands/speckit.taskstoissues.md similarity index 100% rename from .opencode/command/speckit.taskstoissues.md rename to .opencode/commands/speckit.taskstoissues.md diff --git a/.opencode/command/speckit.testreview.md b/.opencode/commands/speckit.testreview.md similarity index 100% rename from .opencode/command/speckit.testreview.md rename to .opencode/commands/speckit.testreview.md diff --git a/.opencode/command/uf-init.md b/.opencode/commands/uf-init.md similarity index 98% rename from .opencode/command/uf-init.md rename to .opencode/commands/uf-init.md index 23609a9..75ef899 100644 --- a/.opencode/command/uf-init.md +++ b/.opencode/commands/uf-init.md @@ -40,9 +40,9 @@ Verify the project has been initialized: - `.opencode/skills/openspec-explore/SKILL.md` 3. Check that these 3 OpenSpec command files exist: - - `.opencode/command/opsx-propose.md` - - `.opencode/command/opsx-apply.md` - - `.opencode/command/opsx-archive.md` + - `.opencode/commands/opsx-propose.md` + - `.opencode/commands/opsx-apply.md` + - `.opencode/commands/opsx-archive.md` For each missing file, report an error: > `❌ : file not found` @@ -81,7 +81,7 @@ customization. For each file: **Target files**: - `.opencode/skills/openspec-propose/SKILL.md` -- `.opencode/command/opsx-propose.md` +- `.opencode/commands/opsx-propose.md` **What to insert**: After the step that creates the change directory (`openspec new change ""`), insert a new step: @@ -105,7 +105,7 @@ renumber existing steps (to avoid accidental content loss). **Target files**: - `.opencode/skills/openspec-apply-change/SKILL.md` -- `.opencode/command/opsx-apply.md` +- `.opencode/commands/opsx-apply.md` **What to insert**: Before the implementation begins, insert a branch validation step: @@ -127,7 +127,7 @@ existing steps. **Target files**: - `.opencode/skills/openspec-archive-change/SKILL.md` -- `.opencode/command/opsx-archive.md` +- `.opencode/commands/opsx-archive.md` **What to insert**: After the archive move completes, insert a branch cleanup step: @@ -172,7 +172,7 @@ instructions. For each file: **Target files**: - `.opencode/skills/openspec-propose/SKILL.md` -- `.opencode/command/opsx-propose.md` +- `.opencode/commands/opsx-propose.md` **What to insert**: Before drafting the proposal artifacts, add a context retrieval step: @@ -203,7 +203,7 @@ of whether branch enforcement was applied. **Target files**: - `.opencode/skills/openspec-apply-change/SKILL.md` -- `.opencode/command/opsx-apply.md` +- `.opencode/commands/opsx-apply.md` **What to insert**: Before implementing tasks, add a context retrieval step: @@ -317,14 +317,14 @@ skills only (commands delegate to skills for behavior). Create the 4 UF-custom speckit commands that upstream `specify init` does not provide. For each file below: -1. **Check** if the file exists in `.opencode/command/` +1. **Check** if the file exists in `.opencode/commands/` 2. **If it exists**: Report `⊘ : already exists (skipped)` 3. **If it does not exist**: Create it with the content described below. Report `✅ : created` #### speckit.analyze.md -Create `.opencode/command/speckit.analyze.md` — a +Create `.opencode/commands/speckit.analyze.md` — a read-only cross-artifact consistency and quality analysis command. The command: - Runs after `/speckit.tasks` produces `tasks.md` @@ -345,7 +345,7 @@ description: Perform a non-destructive cross-artifact consistency and quality an #### speckit.checklist.md -Create `.opencode/command/speckit.checklist.md` — a +Create `.opencode/commands/speckit.checklist.md` — a requirements quality validation command ("unit tests for English"). The command: - Generates checklists that test REQUIREMENTS quality, @@ -366,7 +366,7 @@ description: Generate a custom checklist for the current feature based on user r #### speckit.clarify.md -Create `.opencode/command/speckit.clarify.md` — a spec +Create `.opencode/commands/speckit.clarify.md` — a spec ambiguity detection and resolution command. The command: - Scans spec.md for ambiguities across 10 taxonomy categories (functional scope, data model, UX flow, @@ -386,7 +386,7 @@ description: Identify underspecified areas in the current feature spec by asking #### speckit.taskstoissues.md -Create `.opencode/command/speckit.taskstoissues.md` — a +Create `.opencode/commands/speckit.taskstoissues.md` — a GitHub issue creation command. The command: - Reads tasks.md and creates GitHub issues for each task - Requires a GitHub remote URL (validates before creating) @@ -409,7 +409,7 @@ step: run `.specify/scripts/bash/check-prerequisites.sh ### Step 6: Speckit Command Guardrails Inject a `## Guardrails` section into ALL 9 -`.opencode/command/speckit.*.md` files. For each file: +`.opencode/commands/speckit.*.md` files. For each file: 1. **Read** the file content 2. **Check** if a `## Guardrails` section already exists @@ -488,7 +488,7 @@ This step is read-only — it verifies but does not modify. ### Step 8: OpenSpec Command Guardrails -For `.opencode/command/opsx-propose.md`: +For `.opencode/commands/opsx-propose.md`: 1. **Read** the file content 2. **Check** if a `## Guardrails` section exists at the diff --git a/.opencode/command/unleash.md b/.opencode/commands/unleash.md similarity index 99% rename from .opencode/command/unleash.md rename to .opencode/commands/unleash.md index 2472e70..b070809 100644 --- a/.opencode/command/unleash.md +++ b/.opencode/commands/unleash.md @@ -239,7 +239,7 @@ Generate the implementation plan by delegating to the `cobalt-crush-dev` agent. 1. Read the full contents of - `.opencode/command/speckit.plan.md`. + `.opencode/commands/speckit.plan.md`. 2. Delegate to the `cobalt-crush-dev` agent via the Task tool, passing the plan command's instructions as the agent's prompt. Include the feature directory path so @@ -260,7 +260,7 @@ Generate the task list by delegating to the `cobalt-crush-dev` agent. 1. Read the full contents of - `.opencode/command/speckit.tasks.md`. + `.opencode/commands/speckit.tasks.md`. 2. Delegate to the `cobalt-crush-dev` agent via the Task tool, passing the tasks command's instructions as the agent's prompt. Include the feature directory path. @@ -279,7 +279,7 @@ Divisor agents provide equivalent coverage (consistency analysis + quality validation) in a single pass. 1. Read the full contents of - `.opencode/command/review-council.md`. + `.opencode/commands/review-council.md`. 2. Delegate to the `cobalt-crush-dev` agent via the Task tool with the review council's instructions, adding the explicit mode override: "Run in **Spec Review @@ -478,7 +478,7 @@ gate, Phase 1b Gaze quality analysis (if available), and Divisor agent reviews. 1. Read the full contents of - `.opencode/command/review-council.md`. + `.opencode/commands/review-council.md`. 2. Delegate to the `cobalt-crush-dev` agent via the Task tool with the review council's instructions, adding the explicit mode override: "Run in **Code Review diff --git a/cmd/replicator/init_test.go b/cmd/replicator/init_test.go index d476b4a..6b478ec 100644 --- a/cmd/replicator/init_test.go +++ b/cmd/replicator/init_test.go @@ -34,11 +34,11 @@ func TestRunInit_FreshDirectory(t *testing.T) { // Verify agent kit files created (16 total: 1 cells.json + 15 agent kit). agentKitFiles := []string{ - ".opencode/command/forge.md", - ".opencode/command/org.md", - ".opencode/command/inbox.md", - ".opencode/command/forge-status.md", - ".opencode/command/handoff.md", + ".opencode/commands/forge.md", + ".opencode/commands/org.md", + ".opencode/commands/inbox.md", + ".opencode/commands/forge-status.md", + ".opencode/commands/handoff.md", ".opencode/skills/always-on-guidance/SKILL.md", ".opencode/skills/forge-coordination/SKILL.md", ".opencode/skills/replicator-cli/SKILL.md", @@ -62,7 +62,7 @@ func TestRunInit_AgentKitSkipsExisting(t *testing.T) { dir := t.TempDir() // Pre-create a file that init would scaffold. - forgePath := filepath.Join(dir, ".opencode", "command", "forge.md") + forgePath := filepath.Join(dir, ".opencode", "commands", "forge.md") os.MkdirAll(filepath.Dir(forgePath), 0o755) original := []byte("# my custom forge\n") os.WriteFile(forgePath, original, 0o644) @@ -78,7 +78,7 @@ func TestRunInit_AgentKitSkipsExisting(t *testing.T) { } // Verify other agent kit files were still created. - orgPath := filepath.Join(dir, ".opencode", "command", "org.md") + orgPath := filepath.Join(dir, ".opencode", "commands", "org.md") if _, err := os.Stat(orgPath); err != nil { t.Errorf("org.md should have been created: %v", err) } @@ -88,7 +88,7 @@ func TestRunInit_ForceOverwrites(t *testing.T) { dir := t.TempDir() // Pre-create a file that init would scaffold. - forgePath := filepath.Join(dir, ".opencode", "command", "forge.md") + forgePath := filepath.Join(dir, ".opencode", "commands", "forge.md") os.MkdirAll(filepath.Dir(forgePath), 0o755) original := []byte("# my custom forge\n") os.WriteFile(forgePath, original, 0o644) @@ -128,7 +128,7 @@ func TestRunInit_AlreadyInitialized(t *testing.T) { } // Verify agent kit files still exist (scaffolded on first run, skipped on second). - forgePath := filepath.Join(dir, ".opencode", "command", "forge.md") + forgePath := filepath.Join(dir, ".opencode", "commands", "forge.md") if _, err := os.Stat(forgePath); err != nil { t.Errorf("agent kit files should exist after second init: %v", err) } @@ -148,7 +148,7 @@ func TestRunInit_CustomPath(t *testing.T) { t.Fatalf("cells.json not created at custom path: %v", err) } - forgePath := filepath.Join(target, ".opencode", "command", "forge.md") + forgePath := filepath.Join(target, ".opencode", "commands", "forge.md") if _, err := os.Stat(forgePath); err != nil { t.Fatalf("agent kit not created at custom path: %v", err) } diff --git a/internal/agentkit/agentkit_test.go b/internal/agentkit/agentkit_test.go index 6c90658..dfbdb63 100644 --- a/internal/agentkit/agentkit_test.go +++ b/internal/agentkit/agentkit_test.go @@ -30,11 +30,11 @@ func TestScaffold_FreshDirectory(t *testing.T) { // Spot-check a few files exist on disk. checks := []string{ - ".opencode/command/forge.md", - ".opencode/command/org.md", - ".opencode/command/inbox.md", - ".opencode/command/forge-status.md", - ".opencode/command/handoff.md", + ".opencode/commands/forge.md", + ".opencode/commands/org.md", + ".opencode/commands/inbox.md", + ".opencode/commands/forge-status.md", + ".opencode/commands/handoff.md", ".opencode/skills/always-on-guidance/SKILL.md", ".opencode/skills/forge-coordination/SKILL.md", ".opencode/skills/replicator-cli/SKILL.md", @@ -58,7 +58,7 @@ func TestScaffold_SkipsExisting(t *testing.T) { dir := t.TempDir() // Pre-create a file that Scaffold would write. - forgePath := filepath.Join(dir, ".opencode", "command", "forge.md") + forgePath := filepath.Join(dir, ".opencode", "commands", "forge.md") os.MkdirAll(filepath.Dir(forgePath), 0o755) original := []byte("# custom content\n") os.WriteFile(forgePath, original, 0o644) @@ -71,7 +71,7 @@ func TestScaffold_SkipsExisting(t *testing.T) { // Find the forge.md result — should be "skipped". var found bool for _, r := range results { - if r.Path == filepath.Join("command", "forge.md") { + if r.Path == filepath.Join("commands", "forge.md") { found = true if r.Action != "skipped" { t.Errorf("forge.md action = %q, want %q", r.Action, "skipped") @@ -93,7 +93,7 @@ func TestScaffold_ForceOverwrites(t *testing.T) { dir := t.TempDir() // Pre-create a file that Scaffold would write. - forgePath := filepath.Join(dir, ".opencode", "command", "forge.md") + forgePath := filepath.Join(dir, ".opencode", "commands", "forge.md") os.MkdirAll(filepath.Dir(forgePath), 0o755) original := []byte("# custom content\n") os.WriteFile(forgePath, original, 0o644) @@ -105,7 +105,7 @@ func TestScaffold_ForceOverwrites(t *testing.T) { // Find the forge.md result — should be "overwritten". for _, r := range results { - if r.Path == filepath.Join("command", "forge.md") { + if r.Path == filepath.Join("commands", "forge.md") { if r.Action != "overwritten" { t.Errorf("forge.md action = %q, want %q", r.Action, "overwritten") } @@ -130,7 +130,7 @@ func TestScaffold_FileCount(t *testing.T) { var commands, skills, agents int for _, r := range results { switch { - case len(r.Path) > 8 && r.Path[:8] == "command/": + case len(r.Path) > 9 && r.Path[:9] == "commands/": commands++ case len(r.Path) > 7 && r.Path[:7] == "skills/": skills++ diff --git a/internal/agentkit/content/command/forge-status.md b/internal/agentkit/content/commands/forge-status.md similarity index 100% rename from internal/agentkit/content/command/forge-status.md rename to internal/agentkit/content/commands/forge-status.md diff --git a/internal/agentkit/content/command/forge.md b/internal/agentkit/content/commands/forge.md similarity index 100% rename from internal/agentkit/content/command/forge.md rename to internal/agentkit/content/commands/forge.md diff --git a/internal/agentkit/content/command/handoff.md b/internal/agentkit/content/commands/handoff.md similarity index 100% rename from internal/agentkit/content/command/handoff.md rename to internal/agentkit/content/commands/handoff.md diff --git a/internal/agentkit/content/command/inbox.md b/internal/agentkit/content/commands/inbox.md similarity index 100% rename from internal/agentkit/content/command/inbox.md rename to internal/agentkit/content/commands/inbox.md diff --git a/internal/agentkit/content/command/org.md b/internal/agentkit/content/commands/org.md similarity index 100% rename from internal/agentkit/content/command/org.md rename to internal/agentkit/content/commands/org.md