Skip to content

feat: Add company mode for organizational knowledge base - #12

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/company-brain-mode-9b0f
Sep 1, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/company-brain-mode-9b0f

Conversation

@divo12

@divo12 divo12 commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a first-class company run mode to Stratiki for queryable organizational knowledge. Company mode uses the existing local-wiki, book, and connector infrastructure but operates from a dedicated Stratiki home (~/.stratiki) instead of ~/.openwiki.

What's Changed

New company mode

  • Added company to OpenWikiRunMode type alongside personal and code
  • Company mode writes to ~/.stratiki/wiki (configurable via STRATIKI_HOME)
  • Company mode uses ~/.stratiki/book.db for the episode store

CLI Updates

  • Added stratiki company positional command
  • Added --mode company flag support
  • Updated book commands to accept --mode <code|company> (defaults to code)
  • Updated help text and examples to document company mode

Implementation

  • Added stratikiHomeDir, stratikiCompanyWikiDir, stratikiBookDbPath to config
  • Added ensureStratikiHome() for company mode directory initialization
  • Updated getRunModeCwd() to return company wiki dir for company mode
  • Updated runBookCommand() to support mode-specific book dir and DB paths

Documentation

  • Updated README with three-mode table showing code, company, and personal modes
  • Updated help content with company mode commands and examples

Tests

  • Added tests for company mode parsing in CLI commands
  • Added tests for book commands with --mode company
  • All existing tests pass (12 pre-existing sqlite fts5 failures remain)

Usage

Initialize company knowledge base:

stratiki company --init

Query the company wiki:

stratiki book context --mode company "search query"

Check company book status:

stratiki book status --mode company

Design Notes

  • Company mode reuses the personal mode infrastructure (book/connectors) but from a separate home
  • Code mode remains the default for repository documentation
  • No changes to code-wiki mode or personal mode behavior
  • Small diff, matching existing patterns
Open in Web Open in Cursor 

Summary by cubic

Adds a company run mode for queryable organizational knowledge. Company mode reuses the existing book and connector infrastructure but writes to a dedicated Stratiki home (~/.stratiki, configurable via STRATIKI_HOME) instead of ~/.openwiki. Code mode stays the default, and existing code and personal behavior is unchanged.

New Features

  • New stratiki company positional command and --mode company flag select the company brain.
  • book subcommands accept --mode <code|company>; --mode company routes wiki and episode-store paths to the Stratiki home.
  • Help text and README now document three modes with usage examples.

Dependencies

  • Adds @changesets/cli as a dev dependency.

Written for commit 26b297a. Summary will update on new commits.

Review in cubic

cursoragent and others added 2 commits September 1, 2026 06:29
Add first-class company run mode that uses Stratiki home (~/.stratiki)
for organization-wide knowledge. Company mode uses the existing book
infrastructure and connectors but with a dedicated home directory.

- Add 'company' to OpenWikiRunMode type alongside 'personal' and 'code'
- Add stratikiHomeDir and stratikiCompanyWikiDir paths in config
- Update CLI command parsing to accept company mode via positional or --mode
- Update book commands to support --mode company flag
- Update getRunModeCwd to return company wiki dir for company mode
- Add ensureStratikiHome() function for company mode directory setup
- Update README with three-mode table showing company mode
- Add tests for company mode parsing and book commands
- Update help text to document company mode usage

Co-authored-by: divo12 <divo12@users.noreply.github.com>
…st init

Convert Stratiki path exports to getter functions to defer homedir() calls
until runtime. This prevents test failures when tests mock os.homedir().

Co-authored-by: divo12 <divo12@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review September 1, 2026 06:35
@cursor
cursor Bot merged commit ed897ac into main Sep 1, 2026
9 checks passed
cursor Bot pushed a commit that referenced this pull request Sep 1, 2026
…9b0f"

This reverts commit ed897ac.

Note: The actual changes were already reverted by 3eb932e which reverted
PR #13 (which was built on top of #12). This commit maintains the explicit
revert history as requested.

Co-authored-by: divo12 <divo12@users.noreply.github.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.

2 participants