chore: audit scripts, archive dead code, update CLAUDE.md#65
chore: audit scripts, archive dead code, update CLAUDE.md#65jeremylongshore merged 2 commits intomainfrom
Conversation
Scripts cleanup: - Archive 11 dead/superseded/migration scripts to scripts/archive/ - deploy_all_agents.sh (R4 violation - manual deploy) - smoke_test_bob_agent_engine_dev.py (superseded by run_agent_engine_dev_smoke.py) - smoke_test_agent_engine.py (superseded) - quick_deploy.py + deploy-agent-engine.yml (legacy deploy workflow) - migrate_agentcards_to_a2a.py, export_agentcards.py, refactor_to_lazy_app_pattern.py - check_live3_readiness.py, check_org_storage_readiness.py (orphaned) - run_a2a_tck_local.sh (scaffold-only), test_adk_knowledge.py - Archive 4 one-off directories: bucket_consolidation/, datahub_setup/, adk-docs-crawler/, knowledge_ingestion/ - Fix Makefile smoke-bob-agent-engine-dev target to use current script CLAUDE.md updates: - Version: v2.0.0 → v6.1.0 (matches latest git tag) - Add 3 missing pytest markers (e2e, smoke, contract) - Add 9 infrastructure directories to agent layout diagram - Update changelog with recent releases - Update last-modified date to 2026-02-19 24 active scripts remain, all referenced by Makefile or CI workflows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoArchive dead scripts and update documentation to v6.1.0
WalkthroughsDescription• Archived 15 dead/superseded scripts and directories to scripts/archive/ • Fixed Makefile smoke-bob-agent-engine-dev target to use current script • Updated CLAUDE.md version v2.0.0→v6.1.0 with infrastructure directories • Added 3 missing pytest markers: e2e, smoke, contract Diagramflowchart LR
A["Dead/Superseded Scripts"] -->|Archive| B["scripts/archive/"]
C["Makefile Target"] -->|Fix Path| D["run_agent_engine_dev_smoke.py"]
E["CLAUDE.md"] -->|Update Version| F["v6.1.0"]
E -->|Add Infrastructure Dirs| G["9 Agent Directories"]
E -->|Add Pytest Markers| H["e2e, smoke, contract"]
File Changes1. CLAUDE.md
|
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughUpdated documentation versioning and directory layout in CLAUDE.md; Makefile smoke target now calls a dedicated smoke script with an agent argument; release workflow adjusted how PREV version components are extracted using cut operations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary of ChangesHello @jeremylongshore, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances repository clarity and documentation accuracy. It systematically cleans up the Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is a great cleanup effort, archiving numerous outdated scripts and updating documentation to reflect the current state of the repository. The changes in CLAUDE.md and the Makefile are accurate and align with the goal of removing dead code. I've found one minor formatting issue in the directory layout diagram in CLAUDE.md that I've left a comment on. Overall, this is a valuable contribution to repository maintenance.
| shared_tools/ # Shared tool implementations | ||
| shared_contracts/ # JSON schemas for agent communication | ||
| ├── iam_index/ # Tier 3: Knowledge indexing | ||
| │ |
There was a problem hiding this comment.
The heredoc `<<EOF ... EOF` at line 103-105 broke YAML parsing because the unindented `EOF` terminator was interpreted as a YAML key. Replace with `cut -d. -f` to split version components, which avoids heredoc entirely. This was causing every release.yml run to fail with "workflow file issue". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| CLAUDE.md | Updated version from v2.0.0 to v6.1.0, added missing pytest markers (e2e, smoke, contract), expanded agent directory layout with 9 infrastructure directories, refreshed changelog |
| Makefile | Updated smoke-bob-agent-engine-dev target to use current script path (run_agent_engine_dev_smoke.py) |
| scripts/archive/smoke_test_agent_engine.py | Archived smoke test script, but still referenced by active workflow .github/workflows/deploy-containerized-dev.yml (lines 209, 226) |
| scripts/archive/smoke_test_bob_agent_engine_dev.py | Archived and replaced by run_agent_engine_dev_smoke.py, properly updated in Makefile |
Last reviewed commit: 235e618
Additional Comments (1)
The replacement script |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CLAUDE.md`:
- Around line 34-38: The CLAUDE.md file currently contains expanded
documentation (notably the "Current Status (v6.1.0)" block and the other
detailed update sections referenced in the review) which violates the
single-doc-folder rule; move the full detailed content from those sections into
appropriately named files under 000-docs/ (preserving headings and any
metadata), replace each moved block in CLAUDE.md with a concise pointer/summary
line that includes the version tag and a relative link to the new 000-docs/
file, and ensure any internal references or TOC entries are updated to point to
the new 000-docs/ locations so CLAUDE.md remains a brief index only.
In `@Makefile`:
- Around line 433-436: The Makefile target smoke-bob-agent-engine-dev currently
calls scripts/run_agent_engine_dev_smoke.py with an explicit --agent bob while
other related targets call the same script relying on its default; make the
usage consistent by either (A) adding --agent bob to all Makefile targets that
invoke scripts/run_agent_engine_dev_smoke.py so every target passes --agent
explicitly, or (B) removing --agent bob from the smoke-bob-agent-engine-dev
target so every invocation relies on the script default; update the
smoke-bob-agent-engine-dev target (and the other targets that call
run_agent_engine_dev_smoke.py) accordingly to match the chosen approach.
| **Current Status (v6.1.0):** | ||
| - **Version**: v6.1.0 | ||
| - **Deployment**: Infrastructure ready, Terraform + GitHub Actions for all deployments (R4 compliance) | ||
| - **New in v2.0.0**: Canonical agent IDs, enterprise controls, Mission Spec v1 | ||
| - **Key milestones**: Canonical agent IDs, enterprise controls, Mission Spec v1, testing harness, CI gates | ||
|
|
There was a problem hiding this comment.
R6 single-doc-folder rule: move detailed updates into 000-docs/ and keep CLAUDE.md as a pointer.
Lines 34-38, 240-252, 455-461, and 622-635 expand documentation content outside 000-docs/, which conflicts with the single-doc-folder rule. Please move the detailed content into 000-docs/ and keep this file as a brief pointer/index.
As per coding guidelines, “Keep all documentation in a single 000-docs/ folder - do not scatter documentation across README.md, wiki/, agent subdirectories, or other locations (R6 Hard Mode Rule)”.
Also applies to: 240-252, 455-461, 622-635
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CLAUDE.md` around lines 34 - 38, The CLAUDE.md file currently contains
expanded documentation (notably the "Current Status (v6.1.0)" block and the
other detailed update sections referenced in the review) which violates the
single-doc-folder rule; move the full detailed content from those sections into
appropriately named files under 000-docs/ (preserving headings and any
metadata), replace each moved block in CLAUDE.md with a concise pointer/summary
line that includes the version tag and a relative link to the new 000-docs/
file, and ensure any internal references or TOC entries are updated to point to
the new 000-docs/ locations so CLAUDE.md remains a brief index only.
| smoke-bob-agent-engine-dev: ## Run dev smoke test against Bob's Agent Engine instance | ||
| @echo "$(BLUE)🚦 Running Bob Agent Engine dev smoke test...$(NC)" | ||
| @echo "$(YELLOW)ℹ️ Requires BOB_AGENT_ENGINE_NAME_DEV to be set after dev deployment$(NC)" | ||
| @$(PYTHON) -m scripts.smoke_test_bob_agent_engine_dev | ||
| @$(PYTHON) scripts/run_agent_engine_dev_smoke.py --agent bob |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the script exists and supports the --agent flag, and check other call sites.
fd -a 'run_agent_engine_dev_smoke.py'
echo "---"
rg -n -- '--agent|argparse|click|typer' scripts/run_agent_engine_dev_smoke.py
echo "---"
rg -n -- 'run_agent_engine_dev_smoke.py' Makefile scripts -g '!scripts/archive/**'Repository: intent-solutions-io/iam-bobs-brain
Length of output: 1119
🏁 Script executed:
sed -n '55,75p' scripts/run_agent_engine_dev_smoke.pyRepository: intent-solutions-io/iam-bobs-brain
Length of output: 669
Align --agent flag usage across targets for consistency.
The script supports --agent bob (default value is "bob"), so line 436 won't fail. However, targets at lines 378 and 383 rely on the implicit default while line 436 is explicit. For clarity and maintainability, either explicitly pass --agent bob to all targets or remove it from line 436 to rely consistently on defaults.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Makefile` around lines 433 - 436, The Makefile target
smoke-bob-agent-engine-dev currently calls scripts/run_agent_engine_dev_smoke.py
with an explicit --agent bob while other related targets call the same script
relying on its default; make the usage consistent by either (A) adding --agent
bob to all Makefile targets that invoke scripts/run_agent_engine_dev_smoke.py so
every target passes --agent explicitly, or (B) removing --agent bob from the
smoke-bob-agent-engine-dev target so every invocation relies on the script
default; update the smoke-bob-agent-engine-dev target (and the other targets
that call run_agent_engine_dev_smoke.py) accordingly to match the chosen
approach.
Code Review by Qodo
1. Smoke env vars inconsistent
|
| smoke-bob-agent-engine-dev: ## Run dev smoke test against Bob's Agent Engine instance | ||
| @echo "$(BLUE)🚦 Running Bob Agent Engine dev smoke test...$(NC)" | ||
| @echo "$(YELLOW)ℹ️ Requires BOB_AGENT_ENGINE_NAME_DEV to be set after dev deployment$(NC)" | ||
| @$(PYTHON) -m scripts.smoke_test_bob_agent_engine_dev | ||
| @$(PYTHON) scripts/run_agent_engine_dev_smoke.py --agent bob |
There was a problem hiding this comment.
1. Smoke env vars inconsistent 🐞 Bug ✓ Correctness
The Makefile target smoke-bob-agent-engine-dev still tells users to set BOB_AGENT_ENGINE_NAME_DEV, but it now runs run_agent_engine_dev_smoke.py which uses build_agent_config() and different env-var naming. The new smoke script also prints guidance to export AGENT_ENGINE_*_ID_DEV, while the config loader expects AGENT_ENGINE_*_DEV, making the smoke test appear “not configured” even after following documented setup.
Agent Prompt
### Issue description
`make smoke-bob-agent-engine-dev` now runs `scripts/run_agent_engine_dev_smoke.py`, but the Makefile and multiple docs still instruct setting `BOB_AGENT_ENGINE_NAME_DEV` (legacy full resource name). Additionally, `run_agent_engine_dev_smoke.py` prints guidance to set `AGENT_ENGINE_*_ID_DEV`, while `agents/config/agent_engine.py` actually reads `AGENT_ENGINE_*_DEV`.
### Issue Context
This creates a high-friction failure mode where users follow the printed/documented setup, but `build_agent_config()` returns `None` and the smoke test exits as “not configured”.
### Fix Focus Areas
- Makefile[433-436]
- scripts/run_agent_engine_dev_smoke.py[16-20]
- scripts/run_agent_engine_dev_smoke.py[121-137]
- agents/config/agent_engine.py[116-150]
- scripts/archive/smoke_test_bob_agent_engine_dev.py[12-17]
### Suggested approach
1) Update `agents/config/agent_engine.get_agent_engine_id()` to support both:
- `AGENT_ENGINE_{AGENT}_{ENV}` (current)
- `AGENT_ENGINE_{AGENT}_ID_{ENV}` (what the smoke script/docs print)
Optionally also parse legacy `BOB_AGENT_ENGINE_NAME_DEV` by extracting the trailing engine ID.
2) Update `run_agent_engine_dev_smoke.py` to print the *actual* supported env var names (and mention accepted fallbacks).
3) Update the Makefile echo line to match the new convention (or mention both conventions during transition).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
- CLAUDE.md: add separator comment between agent and infrastructure dirs in tree diagram (fixes misleading nesting visual) - Makefile: fix env var in smoke-bob-agent-engine-dev from legacy BOB_AGENT_ENGINE_NAME_DEV to correct AGENT_ENGINE_BOB_DEV; remove redundant --agent bob flag (bob is already the default) - run_agent_engine_dev_smoke.py: fix env var guidance from AGENT_ENGINE_*_ID_DEV to AGENT_ENGINE_*_DEV (matches what agents/config/agent_engine.py actually reads) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: add separator comment between agent and infrastructure dirs in tree diagram (fixes misleading nesting visual) - Makefile: fix env var in smoke-bob-agent-engine-dev from legacy BOB_AGENT_ENGINE_NAME_DEV to correct AGENT_ENGINE_BOB_DEV; remove redundant --agent bob flag (bob is already the default) - run_agent_engine_dev_smoke.py: fix env var guidance from AGENT_ENGINE_*_ID_DEV to AGENT_ENGINE_*_DEV (matches what agents/config/agent_engine.py actually reads) Co-authored-by: jeremylongshore <jeremy@intentsolutions.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
scripts/archive/smoke-bob-agent-engine-devtarget to use current scriptdeploy-agent-engine.ymlworkflow (replaced by inline deploy)Details
Scripts archived (no longer active):
deploy_all_agents.sh(manual deploy forbidden)smoke_test_bob_agent_engine_dev.py,smoke_test_agent_engine.py(replaced byrun_agent_engine_dev_smoke.py)quick_deploy.py+deploy-agent-engine.ymlmigrate_agentcards_to_a2a.py,export_agentcards.py,refactor_to_lazy_app_pattern.pycheck_live3_readiness.py,check_org_storage_readiness.pyrun_a2a_tck_local.sh,test_adk_knowledge.pybucket_consolidation/,datahub_setup/,adk-docs-crawler/,knowledge_ingestion/CLAUDE.md fixes:
e2e,smoke,contract24 active scripts remain, all verified as referenced by Makefile or CI workflows.
Test plan
make helpstill lists all expected targetsmake smoke-bob-agent-engine-devuses correct script path🤖 Generated with Claude Code
Summary by CodeRabbit