Skip to content

[OpenSpec] ai-agents-knowledge-and-run-trace #967

Open

Description

@github-actions

⚠️ OpenSpec-managed issue — this content is automatically synced
from the openspec/ directory. Manual edits will be overwritten on next sync.

Artifacts

Specs

Tasks

  • T01: Add "Agents" to the actions menu in src/components/ApplicationDetailActions.vue beside "Automations", pushing the Agents route with ?app=, and preselect that app in src/views/AgentsPage.vue from the query (REQ-BQAG-003). Verify: vitest tests/components/AgentsPage.spec.js case for a preselected app, and a case in tests/components/ApplicationDetailActionsAutomations.spec.js for the new action; extend tests/e2e/agents.spec.ts to reach the page from an app.
  • T02: Add knowledge[] to Agent in lib/Settings/register.d/70-agent-workspace.json and bump it to 1.1.0 (REQ-BQAG-001). Verify: PHPUnit on the register import accepting an agent with knowledge.
  • T03: Add the "Knowledge" section to src/dialogs/AgentEditDialog.vue, uploading to the agent object's files, with the type list and the 40,000 character budget (REQ-BQAG-001). Verify: vitest tests/dialogs/AgentEditDialog.spec.js cases for add, remove and a refusal over budget.
  • T04: Read the agent's knowledge into the plan prompt through CopilotPromptBuilder and record the file names used (REQ-BQAG-002). Verify: PHPUnit cases in tests/Unit/Service/CopilotServiceTest.php for prompt order and a caller without app access.
  • T05: Return a step record from every call through CopilotTextTask, collect them per turn and cache them under a traceId returned with the plan, keyed by agent and user (REQ-BQAG-004). Verify: PHPUnit tests/Unit/Service/Copilot/CopilotTextTaskTest.php for the step shape and the 20,000 character cap.
  • T06: Add modelSteps[], knowledgeUsed[], durationMs and traceMissing to AgentRun (1.1.0), and have AgentRunLogger::log() attach the cached steps, or store them directly for a rejected plan (REQ-BQAG-004). Verify: tests/Unit/Service/AgentRunLoggerTest.php cases for attached steps, an expired trace and a trace of another user.
  • T07: Show the model steps and knowledge used in src/components/agents/AgentRunHistory.vue above the tool calls (REQ-BQAG-005). Verify: vitest tests/components/AgentRunHistory.spec.js for a run with a repair and a run with traceMissing.
  • T08: When OpenRegister publishes its vector facade, switch D2 from whole files to ranked passages and drop the budget refusal (REQ-BQAG-002). Verify: PHPUnit case with a knowledge set larger than the budget.
  • T09: Strings and docs: English and Dutch for "Agents", "Knowledge", the budget message and the step labels (l10n/en.json, l10n/nl.json), and a page in docs/ on giving an agent knowledge and reading its runs.
  • T10: Run openspec validate ai-agents-knowledge-and-run-trace --strict. Valid, 2026-11-17.

Design

See design.md for technical design details.


Synced from openspec/changes/ai-agents-knowledge-and-run-trace by OpenSpec workflow
App: buildiq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions