Bump version to 2.35.1: Second Brain Trace Collapsible UI.

This commit is contained in:
g1nation
2026-05-02 16:14:36 +09:00
parent 8bb8c065d7
commit 0a58d5127a
12 changed files with 36 additions and 271 deletions
@@ -1,27 +0,0 @@
# ADR-0001: Implement Project Chronicle Guard As An Independent Module
## Status
Accepted
## Context
The requested feature records project planning, questions, decisions, development logs, bugs, and retrospectives. Existing chat and agent systems already manage model interaction and agent skills.
## Decision
Implement Project Chronicle Guard as a separate module under `src/features/projectChronicle`.
## Reason
- It reduces the chance of regressions in chat and agent execution.
- It keeps the MVP focused on local Markdown generation.
- It can later receive events from chat or agents without owning those flows.
- It makes project-specific record storage easier to test and evolve.
## Alternatives
- Integrate into the existing Second Brain flow.
- Extend Agent Skill files to double as project records.
- Add a standalone Project Chronicle module.
## Selected Alternative
Add a standalone Project Chronicle module.
## Consequences
The first stage needs explicit sidebar actions to create and write records. Automatic extraction can be layered on later.
@@ -1,39 +0,0 @@
# Development Log: Project Chronicle Guard Feedback Response
## Purpose
Improve Chronicle Guard behavior after testing showed the assistant still answered like a general idea proposer instead of a project planning and record guard.
## Feedback Summary
The tested response understood the broad idea, but missed key guard behaviors:
- Project target check
- Record path check
- Question intent and question reasons
- Pending decision candidates
- Low-dependency MVP first
- Candidate records at the end
- Plain engineering tone
## Implementation Summary
- Made Chronicle Guard context apply by default unless explicitly disabled from the webview payload.
- Strengthened the Guard response contract for new ideas and feature requests.
- Added required response order: summary, intent, project check, record path check, blocking questions, question reasons, direction review, MVP, later expansion, candidate records.
- Added decision policy so unconfirmed decisions stay pending.
- Added tone rules against inflated consulting language and premature Vector DB / relational DB / knowledge graph suggestions.
- Extracted Guard prompt generation into `buildProjectChronicleGuardContext`.
- Added tests that lock the most important Guard rules.
- Added base system prompt guidance to prefer practical MVP-first answers for product and architecture discussions.
## Changed Files
- `src/features/projectChronicle/guardPrompt.ts`
- `src/features/projectChronicle/index.ts`
- `src/sidebarProvider.ts`
- `src/utils.ts`
- `tests/projectChronicleGuardPrompt.test.ts`
## Verification
- `./node_modules/.bin/tsc --noEmit`
- `npm run compile`
- `./node_modules/.bin/jest --runInBand`
## Result
Chronicle Guard should now behave less like a general ideation assistant and more like a project planning, decision, and record guard.
@@ -1,48 +0,0 @@
# Development Log: Project Chronicle Guard Stage 1
## Purpose
Add the first stable stage of the Designer menu and Project Chronicle Guard without coupling it tightly to chat execution.
## Implementation Summary
- Added an independent `src/features/projectChronicle` module.
- Added typed project, planning, discussion, decision, development, bug, and retrospective records.
- Added a Markdown writer with folder creation and filename collision protection.
- Added templates for project seed files and record documents.
- Added a Designer row in the sidebar with project selection and explicit record actions.
- Added VS Code-side handlers for creating/selecting record projects and writing planning, development, and bug records.
## Architecture
```text
Sidebar Designer UI
-> Webview postMessage
-> SidebarChatProvider handlers
-> ProjectChronicleManager
-> MarkdownFileWriter
-> docs/records/{Project}/...
```
## Changed Files
- `src/features/projectChronicle/types.ts`
- `src/features/projectChronicle/markdownFileWriter.ts`
- `src/features/projectChronicle/templates.ts`
- `src/features/projectChronicle/index.ts`
- `src/sidebarProvider.ts`
- `docs/records/ConnectAI/...`
## Dependency Notes
The implementation uses only TypeScript, Node `fs`/`path`, and VS Code extension APIs already available in the project.
## Verification
- `npm run compile`
- `./node_modules/.bin/jest --runInBand`
## Known Limits
- The records are generated through explicit sidebar actions.
- Full automatic conversation analysis is not implemented in this stage.
- Retrospective and ADR writing are available in the module, but the sidebar only exposes Plan, Dev, and Bug actions in this first pass.
## Next Development Notes
- Add a richer Designer panel for ADR, discussion, and retrospective creation.
- Capture AI question intent more directly during the conversation flow.
- Add tests for the Project Chronicle manager.
@@ -1,47 +0,0 @@
# Development Log: Project Chronicle Guard Stage 2
## Purpose
Expand the Designer menu from basic Plan/Dev/Bug writing into a fuller MVP record writer.
## Implementation Summary
- Reworked the Designer sidebar controls into a project selector plus a record type selector.
- Added explicit write flows for discussion, decision, and retrospective records.
- Preserved the existing planning, development, and bug writers.
- Added question intent capture in the discussion writer through optional prompts.
- Added ADR numbering for decision records and timeline updates for every record type.
- Expanded tests to verify all major record categories are written to their expected folders.
## Design Adjustment
The first pass exposed separate buttons for Plan, Dev, and Bug. Stage 2 changes this to a more scalable pattern:
```text
Designer Project Selector
Record Type Selector
Write / Open / Add actions
```
This keeps the sidebar usable as more record types are added.
## Changed Files
- `src/sidebarProvider.ts`
- `tests/projectChronicle.test.ts`
- `docs/records/ConnectAI/development/2026-05-02_project-chronicle-guard_stage-2_implementation.md`
## Verification
- `./node_modules/.bin/tsc --noEmit`
- `npm run compile`
- `./node_modules/.bin/jest --runInBand`
## Result
The Designer menu can now create the MVP record types:
- Planning
- Discussion
- Decision
- Development
- Bug
- Retrospective
## Next Development Notes
- Add a dedicated Designer panel for editing richer record content before writing.
- Add automatic conversation event capture so records can be generated with less manual input.
- Add settings for default record detail level and automatic timeline behavior.
@@ -1,42 +0,0 @@
# Development Log: Project Chronicle Guard Stages 3 to 5
## Purpose
Complete the remaining MVP support around Designer mode, record browsing, and project configuration persistence.
## Stage 3: Chronicle Guard Mode
- Added a `Guard` toggle in the sidebar header.
- When enabled, active Designer project context is injected into the agent system context.
- The guard context asks the assistant to summarize requests, infer intent, explain blocking questions, identify decisions, and name records that should be written.
- The mode is restored through webview state.
## Stage 4: Record Browser
- Added a record list selector for generated Chronicle Markdown files.
- Added refresh and open actions for selected records.
- Added record listing to `ProjectChronicleManager`.
- Added path validation before opening selected Markdown records.
## Stage 5: Project Config File
- Added `chronicle.config.json` generation under each project record root.
- The config file stores project id, project name, root, record root, description, purpose, detail level, and timestamps.
- This gives the record folder its own portable project metadata, independent of VS Code global state.
## Changed Files
- `src/agent.ts`
- `src/sidebarProvider.ts`
- `src/features/projectChronicle/index.ts`
- `src/features/projectChronicle/types.ts`
- `tests/projectChronicle.test.ts`
## Verification
- `./node_modules/.bin/tsc --noEmit`
- `npm run compile`
- `./node_modules/.bin/jest --runInBand`
## Result
The staged MVP is now functionally complete:
- Select or create Designer project
- Generate project record structure
- Persist project config
- Enable Chronicle Guard response mode
- Write all MVP record types
- Browse and open generated Markdown records
@@ -1,35 +0,0 @@
# Development Log: Second Brain Trace Mode
## Purpose
Make Second Brain usage visible and testable in AI answers.
## Implementation Summary
- Added `src/features/secondBrainTrace.ts`.
- Added trace scoring over active Second Brain Markdown files.
- Added user-facing trace Markdown with usage status, referenced documents, unused documents, and grounding metrics.
- Added debug JSON output when debug mode is enabled.
- Added Trace and Dbg sidebar buttons.
- Connected trace context into `AgentExecutor`.
- Added tests for retrieval, rendering, debug JSON, and no-use cases.
## Changed Files
- `src/features/secondBrainTrace.ts`
- `src/agent.ts`
- `src/sidebarProvider.ts`
- `tests/secondBrainTrace.test.ts`
- `docs/records/ConnectAI/planning/2026-05-02_second-brain-trace-mode.md`
- `docs/records/ConnectAI/development/2026-05-02_second-brain-trace-mode_implementation.md`
## Verification
- `./node_modules/.bin/tsc --noEmit`
- `npm run compile`
- `./node_modules/.bin/jest --runInBand`
## Result
When Trace mode is on, answers can now include:
- 2nd Brain usage status
- Reason for use or non-use
- Referenced note paths and excerpts
- Searched but unused notes
- Retrieval and grounding metrics
- Optional debug JSON
@@ -1,27 +0,0 @@
# AI-Human Discussion Log
## Topic
Project Chronicle Guard sidebar Designer menu and Markdown record system.
## User Request Summary
The user wants a Designer menu in the sidebar and a staged implementation of a project planning, decision, and development record system.
## AI Questions
### Question
No blocking question was asked.
### Reason
The current workspace, project root, and a reasonable record location were available from local context.
### Impact On Decision
The first implementation can proceed with `ConnectAI` as the active project and `docs/records/ConnectAI` as the planning record location.
## Main Discussion
The feature should not replace code generation or existing agent execution. It should sit beside those features as a recording and decision support layer.
## Decisions
- Use an independent `src/features/projectChronicle` module.
- Add a sidebar Designer control similar to existing Brain and Agent controls.
- Keep the MVP file-based and Markdown-only.
- Do not implement full automatic transcript capture in the first stage.
+1
View File
@@ -11,3 +11,4 @@
- Completed Stage 5: added `chronicle.config.json` as a portable project record configuration file.
- Improved Chronicle Guard after user testing: default guard context, stricter project/record checks, question reasons, MVP-first guidance, candidate record output, and tests.
- Added Second Brain Trace Mode so users can verify whether active Brain notes were searched, referenced, and reflected in answers.
- Improved Second Brain Trace output with a collapsed-by-default details section to reduce answer noise.