Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

The package README documented API that no longer exists and was missing documentation for types and functions added in recent releases.

Changes

Fixed Examples

  • Replaced non-existent WithWorkDir with WithSearchPaths
  • Removed obsolete WithRemotePaths and WithEmitTaskFrontmatter options
  • Added new options: WithAgent, WithResume, WithUserPrompt, WithManifestURL
  • Updated frontmatter access from map-based to typed struct fields

Before:

ctx := codingcontext.New(
    codingcontext.WithWorkDir("."),
    codingcontext.WithRemotePaths([]string{"..."}),
)

After:

ctx := codingcontext.New(
    codingcontext.WithSearchPaths("file://.", "git::https://..."),
    codingcontext.WithAgent(codingcontext.AgentCursor),
    codingcontext.WithUserPrompt("Additional context"),
)

Added Missing Documentation

  • Types: Agent, TaskFrontMatter, RuleFrontMatter, CommandFrontMatter, BaseFrontMatter, MCPServerConfig, MCPServerConfigs, TransportType, task parser types
  • Functions: ParseTask, ParseParams, ParseAgent
  • Constants: Agent constants (AgentCursor, AgentOpenCode, etc.), TransportType constants, FreeText constants
  • Methods: (*Result).MCPServers(), methods on Params/Selectors/Agent types

Updated Type Signatures

  • Markdown is now generic: Markdown[T any] with type aliases TaskMarkdown and RuleMarkdown
  • ParseMarkdownFile signature changed to: ParseMarkdownFile[T any](path string, frontmatter *T) (Markdown[T], error)
  • Result struct now includes Tokens int and Agent Agent fields

Removed Obsolete Documentation

  • Functions: AllTaskSearchPaths, AllRulePaths
  • Options: WithWorkDir, WithRemotePaths, WithEmitTaskFrontmatter
  • Types: Generic FrontMatter map (replaced by structured types)
Original prompt

Review pkg/codingcontext/README.md and verify it is up-to-date.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 16, 2025 15:45
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Copilot AI changed the title [WIP] Verify pkg/codingcontext README.md is up to date Update pkg/codingcontext/README.md to reflect current API Dec 16, 2025
Copilot AI requested a review from alexec December 16, 2025 15:53
@alexec alexec marked this pull request as ready for review December 16, 2025 17:27
Copilot AI review requested due to automatic review settings December 16, 2025 17:27
Copy link
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 updates the pkg/codingcontext/README.md to accurately reflect the current API after several breaking changes. The documentation was outdated with references to removed functions and missing documentation for new types and methods.

Key changes:

  • Replaced obsolete API examples (WithWorkDir, WithRemotePaths) with current options (WithSearchPaths, WithAgent, WithUserPrompt, WithManifestURL)
  • Added comprehensive documentation for 15+ new types including Agent, frontmatter types, MCP server configs, and task parser types
  • Updated type signatures to reflect the generic Markdown[T] implementation

@alexec alexec merged commit 8c5685a into main Dec 16, 2025
1 check passed
@alexec alexec deleted the copilot/update-readme-file branch December 16, 2025 17:39
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.

2 participants