Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Plugin Options Configurability
summary: AdaptiveThinkingPlugin now supports configurable enabled/quiet flags, service and tool naming, custom tool descriptions and system prompts, with invalid config logging and disabled-plugin no-op behavior.
tags: []
related: [facts/project/reasoning_effort_behavior.md, facts/project/reasoning_effort_confirmation.md]
keywords: []
createdAt: '2026-04-25T12:40:26.166Z'
updatedAt: '2026-04-25T12:49:59.689Z'
---
## Reason
Document configurable plugin options and validation behavior for the adaptive thinking plugin

## Raw Concept
**Task:**
Document the configurable plugin options added to AdaptiveThinkingPlugin.

**Changes:**
- Identified that the current plugin behavior is hard-coded in src/index.ts
- Proposed a config schema modeled after ../opencode-byterover
- Defined default options for enablement, tool naming, prompt text, quiet error handling, and service naming
- Add a config schema with defaults
- Support enabled boolean and prompt string options
- Return empty config when disabled or invalid
- Keep existing tool and reset behavior unchanged
- Added src/config.ts with Zod-backed defaults
- Wired config into AdaptiveThinkingPlugin
- Added tests for config behavior
- Updated README with config docs and example
- Added a minor changeset

**Files:**
- src/index.ts
- ../opencode-byterover
- src/config.ts
- src/index.test.ts
- README.md
- .changeset/configurable-plugin-options.md

**Flow:**
load config -> validate with Zod -> if invalid log and toast -> if disabled return {} -> otherwise expose configured tool and guidance

**Timestamp:** 2026-04-25

**Author:** Ian

## Narrative
### Structure
The implementation centralizes plugin configuration in src/config.ts and threads the validated options into AdaptiveThinkingPlugin so runtime behavior and exposed tool metadata can be customized.

### Dependencies
Depends on the existing opencode-byterover config pattern, Zod validation, and the plugin runtime that shows toasts and logs errors on invalid configuration.

### Highlights
Tests, typecheck, lint, format check, and build all passed after the implementation. Validation only found formatting drift in src/index.test.ts before formatting was applied.

### Rules
Curate only information with lasting value: facts, decisions, technical details, preferences, or notable outcomes.

### Examples
Example options include enabled, quiet, serviceName, toolName, toolDescription, and systemPrompt.

## Facts
- **config_pattern**: The plugin uses the opencode-byterover config pattern. [project]
- **plugin_options**: Supported options are enabled, quiet, serviceName, toolName, toolDescription, and systemPrompt. [project]
- **invalid_config_behavior**: Invalid config logs an error, shows a toast, and returns {}. [project]
- **disabled_plugin_behavior**: Disabled plugin returns {}. [project]
- **tool_name_behavior**: Custom toolName updates both the exposed tool and the system prompt guidance. [project]
53 changes: 53 additions & 0 deletions .brv/context-tree/facts/project/git_branch_checkout_safety.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Git branch checkout safety
summary: Use Git refusal as a safety signal; stash conflicting local .brv changes with a clear label before switching branches and pulling updates.
tags: []
related: []
keywords: []
createdAt: '2026-04-25T12:25:59.254Z'
updatedAt: '2026-04-25T12:25:59.254Z'
---
## Reason
Documented safe branch transition behavior when local .brv edits exist

## Raw Concept
**Task:**
Document safe git branch switching when local tracked .brv changes are present

**Changes:**
- Verified worktree before switching branches
- Allowed Git refusal to prevent overwriting .brv edits
- Stashed conflicting changes with a clear label
- Switched to main and pulled latest updates

**Files:**
- .brv/

**Flow:**
check worktree -> attempt checkout -> on refusal, stash conflicting changes -> checkout main -> pull origin/main -> confirm clean status

**Timestamp:** 2026-04-25T12:25:53.760Z

**Author:** Ian

## Narrative
### Structure
This note captures the branch transition procedure used during a release-preparation sync. The key local path involved was .brv, which had in-progress edits that triggered Git protection.

### Dependencies
Relies on Git refusing unsafe checkout operations when tracked files have uncommitted changes.

### Highlights
The safe recovery path preserved local .brv work by stashing before switching to main. The repository ended clean and up to date after pulling origin/main.

### Rules
Before branch switches, check worktree for local edits; if a switch is blocked, stash labeled changes, then switch and pull.

### Examples
Example stash label: pre-main-checkout local brv changes

## Facts
- **current_branch**: The current branch was feat/prepare-for-release before checkout. [project]
- **checkout_refusal_reason**: Git refused the branch switch because local .brv edits would be overwritten. [project]
- **stash_label**: Conflicting local changes were stashed with the label pre-main-checkout local brv changes. [project]
- **final_branch_state**: The repository was checked out to main and pulled from origin/main. [project]
48 changes: 48 additions & 0 deletions .brv/context-tree/facts/project/git_stash_reapply_outcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Git Stash Reapply Outcome
summary: Reapplying stash on main restored .brv context-tree changes without dropping the stash; reasoning-effort state handling and medium handling files were restored, while git branch checkout safety file remained present.
tags: []
related: []
keywords: []
createdAt: '2026-04-25T12:27:24.819Z'
updatedAt: '2026-04-25T12:27:24.819Z'
---
## Reason
Record the outcome of reapplying a stash on main and the affected files.

## Raw Concept
**Task:**
Document the result of reapplying a stash during branch recovery.

**Changes:**
- Reapplied stash@{0} onto main
- Restored modified reasoning_effort_state_handling.md
- Restored untracked reasoning_effort_medium_handling.md
- Kept git_branch_checkout_safety.md present

**Files:**
- .brv/context-tree/facts/project/reasoning_effort_state_handling.md
- .brv/context-tree/facts/project/reasoning_effort_medium_handling.md
- .brv/context-tree/facts/project/git_branch_checkout_safety.md

**Flow:**
current git branch main -> reapply stash -> restore tracked and untracked .brv files -> stash remains applied

**Timestamp:** 2026-04-25

## Narrative
### Structure
The outcome centers on branch recovery on main and the resulting .brv context-tree file state after stash application.

### Dependencies
This depends on an existing stash containing .brv context-tree changes.

### Highlights
The stash application succeeded and did not drop the stash. It restored the reasoning_effort_state_handling and reasoning_effort_medium_handling files while leaving git_branch_checkout_safety in place.

## Facts
- **git_stash_reapply_branch**: The stash was reapplied on the main branch. [project]
- **git_stash_status**: The stash was applied, not dropped. [project]
- **restored_file**: Reapplying the stash modified .brv/context-tree/facts/project/reasoning_effort_state_handling.md. [project]
- **restored_file**: Reapplying the stash restored the untracked file .brv/context-tree/facts/project/reasoning_effort_medium_handling.md. [project]
- **existing_file**: The untracked file .brv/context-tree/facts/project/git_branch_checkout_safety.md was still present after reapplying the stash. [project]
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Reasoning Effort Medium Handling
summary: Reasoning effort was set to medium, a patch changeset was added for opencode-adaptive-thinking, and formatting, lint, test, and typecheck all passed before committing and pushing only the changeset.
tags: []
related: []
keywords: []
createdAt: '2026-04-25T11:56:05.207Z'
updatedAt: '2026-04-25T12:17:35.362Z'
---
## Reason
Record durable outcome about reasoning effort setting and release workflow

## Raw Concept
**Task:**
Document the reasoning effort medium handling and release outcome

**Changes:**
- Set reasoning effort to medium
- Committed hardening changes for reasoning effort state handling
- Pushed the branch and opened a PR against main
- Added a new changeset for the package patch release
- Committed and pushed only the changeset file

**Files:**
- .changeset/clean-ravens-reset.md

**Flow:**
set reasoning effort -> add changeset -> run format/lint/test/typecheck -> commit and push changeset

**Timestamp:** 2026-04-25T12:17:30.083Z

**Author:** assistant

## Narrative
### Structure
This update records a completed release workflow centered on a medium reasoning-effort setting and a patch changeset for opencode-adaptive-thinking.

### Dependencies
The outcome depended on successful formatting, linting, tests, and typechecking before the commit was pushed.

### Highlights
The worktree contained unrelated .brv changes, but they were left untouched while only the changeset file was committed and pushed.

### Examples
Commit hooks: pnpm run format:check, pnpm run lint, pnpm run test, pnpm run typecheck.

## Facts
- **reasoning_effort**: Reasoning effort was set to medium [project]
- **release_type**: A patch release changeset was created for opencode-adaptive-thinking [project]
- **verification_checks**: Verification passed with format:check, lint, test, and typecheck [project]
- **commit_scope**: Only .changeset/clean-ravens-reset.md was committed and pushed [project]
37 changes: 29 additions & 8 deletions .brv/context-tree/facts/project/reasoning_effort_state_handling.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,52 @@
---
title: Reasoning Effort State Handling
summary: x
summary: SDK types were restored in src/index.ts, the PR title was changed to conventional commit style, and verification passed.
tags: []
related: []
keywords: []
createdAt: '2026-04-25T11:48:50.291Z'
updatedAt: '2026-04-25T11:48:50.291Z'
updatedAt: '2026-04-25T12:13:21.426Z'
---
## Reason
x
Capture lasting project update about restoring SDK types and the PR/title/verification outcome.

## Raw Concept
**Task:**
x
Restore SDK type usage and update PR metadata for reasoning effort state handling

**Changes:**
- x
- Restored SDK type imports/casts in src/index.ts
- Updated PR title to conventional commit style
- Recorded verification results across format, lint, test, typecheck, and build

**Files:**
- src/index.ts
- .brv/context-tree/facts/project/reasoning_effort_medium_handling.md

**Flow:**
x
request to restore SDK types -> source change -> verification -> commit and PR title update

**Timestamp:** 2026-04-25T12:13:12.169Z

**Author:** assistant

## Narrative
### Structure
x
This note records a small source-level correction plus the related PR maintenance steps and validation outcome.

### Dependencies
x
Depends on the reasoning effort state implementation in src/index.ts and the associated PR workflow.

### Highlights
x
The change was limited to restoring SDK types; the untracked .brv context file was explicitly left out of the commit.

### Examples
Commit 94d4e11: fix: restore SDK types for reasoning effort state. PR title: fix: harden reasoning effort state handling.

## Facts
- **sdk_type_handling**: SDK types were restored in src/index.ts after being replaced with custom types. [project]
- **pr_title_format**: The PR title was updated to conventional commit style. [project]
- **verification_status**: Verification passed for format, lint, test, typecheck, and build. [project]
- **commit_reference**: The commit recorded for the change was 94d4e11 with message "fix: restore SDK types for reasoning effort state". [project]
- **untracked_context_file**: The untracked .brv context file was left untouched. [project]
13 changes: 13 additions & 0 deletions .brv/context-tree/project_management/pull_requests/context.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Topic: pull_requests

## Overview
Tracks the completion and verification details of pull requests for repository changes.

## Key Concepts
- PR creation
- separate commits
- verification hooks
- build validation

## Related Topics
- project_management/retrospectives
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: PR 3 Plugin Configurable Options
summary: PR 3 removed the public serviceName plugin option, kept the internal log service name fixed, and added a regression test plus docs updates.
tags: []
related: [architecture/plugin_options/plugin_options_configurability.md, project_management/pull_requests/context.md]
keywords: []
createdAt: '2026-04-25T13:00:09.453Z'
updatedAt: '2026-04-25T13:05:54.310Z'
---
## Reason
Document the lasting outcome of removing the serviceName option from the configurable plugin options PR

## Raw Concept
**Task:**
Document the outcome of PR 3 for configurable plugin options

**Changes:**
- Opened PR against main
- Committed BRV memories separately from feature changes
- Verified commits with hooks and build checks
- Removed serviceName from the public config surface
- Kept internal log service name fixed
- Added a regression test for non-configurable serviceName
- Updated README docs and example
- Removed serviceName from schema and defaults

**Files:**
- src/config.ts
- src/index.test.ts
- README.md
- .changeset/configurable-plugin-options.md

**Flow:**
user requests removal -> schema/code/docs updated -> regression test added -> verification passes -> PR pushed

**Timestamp:** 2026-04-25

**Author:** Ian

## Narrative
### Structure
This PR memory captures the change request, implementation outcome, regression coverage, and validation results for configurable plugin options.

### Dependencies
The change depended on updating the config schema, internal logging behavior, documentation, and test mocks for the negative path.

### Highlights
The key decision was to remove serviceName from the public plugin API while keeping the internal log service name hardcoded as opencode-adaptive-thinking.

### Examples
The negative-path test confirms that even when serviceName is supplied in options, internal logs do not use it.

## Facts
- **git_branch**: The current git branch was feat/configurable-plugin-options. [project]
- **service_name_option**: The serviceName plugin option was removed because it was considered too low level. [project]
- **internal_log_service_name**: Internal logs keep using opencode-adaptive-thinking even if serviceName is provided in options. [project]
- **regression_test**: The PR added a regression test to prove serviceName no longer affects internal logging. [project]
- **config_surface**: The change removed serviceName from ConfigSchema, defaults, README docs, and the example. [project]
- **verification_commands**: The work was verified with pnpm test, pnpm typecheck, pnpm lint, pnpm format:check, and pnpm build. [project]
- **commits**: The PR added commits 42fd2e0 and 37fc45e. [project]
- **pr_url**: The PR URL was https://github.com/ian-pascoe/opencode-adaptive-thinking/pull/3. [project]
Loading
Loading