Skip to content

Conversation

@jeremyeder
Copy link
Collaborator

draft for discussion. I think we would also want to add something in claude.md that points to this agent. we also need to centralize logic. Should ewe move out of claude.md "entirely", and into an agent(s)?

jeremyeder and others added 5 commits November 16, 2025 23:14
Introduces Amber, THE AI expert colleague for github.com/ambient-code/platform:

OPERATING MODES:
1. Interactive Consultation - On-demand via UI or @amber mentions
2. Background Agent - Autonomous issue-to-PR workflows, backlog reduction
3. Sprint Planning - Automated health checks and planning reports
4. Maintainer Mode - PR reviews and monitoring (Coming Soon)

KEY CAPABILITIES:
- Deep ACP platform knowledge (architecture, patterns, dependencies)
- Issue-to-PR automation: triage, auto-fix, create PRs autonomously
- Proactive maintenance: catches breaking changes before impact
- Daily dependency sync to stay current with codebase
- TodoWrite integration for plan visibility and user safety

SAFETY & TRUST:
- Acts like on-call engineer: responsive, reliable, responsible
- Shows plans before executing (TodoWrite)
- Provides rollback instructions in every PR
- Engineering-first honesty: correct answers over comfortable ones
- Confidence levels and risk assessments for all changes

CONSTITUTION COMPLIANCE:
- Absolute adherence to ACP Constitution v1.0.0
- Authority hierarchy: Constitution > CLAUDE.md > Agent > User
- Daily GitHub Actions validation with auto-issue filing
- Politely declines requests violating constitution principles

AUTOMATION:
- Daily GitHub Actions workflow with self-validation
- Constitution compliance checks on every dependency sync
- Webhook integration for issue triage (documented)
- Scheduled backlog reduction (documented)

FILES CHANGED:
- agents/amber.md (renamed from amber-codebase_colleague.md)
- docs/user-guide/working-with-amber.md (renamed from using-amber.md)
- .github/workflows/amber-dependency-sync.yml (daily + validation)
- scripts/sync-amber-dependencies.py (updated file references)
- mkdocs.yml (updated navigation)

Documentation: docs/user-guide/working-with-amber.md
Agent definition: agents/amber.md
Automation: scripts/sync-amber-dependencies.py + .github/workflows/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Adds 5 comprehensive Mermaid diagrams to visualize Amber's operating modes
with explicit human checkpoint annotations:

DIAGRAMS ADDED:

1. Interactive Consultation (User Guide)
   - Sequence diagram: User → UI → Amber workflow
   - Human checkpoints: Review response, decision to implement
   - Shows confidence levels (High/Medium/Low)

2. Background Agent Mode - Issue-to-PR (User Guide)
   - Sequence diagram: Webhook/CronJob → Triage → PR creation
   - Human checkpoints: Plan review (TodoWrite gate), PR review
   - Dual checkpoint system clearly marked
   - Escalation path for complex issues

3. Scheduled Health Checks / Sprint Planning (User Guide)
   - Sequence diagram: CronJob → Analysis → Report → Team review
   - Human checkpoints: Sprint plan review, accept/modify decision
   - Weekly cadence visualization

4. Webhook-Triggered Reactive Intelligence (User Guide)
   - Sequence diagram: Three GitHub event types (issue/PR/push)
   - Human checkpoints: All actions require human review/decision
   - "High signal, low noise" principle visualized
   - NEW SECTION added to user guide

5. Authority Hierarchy & Conflict Resolution (Agent Definition)
   - Flowchart: Constitution → CLAUDE.md → Implementation
   - Color-coded paths: red (decline), yellow (warn), green (implement)
   - Decision tree for handling user requests
   - Examples scenarios included

DESIGN STANDARDS:

- Human checkpoints: Red/pink highlighting with ⚠️ symbols
- Maximum 10 steps per diagram (simplicity)
- All decision branches have clear end states
- TodoWrite safety gates explicitly shown
- Color conventions for different outcomes

IMPLEMENTATION PLAN UPDATE:

- Added Phase 2.5: "Add Workflow Diagrams" to amber-implementation.md
- Includes verification commands and success criteria
- Complete checklist for diagram creation

FILES MODIFIED:
- docs/user-guide/working-with-amber.md (4 diagrams + new section)
- agents/amber.md (1 flowchart)
- docs/implementation-plans/amber-implementation.md (new Phase 2.5)

VERIFICATION:
- 5 Mermaid diagrams total (4 sequence + 1 flowchart)
- 9 human checkpoint markers (⚠️ HUMAN) in user guide
- All diagrams use simple, logical structures
- Versioned with documentation in Git

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
FIXES APPLIED:

1. Removed misleading timing reference
   - Deleted "Typical response time: 2-5 minutes" claim
   - Response times vary based on complexity

2. Updated to official Kubernetes images
   - Changed bitnami/kubectl:latest → registry.k8s.io/kubectl:latest
   - Uses official Kubernetes registry images (3 instances)

3. Fixed Background Agent Mode to be event-driven
   - Removed CronJob/scheduled trigger from Issue-to-PR workflow
   - Issue-to-PR is purely webhook-driven (GitHub events)
   - Simplified diagram to show single trigger path

4. Updated report storage to UI-accessible locations
   - Changed docs/amber-reports references to UI-accessible approaches
   - Health checks: "Store findings in session results (accessible via UI)"
   - Sprint plans: "Create PR with analysis (viewable in GitHub UI)"
   - Reports now accessible via:
     * PR descriptions in GitHub
     * AgenticSession status in ACP UI
   - Updated troubleshooting to use `gh pr list` instead of file paths

5. Fixed markdown list formatting
   - Added blank lines before all bulleted lists (4 Key Points sections)
   - Added blank line before Supported Events list
   - Improves markdown rendering and linting compliance

FILES MODIFIED:
- docs/user-guide/working-with-amber.md

IMPACT:
- More accurate documentation (no false timing claims)
- Better security posture (official images)
- Correct workflow representation (event-driven)
- Improved accessibility (reports in UI, not just files)
- Better markdown formatting (proper lists)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Configures MkDocs Material theme to use IBM Plex font family:
- IBM Plex Sans for body text and UI elements
- IBM Plex Mono for code blocks and inline code

IBM Plex is a modern, professional typeface designed by IBM that
provides excellent readability and a cohesive visual identity.

Fonts are loaded automatically from Google Fonts by Material theme.

FILES MODIFIED:
- mkdocs.yml (added font configuration to theme section)

TESTING:
Run `mkdocs serve` and verify fonts at http://127.0.0.1:8000

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated all documentation references from "vTeam" to "Ambient Code Platform" (or "ACP" acronym where appropriate) to align with the official product name.

CHANGES:
- mkdocs.yml: Updated site_name, site_url, repo_name, and repo_url
- docs/index.md: Updated git clone URLs and GitHub links
- docs/user-guide/: Updated all user-facing documentation
- docs/labs/: Updated lab exercises and examples
- docs/testing/: Updated e2e testing guide references
- docs/reference/: Updated API reference and support links
- Deployment guides: Updated GitHub App setup and runner docs

TECHNICAL NOTES:
- Technical artifacts (API groups, namespaces, image names) still use "vteam" for backward compatibility
- File paths and URLs in e2e tests kept as-is (implementation details)
- Repository URL changed: github.com/ambient-code/vTeam → github.com/ambient-code/platform

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@jeremyeder jeremyeder marked this pull request as ready for review November 17, 2025 20:34
- Ask permission before making potentially breaking changes
- Make it easy to understand and reverse your actions
- When uncertain, over-communicate rather than assume
- Be nice but never be a sycophant—this is software engineering, and we want the CORRECT ANSWER regardless of feelings
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an important behavior change for claude

@jeremyeder
Copy link
Collaborator Author

image

…ommendations

Implements 5 high-priority fixes from Claude Code review feedback:

CRITICAL FIXES:
- Constitution validation: Fix grep patterns with case-insensitive flags
  - "Test-Driven Development" pattern now matches actual content
  - "structured logging" case-insensitive match
  - "200K token" pattern aligned with file content
  - "conventional commit" case-insensitive for plural forms
- Langfuse version: Prioritize Python deps, remove "v" prefix
  - Fixes "vunknown" display issue
  - Now shows "Langfuse {version}" correctly
- Update dates: 2025-11-16 → 2025-11-17 across all files

ESSENTIAL UX FIXES:
- Authority hierarchy: Add 9 concrete examples to agents/amber.md
  - 3 constitution violation examples (decline responses)
  - 3 CLAUDE.md preference examples (warn responses)
  - 3 within-expertise examples (implement responses)
- TodoWrite safety gates: Document checkpoints in YAML examples
  - Annotate Issue-to-PR and Backlog workflows
  - Clarify when TodoWrite is required vs optional
  - Explain read-only workflows don't need checkpoints

FOLLOW-UP:
- Created issue ambient-code#341 for remaining 9 recommendations
- Deferred: Mermaid validation, error handling, permissions, etc.

FILES CHANGED:
- .github/workflows/amber-dependency-sync.yml (grep fixes)
- scripts/sync-amber-dependencies.py (Langfuse priority)
- agents/amber.md (examples + date)
- docs/user-guide/working-with-amber.md (safety gates + date)
- docs/implementation-plans/amber-implementation.md (dates)

VERIFICATION:
- All 5 constitution grep patterns pass
- Langfuse version displays correctly
- 0 old dates remaining, 7 new dates present
- markdownlint shows only pre-existing issues

Related: PR ambient-code#337, Issue ambient-code#341

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Claude Code Review

Summary

This PR introduces Amber, an AI colleague agent for the ACP platform codebase. The implementation is comprehensive with 3,163 additions across 16 files, introducing agent definitions, documentation, automated dependency syncing, and workflow diagrams. The work shows strong alignment with project standards and constitution compliance, with some areas needing attention before merge.

Overall Assessment: Strong implementation with critical and major issues that should be addressed before merge. The foundation is solid, but security, testing, and documentation gaps need resolution.


Issues by Severity

Critical Issues

1. Missing Tests for New Python Script (scripts/sync-amber-dependencies.py:343 lines)

  • Issue: Zero test coverage for dependency sync script with complex parsing logic
  • Risk: Parsing failures could silently corrupt Amber's knowledge
  • Impact: Constitution Principle IV violation (TDD mandatory)
  • Fix Required: Create tests/unit/test_sync_amber_dependencies.py with table-driven tests

2. GitHub Actions Workflow Permissions Too Broad (.github/workflows/amber-dependency-sync.yml:10-12)

  • Issue: contents:write + issues:write for automated bot commits directly to main
  • Risk: Compromised workflow could modify any file or create spam issues
  • Constitution Reference: Principle II (Least Privilege)
  • Fix Required: Change to PR-based workflow, use pull-requests:write instead

3. Workflow YAML Syntax Issues (.github/workflows/amber-dependency-sync.yml:57-58, 96)

  • Line 57-58: grep pattern missing closing brace
  • Line 96: Missing case-insensitive flag for conventional commit grep
  • Impact: Validation steps will produce false positives/negatives

4. Constitution Compliance Validation Logic Gaps (.github/workflows/amber-dependency-sync.yml:75-103)

  • Grep patterns don't match actual Amber content precisely
  • Will file false positive constitution violations as issues
  • Fix: Test validation script locally before merge

See full review details below for more issues and recommendations.

@github-actions
Copy link
Contributor

Detailed Review (Part 2/3)

Major Issues

5. Amber Agent Definition Extremely Long (agents/amber.md:607 lines)

  • Single file violates Component Modularity principle (Constitution V)
  • Recommendation: Consider splitting into core/capabilities/workflows
  • Not Blocking: Agent files may be exempt from 200-line limit

6. User Guide Documentation Gaps (docs/user-guide/working-with-amber.md)

  • Missing: Troubleshooting for common failure modes
  • Missing: Examples of bad vs good prompts for Amber
  • Missing: When NOT to use Amber
  • Missing: Escalation path when Amber declines requests
  • Fix Required: Add practical troubleshooting section

7. Dependency Sync Script Error Handling (scripts/sync-amber-dependencies.py:106-108)

  • Broad exception catch swallows all errors silently
  • Parsing failures return empty dict with no user feedback
  • Fix: Add specific exception handling

8. No Rollback Instructions for workflow changes

  • PR description lacks rollback steps for automated daily commits
  • Impact: Maintainers lack quick recovery path if workflow malfunctions
  • Fix: Add rollback section to PR description

9. Mermaid Diagrams Not Validated

  • PR includes 5 Mermaid diagrams with no syntax validation
  • Risk: Broken diagrams in MkDocs
  • Fix: Run mkdocs build --strict

10. Inconsistent Date References (docs/implementation-plans/amber-implementation.md:607)

  • Example uses 2025-11-17 but current date is 2025-11-18

Minor Issues

11. Over-Engineering in Authority Hierarchy (agents/amber.md:98-178)

  • 80 lines with flowchart and 12 examples adds cognitive load
  • Not Blocking: Comprehensive is acceptable

12. Redundant Constitution Sections (agents/amber.md:179-234)

  • 55 lines duplicated from CLAUDE.md
  • Not Blocking: Redundancy aids agent context

13-15. Other minor issues (see full review)

@github-actions
Copy link
Contributor

Positive Highlights & Recommendations (Part 3/3)

Positive Highlights

Exceptional Constitution Alignment

  • Authority hierarchy clearly defines Constitution as absolute
  • Embedded constitution compliance checks in daily automation
  • Safety principles align with on-call mentality

Comprehensive User Documentation

  • 707 lines of user guide with visual workflows
  • Clear Quick Start for new users

Smart Automation Design

  • Daily dependency sync keeps knowledge current
  • Auto-filing issues for violations
  • Self-validating workflows

Safety-First Approach

  • TodoWrite integration for plan visibility
  • Rollback instructions required
  • Confidence levels for transparency

Professional Implementation

  • Follows conventional commits
  • 1,258-line implementation plan
  • Validation scripts included

Mermaid Diagrams Enhance Understanding

  • 5 diagrams with human checkpoints
  • Color-coded decision paths

Recommendations

Before Merge (Required - P0/P1)

  1. Add tests for Python script
  2. Fix workflow security model (PR-based, not direct commits)
  3. Fix YAML validation patterns
  4. Add rollback documentation

Post-Merge (Recommended - P2/P3)

  1. Consider splitting agent definition if maintenance becomes difficult
  2. Enhance user guide with common patterns
  3. Extract validation script for reusability
  4. Track Amber metrics (auto-merge success rate, triage accuracy)

Constitution Compliance

  • ✅ Principle II (Security): Workflow uses least privilege (needs refinement)
  • ✅ Principle III (Type Safety): Explicit error handling
  • ⚠️ Principle IV (TDD): VIOLATION - Missing tests for sync script
  • ✅ Principle V (Modularity): Clear separation
  • ✅ Principle VI (Observability): Validation steps included
  • ✅ Principle VIII (Context Engineering): 200K token budget
  • ✅ Principle X (Commit Discipline): Conventional commits

Critical Violation: Principle IV requires TDD. Python script needs tests before merge.


Final Recommendation

Action: Request changes for critical issues 1-4, then merge.

Confidence: 85% - Strong implementation with fixable gaps

Estimated Fix Time: 3-4 hours

Rationale: Missing tests violate Constitution Principle IV (non-negotiable), workflow security needs hardening per Principle II.

@Gkrumbach07 Gkrumbach07 merged commit 8a4d5cd into ambient-code:main Nov 18, 2025
20 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.

3 participants