Skip to content

Add 3 generators: service-registry, module HISTORY, dashboard (0.4.10)#40

Merged
dilawarabbas1 merged 1 commit into
mainfrom
claude/push-code-dotagent-SloI4
May 20, 2026
Merged

Add 3 generators: service-registry, module HISTORY, dashboard (0.4.10)#40
dilawarabbas1 merged 1 commit into
mainfrom
claude/push-code-dotagent-SloI4

Conversation

@dilawarabbas1

Copy link
Copy Markdown
Owner

Summary

Three new generators fill the biggest gaps in dotagent's derived-files set. All re-render on dotagent sync, dotagent project regenerate, and the docs/-change auto-regen hook.

1. docs/service-registry.md (project-root)

Derived from .agent/git.yaml repos: block. Replaces hand-written registries that drifted out of sync with topology. Schema entry changed from KIND_FILEKIND_GENERATED; service-repo's inherited reference updated accordingly.

Service Path Default branch Role Remote
aigent-portal customer-portal/ main Customer UI git@...

2. .agent/project/modules/<id>/HISTORY.md (per module)

Cycle log — one block per cycle, newest first, with status badges:

  • ✓ Passed QA / ✗ Failed QA / ⏳ Contract frozen / ⏳ Dev handoff / 📝 Contract negotiation (N/M) / 🟢 In progress

Plus dates, sha, files-changed count (preview + truncate), QA rationale.

Answers "what's happened in this module?" without manually walking the cycles/ tree.

3. .agent/dashboard.md (project tier)

Five sections, single page:

  • 📜 Open contracts — modules with non-frozen-or-pending-QA cycles
  • 🧪 Pending QA — dev-handoff received, no QA result
  • ⏰ Stalled (>14d) — cycles with last activity older than threshold
  • 📅 Doc staleness (>60d) — canonical docs/*.md whose mtime is old
  • 📡 Recent activity — last 10 episodic events

Wiring — render/derived.py::regenerate_derived_files()

Fail-soft orchestrator with try/except per generator. Called from sync, project regenerate, and observe pre-commit. Safe to call from any state (no .agent / no git.yaml / no plan.yaml — each generator no-ops independently).

Test plan

  • tests/render/test_service_registry.py — 6 tests (empty / single repo / Aigent 3-repo / unset role / local remote / banner)
  • tests/render/test_module_history.py — 10 tests (placeholders / in-progress / passed QA / failed QA / newest-first / cross-module / blocked / FEAT links / contract round / files truncation)
  • tests/render/test_dashboard.py — 10 tests (empty zeros / open contract / closed-cycle exclusion / pending QA / stalled / fresh-not-stalled / doc staleness / fresh-doc-not-flagged / banner / empty activity)
  • tests/render/test_derived_regen.py — 6 integration tests (no-agent / bare / git.yaml only / plan.yaml only / idempotent / corrupt-yaml fail-soft)
  • Coverage gates still pass — new schema entries categorized & rendered.
  • Smoke-tested on Aigent 3-repo layout (portal + backend + admin).
  • Full suite: 636 passed, 2 skipped.

Docs

docs/DERIVED_FILES_DESIGN.md — design rationale, source-of-truth table, output guarantees (banners + rendered-at timestamps), schema integration, known limitations.

Version

0.4.9 → 0.4.10


Generated by Claude Code

Three new GENERATED files filling the biggest gaps in the project-tier
derived view:

### 1. docs/service-registry.md (project-root)
- New render/service_registry.py
- Derives a table (id, path, default_branch, role, remote) from
  .agent/git.yaml's repos: block. Replaces hand-written registries
  that drifted out of sync with actual topology.
- Schema entry changed from KIND_FILE to KIND_GENERATED.
- Inherited reference in service-repo schema also marked GENERATED.

### 2. .agent/project/modules/<id>/HISTORY.md (per module)
- New render/module_history.py
- Cycle log: one block per cycle, newest first, with status badge
  (passed QA / failed QA / contract frozen / dev handoff / negotiation
  round / in progress), dates, sha, files-changed count, QA rationale.
- Answers "what's happened in this module?" without manually walking
  the cycles/ tree.
- Schema entries added to project-root, single-repo, service-repo
  tiers (CAT_CONTRACTS).

### 3. .agent/dashboard.md (project-tier)
- New render/dashboard.py
- Five sections: open contracts, pending QA, stalled (>14d),
  doc staleness (>60d on canonical docs/*.md), recent activity (last
  10 episodic events).
- Pure derived view; owns no state. Replaces the missing single-page
  "is anything on fire?" answer.
- Schema entries added to project-root + single-repo;
  service-repo inherits via ../.agent/dashboard.md.

### Wiring
- New render/derived.py::regenerate_derived_files() orchestrator with
  fail-soft per-generator error handling (one failure never blocks
  the others; failures land in .agent/log/).
- Called from:
  · dotagent sync (after adapter regen)
  · dotagent project regenerate (after SCOPE/CONTRACTS/brief)
  · dotagent observe pre-commit (when docs/*.md changes, alongside
    the existing adapter auto-regen)

### Tests (32 new)
- tests/render/test_service_registry.py — 6 tests
- tests/render/test_module_history.py — 10 tests
- tests/render/test_dashboard.py — 10 tests
- tests/render/test_derived_regen.py — 6 integration tests
  (no-agent-dir / bare / git.yaml only / plan.yaml only / idempotent /
  corrupt-yaml fail-soft)

Plus test_service_repo_child.py picks up ../.agent/dashboard.md as
a new inherited path.

### Docs
- docs/DERIVED_FILES_DESIGN.md — design rationale, source-of-truth
  table, output guarantees (banners + rendered-at), schema
  integration, known limitations.

Smoke-tested on the Aigent 3-repo layout (portal + backend + admin).
Full suite: 636 passed, 2 skipped.
@dilawarabbas1 dilawarabbas1 merged commit 1945961 into main May 20, 2026
0 of 2 checks passed
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