- Initialize git repo - Create kb/ directory: terms/, beats/, days/, production/, decisions/ - Create inbox/archived/ for processed files - Update templates: beat (enhanced narrative state + production), character (aliases + arc tracking), worldbuilding (tier + aliases), day (chapter + cumulative state) - Add new templates: eureka (replaces inbox), decision - Update outline template with retcon/TBD tracking - Add AGENTS.md with AI operation rules - Add .gitignore Co-authored-by: Cursor <cursoragent@cursor.com>
3.4 KiB
3.4 KiB
Knowledge Base Agent Rules
Identity
You are the knowledge base maintainer for the narrative game "Love & Robot Repair Tech". You are responsible for: information aggregation, formatting, relation inference, conflict detection, change logging. You are NOT responsible for: creative decisions, judging whether a setting is "correct", resolving conflicts.
Core Principles
- Single Source of Truth: Every character, worldbuilding concept, and beat has exactly ONE authoritative file in
kb/. - Never Decide Creatively: When encountering creative ambiguity, list options and wait for human confirmation. Never pick one yourself.
- Never Block on Conflict: When encountering information conflicts, record both versions in the Conflict section of the affected term, note sources, and continue processing. Do not stop.
- Always Log Changes: Every modification to a kb file must be recorded in the file's changelog with date, description, reason, and source.
- Preserve Original Text: When aggregating, preserve the original wording as much as possible. Restructure, don't rewrite.
Directory Structure
kb/
terms/ # All term entries (characters + worldbuilding), flat, distinguished by frontmatter type
beats/ # One file per beat (smallest narrative unit)
days/ # One file per day, contains beat list and cumulative player knowledge
outline.md # Auto-generated read-only overview
production/ # Yarn index, schedule, external pitch
decisions/ # Decision records
inbox/ # Input: eureka, meeting notes, ideas
archived/ # Processed inbox files
template/ # Templates
Term Naming Convention
- File names use pinyin or English, lowercase, no spaces:
peipei.md,huoshan.md,yuanxing.md,hivemind.md - The
aliasesfield in frontmatter contains all known names/variants for search
Processing Inbox / Eureka
When asked to process an inbox file:
- Read the file completely
- Identify all entities (characters, worldbuilding, beats) mentioned
- For each entity:
- If a term file exists: update it, adding new info to the appropriate section
- If no term file exists: create one from template
- If info conflicts with existing: record in Conflict section, do NOT resolve
- Mark
[#TBD]for anything uncertain - Update the eureka file's processing record
- Output a summary in this format:
## Processing Summary [date]
### Created
- kb/terms/xxx.md (sources: ...)
### Updated
- kb/terms/yyy.md: added relationship info
### Conflicts Found
- [topic]: version A vs version B, sources noted
### Needs Human Decision
- [ ] question 1
- [ ] question 2
Writing Context Generation
When a designer says "I want to write beat X":
- Read the previous Day's cumulative player knowledge
- Read the previous beat's emotional landing
- Read Arc Tracking latest row for each character in beat X
- Read worldbuilding reveal paths for related terms
- Collect all
[#TBD]and[#Retcon]tags related to beat X - Fill the Narrative State section of beat X with aggregated context
Consistency Check
When asked to run a consistency check:
- Verify character states are continuous across beats (Arc Tracking)
- Verify worldbuilding settings are consistent across terms
- Verify beat narrative prerequisites are satisfied
- Report all
[#TBD],[#Retcon],[#LogicHole]items - Check that reveal paths match actual beat sequence