Skip to content
approved Visibility internal Owner erik@uvilo.com Approver _ Created _ Updated _

Knowledge Consistency Plan 8

Plan 8 — Post-Verify Stale Reference Cleanup

Project: Forge/Knowledge_Consistency Phase: Plan 8 (post-Verify new Plan) Spec: Knowledge_Consistency_Spec.md Verification Report: Knowledge_Consistency_Verification.md

Scope: Resolve verification findings E2–E10 by removing stale MongoDB references, JWT Auth Manager references, obsolete forge-discovery tool names, incorrect workspace paths, deprecated Forge_Chat_Prompt.md references, direct Manage Pages skill routing, and model-specific names in skill files. E9 (LibreChat-era Output docs) is already resolved — all Forge/Output files except README.md were trashed by the user. E10 (Spec coverage gap) is resolved by this Plan addressing all specific stale references identified in E2–E8.

Spec sections covered: S1.5 (filesystem paths), S1.6 (forge-discovery tool names), S1.8 (MongoDB references removed), S1.10 (Page Manager bot spawning), S1.3 (Forge_Chat_Prompt.md references removed), S4.4 (JWT Auth Manager removed), S7.2–S7.3 (use-case names, not model-specific names).

Prerequisite: Plans 1–7 completed and approved (Execute_Eval 1–7 all passed). Verification completed with findings E2–E10.

E9 Status — RESOLVED: All files in Forge/Output/ except README.md have been trashed by the user. This resolves E9 (LibreChat-era documentation in Output docs). No action needed in this Plan.

E10 Status — RESOLVED BY THIS PLAN: The approved Spec missed or under-specified stale references in several files. This Plan addresses all specific stale references identified in E2–E8, covering files not explicitly named in the Spec’s original task lists.


Task 1 — Fix Forge_Infrastructure.md (E2, E3, E4, E5)

Spec S1.8: “No skill or knowledge file references MongoDB or the mongodb skill. MongoDB has been completely removed from the system.” Spec S4.4: “Forge/Forge_Agent_Orchestration.md does not reference ‘JWT Auth Manager for session auth.’ The Orchestrator Service section describes ‘API-key authentication (service account)’ consistently.” The same standard applies to Forge_Infrastructure.md. Spec S1.6: “The Forge_Agent_Orchestration.md discovery MCP tools table matches actual tool names.” The same current tool names must be used in Forge_Infrastructure.md’s MCP details section. The correct names are: forge-discovery__list_departments, forge-discovery__list_dept_projects, forge-discovery__get_project, forge-discovery__list_skills, forge-discovery__get_skill, forge-discovery__find. Spec S1.5: “No file references the incorrect path /workspace/erik/uvilo-os/. All hardcoded paths are replaced with either the correct /workspace/erik@uvilo.com/uvilo-os/ or the [[orgRepoRoot]] template variable where appropriate.”

File: Forge/Forge_Infrastructure.md

This file has four distinct findings (E2, E3, E4, E5). Each is in a different section of the file.

Step 1 — Remove MongoDB from Architecture Diagram (E2, line ~44–45)

The architecture diagram contains this entry:

├── MongoDB (via Railway "Add Database" — persistent volume, backups enabled)
│   └── Agent configs, conversation history, user data

Remove these two lines entirely. MongoDB has been completely removed from the system. The data it held (agent configs, conversation history, user data) is now managed by the forgentic runtime’s Bot system using the forge Postgres database.

Update the existing forge Postgres entry in the same diagram to reflect the expanded role:

Current:

├── forge Postgres (via Railway — persistent volume)
│   └── AgentJob table, orchestration state

New:

├── forge Postgres (via Railway — persistent volume)
│   └── AgentJob table, orchestration state, agent configs, conversation history, user data

Step 2 — Remove MONGO_URI from Environment Variable Table (E2, line ~109)

The “Key variables” table contains this row:

| Infrastructure | MONGO_URI, FORGE_DB_URL, TYPESENSE_URL, TYPESENSE_ADMIN_KEY | MongoDB, Postgres, Typesense |

Remove MONGO_URI from the Key variables column and MongoDB from the Used by column:

| Infrastructure | FORGE_DB_URL, TYPESENSE_URL, TYPESENSE_ADMIN_KEY | Postgres, Typesense |

Step 3 — Replace JWT Auth Manager with API-key Authentication (E3, line ~48)

In the Orchestrator section of the architecture diagram:

Current:

│   ├── JWT Auth Manager for session auth

New:

│   ├── API-key authentication (service account)

Step 4 — Fix Obsolete forge-discovery Tool Names (E4, line ~271)

In the MCP server details section under ### forge-discovery:

Current:

TypeScript MCP server. Source: `Forge/Configs/MCP_Servers/forge-discovery/`. Provides `list_skills`, `find_skill`, `get_skill_details` for skill/project discovery. Stdio transport.

New:

TypeScript MCP server. Source: `Forge/Configs/MCP_Servers/forge-discovery/`. Provides `forge-discovery__list_departments`, `forge-discovery__list_dept_projects`, `forge-discovery__get_project`, `forge-discovery__list_skills`, `forge-discovery__get_skill`, `forge-discovery__find` for skill/project discovery. Stdio transport.

Step 5 — Fix Incorrect Workspace Path (E5, line ~319)

In the ### suprsend-dev/staging/prod section:

Current:

Command: `python3 /workspace/erik/uvilo-os/Forge/Configs/MCP_Servers/suprsend-mcp-proxy.py <workspace>`. Injects Railway env vars at startup. Uses `SUPRSEND_SERVICE_TOKEN`.

New:

Command: `python3 /workspace/erik@uvilo.com/uvilo-os/Forge/Configs/MCP_Servers/suprsend-mcp-proxy.py <workspace>`. Injects Railway env vars at startup. Uses `SUPRSEND_SERVICE_TOKEN`.

Verify

  • grep -in 'mongodb\|MONGO_URI\|mongo' Forge/Forge_Infrastructure.md returns no matches
  • grep -in 'JWT Auth Manager' Forge/Forge_Infrastructure.md returns no matches
  • grep -nP '(?<!forge-discovery__)(list_skills|find_skill|get_skill_details)' Forge/Forge_Infrastructure.md returns no matches (the negative lookbehind (?<!forge-discovery__) ensures the correct prefixed names forge-discovery__list_skills, forge-discovery__get_skill, and forge-discovery__find are not matched; only obsolete unprefixed occurrences are detected)
  • grep -n '/workspace/erik/uvilo-os' Forge/Forge_Infrastructure.md returns no matches
  • grep -n 'API-key authentication' Forge/Forge_Infrastructure.md returns a match (confirms the replacement)

Task 2 — Fix infrastructure_state.md (E2)

Spec S1.8: “No skill or knowledge file references MongoDB or the mongodb skill. MongoDB has been completely removed from the system.”

File: Forge/Skills/Update_Infrastructure/references/infrastructure_state.md

This file is a reference extract from Forge_Infrastructure.md and contains two MongoDB references.

Step 1 — Remove MongoDB from Services Table (line ~21)

Current row in the Services table:

| MongoDB | 8.0.20 (Railway "Add Database") | Yes | Yes |

Remove this entire row.

Step 2 — Remove MONGO_URI from Key Connection Variables Table (line ~30)

Current row in the Key Connection Variables table:

| `MONGO_URI` | MongoDB connection string (include `?authSource=admin`) |

Remove this entire row.

Verify

  • grep -in 'mongodb\|MONGO_URI\|mongo' Forge/Skills/Update_Infrastructure/references/infrastructure_state.md returns no matches

Task 3 — Fix Project_Rename/SKILL.md (E5)

Spec S1.5: “No file references the incorrect path /workspace/erik/uvilo-os/. All hardcoded paths are replaced with either the correct /workspace/erik@uvilo.com/uvilo-os/ or the [[orgRepoRoot]] template variable where appropriate.”

File: Forge/Forge_Project/Skills/Project_Rename/SKILL.md

Step 1 — Fix Incorrect Workspace Path (line ~48)

In the “Update external references” step (Step 7), the grep example uses the incorrect path:

Current:

grep -rl "old/path" /workspace/erik/uvilo-os/ --exclude-dir='.internal' --exclude-dir='node_modules' --exclude-dir='.generated' --exclude-dir='dist'

New:

grep -rl "old/path" [[orgRepoRoot]]/ --exclude-dir='.internal' --exclude-dir='node_modules' --exclude-dir='.generated' --exclude-dir='dist'

Use the [[orgRepoRoot]] template variable since this is a skill file that should be portable across environments.

Verify

  • grep -n '/workspace/erik/uvilo-os' Forge/Forge_Project/Skills/Project_Rename/SKILL.md returns no matches

Task 4 — Fix Forge_Optimizer Reference Files (E6, E7, E4)

Spec S1.3: “No skill or knowledge file references Forge/Configs/Agents/Forge_Chat_Prompt.md. The file does not exist — the Forge Chat prompt lives in the Bot database.” Spec S1.10: “No skill or prompt directs an agent to read or invoke the Manage_Pages skill for sidebar entries, page creation, or page operations. Instead, skills and prompts instruct agents to add sidebar entries and perform page operations by spawning the Page Manager bot via spawnAgent with { botGroup: \"forge\", botHandle: \"page-manager\" }.” Spec S1.6: “The discovery MCP tools table matches actual tool names.” The obsolete tool name get_skill_details must be replaced with forge-discovery__get_skill wherever it appears.

Files:

  • Forge/Skills/Forge_Optimizer/references/example_report.md
  • Forge/Skills/Forge_Optimizer/references/extraction_prompt.md

Step 1 — Fix example_report.md (E6, E7)

This file is a sample Forge Optimizer report. Two findings reference Forge_Chat_Prompt.md and one references the Manage Pages skill.

Finding 1 (line ~19) — E6:

Current:

- [ ] 🔴 **Sidebar + skill not committed together** (compliance failure) — SIDEBAR RULE requires new files and their sidebar entry in the same commit; agent committed them separately. → No change needed — rule exists in `Forge/Configs/Agents/Forge_Chat_Prompt.md` (SIDEBAR RULE)

Replace Forge/Configs/Agents/Forge_Chat_Prompt.md with the system prompt:

- [ ] 🔴 **Sidebar + skill not committed together** (compliance failure) — SIDEBAR RULE requires new files and their sidebar entry in the same commit; agent committed them separately. → No change needed — rule exists in the system prompt (SIDEBAR RULE)

Finding 2 (line ~20) — E6 + E7:

Current:

- [ ] 🟡 **Skipped pre-work skill lookup** (rule violation) — Agent edited the sidebar without reading the Update Sidebar skill first. → `Forge/Configs/Agents/Forge_Chat_Prompt.md` SIDEBAR RULE — add cross-reference: "Follow the Manage Pages skill procedure"

Replace the Forge_Chat_Prompt.md reference with the system prompt (E6) and replace the “Follow the Manage Pages skill procedure” with the Page Manager bot spawn pattern (E7):

- [ ] 🟡 **Skipped pre-work skill lookup** (rule violation) — Agent edited the sidebar without spawning the Page Manager bot first. → The system prompt SIDEBAR RULE — add cross-reference: "Spawn the Page Manager bot via `spawnAgent` with `{ botGroup: 'forge', botHandle: 'page-manager' }`"

Step 2 — Fix extraction_prompt.md (E6, E4)

This file is a prompt template for the Forge Optimizer. It references Forge_Chat_Prompt.md in five places and uses the obsolete tool name get_skill_details in one place.

Reference 1 (line ~18) — E6:

Current:

- **Quote rules exactly.** When claiming a rule violation, quote the Forge_Chat_Prompt.md text (provided in the system message). No quote = not a violation.

Replace Forge_Chat_Prompt.md with the system prompt:

- **Quote rules exactly.** When claiming a rule violation, quote the system prompt text (provided in the system message). No quote = not a violation.

Reference 2 (line ~19) — E6:

Current:

- **Don't flag documented procedures as waste.** If Forge_Chat_Prompt.md prescribes it, it's not waste.

Replace Forge_Chat_Prompt.md with the system prompt:

- **Don't flag documented procedures as waste.** If the system prompt prescribes it, it's not waste.

Reference 3 (line ~21) — E6:

Current:

- **Forge Optimizer finds systemic fixes, not one-off patches.** Every actionable finding must improve a skill, knowledge doc, environment config, or Forge_Chat_Prompt.md rule — not fix a specific past agent's output. "The agent didn't do X" → "Add X to the procedure in [file]" not "Go do X now."

Replace Forge_Chat_Prompt.md with the system prompt:

- **Forge Optimizer finds systemic fixes, not one-off patches.** Every actionable finding must improve a skill, knowledge doc, environment config, or system prompt rule — not fix a specific past agent's output. "The agent didn't do X" → "Add X to the procedure in [file]" not "Go do X now."

Reference 4 (line ~27) — E6:

Current:

1. **Cross-reference at point of action.** If Forge_Chat_Prompt.md has a rule that applies when doing X, but the skill for X doesn't mention it, add a cross-reference in the skill so agents encounter the rule at the moment they need it.

Replace Forge_Chat_Prompt.md with the system prompt:

1. **Cross-reference at point of action.** If the system prompt has a rule that applies when doing X, but the skill for X doesn't mention it, add a cross-reference in the skill so agents encounter the rule at the moment they need it.

Reference 5 (line ~36) — E6:

Current:

- **Redundant copies.** Don't propose adding a Forge_Chat_Prompt.md rule to a skill file verbatim. That creates drift and maintenance burden.

Replace Forge_Chat_Prompt.md with the system prompt:

- **Redundant copies.** Don't propose adding a system prompt rule to a skill file verbatim. That creates drift and maintenance burden.

Reference 6 (line ~50) — E4 (obsolete tool name):

Current:

- **Inline detection:** If an agent reads a skill file via `get_skill_details` or filesystem read in every transcript, flag it as an `inlining opportunity` and suggest adding `<!-- include: {path} -->` to the agent's prompt file.

Replace get_skill_details with forge-discovery__get_skill:

- **Inline detection:** If an agent reads a skill file via `forge-discovery__get_skill` or filesystem read in every transcript, flag it as an `inlining opportunity` and suggest adding `<!-- include: {path} -->` to the agent's prompt file.

Verify

  • grep -rn 'Forge_Chat_Prompt' Forge/Skills/Forge_Optimizer/references/example_report.md Forge/Skills/Forge_Optimizer/references/extraction_prompt.md returns no matches
  • grep -rn 'get_skill_details' Forge/Skills/Forge_Optimizer/references/example_report.md Forge/Skills/Forge_Optimizer/references/extraction_prompt.md returns no matches
  • grep -in 'Manage Pages skill\|manage.pages skill\|manage-pages skill' Forge/Skills/Forge_Optimizer/references/example_report.md returns no matches

Task 5 — Fix Project Skills and Workflow (E6)

Spec S1.3: “No skill or knowledge file references Forge/Configs/Agents/Forge_Chat_Prompt.md. The file does not exist — the Forge Chat prompt lives in the Bot database.”

Files:

  • Forge/Forge_Project/Skills/Project_Extract/SKILL.md
  • Forge/Forge_Project/Skills/Project_Extract_Eval/SKILL.md
  • Forge/Forge_Project/Forge_Project_Workflow.md

Step 1 — Fix Project_Extract/SKILL.md (line ~46)

In Step 7 of the procedure (“Ensure everything is findable”):

Current:

   - System-wide skills must be listed in `Forge_Chat_Prompt.md`

The Available Skills list now lives in the Persistent Knowledge prompt (Bot database). Replace:

New:

   - System-wide skills must be listed in the Persistent Knowledge prompt (Bot database)

Step 2 — Fix Project_Extract_Eval/SKILL.md (line ~40)

In Step 4 of the procedure (“Review the extraction”):

Current:

   - Verify system-wide skills are listed in `Forge_Chat_Prompt.md`

Replace:

New:

   - Verify system-wide skills are listed in the Persistent Knowledge prompt (Bot database)

Step 3 — Fix Forge_Project_Workflow.md (line ~400)

In the section describing Execute_State documents:

Current:

- Uses the checkbox conventions defined in Forge_Chat_Prompt.md

The checkbox conventions are now defined in the system prompt. Replace:

New:

- Uses the checkbox conventions defined in the system prompt

Verify

  • grep -rn 'Forge_Chat_Prompt' Forge/Forge_Project/Skills/Project_Extract/SKILL.md Forge/Forge_Project/Skills/Project_Extract_Eval/SKILL.md Forge/Forge_Project/Forge_Project_Workflow.md returns no matches

Task 6 — Fix Model-Specific Names in Typesense Skills (E8)

Spec S7.2: “Knowledge files and skills refer to use-case names (e.g., ‘the indexing use case’), not specific model names (e.g., ‘gpt-5.4-nano’). When a model is swapped, only the Choose_AI_Model skill’s table needs updating.” Spec S7.3: “Model-specific quirk documentation is moved from inline skill procedures into the Choose_AI_Model skill’s model reference files.”

Files:

  • Forge/Skills/Reindex_Typesense/SKILL.md
  • Forge/Skills/Typesense_MCP/SKILL.md

Step 1 — Fix Reindex_Typesense/SKILL.md (line ~141)

In the “Gotchas” section:

Current:

- Consult `Forge/Skills/Choose_AI_Model/Models/gpt-5.4-nano.md` for model-specific quirks (required parameters, rejected parameters)

Replace the model-specific file reference with a use-case name and the Models/ folder (not a specific model file):

New:

- Consult `Forge/Skills/Choose_AI_Model/Models/` for the indexing use case's model-specific quirks (required parameters, rejected parameters)

Step 2 — Fix Typesense_MCP/SKILL.md (line ~72)

In the “Gotchas” section:

Current:

- Consult `Forge/Skills/Choose_AI_Model/Models/gpt-5.4-nano.md` and `Forge/Skills/Choose_AI_Model/Models/gpt-4o-mini.md` for model-specific quirks (required parameters, rejected parameters)

Replace both model-specific file references with a use-case name and the Models/ folder:

New:

- Consult `Forge/Skills/Choose_AI_Model/Models/` for the indexing use case's model-specific quirks (required parameters, rejected parameters)

Verify

  • grep -rn 'gpt-5.4-nano\|gpt-4o-mini' Forge/Skills/Reindex_Typesense/SKILL.md Forge/Skills/Typesense_MCP/SKILL.md returns no matches
  • grep -n 'indexing use case' Forge/Skills/Reindex_Typesense/SKILL.md Forge/Skills/Typesense_MCP/SKILL.md returns matches (confirms the replacement)

Task 7 — Build, Commit, and Push

Spec sections addressed by Plan 8: S1.3 (Forge_Chat_Prompt.md references removed), S1.5 (filesystem paths), S1.6 (forge-discovery tool names), S1.8 (MongoDB references removed), S1.10 (Page Manager bot spawning), S4.4 (JWT Auth Manager removed), S7.2–S7.3 (use-case names, not model-specific names). All findings E2–E8 are addressed by Tasks 1–6. E9 is already resolved (Output files trashed). E10 is resolved by this Plan’s comprehensive coverage. After all tasks are complete, build and commit.

Steps

  1. Run npm run build --prefix .internal from the repo root. This should succeed (940+ pages).
  2. git add all modified files:
    • Forge/Forge_Infrastructure.md
    • Forge/Skills/Update_Infrastructure/references/infrastructure_state.md
    • Forge/Forge_Project/Skills/Project_Rename/SKILL.md
    • Forge/Skills/Forge_Optimizer/references/example_report.md
    • Forge/Skills/Forge_Optimizer/references/extraction_prompt.md
    • Forge/Forge_Project/Skills/Project_Extract/SKILL.md
    • Forge/Forge_Project/Skills/Project_Extract_Eval/SKILL.md
    • Forge/Forge_Project/Forge_Project_Workflow.md
    • Forge/Skills/Reindex_Typesense/SKILL.md
    • Forge/Skills/Typesense_MCP/SKILL.md
  3. git commit -m "Plan 8: Post-verify stale reference cleanup (E2-E8: MongoDB, JWT Auth Manager, discovery tools, workspace path, Forge_Chat_Prompt, Manage Pages, model names)"
  4. git push origin dev

Verify

  • npm run build --prefix .internal succeeds
  • All modified files are committed and pushed to dev
  • git log --oneline -1 shows the commit

Plan 8 Completion Criteria

  • E2 (MongoDB): No MongoDB or MONGO_URI references in Forge/Forge_Infrastructure.md or Forge/Skills/Update_Infrastructure/references/infrastructure_state.md
  • E3 (JWT Auth Manager): No “JWT Auth Manager” references in Forge/Forge_Infrastructure.md; replaced with “API-key authentication (service account)”
  • E4 (Obsolete discovery tool names): No list_skills, find_skill, or get_skill_details (without forge-discovery__ prefix) in Forge/Forge_Infrastructure.md or Forge/Skills/Forge_Optimizer/references/extraction_prompt.md
  • E5 (Incorrect workspace path): No /workspace/erik/uvilo-os references in Forge/Forge_Infrastructure.md or Forge/Forge_Project/Skills/Project_Rename/SKILL.md
  • E6 (Forge_Chat_Prompt.md references): No Forge_Chat_Prompt references in any of the 5 affected files: example_report.md, extraction_prompt.md, Project_Extract/SKILL.md, Project_Extract_Eval/SKILL.md, Forge_Project_Workflow.md
  • E7 (Manage Pages skill routing): No “Manage Pages skill” routing language in example_report.md; replaced with Page Manager bot spawn pattern
  • E8 (Model-specific names): No gpt-5.4-nano or gpt-4o-mini references in Reindex_Typesense/SKILL.md or Typesense_MCP/SKILL.md; replaced with use-case names and Choose_AI_Model/Models/ folder reference
  • E9 (LibreChat-era Output docs): Already resolved — Forge/Output files trashed. No action needed.
  • E10 (Spec coverage gap): Resolved by this Plan addressing all specific stale references from E2–E8.
  • Build succeeds, changes committed and pushed to dev

Dependencies

  • Requires: Plans 1–7 completed and approved (Execute_Eval 1–7 all passed), Verification completed
  • Blocks: Execute_Eval_8 → Verify re-check