schema-sync-structured
Fix an agentic NL2SQL system after a database schema change. Inspect the schema contract, agent prompts, and vector database chunks for stale field references and update them.
- License 许可
- Apache-2.0
- 最近更新
- 2026-04-18
- Stars
- ★ 9
- Forks
- 2
01 前言 Front Matter
- name
- schema-sync-structured
- description
- Fix an agentic NL2SQL system after a database schema change. Inspect the schema contract, agent prompts, and vector database chunks for stale field references and update them.
02 资源文件 1
- 参考文档README.md672 B
03 SKILL.md 正文
Schema Sync — Structured
After a database schema migration, the following files and systems may contain stale field references.
Files to inspect
agentic_system/schema/github_events.yaml— machine-readable schema contractagentic_system/agents_core/nl2sql/prompts/system.md— NL2SQL agent system promptagentic_system/agents_core/rag/prompts/system.md— RAG agent system prompt- ChromaDB collections:
schema_docs,qa_examples— vector RAG chunks
What to look for
- Read the live ClickHouse schema:
SELECT name, type FROM system.columns WHERE table = 'github_events' ORDER BY position - Find references to old field names and SQL predicates in the files above.
- Update each file to use the new field names, types, and predicate syntax.
- For ChromaDB: find chunks with
stale: Truein their metadata and update their content.
Validation
Run python scripts/validate_schema.py to check whether the YAML contract matches the live schema.
04 同仓库更多 Skills
backlog-task-creator
Create or update `backlog/<TASK-ID>.md` task files for this repo using the established traceability format. Use when asked to add backlog task documents, standardize task scope and status, or derive task files from `PRODUCT_BACKLOG.md`.
backlog-board-status
Fast status check for backlog tasks using `scripts/backlog_board.py` and `backlog/board.md`. Use when you need a compact view of task id, epic, status, and short description across sessions.
schema-sync-fully-guided
Complete schema drift repair for the Ghost Contributors NL2SQL system. Patches all four layers (YAML contract, ChromaDB RAG chunks, NL2SQL prompt, RAG prompt) using validated tooling. Includes dry-run preview, step-by-step fallback, validation, and rollback.
schema-sync-agent-assisted
Four-layer schema sync procedure for the Ghost Contributors NL2SQL system after a database migration. Covers YAML contract, ChromaDB RAG chunks, NL2SQL prompt, and RAG prompt with a step-by-step repair sequence.
schema-sync-naive
The database schema changed and the agent is returning wrong answers. Fix it.