CorpusX — Thai Enterprise Data Intelligence Platform
Enterprise web app for Thai company data intelligence — aggregating DBD, Revenue Department, and NACC procurement data into searchable profiles, financial scoring, and network graphs.
Current Focus
Agent team architecture designed. Next: write CLAUDE.md, create Phase 1 spec files, and set up speckit.implement slash command.
Open Tasks
- Write CLAUDE.md for CorpusX repo (Thai data sources, field name conventions Thai/English, immutable raw layer rule, stack: Django 6 + Ninja, Next.js 16, Vuexy patterns)
- Create Phase 1 agent team spawn prompts (Orchestrator: schema, API, frontend shell, ingestion + QA)
- Write spec file:
specs/company-search.md(Company Search feature) - Write spec file:
specs/company-profile.md(Company Profile feature) - Run speckit.implement for Phase 1 after CLAUDE.md and specs are ready
- Set up GitLab cloud repo and push codebase
- Add
ANTHROPIC_API_KEYsecret in GitLab CI/CD settings - Verify Claude CI pipeline runs on first push
Key Decisions / Insights
- Agent team patterns — Orchestrator-Worker vs Pipeline vs Peer Review
- Spec-kit methodology — three levels for directing Claude Code
- PDPA compliance (Thai personal data protection law) is a Phase 4 concern — plan for Peer Review pattern
Agent Team Architecture
Phase 1 — Orchestrator-Worker
Domains: schema, API, frontend shell, ingestion — all independent. Lead owns spec-kits and merges. QA teammate gates each domain before calling done.
Phase 2 — Pipeline (sequential)
Financial data: Thai GAAP mapping from DBD → scoring engine → validation → UI. Pipeline enforces ordering. UI teammate starts in parallel with Validate once Implement posts API contract.
Phase 3 — Orchestrator-Worker
Domains: monitoring, network graph, procurement, lead gen. Each has backend + frontend teammate pair. Lead assigns and synthesises.
Phase 4 — Peer Review
Architecture decisions: API rate limit strategy, PDPA compliance, AI feature scope, billing model. Intellectual friction needed before any code is written.
CLAUDE.md Must Include
- Thai data sources: DBD (Department of Business Development), Revenue Department, NACC (National Anti-Corruption Commission for procurement)
- Field name conventions: Thai vs English (specify mapping rules)
- Immutable raw data layer rule: no teammate touches raw ingested data directly — all reads go through computed layer
- Stack: Django 6, Ninja, Next.js 16, Vuexy patterns, Postgres
Spec-Kit Practice
Before any Claude Code session:
“Read CLAUDE.md and specs/[feature].md. Summarise what you’re about to build in 5 bullet points. Do not write any code yet.”
This surfaces misinterpretations before any files are touched.
People
- (solo project / Phuriwaj building with Claude Code agent teams)
Progress Log
2026-05-14
Designed four-phase agent team architecture for CorpusX. Confirmed spec-kit methodology as the right approach (CLAUDE.md + per-feature spec files + inline prompts). Built speckit.implement.md slash command that spawns Backend, Frontend, QA teammates from a spec directory. Also confirmed that Claude Code Agent Teams requires Anthropic models — GLM-5.1 / MiniMax M2.7 as team backends is unconfirmed; keeping Claude Pro/Max for orchestration.
Week of 2026-W20 (Mon 12 – Sun 17 May)
Architecture fully designed and documented. Four-phase agent team structure: Phase 1 Orchestrator-Worker (schema, API, frontend shell, ingestion — parallel), Phase 2 Pipeline (Thai GAAP mapping → scoring → validation — sequential), Phase 3 Orchestrator-Worker (monitoring, network graph, procurement, lead gen), Phase 4 Peer Review (rate limits, PDPA, AI features, billing). Spec-kit methodology confirmed as the development approach. Three spec levels: CLAUDE.md global rules, per-feature spec files, inline prompts. speckit.implement.md slash command built. Key CLAUDE.md requirements identified: Thai data sources (DBD, Revenue Dept, NACC), field name conventions (Thai vs English), immutable raw layer rule.
Status: 🟡 Architecture complete — CLAUDE.md and Phase 1 spec files not yet written.
Open tasks (W21):
- Create CLAUDE.md for CorpusX (Thai data sources, field name conventions, immutable raw layer)
- Write Phase 1 spawn prompts for agent team
- Create spec files for first two features: Company Search + Company Profile
- Apply workspace restriction
settings.jsonto CorpusX project root - Move to GitLab cloud: push repo, add ANTHROPIC_API_KEY secret, verify Claude CI pipeline