Make page command default to summary only #3

Closed
opened 2026-03-05 20:13:25 -06:00 by sam · 2 comments
Owner

We want to ration our client agent's context window. When the page subcommand is used, it loads the full text. Instead, it should only load the high-level table of contents so that future commands can grab the exact needed section. There still needs to be a way to access the entire page. Consider a good UX, perhaps --complete or --section All?

Decide on what an agent would be most comfortable with, then implement.

Remember to update the SKILL.md and unit tests as necessary.

We want to ration our client agent's context window. When the `page` subcommand is used, it loads the full text. Instead, it should only load the high-level table of contents so that future commands can grab the exact needed section. There still needs to be a way to access the entire page. Consider a good UX, perhaps `--complete` or `--section All`? Decide on what an agent would be most comfortable with, then implement. Remember to update the SKILL.md and unit tests as necessary.
Author
Owner

@claude please implemet

@claude please implemet
Collaborator

Claude finished @sam's task —— View job


Implementation Plan

  • Gather context and understand request
  • Read CLAUDE.md and explore codebase
  • Check for existing claude branch (none found, created claude/issue-3-page-default-summary)
  • Understand current page command implementation
  • Implement changes: default to TOC/summary, add --complete flag
  • Update SKILL.md
  • Commit and push changes
  • Create PR

Summary

Implemented the change in scripts/rsw/internal/cmd/page.go:

  • Default behavior (rsw <game> page <title>): now shows only the table of contents (section list) plus a hint message — no full page content dumped
  • --complete flag: fetches the full page content (restores old default behavior)
  • --section <name>: unchanged

The SKILL.md was updated with the new recommended 2-step workflow: call page (TOC) first, then page --section <name> for the content needed.

Note: No existing unit tests covered the cmd layer behavior — only integration tests for the wiki client exist, which are unchanged.

PR: #4
Branch: claude/issue-3-page-default-summary

**Claude finished @sam's task** —— [View job](http://100.100.131.50:3000/sam/claude-plugin-runescape/actions/runs/13) --- ### Implementation Plan - [x] Gather context and understand request - [x] Read CLAUDE.md and explore codebase - [x] Check for existing claude branch (none found, created `claude/issue-3-page-default-summary`) - [x] Understand current `page` command implementation - [x] Implement changes: default to TOC/summary, add `--complete` flag - [x] Update SKILL.md - [x] Commit and push changes - [x] Create PR ### Summary Implemented the change in `scripts/rsw/internal/cmd/page.go`: - **Default behavior** (`rsw <game> page <title>`): now shows only the table of contents (section list) plus a hint message — no full page content dumped - **`--complete` flag**: fetches the full page content (restores old default behavior) - **`--section <name>`**: unchanged The `SKILL.md` was updated with the new recommended 2-step workflow: call `page` (TOC) first, then `page --section <name>` for the content needed. Note: No existing unit tests covered the cmd layer behavior — only integration tests for the wiki client exist, which are unchanged. **PR:** https://git.samlab.cloud/sam/claude-plugin-runescape/pulls/4 **Branch:** `claude/issue-3-page-default-summary`
sam closed this issue 2026-03-05 20:35:28 -06:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/claude-plugin-runescape#3