Skip to content

Add manifest URL support for centralized rule/task management#138

Merged
alexec merged 5 commits into
mainfrom
copilot/add-manifest-url-support
Dec 4, 2025
Merged

Add manifest URL support for centralized rule/task management#138
alexec merged 5 commits into
mainfrom
copilot/add-manifest-url-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 4, 2025

Enables loading rules and tasks from multiple remote locations via a manifest file, supporting centralized management of coding standards and task definitions across projects.

Changes

  • Used getter.GetFile() for manifest downloads: Downloads single manifest file correctly (not a directory structure)
  • Parse manifest before downloading search paths: Ensures paths from manifest are included in the download phase
  • Manifest format: Each line in the manifest file is treated as a search path (blank lines are not allowed)

Usage

# manifest.txt contains search paths (one per line, no blank lines)
git::https://github.com/company/coding-standards.git
file:///shared/team-rules

# Load rules/tasks from manifest locations
coding-context -m https://example.com/manifest.txt /task-name

Manifest supports all go-getter protocols: http://, https://, git::, s3::, file://.

Original prompt

Seems like the CLI needs to support manifest URL.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 4, 2025 17:21
- Use getter.GetFile() to download manifest files (not directories)
- Parse manifest file to get search paths (one per line)
- Download manifest before downloading other directories
- Add comprehensive test for manifest file functionality
- All existing tests pass

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
- Filter out empty lines from manifest file
- Use fmt.Sprintf for better readability in tests
- Add test for manifest files with empty lines
- Add fmt import to integration_test.go

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Add manifest URL support to CLI Add manifest URL support for centralized rule/task management Dec 4, 2025
Copilot AI requested a review from alexec December 4, 2025 17:26
Comment thread pkg/codingcontext/context.go Outdated
paths = append(paths, scanner.Text())
line := scanner.Text()
// Skip empty lines
if line != "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot blank lines are not allow, don't bother checking for them

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the empty line filtering in commit bd26f92. The manifest parser now includes all lines as-is.

Blank lines are not allowed in manifest files per the format specification, so we don't need to filter them out. Removed the empty line check and the associated test.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI requested a review from alexec December 4, 2025 17:40
@alexec alexec marked this pull request as ready for review December 4, 2025 18:22
Copilot AI review requested due to automatic review settings December 4, 2025 18:22
@alexec alexec enabled auto-merge (squash) December 4, 2025 18:22
@alexec alexec merged commit 6d0e3e9 into main Dec 4, 2025
5 checks passed
@alexec alexec deleted the copilot/add-manifest-url-support branch December 4, 2025 18:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for loading rules and tasks from remote locations specified in a manifest file, enabling centralized management of coding standards across projects. The key improvement is moving manifest parsing to occur before downloading remote directories, ensuring paths from the manifest are properly included in the download phase.

  • Manifest file is now parsed before downloading remote directories (not after)
  • Uses getter.GetFile() instead of getter.Get() for single-file manifest downloads
  • Includes integration test validating manifest-based rule/task loading

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/codingcontext/context.go Reorders manifest parsing before remote downloads; switches to GetFile() for manifest retrieval
integration_test.go Adds integration test for manifest file functionality with local and remote rules

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants