aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

(orchestration): Inject service-catalog metadata into context hydration

Aperta
#423 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement orchestration
Lingua principale
TypeScript
Stelle
143
Fork
46
Merge medio
3g 10h
PR unite (30g)
24

Descrizione

## Component

API or orchestration

## Describe the feature

Extend context hydration so onboarded repositories can attach **structured service metadata** (ownership, dependencies, data stores, environment boundaries, non-negotiable conventions) alongside code and `AGENTS.md` content. Metadata should be resolved at task start and injected into the assembled prompt within the existing token budget.

## Use case

Agents working in large or polyglot monorepos often guess at ownership, blast radius, dependencies, and conventions because the codebase alone does not encode them—internal developer portals and service catalogs exist precisely to answer “who owns this, what does it talk to, what is non-negotiable.” Hydration today pulls issue/PR content, memory, and repo-local rules, but not a **system-of-record view** of the service being changed. Reducing that guesswork improves first-pass PR quality and review trust.

## Proposed solution

1. Add optional Blueprint / `RepoConfig` fields for a **service catalog source** (initially: static JSON/YAML in-repo path such as `.abca/service.yaml`, or S3 object keyed by repo).
2. Extend `context-hydration.ts` to fetch, validate (schema), and render a compact **Service context** block (owner, dependents, data classification hints, required checks).
3. Document schema in `docs/design/REPO_ONBOARDING.md`; mirror types in `cli/src/types.ts`.
4. Fail-open: missing or invalid catalog data logs a warning and omits the block (consistent with memory fail-open).

## Other information

- Complements **Dynamic onboarding artifacts** on the roadmap (generated summaries) with operator-authored or IDP-exported truth.
- Distinct from memory: catalog entries are versioned with the repo, not learned episodically.
- Related roadmap: `Untrusted hydration content boundaries` — catalog text should be framed as reference data, not instructions.

## Acknowledgements

- [ ] I may be able to implement this feature
- [ ] This might be a breaking change

## Acceptance criteria

- [ ] Blueprint can reference an optional service-metadata source per repo.
- [ ] Hydrated prompt includes a bounded Service context section when configured.
- [ ] Invalid catalog files do not block task execution; warning is emitted to orchestrator logs and `TaskEvents`.
- [ ] JSON Schema (or equivalent) published under `docs/design/` and validated in unit tests.
- [ ] Colocated tests under `cdk/test/handlers/shared/context-hydration.test.ts` cover happy path, missing file, and malformed schema.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da cdk/.../context-hydration.ts e dalle definizioni di Blueprint/RepoConfig, quindi esamina cli/src/types.ts e docs/design/REPO_ONBOARDING.md. Esegui cdk/test/handlers/shared/context-hydration.test.ts prima di aggiungere la copertura per i dati di catalogo configurati, mancanti e malformati. Il lavoro è completato quando il contesto Service limitato viene iniettato se i dati sono validi, mentre i dati non validi registrano avvisi e non bloccano l’esecuzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, typescript
Ambito
api, backend, cloud
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.