Files
meeting-assistant/openspec/specs/agent-project-tools/spec.md
T
codex 7ff93b73b3
PR and Push Build/Test / build-and-test (push) Failing after 6m36s
Make agent file writes append by default
2026-05-28 12:36:23 +02:00

75 lines
3.8 KiB
Markdown

# agent-project-tools Specification
## Purpose
TBD - created by archiving change define-meeting-assistant-v1. Update Purpose after archive.
## Requirements
### Requirement: Agents can use project context tools
Meeting Assistant SHALL expose tools that allow agents to look up project information, retrieve keyword-relevant context, and inspect meeting-derived knowledge.
Project tools SHALL treat each direct subfolder of the configured projects folder as one project. A meeting note binds projects by listing those subfolder names in the `projects` frontmatter field.
The summary agent SHALL expose these project tools:
- `list_projects`
- `list_projectfiles`
- `read_projectfile`
- `write_projectfile`
- `search`
#### Scenario: Agent looks up meeting project context
- **WHEN** a meeting note identifies a project
- **THEN** the agent can retrieve relevant project context through Meeting Assistant tools
#### Scenario: Agent lists projects bound to the meeting
- **WHEN** the meeting note frontmatter lists project folder names
- **THEN** `list_projects` returns the matching configured project subfolders
#### Scenario: Agent reads a clamped project file range
- **WHEN** the agent reads a project file with optional line bounds outside the file length
- **THEN** `read_projectfile` clamps the requested range to the available file lines without failing
#### Scenario: Agent searches project knowledge
- **WHEN** the agent calls `search` with ripgrep syntax keywords
- **THEN** Meeting Assistant runs the search against the requested projects or the meeting-bound projects and returns matches as `filename:line text`
### Requirement: Agents can write files in existing projects
Meeting Assistant SHALL expose a `write_projectfile` tool that can create or update files inside an existing project folder.
The target project SHALL be an existing direct subfolder of the configured projects folder. The target file path SHALL stay inside that project folder.
When no line edit arguments are supplied and `replace_file` is not true, `write_projectfile` SHALL append the supplied content to the file and SHALL create the file when it does not exist.
When `replace_file` is true, `write_projectfile` SHALL replace the whole file with the supplied content.
When both `from` and `to` are supplied, `write_projectfile` SHALL replace the inclusive 1-based line range with the supplied content.
When `insert` is supplied, `write_projectfile` SHALL insert the supplied content at that 1-based line position.
Meeting Assistant SHALL refuse ambiguous writes that combine `replace_file` with line edit arguments.
#### Scenario: Project file is appended or created
- **WHEN** the agent writes a project file without line edit arguments
- **THEN** Meeting Assistant appends the supplied content to an existing file
- **AND** creates the file with the supplied content when it does not exist
#### Scenario: Project file is explicitly replaced
- **WHEN** the agent writes a project file with `replace_file` set to true
- **THEN** Meeting Assistant writes the supplied content as the complete file content
#### Scenario: Project file line range is replaced
- **WHEN** the agent writes a project file with `from` and `to` line numbers
- **THEN** Meeting Assistant replaces the inclusive line range with the supplied content
#### Scenario: Project file content is inserted
- **WHEN** the agent writes a project file with an `insert` line number
- **THEN** Meeting Assistant inserts the supplied content at that line position
#### Scenario: Project file write target is invalid
- **WHEN** the target project is missing or the target path escapes the project folder
- **THEN** Meeting Assistant refuses the project file write
#### Scenario: Project file write mode is ambiguous
- **WHEN** the agent combines `replace_file` with `from`, `to`, or `insert`
- **THEN** Meeting Assistant refuses the project file write