Skip to content

feat: named tables and array type#120

Draft
dvhthomas wants to merge 6 commits into
mainfrom
feat/named-tables-and-arrays
Draft

feat: named tables and array type#120
dvhthomas wants to merge 6 commits into
mainfrom
feat/named-tables-and-arrays

Conversation

@dvhthomas

Copy link
Copy Markdown
Contributor

Summary

  • Add named markdown tables as computation sources via <!-- table: name (col1, col2) --> directive
  • Introduce first-class Array type with element-wise arithmetic and scalar broadcasting
  • Add aggregate functions (sum(), avg(), min(), max(), count()) on arrays
  • Enable per-row array interpolation in table cells

Closes #118

Documents

Example

<!-- table: rates (role, rate, hc) -->
| Role   | Hourly Rate | Headcount |
|--------|-------------|-----------|
| Senior | $250/hr     | 3         |
| Junior | $150/hr     | 5         |

---

line_costs = rates.rate * rates.hc
total = sum(line_costs)

Test plan

  • Array and Table type unit tests
  • Lexer DOT token generalization (no decimal regression)
  • Parser MemberAccess + relaxed sum/avg arg counts
  • Table extraction from TextBlocks (all 3 evaluator paths)
  • Element-wise arithmetic + aggregate functions
  • Display formatting + JSON output
  • Array interpolation in table cells
  • Classifier recognizes dot-access patterns
  • Golden tests: full consulting SOW end-to-end
  • task test + task quality pass

🤖 Generated with Claude Code

dvhthomas and others added 6 commits April 6, 2026 22:09
Add brainstorm requirements document and implementation plan for the
named tables and array type feature. Tables become computation sources
via directive-based naming, with element-wise arithmetic and aggregate
functions operating on column arrays.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Note the insight that computed table rows can be auto-injected during
the pre-processing pass without special user markup, and that NL syntax
for array functions is deferred due to expression ambiguity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…118)

Add executable spec golden files for named tables feature:
- 4 success files (SOW, types, multi-table, edge cases)
- 1 error file (11 diagnostic cases)
- 2 parse-level files (valid/invalid syntax)

Add cross-table lookup/countif to future considerations in requirements
doc to ensure v1 design doesn't block the extension path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Consumer-oriented web notebook product: social login, private by
default, share readonly rendered views, clone into own workspace.
Single Go binary deployment with SQLite + Litestream for backups.
Jupyter-like block editor with context-aware documentation sidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10-unit plan across 4 phases for the web notebook product:
- Separate repo consuming go-calcmark as a library
- Go HTTP server + embedded SvelteKit frontend + SQLite
- OAuth (Google/GitHub), Jupyter-like block editor
- Litestream for continuous backup
- Export APIs (single doc + bulk zip)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add R18-R21 covering the killer editor features: interpolation
autosuggest, calc-table preview, visual table editor, and fluid
prose-calculation boundary. Add cmw binary naming, cmw backup command,
and separate project requirement.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.

feat: named tables and array type

1 participant