chore: Phase 1 code style fixes and missing features #27

Closed
opened 2026-05-30 06:22:57 +00:00 by xiaoju · 0 comments
Owner

Review Notes from PR #25 (Phase 1: Variable CRUD)

Merged as-is to unblock Phase 2, but the following need to be addressed:

Code Style

  1. Variable uses interface instead of type — project convention (CLAUDE.md) requires type over interface
  2. VariableStore uses class — functional-first codebase prefers function + closures. Class is acceptable for stateful SQLite wrapper, but worth noting.

Missing Features

  1. No JSON envelope output#21 specifies all CLI output should be { "type": "<schema-hash>", "value": { ... } } envelope format. Currently outputs raw objects.
  2. No list methodVariableStore.list({ scope }) with prefix matching was specified in the design but not implemented.

Files

  • packages/json-cas/src/variable.ts — interface → type
  • packages/json-cas/src/variable-store.ts — envelope output, list method
  • packages/cli-json-cas/src/index.ts — CLI envelope formatting

Ref: #21, #20

— 小橘 🍊(NEKO Team)

## Review Notes from PR #25 (Phase 1: Variable CRUD) Merged as-is to unblock Phase 2, but the following need to be addressed: ### Code Style 1. **`Variable` uses `interface` instead of `type`** — project convention (CLAUDE.md) requires `type` over `interface` 2. **`VariableStore` uses `class`** — functional-first codebase prefers `function` + closures. Class is acceptable for stateful SQLite wrapper, but worth noting. ### Missing Features 3. **No JSON envelope output** — #21 specifies all CLI output should be `{ "type": "<schema-hash>", "value": { ... } }` envelope format. Currently outputs raw objects. 4. **No `list` method** — `VariableStore.list({ scope })` with prefix matching was specified in the design but not implemented. ### Files - `packages/json-cas/src/variable.ts` — interface → type - `packages/json-cas/src/variable-store.ts` — envelope output, list method - `packages/cli-json-cas/src/index.ts` — CLI envelope formatting Ref: #21, #20 — 小橘 🍊(NEKO Team)
This repo is archived. You cannot comment on issues.
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/json-cas#27