Skip to content

fix: point workspace agent shim at .grove/instructions.md#79

Open
emmax86 wants to merge 1 commit into
mainfrom
fix/workspace-shim-instructions-ref
Open

fix: point workspace agent shim at .grove/instructions.md#79
emmax86 wants to merge 1 commit into
mainfrom
fix/workspace-shim-instructions-ref

Conversation

@emmax86

@emmax86 emmax86 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Problem

The generated workspace CLAUDE.md / AGENTS.md entry files told agents to load instruction context via grove (context_touch MCP tool or grove ws context touch), but never named the workspace instruction file itself. An agent that cannot run grove had no discoverable path to the workspace instructions.

Change

One paragraph appended to the shared bootstrap shim template in src/lib/agent-files.ts (the same constant feeds both CLAUDE.md and AGENTS.md generation, so both files are covered):

Workspace instructions live at .grove/instructions.md - read that file directly if you cannot run grove (it is the same content grove context serves at workspace scope).

Verification

  • Test-driven: mirrored shim constants in src/__tests__/lib/agent-files.test.ts and src/__tests__/commands/workspace.test.ts were updated first and confirmed failing for content mismatch, then the template was updated.
  • Full suite green: 902 tests passing, 0 failures.
  • The shim's ASCII-only invariant (asserted in agent-files.test.ts) is preserved by using a plain hyphen rather than an em-dash in the new paragraph.
  • bun run format / bun run format:check clean.

Note on existing workspaces

Generation is create-if-missing, so existing workspaces don't pick up the new shim automatically (the ai workspace was updated by hand). A possible follow-up is having ws sync refresh shims that are byte-identical to a previous template version (matched by hash) — out of scope here.

🤖 Generated with Claude Code

Agents that cannot run grove previously had no discoverable path to the
workspace instruction file, so the generated CLAUDE.md and AGENTS.md now
name .grove/instructions.md directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Claude finished @emmax86's task in 1m 44s —— View job


Reviewing PR #79

  • Gather context (PR body, diff, changed files)
  • Read changed files and understand the change
  • Run code review (correctness, simplification, efficiency)
  • Post findings / summary

Summary

This is a small, low-risk documentation fix: it appends one sentence to the shared WORKSPACE_AGENT_BOOTSTRAP_SHIM template in src/lib/agent-files.ts:40, pointing agents at .grove/instructions.md when they can't invoke grove's MCP tools. Since CLAUDE.md and AGENTS.md generation both consume this constant, both files pick up the change together.

Verified:

  • The path is correct: Paths.workspaceInstructions (src/constants.ts:34) resolves to join(root, name, ".grove", "instructions.md"), which is .grove/instructions.md relative to the workspace root — the same root where CLAUDE.md/AGENTS.md (src/constants.ts:45-46) live. The relative path in the new sentence is accurate.
  • ASCII-only invariant preserved: a plain hyphen is used instead of an em-dash, and the existing test (src/__tests__/lib/agent-files.test.ts:36) asserts every character in the shim is ASCII.
  • The test mirrors in src/__tests__/lib/agent-files.test.ts and src/__tests__/commands/workspace.test.ts are byte-identical to the production template, so there's no drift risk between the three copies.
  • No other place in the repo hardcodes the old shim text that would now be inconsistent (checked docs/context-loading.md and render/formatter tests — none embed the shim string itself).

Minor, non-blocking nit: per docs/context-loading.md:16 ("Workspace-owned instructions live at .grove/instructions.md. When present..."), this file is optional/user-created, not auto-generated. The new sentence tells an agent to "read that file directly" without noting it may not exist for a given workspace. Not a bug (an agent hitting ENOENT will just fall back), but a one-clause caveat (e.g. "...if present") would make the shim fully accurate. Not blocking this PR.

Not verified: I was unable to execute bun test or bun run format:check in this environment (tool permissions blocked shell execution of bun), so I could not independently confirm the "902 tests passing" / lint-clean claims in the PR description — I relied on manual inspection of the diff and existing test assertions instead.

No blocking issues found. Change is scoped correctly and test-mirrored per the repo's TDD conventions.

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