Skip to content

feat(SUP-1804): ship Capture Your Thoughts release - #47

Merged
levineam merged 1 commit into
mainfrom
SUP-1804/capture-your-thoughts-release
May 19, 2026
Merged

feat(SUP-1804): ship Capture Your Thoughts release#47
levineam merged 1 commit into
mainfrom
SUP-1804/capture-your-thoughts-release

Conversation

@levineam

@levineam levineam commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • ships the v0.2.0 "Capture Your Thoughts" first-experience flow for @jarvos/secondbrain
  • adds confidence-based capture classification: ideas to ## 💡 Ideas, notes to durable markdown notes with journal wiki-links, ambiguous captures to ## 🚩 Flagged
  • exports routing APIs and portable skill contracts for journal-entry, note-creation, and idea-parking
  • bumps v0.2.0 release metadata and adds release notes

Verification

  • npm test
  • cd modules/jarvos-secondbrain && npm test
  • npm pack --dry-run in modules/jarvos-secondbrain
  • temp-prefix npm install /Users/andrew/clawd-worktrees/SUP-1804-paperclip/modules/jarvos-secondbrain --package-lock=false --ignore-scripts plus API import smoke
  • npm run release:check

Paperclip

SUP-1804

Summary by CodeRabbit

Release Notes

  • New Features

    • "Capture Your Thoughts" flow: High-confidence captures create journal Ideas with wiki-link support
    • Medium-confidence captures route to a Flagged review section for verification before note creation
    • Configuration resolution now uses shared repository settings
  • Documentation

    • Updated release documentation with capture routing specifications and skill contract details
  • Chores

    • Version bumped to 0.2.0
    • Module made publicly distributable with explicit entry points

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 36b0db25-f558-4216-b293-491889d96e86

📥 Commits

Reviewing files that changed from the base of the PR and between 45009c1 and b97db45.

📒 Files selected for processing (13)
  • CHANGELOG.md
  • docs/releases/v0.2.0.md
  • modules/jarvos-secondbrain/README.md
  • modules/jarvos-secondbrain/adapters/index.js
  • modules/jarvos-secondbrain/adapters/obsidian/src/vault-storage-adapter.js
  • modules/jarvos-secondbrain/bridge/routing/README.md
  • modules/jarvos-secondbrain/bridge/routing/src/keyword-capture-router.js
  • modules/jarvos-secondbrain/bridge/routing/src/skill-contracts.js
  • modules/jarvos-secondbrain/package.json
  • modules/jarvos-secondbrain/packages/jarvos-secondbrain-journal/config/journal-module.json
  • modules/jarvos-secondbrain/src/index.js
  • modules/jarvos-secondbrain/tests/keyword-capture-router.test.js
  • tests/modules-smoke-test.js
✅ Files skipped from review due to trivial changes (4)
  • modules/jarvos-secondbrain/bridge/routing/README.md
  • modules/jarvos-secondbrain/adapters/index.js
  • CHANGELOG.md
  • docs/releases/v0.2.0.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • modules/jarvos-secondbrain/adapters/obsidian/src/vault-storage-adapter.js
  • modules/jarvos-secondbrain/bridge/routing/src/skill-contracts.js
  • modules/jarvos-secondbrain/bridge/routing/src/keyword-capture-router.js
  • modules/jarvos-secondbrain/package.json
  • modules/jarvos-secondbrain/tests/keyword-capture-router.test.js

📝 Walkthrough

Walkthrough

This PR releases v0.2.0 of @jarvos/secondbrain with a new "flagged" capture routing path for medium-confidence text. New classifier and dispatch functions determine capture intent and route to Ideas, Notes, or Flagged sections with structured metadata. Skill contracts define handling contracts, module exports are updated for public consumption, and comprehensive tests and documentation complete the feature.

Changes

v0.2.0 Release: Capture Routing & Skill Contracts

Layer / File(s) Summary
Capture Classifier Core Logic
modules/jarvos-secondbrain/bridge/routing/src/keyword-capture-router.js
classifyCaptureIntent() detects idea/note/ambiguous capture intent and returns structured metadata (route, confidence, reviewRequired, skillIds, reason). Keyword patterns expanded for "make a/an note" and "take a note" variants. New flaggedJournalLine() formats medium-confidence captures with review markers.
Routing Plan & Dispatch Refactoring
modules/jarvos-secondbrain/bridge/routing/src/keyword-capture-router.js
buildRoutingPlan() refactored to consume classification metadata and attach confidence/review/reason/skillIds to all routes (IDEA, NOTE, FLAGGED). New dispatchCaptureToSkills() executes routing plans; applyRoutingPlan() delegates to it. Explicit FLAGGED routing uses FLAGGED_HEADING and flaggedJournalLine().
Skill Contracts Infrastructure
modules/jarvos-secondbrain/bridge/routing/src/skill-contracts.js
New module defining three skill contract identifiers (JOURNAL_ENTRY, NOTE_CREATION, IDEA_PARKING) with frozen input/output descriptor schemas. Exports getSkillContract(id) helper for contract lookup.
Flagged Journal Section Configuration
modules/jarvos-secondbrain/adapters/obsidian/src/vault-storage-adapter.js, modules/jarvos-secondbrain/adapters/index.js, modules/jarvos-secondbrain/packages/jarvos-secondbrain-journal/config/journal-module.json
FLAGGED_HEADING constant defined and exported through adapters index. New required "flagged" section added to journal config with manual source, positioned before journal-entry, for queuing medium-confidence captures pending human review.
Module Public API & Package Configuration
modules/jarvos-secondbrain/package.json, modules/jarvos-secondbrain/src/index.js
Package bumped to v0.2.0, private flag removed. New exports map defines main entry and routing/contracts/config subpaths. files array controls publication scope. Main index.js delegates path resolution to jarvos-paths bridge; routing and skillContracts exports spread into module.exports; local resolveTilde removed.
Capture API Documentation
modules/jarvos-secondbrain/bridge/routing/README.md, modules/jarvos-secondbrain/README.md
Routing bridge README documents classifier contract with output fields (route, confidence, reviewRequired, skillIds, reason) and high- vs medium-confidence dispatch behavior. Module README specifies "Capture Your Thoughts" API: three core functions and SKILL_CONTRACTS shape; describes default routing for idea/note/flagged captures.
Test Coverage for Classification & Dispatch
modules/jarvos-secondbrain/tests/keyword-capture-router.test.js, tests/modules-smoke-test.js
Tests expanded to import classifyCaptureIntent and dispatchCaptureToSkills. New test cases verify idea-trigger metadata (confidence, skillIds), plain-idea routing, note-trigger with backlink creation, medium-confidence flagged routing with review markers, and classifier contract structure for explicit and ambiguous captures. Smoke test verifies SKILL_CONTRACTS['note-creation'] export.
Release Documentation & Version Bump
CHANGELOG.md, docs/releases/v0.2.0.md
CHANGELOG entry describes capture flow changes, new API exports, and path resolution delegation. Release notes expand scope (setup script, capture routing flows, secondbrain exports, path resolution), document fixes (per-session workspace foundation, deferred durable-note creation for ambiguous language), clarify limitations (medium-confidence review required, GBrain-first is resolver context only, git/npm distribution), and extend verification steps including module tests and smoke checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • levineam/jarvOS#11: Builds on initial secondbrain module stubs and baseline smoke-test scaffolding; both update capture routing logic and module exports.
  • levineam/jarvOS#19: Both PRs delegate path resolution to the shared jarvos-paths resolver instead of local hardcoded defaults.

Suggested labels

jarvis-managed


🐰 A bunny hops through the code with glee,
Captures now whisper: idea, note, or "flagged, please!"
Medium confidence finds refuge in review,
While skills shake paws—the contract rings true. 🚩
v0.2.0 bounces ahead, light and spry!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.75% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: shipping the v0.2.0 'Capture Your Thoughts' release with confidence-based routing and new exports.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SUP-1804/capture-your-thoughts-release

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45009c1fcc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +8 to +12
".": "./src/index.js",
"./routing": "./bridge/routing/src/keyword-capture-router.js",
"./routing/contracts": "./bridge/routing/src/skill-contracts.js",
"./config": "./bridge/config/jarvos-paths.js"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the legacy config subpath export

When v0.2.0 is consumed as an installed package, this new exports map blocks the deep import @jarvos/secondbrain/bridge/config/jarvos-paths.js; Node raises ERR_PACKAGE_PATH_NOT_EXPORTED even though the file is included. I checked the repo consumers and both modules/jarvos-agent-context/src/index.js and modules/jarvos-gbrain/src/index.js still resolve that exact subpath; the agent-context fallback only works in the monorepo layout, so packaged installs lose shared path resolution. Please either keep that legacy subpath in exports or update the consumers before publishing this map.

Useful? React with 👍 / 👎.

Comment on lines +293 to +294
journalSection: FLAGGED_HEADING,
journalLine: flaggedJournalLine(capture),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Create the Flagged section before appending

For medium-confidence captures on a journal file that already exists without the new ## 🚩 Flagged heading, this route now calls appendLineToJournalSection with FLAGGED_HEADING, and that adapter throws when the heading is missing instead of normalizing existing files. This affects users who update mid-day or have journals created before this release; the same capture that should be queued for review fails entirely. Ensure the section is materialized/migrated before appending, or fall back to an existing section.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/releases/v0.2.0.md`:
- Around line 51-55: Update the release notes so the dry-run pack is scoped to
the secondbrain package by replacing the standalone "npm pack --dry-run" entry
with the command that runs it in the module directory: "cd
modules/jarvos-secondbrain && npm pack --dry-run"; ensure the sequence shows
changing directory before the pack step and keeps the surrounding commands ("npm
test", "cd modules/jarvos-secondbrain && npm test", and "npm run release:check")
intact.

In `@modules/jarvos-secondbrain/adapters/obsidian/src/vault-storage-adapter.js`:
- Around line 174-179: The module's export list was updated but never exposes
NOTES_CREATED_HEADING, causing downstream imports to be undefined; locate the
constant (or create it) named NOTES_CREATED_HEADING in this file and add it to
the module.exports list (alongside createVaultStorageAdapter, FLAGGED_HEADING,
IDEAS_HEADING, NOTES_HEADING, todayDate) or, if the needed value already exists
under a different name, export that identifier as NOTES_CREATED_HEADING so the
re-export in modules/jarvos-secondbrain/adapters/index.js resolves correctly.

In `@modules/jarvos-secondbrain/bridge/routing/src/keyword-capture-router.js`:
- Around line 150-195: classifyCaptureIntent drops explicit capture.route ===
FLAGGED because normalizeTrigger/detectTrigger only recognizes IDEA|NOTE; update
the trigger normalization to accept 'flagged' (or add a branch in detectTrigger)
so an explicit capture.route of FLAGGED maps to the FLAGGED constant, then
ensure classifyCaptureIntent handles that returned FLAGGED path (route: FLAGGED,
reviewRequired: true, skillIds: [JOURNAL_ENTRY], reason:
'explicit-flagged-capture' or reuse existing flagged branch). Reference:
detectTrigger, normalizeTrigger, classifyCaptureIntent, and the FLAGGED
constant.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b685b002-6dfb-4b21-90d8-8192aa4f9055

📥 Commits

Reviewing files that changed from the base of the PR and between 214fb6d and 45009c1.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • docs/releases/v0.2.0.md
  • modules/jarvos-secondbrain/README.md
  • modules/jarvos-secondbrain/adapters/index.js
  • modules/jarvos-secondbrain/adapters/obsidian/src/vault-storage-adapter.js
  • modules/jarvos-secondbrain/bridge/routing/README.md
  • modules/jarvos-secondbrain/bridge/routing/src/keyword-capture-router.js
  • modules/jarvos-secondbrain/bridge/routing/src/skill-contracts.js
  • modules/jarvos-secondbrain/package.json
  • modules/jarvos-secondbrain/packages/jarvos-secondbrain-journal/config/journal-module.json
  • modules/jarvos-secondbrain/src/index.js
  • modules/jarvos-secondbrain/tests/keyword-capture-router.test.js
  • package.json
  • tests/modules-smoke-test.js

Comment thread docs/releases/v0.2.0.md Outdated
Comment on lines +51 to +55
```bash
npm test
cd modules/jarvos-secondbrain && npm test
npm pack --dry-run
npm run release:check

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Scope npm pack --dry-run to the secondbrain module package.

This command currently validates the repo root package, not @jarvos/secondbrain. Update it so verification checks the intended publish artifact.

📌 Proposed docs fix
 ```bash
 npm test
 cd modules/jarvos-secondbrain && npm test
-npm pack --dry-run
+cd modules/jarvos-secondbrain && npm pack --dry-run
 npm run release:check
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/releases/v0.2.0.md around lines 51 - 55, Update the release notes so
the dry-run pack is scoped to the secondbrain package by replacing the
standalone "npm pack --dry-run" entry with the command that runs it in the
module directory: "cd modules/jarvos-secondbrain && npm pack --dry-run"; ensure
the sequence shows changing directory before the pack step and keeps the
surrounding commands ("npm test", "cd modules/jarvos-secondbrain && npm test",
and "npm run release:check") intact.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines 174 to 179
module.exports = {
createVaultStorageAdapter,
FLAGGED_HEADING,
IDEAS_HEADING,
NOTES_HEADING,
todayDate,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Export contract mismatch: NOTES_CREATED_HEADING is missing at source.

Line [176] updates exports, but this module still does not export NOTES_CREATED_HEADING, while modules/jarvos-secondbrain/adapters/index.js imports/re-exports it. That makes the downstream export undefined.

Proposed fix
 const IDEAS_HEADING = '## 💡 Ideas';
 const FLAGGED_HEADING = '## 🚩 Flagged';
+const NOTES_CREATED_HEADING = '## 🗂️ Notes Created';
 const SIGNATURE = '— Edited by Jarvis';
@@
 module.exports = {
   createVaultStorageAdapter,
   FLAGGED_HEADING,
   IDEAS_HEADING,
   NOTES_HEADING,
+  NOTES_CREATED_HEADING,
   todayDate,
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/jarvos-secondbrain/adapters/obsidian/src/vault-storage-adapter.js`
around lines 174 - 179, The module's export list was updated but never exposes
NOTES_CREATED_HEADING, causing downstream imports to be undefined; locate the
constant (or create it) named NOTES_CREATED_HEADING in this file and add it to
the module.exports list (alongside createVaultStorageAdapter, FLAGGED_HEADING,
IDEAS_HEADING, NOTES_HEADING, todayDate) or, if the needed value already exists
under a different name, export that identifier as NOTES_CREATED_HEADING so the
re-export in modules/jarvos-secondbrain/adapters/index.js resolves correctly.

@levineam
levineam marked this pull request as draft May 18, 2026 00:46
@levineam
levineam force-pushed the SUP-1804/capture-your-thoughts-release branch from 45009c1 to b97db45 Compare May 19, 2026 15:19
@levineam
levineam marked this pull request as ready for review May 19, 2026 15:19
@levineam
levineam merged commit 66c81e8 into main May 19, 2026
6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

function normalizeTrigger(value) {
const trimmed = String(value || '').trim().toLowerCase();
return trimmed === IDEA || trimmed === NOTE ? trimmed : null;
}

P2 Badge Accept explicit flagged trigger in route normalization

The new review-first flow introduces flagged, but normalizeTrigger still only allows idea and note, even though detectTrigger reads explicit override fields like capture.trigger and capture.route. As a result, callers that pass an explicit route: 'flagged'/trigger: 'flagged' (for example, forwarding classifier output) fall through to no-capture-intent and get dropped instead of being queued in the Flagged section, which silently loses captures whenever the text itself doesn’t match the keyword patterns.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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