Skip to content

Remove reload command from all configs and docs#59

Merged
dbpolito merged 3 commits intomainfrom
refactor/remove-reload-command
Mar 27, 2026
Merged

Remove reload command from all configs and docs#59
dbpolito merged 3 commits intomainfrom
refactor/remove-reload-command

Conversation

@dbpolito
Copy link
Copy Markdown
Contributor

Ticket

SKIPPED

Description

Remove the reload command from all configuration files and delete associated documentation files. The reload functionality is superseded by automatic project cache management.

Checklist

Configuration Updates

  • Removed reload from root kompass.jsonc
  • Removed reload from packages/core/kompass.jsonc
  • Removed reload from packages/opencode/kompass.jsonc
  • Removed reload from generated packages/opencode/.opencode/kompass.jsonc

Documentation Cleanup

  • Deleted packages/core/commands/reload.md (source)
  • Deleted packages/opencode/.opencode/commands/reload.md (generated)
  • Deleted packages/web/src/content/docs/docs/reference/commands/reload.mdx (web docs)

Integration Updates

  • Removed reload references from CommandShowcase.astro
  • Removed reload from commands index.mdx

Validation

  • Verify all config files no longer reference reload command
  • Confirm all reload documentation files are removed
  • Check that command index and showcase no longer list reload

- Delete reload.md command definition from packages/core/commands/
- Remove reload.md from packages/opencode/.opencode/commands/
- Delete reload.mdx documentation from packages/web/src/content/docs/docs/reference/commands/
- Update kompass.jsonc files to remove reload command references
- Update CommandShowcase.astro and commands index.mdx to remove reload references
@dbpolito dbpolito self-assigned this Mar 27, 2026
Copy link
Copy Markdown

@kompassdev kompassdev bot left a comment

Choose a reason for hiding this comment

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

★★☆☆☆

This PR removes the reload command from configs and docs, but misses several critical files that still reference the reload command:

Critical Issues (will break build/tests):

  1. kompass.schema.json - The JSON schema still references reload as a valid command in 3 locations:
  • Line 62-64: "reload": { "$ref": "#/$defs/commandConfig" }
  • Line 106: In the enabled array enum for valid commands
  • Line 134: In the templates property names enum

These must be removed to keep schema validation in sync. Leaving them will cause schema validation failures.

  1. packages/opencode/test/commands-config.test.ts - Multiple tests expect the reload command to exist:
  • Line 37: "reload" appears in expectedCommands array
  • Line 64: assert.equal(cfg.command!["reload"]?.agent, "build");
  • Line 75: assert.ok(cfg.command!["reload"]?.template);
  • Lines 115-125: Test that verifies reload template rewriting

These tests will fail after the command is removed.

Medium Issues:

  1. packages/web/src/content/docs/docs/reference/tools/index.mdx - Line 59 states - used by: /reload which references the removed command. This documentation should be updated since the reload tool still exists internally but no longer has a user-facing command wrapper.

What was done correctly:

  • All configuration files correctly removed reload from the commands section
  • The reload tool remains in the tools section (correct, as this is a low-level tool)
  • All command documentation files were deleted
  • Command showcase and index were updated

Required fixes before merge:

  1. Remove reload command references from kompass.schema.json
  2. Update tests in packages/opencode/test/commands-config.test.ts to remove reload expectations
  3. Update packages/web/src/content/docs/docs/reference/tools/index.mdx line 59

Run bun run compile && bun run typecheck && bun run test after making these fixes to verify nothing breaks.

@dbpolito
Copy link
Copy Markdown
Contributor Author

All review feedback has been addressed:

Fixed:

  1. kompass.schema.json - Removed reload command references from:

    • Command definition (lines 62-64)
    • Enabled array enum (line 103)
    • Templates property names enum (line 131)
  2. packages/opencode/test/commands-config.test.ts - Removed all reload-related test assertions:

    • Removed reload from expectedCommands array
    • Removed reload agent and template assertions
    • Removed the "rewrites project reload tool name with opencode prefix" test
  3. packages/web/src/content/docs/docs/reference/tools/index.mdx - Updated line 59 to note that the reload tool no longer has a user-facing command

Validation:

  • bun run compile - passed (18 commands compiled, reload not in list)
  • bun run typecheck - passed (0 errors)
  • bun run test - passed (49 tests)

No additional steps are required.

Copy link
Copy Markdown

@kompassdev kompassdev bot left a comment

Choose a reason for hiding this comment

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

★★★☆☆

The previous review feedback has been properly addressed - schema, tests, and docs are updated correctly. However, one critical source of truth was missed.

Missing: command definition in packages/core/commands/index.ts

The reload command definition (lines 45-50) still exists in packages/core/commands/index.ts, but the corresponding template file packages/core/commands/reload.md has been deleted. According to AGENTS.md, these files are part of the linked surface area that must stay in sync.

Fix required: Remove the reload command definition from packages/core/commands/index.ts (lines 45-50):

-  reload: {
-    description: "Reload the current OpenCode project configuration",
-    agent: "build",
-    templatePath: "commands/reload.md",
-    subtask: false,
-  },

After removing this, re-run bun run compile && bun run typecheck && bun run test to verify the removal is complete.

What was done correctly:

  • ✅ All config files (root, core, opencode) removed reload from commands
  • ✅ Schema removed reload command references
  • ✅ Tests updated to remove reload expectations
  • ✅ Web docs updated for reload tool
  • ✅ Command docs showcase and index updated
  • ✅ Tool documentation (reload.mdx) correctly retained since the tool still exists

@dbpolito dbpolito merged commit d7786ab into main Mar 27, 2026
1 check passed
@dbpolito dbpolito deleted the refactor/remove-reload-command branch March 27, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant