Skip to content

Comments

prompt updates#15

Merged
khaliqgant merged 2 commits intomainfrom
prompt-updates
Feb 20, 2026
Merged

prompt updates#15
khaliqgant merged 2 commits intomainfrom
prompt-updates

Conversation

@khaliqgant
Copy link
Collaborator

@khaliqgant khaliqgant commented Feb 20, 2026

@khaliqgant khaliqgant merged commit 0b46d5c into main Feb 20, 2026
5 checks passed
@khaliqgant khaliqgant deleted the prompt-updates branch February 20, 2026 16:30
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

trail show <trajectory-id>
```

Export a trajectory (markdown, json, timeline, html, pr-summary):

Choose a reason for hiding this comment

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

🟡 Documentation lists pr-summary as supported export format but CLI doesn't implement it

The documentation at docs/trail-snippet.md:117 states that trail export supports formats: markdown, json, timeline, html, pr-summary. However, the CLI export command at src/cli/commands/export.ts:51-63 only handles json, timeline, and html in its switch statement — any other value (including pr-summary) falls through to the default case and silently exports as markdown instead.

Root Cause

The switch statement in src/cli/commands/export.ts:51-63 has no case for "pr-summary". When a user runs trail export <id> --format pr-summary as the documentation suggests, the format string "pr-summary" doesn't match any case, so it falls through to default and calls exportToMarkdown() instead of exportToPRSummary() (which does exist at src/export/pr-summary.ts:20).

Impact: Users following this documentation will get markdown output instead of the PR summary format, with no error or warning that the format is unsupported.

Suggested change
Export a trajectory (markdown, json, timeline, html, pr-summary):
Export a trajectory (markdown, json, timeline, html):
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


Compact by commit range:
```bash
trail compact --commits abc123..def456

Choose a reason for hiding this comment

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

🟡 Documentation shows git range syntax for --commits but CLI expects comma-separated SHAs

The documentation at docs/trail-snippet.md:137 shows trail compact --commits abc123..def456 using git range syntax (..). However, the CLI implementation at src/cli/commands/compact.ts:163-171 splits the value by commas (options.commits.split(",")), so it expects comma-separated SHAs like abc123,def456.

Root Cause

The compact command parses the --commits option as:

const targetCommits = options.commits
  ? new Set(
      options.commits.split(",").flatMap((sha) => {
        const trimmed = sha.trim();
        if (!trimmed) return [];
        return [trimmed, trimmed.slice(0, 7)];
      }),
    )
  : null;

If a user passes abc123..def456, it will be treated as a single string "abc123..def456" (no comma to split on), which won't match any trajectory commit SHA. The command will silently find no matching trajectories.

Impact: Users following this documentation will get zero results with no error message explaining why.

Suggested change
trail compact --commits abc123..def456
trail compact --commits abc123,def456
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +130 to +133
Compact by branch:
```bash
trail compact --branch feature/auth
```

Choose a reason for hiding this comment

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

🟡 Documentation shows --branch feature/auth but the flag expects the base branch (e.g., main)

The documentation at docs/trail-snippet.md:131-132 says "Compact by branch" and shows trail compact --branch feature/auth, implying it compacts trajectories associated with the feature branch. However, the CLI implementation does the opposite: it finds commits on the current HEAD that are NOT in the specified branch.

Root Cause

The compact command at src/cli/commands/compact.ts:268-295 runs:

git log '${targetBranch}'..HEAD --format=%H

This gets commits on HEAD that are NOT in targetBranch. The CLI help text at src/cli/commands/compact.ts:87-88 correctly says: "Compact trajectories with commits not in the specified branch (e.g., main)".

So the correct usage is trail compact --branch main (pass the base branch), not trail compact --branch feature/auth (the feature branch). The documentation example will produce incorrect results — if you're on main and pass --branch feature/auth, you'd get commits on main not in feature/auth, which is the opposite of what's intended.

Impact: Users following this documentation will compact the wrong set of trajectories.

Suggested change
Compact by branch:
```bash
trail compact --branch feature/auth
```
Compact by branch (finds trajectories with commits not in the specified base branch):
```bash
trail compact --branch main

<!-- devin-review-badge-begin -->
<a href="https://app.devin.ai/review/agentworkforce/trajectories/pull/15" target="_blank">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review">
  </picture>
</a>
<!-- devin-review-badge-end -->

---
*Was this helpful? React with 👍 or 👎 to provide feedback.*

khaliqgant added a commit that referenced this pull request Feb 20, 2026
- Remove pr-summary from export format list (CLI doesn't implement it)
- Fix --branch example to show base branch (main) not feature branch
- Fix --commits syntax from range (abc..def) to comma-separated (abc,def)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
khaliqgant added a commit that referenced this pull request Feb 20, 2026
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