* Introduce project_personas table with foreign keys to projects and agent_personas * Add project_skills table with foreign key to projects and agent_skills * Include override boolean field in agent_persona_skills and project_skills * Update schema and migration files to reflect new tables and fields * Enhance CORS handling to reflect request origin
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# World Model Planning
|
||||
|
||||
Project: AMCS
|
||||
|
||||
AMCS already exposes MCP initialization instructions from `llm/memory.md`, active-project tools, project-linked skills and guardrails, persona manifests, project context, and MCP file resources.
|
||||
|
||||
Recommended design:
|
||||
|
||||
- Keep a concise mandatory world-model bootstrap protocol in MCP initialization instructions.
|
||||
- Add a readable static resource at `amcs://world-model/intro` containing the fuller introduction and project-selection protocol.
|
||||
- Add one `bootstrap_world_model` tool. It accepts an explicit project name or ID, validates it, sets it active when the transport is stateful, and returns one bounded snapshot containing project identity, linked skills, linked guardrails, linked persona manifests/default persona, and recent project context.
|
||||
- Never silently select or create a project. Return structured `project_not_found` or `project_ambiguous` errors with candidate projects; stateless clients must keep passing the project explicitly.
|
||||
- Add project-to-persona associations because the current schema only associates skills and guardrails with projects. Support one optional default persona plus additional available personas. Return manifests at bootstrap and load full persona content on demand.
|
||||
- Merge skills additively by default. Store an explicit `override` flag on project-skill and persona-skill association rows, not on the reusable skill itself. An overriding skill replaces lower-precedence skills with the same stable skill key; unrelated skills remain additive.
|
||||
- Resolve precedence deterministically: project skills form the base, the selected persona is applied next, and explicit runtime/session skills are applied last. At each layer, `override: true` replaces the accumulated entry with the same key while `override: false` adds or de-duplicates it.
|
||||
- Include a snapshot version and generation timestamp so clients can cache and refresh the world model safely.
|
||||
|
||||
Delivery phases:
|
||||
|
||||
1. Fix the existing `list_project_skills` SQL failure: `skillSelectCols` leaves `created_at` and other columns unqualified in a join.
|
||||
2. Define the bootstrap response contract, size limits, precedence rules, and structured errors.
|
||||
3. Add project-persona schema/store/tool support through DBML generation.
|
||||
4. Add the intro resource and initialization instructions.
|
||||
5. Implement and register `bootstrap_world_model` using existing project, skill, guardrail, persona, and context stores.
|
||||
6. Add MCP lifecycle, stateful/stateless, missing/ambiguous project, payload-bound, and resource tests.
|
||||
7. Add admin UI management for project personas/default persona and update client documentation.
|
||||
|
||||
Confirmed decision: skills are additive unless their association has `override: true`. Guardrails remain additive, use the stricter severity when duplicates occur, and cannot be weakened by persona or runtime context.
|
||||
|
||||
AMCS MCP writes and subsequent verification hung during this planning session, so this local log is the required fallback rather than a confirmed remote thought/plan.
|
||||
Reference in New Issue
Block a user