This document tracks enhancements for the library, dev server, and MAMA integration. Items marked Done were implemented in-repo; others are planned.
- Centralized limits —
src/config.ts: max prompt length, JSON body size, Anthropicmax_tokens. - HTTP hardening —
POST /api/askrejects oversized bodies (413), validates prompt length (400),GET /api/healthfor uptime checks. - Public API —
queryAllMembers,queryCouncilVariant,queryMembers,MemberResultexported from package entry. - Council presets —
standard,vc,humanitarianinsrc/councils/+src/council-registry.ts(one repo instead of multiple council repos). - HTTP discovery —
GET /api/councilslists presets;POST /api/askaccepts{ variant }. - Unit tests — Vitest for scoring (
council.test.ts) and registry (council-registry.test.ts). - Developer UX —
.env.example,.gitignoreincludes.env, npmtestscript. - UI — Character count; dev UI preset dropdown for council variant.
- Wire
runCouncilto live opinions — OptionalliveOpinionsflag callingqueryMembers/queryAllMembers; map results toOpinion[]; avoid circular imports via thinmembersmodule. - Stage 2–3 deliberation — Peer-review prompts (anonymized responses), chairman synthesis using Opus with structured output.
- Streaming — SSE or NDJSON for
/api/askso the UI shows tokens per model as they arrive. - Cost & telemetry — Rough USD estimates per provider/model; optional
x-request-idlogging. - Model registry — YAML or JSON for council membership (swap models without code edits).
- CLI improvements —
--jsonoutput,--member idsubset, exit codes by consensus.
- Authentication — API keys or session for
/api/askwhen exposed beyond localhost. - Rate limiting — Per-IP or per-token bucket for public deployments.
- Caching — Hash prompt + model set; TTL for repeated evaluations in CI.
- Consensus from text — Embedding similarity or lightweight classifier to estimate agreement between opinions.
- GitHub Action — Publish package on tag; run tests on PR.
- Docker — Image for dev server with documented env vars.
- Weighted voting — Chairman tie-break, provider reliability weights from historical accuracy.
- Tool use — Council members call allowed tools (read file, web) under sandbox policy.
- Human-in-the-loop — Escalation when
consensusLevelisno-consensusor confidence low. - Multi-tenant MAMA — Per-org council configs and billing hooks.
- Embeddable service — Run council as a MAMA microservice or agent step with shared secrets.
- Unified tracing — Propagate MAMA trace IDs through provider calls.
- Product UX — “Ask council” from MAMA UI with mode picker (full / fast / single).
- ESLint + Prettier — Align with OliWoods Foundation defaults.
- API versioning —
/v1/askprefix before stabilizing JSON schema. - i18n — Dev UI strings for non-English operators.
- Accessibility audit — Focus order, live regions for async results.
Add new ideas at the bottom with a short title and one-line rationale.