Skip to content

Refactor - #4

Merged
bilikaz merged 3 commits into
mainfrom
refactor
Jun 10, 2026
Merged

bilikaz merged 3 commits into
mainfrom
refactor

Conversation

@bilikaz

@bilikaz bilikaz commented Jun 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

bilikaz and others added 3 commits June 10, 2026 12:32
- vcs/ -> providers/: Provider port, BaseProvider (shared local-git
  plumbing), LocalProvider/MockProvider naming aligned with adapters;
  ctx.vcs -> ctx.provider
- llm/: client.ts (callLLM + resolveModel) / transport.ts (send +
  receive, SSE merged in) / types.ts (shared wire + API vocabulary);
  tools contract in tools/types.ts
- stages/shared.ts: prompt assets, SLOT table, base section assembly,
  LLM stage metrics shared by review/reconcile
- single definitions: git wire types (lib/git.ts, port re-exports),
  isOpenBotThread predicate, summary fragment constants, joinScope
- lib/errors.ts errorMessage() replaces all (e as Error) casts
- logger contract in logger/types.ts; index.ts is a barrel
- REVIEW_DEFAULTS exported; tests build configs from real defaults

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- docs/ARCHITECTURE.md: system map with Mermaid diagrams, module map,
  core patterns, repo-specific conventions
- docs/conventions/: portable rule set (naming, types placement,
  consolidation, errors, configuration, logging, testing, docs) —
  reusable across projects
- docs/adr/: 13 settled decisions; ADR-0013 adopts the conventions
- README: published package name, layered docs, config table fixes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Internal module paths restructured (dist/vcs -> dist/providers, llm
files renamed); CLI surface, env vars and behavior unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@bilikaz bilikaz left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

8 informational finding(s) (nits / suggestions, not blocking — listed here as summary, not tracked as individual threads):

  • src/ctx.ts — The asBool helper is a good addition for consistent boolean parsing. Consider adding a doc comment explaining the accepted values since this is a new public-facing utility.
  • src/providers/base.ts — Good consolidation of git plumbing into BaseProvider. The protected gitCwd field gives subclasses the flexibility to set the working directory while keeping the common diff logic shared.
  • src/llm/client.ts — The new LLMValidationError class is appropriately minimal. Consider adding a doc comment explaining when this error is thrown to aid debugging.
  • src/lib/errors.ts — The errorMessage helper properly handles unknown throws per the error-handling convention. This eliminates the dangerous (e as Error).message pattern throughout the codebase.
  • src/providers/types.ts — Good centralization of the bot-thread predicate. The type guard signature ensures callers get proper typing after the check. This follows ADR-0011 correctly.
  • src/stages/shared.ts — The shared section assembly functions properly encode the prompt envelope order and presence rules. Stages can still append their specific sections (like thread_decisions) to the returned arrays.
  • README.md — README correctly documents the new local:// provider for console-only review. The explanation of container requirements is clear and important for safety.
  • package.json — Version bump from 0.1.2 to 0.2.0 is appropriate given the breaking changes (provider rename, LLM client restructuring, new docs folder). Consumers will need to update imports.

@bilikaz
bilikaz merged commit f6337b2 into main Jun 10, 2026
2 checks passed
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