Skip to content

v0.2.0: Custom prompts, historical summarise, nested session fix - #3

Merged
RemoteCTO merged 8 commits into
mainfrom
feature/v0.2.0-custom-prompt
Feb 13, 2026
Merged

RemoteCTO merged 8 commits into
mainfrom
feature/v0.2.0-custom-prompt

Conversation

@RemoteCTO

Copy link
Copy Markdown
Owner

Summary

  • Add SEAMLESS_PROMPT_FILE env var to override
    the default compaction prompt entirely
  • Add "User Intent" section to default prompt —
    preserves user's original requests verbatim
  • Add claude-summarise CLI to summarise any
    historical session by ID or prefix
  • Fix nested session guard — strip CLAUDECODE
    env var so claude -p works from inside a
    Claude Code session

Changed files

File Change
package.json Version 0.1.1 → 0.2.0, add claude-summarise bin
scripts/compactor.mjs Custom prompt loading, User Intent section
scripts/summarise.mjs New — resolve session ID → transcript, run compactor
bin/claude-summarise New — CLI wrapper
lib/claude.mjs Strip CLAUDECODE from child env
lib/validate.mjs Skip section checks for custom prompts
lib/config.mjs Add User Intent to EXPECTED_SECTIONS
README.md Document summarise, custom prompts, updated PATH setup
CHANGELOG.md v0.2.0 entry

Users can override the default compaction prompt by setting
SEAMLESS_PROMPT_FILE to a file path. Tilde expansion supported.
Validation relaxed for custom prompts — section-name check
skipped, minimum length still enforced.
Instructs the summariser to preserve the user's original
requests, clarifications, and stated constraints verbatim.
Only direction-shaping messages, not every message. Also
updates expected sections in validation config.
New feature: custom compaction prompts via SEAMLESS_PROMPT_FILE.
Add custom compaction prompt section explaining the env var,
tilde expansion, silent fallback, and relaxed validation.
Update section list from 5 to 6 with User Intent. Add
SEAMLESS_PROMPT_FILE to configuration table.
claude-summarise resolves any historical session ID
(or prefix) to its transcript and runs the compactor.
Supports --list, --force, and prefix matching.

Strip CLAUDECODE env var when spawning claude -p so
compaction works from inside a Claude Code session.
Copilot AI review requested due to automatic review settings February 13, 2026 16:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps seamless-claude to v0.2.0 by adding custom compaction prompt support, introducing a new “User Intent” section in summaries, and adding a claude-summarise CLI for summarising historical sessions; it also attempts to fix nested-session spawning by stripping CLAUDECODE from the child environment.

Changes:

  • Add SEAMLESS_PROMPT_FILE to fully override the default compaction prompt and relax section validation when active.
  • Add a new claude-summarise command (script + bin wrapper) to summarise historical sessions by ID/prefix and list available sessions.
  • Update prompt/validation config for the new “User Intent” section and adjust docs/changelog accordingly.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Version bump to 0.2.0 and register claude-summarise binary.
scripts/compactor.mjs Adds “User Intent” section; supports loading a custom prompt file; passes custom-prompt flag into validation.
scripts/summarise.mjs New script to locate historical transcripts and run the compactor against them.
bin/claude-summarise New CLI wrapper that forwards args to scripts/summarise.mjs.
lib/claude.mjs Attempts to strip CLAUDECODE from spawned claude -p environment.
lib/validate.mjs Adds customPrompt mode to skip section-name checks.
lib/config.mjs Adds “User Intent” to EXPECTED_SECTIONS.
README.md Documents custom prompts, new “User Intent” section, and claude-summarise.
CHANGELOG.md Adds v0.2.0 release notes.
Comments suppressed due to low confidence (1)

lib/validate.mjs:16

  • validateResult() now has a customPrompt mode that skips section validation, but there are no tests covering the new behavior (e.g., long output with no expected headings should be accepted when customPrompt=true, while short output should still fail). Adding/adjusting unit tests will help prevent regressions in this new branch.
  }
  if (result.length < MIN_RESULT_LENGTH) return false
  if (customPrompt) return true
  const lower = result.toLowerCase()
  const found = EXPECTED_SECTIONS.filter((s) =>
    lower.includes(s.toLowerCase()),
  ).length
  return found >= 3
}


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/claude.mjs
Comment thread scripts/summarise.mjs Outdated
Comment thread README.md Outdated
Wrap statSync in try/catch for TOCTOU resilience.
Fix misleading --list example (filters by session
ID prefix, not project name).
@RemoteCTO
RemoteCTO merged commit a749440 into main Feb 13, 2026
2 checks passed
@RemoteCTO
RemoteCTO deleted the feature/v0.2.0-custom-prompt branch February 13, 2026 16:45
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