To improve an agent's ability to quickly access context, we need a new tool, get_local_issue_by_id, that can retrieve a local issue's markdown file directly by its number.
This tool will provide a direct lookup mechanism, bypassing the need to manually browse the file system or parse the output of other tools. It should be intelligent enough to find the issue whether it is in the active ISSUES directory or recursively within the ISSUE_ARCHIVE directory.
Acceptance Criteria
- A new service,
LocalFileService.mjs, is created within the github-workflow server to handle local file system lookups.
- A method
getIssueById(issueNumber) is implemented in the new service.
- The method accepts an issue number as a string (e.g.,
"7608" or "#7608").
- The method uses configuration (
issueFilenamePrefix, issuesDir, archiveDir) to locate the file.
- If the file is found, the service returns a JSON object containing both the absolute
filePath and the file's content.
- If the file is not found, a structured
404 Not Found error is returned.
- A new endpoint,
GET /issues/{issue_number}/content, is added to openapi.yaml with the operationId: get_local_issue_by_id.
- A new schema,
LocalIssueResponse, is added to openapi.yaml to define the successful response object (filePath, content). The endpoint's 200 response must use this schema with an application/json content type.
- The new tool is registered in the
github-workflow/services/toolService.mjs.
To improve an agent's ability to quickly access context, we need a new tool,
get_local_issue_by_id, that can retrieve a local issue's markdown file directly by its number.This tool will provide a direct lookup mechanism, bypassing the need to manually browse the file system or parse the output of other tools. It should be intelligent enough to find the issue whether it is in the active
ISSUESdirectory or recursively within theISSUE_ARCHIVEdirectory.Acceptance Criteria
LocalFileService.mjs, is created within thegithub-workflowserver to handle local file system lookups.getIssueById(issueNumber)is implemented in the new service."7608"or"#7608").issueFilenamePrefix,issuesDir,archiveDir) to locate the file.filePathand the file'scontent.404 Not Founderror is returned.GET /issues/{issue_number}/content, is added toopenapi.yamlwith theoperationId: get_local_issue_by_id.LocalIssueResponse, is added toopenapi.yamlto define the successful response object (filePath,content). The endpoint's200response must use this schema with anapplication/jsoncontent type.github-workflow/services/toolService.mjs.