Skip to content

feat(persona): plain npx -y ai-hist-mcp + enable trajectory memory on persona-maker - #211

Merged
khaliqgant merged 1 commit into
mainfrom
feat/aihist-plain-npx-and-persona-memory
Jun 6, 2026
Merged

khaliqgant merged 1 commit into
mainfrom
feat/aihist-plain-npx-and-persona-memory

Conversation

@khaliqgant

Copy link
Copy Markdown
Member

What

Now that the ai-hist-mcp wrapper is published with provenance (ai-hist-mcp@0.3.1, SLSA provenance v1, deps ai-hist@0.3.1), simplify the MCP injection and add a real-world memory usage on a built-in persona.

Changes

  1. Injection flip — buildAiHistMcpServer args ['-y','-p','ai-hist','ai-hist-mcp'] → ['-y','ai-hist-mcp'] (type/command/TRAJECTORY_ROOT+AI_HIST_DB env passthrough unchanged). Updated the interactive-spec.test.ts + plan.test.ts assertions. codex-1 verified the published wrapper exposes the full 7-tool contract (search_history, recent_entries, get_session, get_context, stats, search_trajectories, why_for_task) over stdio from a clean npx -y ai-hist-mcp.
  2. persona-maker opts into memory — memory.trajectories: true so it records its authoring decisions (the why). Regenerated workload-router/generated/personas.ts.

Why aiMemory is omitted on persona-maker

persona-maker runs on the opencode harness, which doesn't support runtime MCP injection — so aiMemory (the ai-hist MCP recall) would warn-and-skip there. Enabling only trajectories (runtime write-side, harness-agnostic) avoids shipping dead config. For the full why + how combo see examples/review-agent (codex) and examples/proactive-issue-resolver (claude).

Tests

persona-kit 268, workload-router 13 (+ build). persona-maker parse-verified. No runtime change (B's 83/83 unaffected).

🤖 Generated with Claude Code

…rajectory memory on persona-maker

The `ai-hist-mcp` wrapper is now published with provenance (ai-hist-mcp@0.3.1,
SLSA provenance v1, deps ai-hist@0.3.1), so the injection no longer needs the
`-p ai-hist` bootstrap form.

- persona-kit buildAiHistMcpServer: args ['-y','-p','ai-hist','ai-hist-mcp'] →
  ['-y','ai-hist-mcp'] (type/command/env passthrough unchanged); updated the
  interactive-spec + plan test assertions. codex-1 verified the published
  wrapper exposes the full 7-tool contract over stdio.
- personas/persona-maker.json: opt into memory.trajectories so it records its
  authoring decisions (the WHY). aiMemory is intentionally omitted here:
  persona-maker runs on the opencode harness, which doesn't support runtime MCP
  injection, so the ai-hist MCP recall only applies to claude/codex personas
  (see examples/review-agent + examples/proactive-issue-resolver for the full
  why+how combo). Regenerated workload-router generated/personas.ts.

Tests: persona-kit 268, workload-router 13. No runtime change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codeant-ai

codeant-ai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@khaliqgant, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 19 minutes and 53 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 95c113b7-7d97-4193-bf93-f0a8bbe957c2

📥 Commits

Reviewing files that changed from the base of the PR and between c074de1 and 377be1d.

⛔ Files ignored due to path filters (1)
  • packages/workload-router/src/generated/personas.ts is excluded by !**/generated/**
📒 Files selected for processing (4)
  • packages/persona-kit/src/interactive-spec.test.ts
  • packages/persona-kit/src/interactive-spec.ts
  • packages/persona-kit/src/plan.test.ts
  • personas/persona-maker.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/aihist-plain-npx-and-persona-memory

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request simplifies the npx arguments for launching ai-hist-mcp by removing the explicit package flag, and adds a memory configuration block to the persona-maker persona and its generated file. The review feedback recommends pinning the ai-hist-mcp package version (e.g., to ai-hist-mcp@0.3.1) in both the implementation and corresponding tests to prevent network latency and ensure build stability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

type: 'stdio',
command: 'npx',
args: ['-y', '-p', 'ai-hist', 'ai-hist-mcp'],
args: ['-y', 'ai-hist-mcp'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Running npx -y ai-hist-mcp without a pinned version or version range means npx will query the npm registry for the latest tag on every execution. This introduces unnecessary network latency during agent startup and risks breaking existing installations if a future version of ai-hist-mcp introduces breaking changes.\n\nConsider pinning the version to ai-hist-mcp@0.3.1 (or a compatible range like ai-hist-mcp@^0.3.1) to ensure reproducibility, stability, and faster startup times.

Suggested change
args: ['-y', 'ai-hist-mcp'],
args: ['-y', 'ai-hist-mcp@0.3.1'],

type: 'stdio',
command: 'npx',
args: ['-y', '-p', 'ai-hist', 'ai-hist-mcp'],
args: ['-y', 'ai-hist-mcp'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Update the test assertion to match the pinned version of ai-hist-mcp.

Suggested change
args: ['-y', 'ai-hist-mcp'],
args: ['-y', 'ai-hist-mcp@0.3.1'],

type: 'stdio',
command: 'npx',
args: ['-y', '-p', 'ai-hist', 'ai-hist-mcp'],
args: ['-y', 'ai-hist-mcp'],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Update the test assertion to match the pinned version of ai-hist-mcp.

Suggested change
args: ['-y', 'ai-hist-mcp'],
args: ['-y', 'ai-hist-mcp@0.3.1'],

@khaliqgant
khaliqgant merged commit 78326b6 into main Jun 6, 2026
3 checks passed
@khaliqgant
khaliqgant deleted the feat/aihist-plain-npx-and-persona-memory branch June 6, 2026 14:30
@agent-relay-code

Copy link
Copy Markdown
Contributor

Reviewed PR #211 against the current checkout. I did not find a demonstrated defect requiring code edits.

Validated:

  • ai-hist-mcp exists on npm and exposes the expected ai-hist-mcp bin.
  • npx -y ai-hist-mcp starts and responds to a minimal MCP initialize request against a temp TRAJECTORY_ROOT / AI_HIST_DB fixture.
  • Regenerated workload-router personas.
  • @agentworkforce/persona-kit tests passed.
  • @agentworkforce/workload-router tests passed.
  • Workspace build, lint, typecheck, example typecheck, and recursive tests passed when invoked through corepack pnpm.

Note: corepack pnpm run check itself cannot run in this sandbox because the root npm script shells out to pnpm, and only corepack pnpm is available here. I ran the equivalent phases directly after building workspace declarations.

@agent-relay-code

Copy link
Copy Markdown
Contributor

ℹ️ pr-reviewer: review only — no file changes were applied to the PR (nothing to commit after review). The notes below are advisory and were not pushed.

Reviewed PR #211 against the current checkout. I did not find a demonstrated defect requiring code edits.

Validated:

  • ai-hist-mcp exists on npm and exposes the expected ai-hist-mcp bin.
  • npx -y ai-hist-mcp starts and responds to a minimal MCP initialize request against a temp TRAJECTORY_ROOT / AI_HIST_DB fixture.
  • Regenerated workload-router personas.
  • @agentworkforce/persona-kit tests passed.
  • @agentworkforce/workload-router tests passed.
  • Workspace build, lint, typecheck, example typecheck, and recursive tests passed when invoked through corepack pnpm.

Note: corepack pnpm run check itself cannot run in this sandbox because the root npm script shells out to pnpm, and only corepack pnpm is available here. I ran the equivalent phases directly after building workspace declarations.

khaliqgant added a commit that referenced this pull request Jun 6, 2026
Remove the memory.trajectories opt-in added in #211. persona-maker runs on
opencode (no MCP injection) and recording it isn't wanted on the built-in;
the full why+how usage lives in examples/review-agent + proactive-issue-resolver.
Regenerated workload-router generated/personas.ts.

Co-authored-by: Ricky Schema Cascade <ricky@agent-relay.com>
Co-authored-by: Claude Opus 4.8 <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.

1 participant