Skip to content

Conversation

@sanity
Copy link
Collaborator

@sanity sanity commented Nov 19, 2025

Problem

AGENTS.md contained hardcoded paths specific to the nova development machine (~/code/freenet/freenet-core/main, ~/code/mcp/skills/...), making it non-portable for other developers or environments.

Solution

  1. Replace hardcoded paths with generic placeholders: Use <repo-root>/main instead of absolute paths
  2. Add import for machine-specific config: Import ~/.claude/freenet-local.md for local overrides
  3. Reference freenet-test-network as GitHub repo: https://github.com/freenet/freenet-test-network instead of hardcoded path
  4. Simplify agent spawning template: Make it environment-agnostic

Structure

AGENTS.md (checked into git):

  • Portable instructions that work on any machine
  • Generic placeholders for paths
  • Environment-agnostic workflows

~/.claude/freenet-local.md (local, not in git):

  • Machine-specific paths
  • Custom automation scripts
  • Local tooling configuration

This follows Claude Code's import pattern for local configuration (similar to settings.local.json).

Testing

  • ✅ Pre-commit hooks pass (fmt, clippy, TODO scan)
  • ✅ No functional changes, only documentation

[AI-assisted - Claude]

Changes:
- Replace hardcoded absolute paths with generic placeholders
- Add import for ~/.claude/freenet-local.md for machine-specific config
- Reference freenet-test-network as GitHub repo instead of hardcoded path
- Simplify agent spawning template to be environment-agnostic

The generic AGENTS.md now contains portable instructions, while
machine-specific paths and automation scripts can be configured in
~/.claude/freenet-local.md (not checked into git).

Addresses portability concerns raised in code review.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sanity sanity enabled auto-merge November 19, 2025 19:10
@sanity sanity added this pull request to the merge queue Nov 19, 2025
Merged via the queue into main with commit e19f742 Nov 19, 2025
11 checks passed
@sanity sanity deleted the fix/agents-portability branch November 19, 2025 19:31
@sanity sanity restored the fix/agents-portability branch November 19, 2025 19:52
@sanity sanity deleted the fix/agents-portability branch November 19, 2025 20:16
sanity added a commit that referenced this pull request Nov 19, 2025
Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants