Area: mobieusKnow (audit p6) · Surface: POST /admin/knowledge/ai/outline -> Admin\AdminAIController@wikiOutline · Dimension: dead-code · Severity: minor
The dedicated route POST /admin/knowledge/ai/outline -> AdminAIController::wikiOutline -> AdminAI::wikiOutline is an unused parallel code path. The wiki editor's outline button is wired to the generic mobieusAI dispatcher (/api/ai/dispatch via data-ai-feature="ai_wiki_outline"), which serves the same ai_wiki_outline key through Prompts/TextGenerator. The two siblings on the same route block (wikiStale, wikiSuggestEdits) still have callers, so only the outline route/handler/service-method are orphaned. The route is not broken (the method exists and runs), so this is a removal candidate, not a bug.
Evidence
Route exists and resolves to a real method (not broken), but has ZERO callers. The only references are the route registration and a docblock:
$ grep -rn "knowledge/ai/outline" platform/ www/
platform/src/routes.php:1638: $router->post('/knowledge/ai/outline', 'Admin\\AdminAIController@wikiOutline');
platform/src/Controllers/Admin/AdminAIController.php:17: * POST /admin/knowledge/ai/outline — #10
(no template/JS caller)
The wiki editor surfaces the outline feature through the GENERIC dispatcher instead, not this dedicated route:
platform/templates/knowledge/editor.php:91: data-ai-feature="ai_wiki_outline" data-ai-source="input[name=title]"
platform/public/js/ai-assist.js:250: return fetch('/api/ai/dispatch', { (per docblock line 23: "On click: read source value, POST to /api/ai/dispatch")
The dispatcher (AIAssistController::dispatch) resolves the feature via Prompts::get($key) + TextGenerator/TextRewriter and never calls AdminAIController::wikiOutline. The key IS served there:
platform/src/Services/AI/Prompts.php:236: 'ai_wiki_outline' => [
Reachability of the dead path: AdminAIController::wikiOutline is only reachable via the dead route, and the service it calls (AdminAI::wikiOutline, platform/src/Services/AI/AdminAI.php:44) is only called by that method:
$ grep -rn "AdminAI::wikiOutline|->wikiOutline|wikiOutline(" platform/src/
platform/src/Controllers/Admin/AdminAIController.php:57: public function wikiOutline(): void
platform/src/Controllers/Admin/AdminAIController.php:64: $this->json(AdminAI::wikiOutline($title, $brief));
platform/src/Services/AI/AdminAI.php:44: public static function wikiOutline(string $title, string $brief): array
NOT policy-disabled: ai_wiki_outline is absent from FeatureCatalog::POLICY_DISABLED (platform-admin/src/Domain/FeatureCatalog.php:51-91).
Contrast — the sibling AI routes ARE live (so this is not a whole-feature-off situation): wikiStale is called from platform/templates/admin/dashboard.php:297 ('/admin/knowledge/ai/stale') and wikiSuggestEdits from platform/templates/knowledge/editor.php:476 ('/admin/knowledge/.../ai/edits').
Suggested fix. Remove the dead path now that the generic dispatcher covers ai_wiki_outline: delete routes.php:1638, AdminAIController::wikiOutline (and its docblock entry), and AdminAI::wikiOutline if nothing else uses it. Verify wikiStale/wikiSuggestEdits remain (they have live callers). If instead the intent is to keep a dedicated admin endpoint, point the editor at it and drop the Prompts.php ai_wiki_outline dispatcher entry to avoid two implementations drifting.
Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.
Patrick Bass
@mobieus