Skip to content

Track upstream integration foundation -- Stage 1 (804cd10) #18

@brianluby

Description

@brianluby

Summary

Track upstream commit 804cd10 (PR github#1925) -- Stage 1 of the "Agents to Integrations" architectural migration.

This is a deferred item. No action needed now, but worth tracking for future upstream convergence.

What it introduces

A new src/specify_cli/integrations/ package with:

  • IntegrationBase ABC and MarkdownIntegration base class -- each AI agent becomes a class instead of a config dict entry
  • IntegrationOption dataclass for per-integration CLI options
  • IntegrationManifest with SHA-256 hash-tracked install/uninstall -- enables safe removal that only deletes files the integration created (skips user modifications)
  • INTEGRATION_REGISTRY -- empty global dict, populated by later stages as integrations are migrated
  • 34 tests at 98% coverage across 9 test classes (~460 lines)

Current status

Why defer

  1. No feature or correctness value today -- the registry is empty and nothing calls into it
  2. The conceptual model references CommandRegistrar.AGENT_CONFIGS from agents.py, which our fork doesn't have (our CommandRegistrar is inline in extensions.py)
  3. Stage 2 is not yet merged upstream, so the full picture isn't clear

Why track

  1. Cherry-pick is mechanically clean (all new files, zero conflicts) -- can be brought in at any time
  2. If upstream merges Stage 2+, this becomes a prerequisite for staying in sync with the agent architecture
  3. Understanding the direction helps inform whether we should align our AGENT_CONFIG dict / CommandRegistrar structure

Files

File Lines Purpose
src/specify_cli/integrations/__init__.py +34 Registry + public API exports
src/specify_cli/integrations/base.py +215 IntegrationBase ABC, MarkdownIntegration, IntegrationOption
src/specify_cli/integrations/manifest.py +265 SHA-256 file tracking for safe install/uninstall
tests/test_integrations.py +460 34 tests, 98% coverage

Upstream reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    trackingTracking upstream changes for potential integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions