feat(strategy): add minimal strategy layer on top of company brain - #13
Merged
Conversation
- Add strategy module with Decision and Goal types - Implement decision seed parser with validation - Add goal decomposer that grounds decisions in book context - Add file-based strategy store under .strategy/ - Add CLI commands: stratiki strategy seed|list - Add tests for parser and decomposer with fixture wikis - Goals are ranked by grounding quality from existing knowledge Co-authored-by: divo12 <divo12@users.noreply.github.com>
- Add 'as Decision[]' and 'as Goal[]' type assertions - Fix lint errors in runners and tests - Create immutable copy for sort operations Co-authored-by: divo12 <divo12@users.noreply.github.com>
….strategy - Use openWikiStrategyDir from openwiki-home helpers - Reuse existing company-mode home infrastructure - Add strategy dir to ensureOpenWikiHome initialization - Update store documentation to reflect correct location Co-authored-by: divo12 <divo12@users.noreply.github.com>
Co-authored-by: divo12 <divo12@users.noreply.github.com>
divo12
marked this pull request as ready for review
September 1, 2026 06:51
Co-authored-by: divo12 <divo12@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Sep 1, 2026
Co-authored-by: divo12 <divo12@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a minimal strategy layer that decomposes decisions into goals grounded in the existing company brain (book context). This implements the smallest viable slice of the strategy system from the research requirements.
Changes
Strategy module (
src/strategy/)types.ts: Decision and Goal domain types with status trackingparser.ts: Decision seed parser with validation (500 char max)decomposer.ts: Goal decomposition grounded in book context via FTS5 searchstore.ts: File-based persistence underopenwiki/.strategy/CLI commands
stratiki strategy seed <description>- Seed a new decision and generate grounded goalsstratiki strategy list- List all seeded decisions and their goalsTests
test/strategy/parser.test.ts- Decision validation teststest/strategy/decomposer.test.ts- Goal decomposition and ranking tests with fixture wikisHow it works
.strategy/alongside the bookExample usage
Testing
pnpm formatandpnpm lintpass cleanlyNotes
~/.stratiki) and book contextRelated
Builds on company mode from PR #12 (merged). Does not reopen PR #11 or import from langchain-ai/openwiki.
Summary by cubic
Adds a minimal strategy layer that turns seeded decisions into goals grounded in the company book, exposing two new CLI commands (
stratiki strategy seed|list). Previously there was no way to record decisions or track goals; now users can seed a decision and get ranked goals backed by existing wiki knowledge, persisted in the shared stratiki home understrategy/. The latest merge frommainleft an unresolved conflict insrc/cli/cli.tsx, so the branch is not currently mergeable.New Features
src/strategy/module with decision parsing (validates non-empty, ≤500 chars), goal decomposition via book context search, and file-based persistence.stratiki strategy seed <description>generates and scores goals by grounding quality, andstratiki strategy listshows all decisions and goal counts.Written for commit 0ec92c5. Summary will update on new commits.