12 KiB
UseCaseCatalog
Register, analyse and explore git repos
Use Case Catalog
Repository Scoping
1. Scope
The Repository Scoping allows users to register Git repositories, analyze their contents, extract or maintain structured descriptions of their abilities, capabilities, features, evidence, and implementation locations, and make this information searchable through efficient interfaces and a web UI.
Core promise:
Register a repository. Understand what it can do. Inspect the evidence. Find what is useful.
2. Primary Actors
Repository Owner
Maintains a Git repository and wants it represented accurately in the registry.
Registry Curator
Reviews, improves, corrects, and approves extracted ability/capability/feature metadata.
Developer / Architect
Searches across registered repositories to find reusable functionality or understand system structure.
Agent / Automation
Uses API/CLI access to query repositories, capabilities, evidence, and implementation locations.
Viewer / Explorer
Uses the web UI to browse and inspect registered repositories.
3. Core Domain Objects
Repository
Ability
Capability
Feature
Evidence
Analysis Run
Registry Entry
Inspection View
Search Query
4. Use Case Overview
| ID | Use Case | Primary Actor |
|---|---|---|
| UC-01 | Register Git Repository | Repository Owner |
| UC-02 | Import Repository Metadata | System |
| UC-03 | Analyze Repository Structure | System |
| UC-04 | Extract Candidate Abilities | System / Agent |
| UC-05 | Extract Candidate Capabilities | System / Agent |
| UC-06 | Extract Candidate Features | System / Agent |
| UC-07 | Link Features to Code Locations | System |
| UC-08 | Attach Evidence to Capabilities | System / Curator |
| UC-09 | Review and Approve Analysis | Registry Curator |
| UC-10 | Search Repositories by Need | Developer / Architect |
| UC-11 | Inspect Repository Ability Map | Developer / Architect |
| UC-12 | Compare Repositories | Developer / Architect |
| UC-13 | Detect Capability Gaps | Architect / Agent |
| UC-14 | Expose Registry via API | Agent / Automation |
| UC-15 | Update Registry After Repo Change | System |
| UC-16 | Export Registry Entry | Repository Owner / Agent |
5. Detailed Use Cases
UC-01 — Register Git Repository
Goal
Add a Git repository to the registry.
Primary Actor
Repository Owner
Preconditions
The actor has a repository URL and access rights if the repo is private.
Main Flow
-
Actor opens “Register Repository”.
-
Actor enters Git URL.
-
Actor provides optional metadata:
- name
- description
- owner
- domain tags
- visibility
-
System validates access.
-
System creates a repository record.
-
System queues initial analysis.
Postconditions
Repository exists in the registry with status registered.
UC-02 — Import Repository Metadata
Goal
Collect basic metadata from the Git repository.
Primary Actor
System
Main Flow
-
System clones or accesses the repository.
-
System reads metadata files:
- README
- package manifests
- build files
- license
- docs
- existing registry metadata
-
System stores detected metadata.
-
System prepares repository for deeper analysis.
Postconditions
Repository has initial metadata and source snapshot reference.
UC-03 — Analyze Repository Structure
Goal
Create a structural map of the repository.
Primary Actor
System
Main Flow
- System detects language/frameworks.
- System identifies major folders and modules.
- System detects APIs, CLIs, services, tests, examples, docs.
- System stores structural findings.
- System generates a repository structure summary.
Output
Example:
languages:
- Python
interfaces:
- REST API
- CLI
tests:
- pytest
documentation:
- README.md
- docs/
UC-04 — Extract Candidate Abilities
Goal
Infer high-level usefulness from the repository.
Primary Actor
System / Agent
Main Flow
-
System analyzes README, docs, examples, names, and tests.
-
System proposes candidate abilities.
-
Each ability receives:
- name
- description
- confidence
- supporting sources
-
Candidate abilities are shown for review.
Example Output
abilities:
- name: Business Email Routing
confidence: 0.82
rationale: README and examples describe routing inbound messages.
UC-05 — Extract Candidate Capabilities
Goal
Identify bounded behaviors the repository provides.
Primary Actor
System / Agent
Main Flow
- System inspects APIs, modules, functions, tests, examples.
- System proposes capabilities.
- System links capabilities to abilities.
- System records confidence and source evidence.
Example
capabilities:
- name: Email Intent Classification
ability_refs:
- Business Email Routing
inputs:
- email subject
- email body
outputs:
- intent category
- confidence
UC-06 — Extract Candidate Features
Goal
Identify concrete exposed or implemented features.
Primary Actor
System / Agent
Main Flow
- System detects endpoints, commands, UI components, config options, public functions, modules.
- System creates candidate feature entries.
- System links features to capabilities.
- System records implementation locations.
Example
features:
- name: Classify Email Endpoint
type: REST endpoint
location: src/api/routes/classify.py
capability_refs:
- Email Intent Classification
UC-07 — Link Features to Code Locations
Goal
Make registry entries inspectable down to source code.
Primary Actor
System
Main Flow
- System identifies file paths and symbols.
- System links registry entries to code locations.
- UI exposes links from ability → capability → feature → source.
- Actor can inspect relevant files without browsing the whole repo.
Postconditions
Features and capabilities are traceable to implementation.
UC-08 — Attach Evidence to Capabilities
Goal
Support trust in capability claims.
Primary Actor
System / Curator
Main Flow
- System detects tests, examples, benchmarks, demos, docs.
- System proposes evidence links.
- Curator confirms or edits evidence.
- Evidence is attached to capabilities.
Evidence Types
unit test
integration test
example
demo
benchmark
documentation
production usage note
manual review
UC-09 — Review and Approve Analysis
Goal
Allow human correction before registry metadata becomes authoritative.
Primary Actor
Registry Curator
Main Flow
- Curator opens analysis results.
- Curator reviews proposed abilities, capabilities, features, and evidence.
- Curator accepts, edits, rejects, or merges entries.
- System saves approved registry entry.
- Repository status changes to
indexed.
Postconditions
Repository has a reviewed registry profile.
UC-10 — Search Repositories by Need
Goal
Find repositories using everyday language.
Primary Actor
Developer / Architect
Main Flow
-
Actor enters a query such as:
“I need something that can classify incoming customer emails.”
-
System maps query to possible abilities and capabilities.
-
System returns matching repositories.
-
Results show:
- matching ability
- matching capability
- confidence
- maturity
- evidence level
Postconditions
Actor can identify candidate repositories without knowing their names.
UC-11 — Inspect Repository Ability Map
Goal
Understand what a repository is useful for.
Primary Actor
Developer / Architect
Main Flow
-
Actor opens repository profile.
-
UI displays:
- repository summary
- abilities
- capabilities
- features
- evidence
- code links
-
Actor drills down from high-level ability to implementation details.
Key UI Concept
Ability
→ Capability
→ Feature
→ Code Location
→ Evidence
UC-12 — Compare Repositories
Goal
Compare multiple repositories by abilities, capabilities, maturity, and evidence.
Primary Actor
Developer / Architect
Main Flow
-
Actor selects two or more repositories.
-
System shows comparison matrix.
-
Actor compares:
- overlapping abilities
- unique capabilities
- maturity
- evidence quality
- interfaces
-
Actor identifies best fit or complementarity.
UC-13 — Detect Capability Gaps
Goal
Identify missing, weak, or unsupported capabilities.
Primary Actor
Architect / Agent
Main Flow
-
Actor defines desired ability or target capability map.
-
System compares desired map with registered repositories.
-
System reports:
- missing capabilities
- weakly evidenced capabilities
- duplicate capabilities
- abandoned repositories
- features without mapped capability
-
Actor uses results for planning.
Example Output
Gap: Document classification ability exists, but no repository provides benchmarked German-language evaluation.
UC-14 — Expose Registry via API
Goal
Allow agents and external tools to query the registry.
Primary Actor
Agent / Automation
Main Flow
-
Agent calls registry API.
-
API supports queries such as:
- find repositories by ability
- show capability details
- list features of repo
- retrieve evidence links
-
API returns structured JSON.
Example
GET /api/capabilities?query=email-routing
UC-15 — Update Registry After Repo Change
Goal
Keep registry entries aligned with repository changes.
Primary Actor
System
Main Flow
- System detects repository change.
- System runs incremental analysis.
- System compares old and new findings.
- System flags changed abilities/capabilities/features.
- Curator reviews differences.
- Registry entry is updated.
Postconditions
Registry reflects current repository state.
UC-16 — Export Registry Entry
Goal
Allow registry data to travel with the repository.
Primary Actor
Repository Owner / Agent
Main Flow
- Actor requests export.
- System generates
repo-abilities.yaml. - Actor commits file into repository.
- Future analyses can use it as a prior.
Output
/.well-known/repo-abilities.yaml
6. MVP Use Cases
For the first version, implement only these:
UC-01 Register Git Repository
UC-02 Import Repository Metadata
UC-03 Analyze Repository Structure
UC-04 Extract Candidate Abilities
UC-05 Extract Candidate Capabilities
UC-06 Extract Candidate Features
UC-09 Review and Approve Analysis
UC-10 Search Repositories by Need
UC-11 Inspect Repository Ability Map
Everything else can follow.
7. Core MVP User Journey
Register repo
↓
Analyze repo
↓
Review extracted ability/capability/feature map
↓
Publish registry profile
↓
Search and inspect repos through web UI/API
8. Product Principle
The registry should not merely answer:
“What files are in this repository?”
It should answer:
“What can this repository help me do, how does it do it, and where can I inspect the proof?”
xxx