Skip to content

feat(D22-D25): Bedrock + Vertex AI parsers, governance utils, CLI updates, v0.3.0#19

Closed
ogkranthi wants to merge 4 commits into
mainfrom
agent/dev/D22-D25
Closed

feat(D22-D25): Bedrock + Vertex AI parsers, governance utils, CLI updates, v0.3.0#19
ogkranthi wants to merge 4 commits into
mainfrom
agent/dev/D22-D25

Conversation

@ogkranthi
Copy link
Copy Markdown
Owner

Summary

Week 7 implementation — v0.3.0 Governance + Cloud Parsers.

Tasks completed

D22 — AWS Bedrock parser (src/agentshift/parsers/bedrock.py)

  • Reads any combination of: bedrock-agent.json, cloudformation.yaml, instruction.txt, openapi.json, guardrail-config.json
  • Field precedence: bedrock-agent.json > cloudformation.yaml > instruction.txt
  • Maps to IR Persona with section extraction
  • Reconstructs tools from OpenAPI action-group schemas (falls back to CFN ActionGroups)
  • Extracts knowledge from AWS::Bedrock::KnowledgeBase CFN resources
  • Detects + strips AgentShift instruction truncation notice
  • Heuristic L1 guardrail classification from guardrail-config.json topic policies
  • Registered under bedrock format key

D23 — Vertex AI parser (src/agentshift/parsers/vertex.py)

  • Reads agent.json (required) + optional tools.json and README.md
  • Reconstructs system_prompt from goal + instructions fields
  • Recovers structured persona.sections from linearized "SectionName:\ncontent" patterns
  • Detects tool kind (function/openapi/data store); routes data store tools to ir.knowledge
  • Reconstructs ToolAuth from Vertex authentication blocks (API key, OAuth2, service account)
  • Heuristic L1 guardrail scan of instruction strings
  • Registered under vertex format key

Shared utilities (src/agentshift/parsers/utils.py)

  • slugify, title_case_to_slug, is_todo_placeholder
  • infer_guardrail_category, infer_guardrail_severity
  • extract_guardrails_from_text (used by both parsers)

D24 — CLI updates (src/agentshift/cli.py)

  • Added bedrock and vertex to _PARSERS registry
  • convert, diff, audit now support --from bedrock and --from vertex
  • Enhanced _parse_with_errors with parser-specific error hints

D25 — Version bump to 0.3.0

  • pyproject.toml version: 0.3.0
  • __init__.py __version__: 0.3.0
  • CHANGELOG.md: v0.3.0 section added
  • README.md: governance layer docs + cloud parser usage examples

Test results

All 782 existing tests pass — no regressions.

… experiments) + clean up duplicate files

- Add Governance, Guardrail, ToolPermission, PlatformAnnotation to IR model
- Add governance extraction to OpenClaw parser (SOUL.md + tool permissions + L3 annotations)
- Add elevation engine (elevate_governance) for L2/L3 → L1 promotion
- Add governance_audit module with GPR/CFS scoring, CSV/JSON export, Rich tables
- Add `agentshift audit` and `agentshift audit-batch` CLI commands
- Integrate elevation into claude_code + copilot emitters
- Add experiments/ directory with 12 domain agents for research paper
- Remove duplicate sections 2.py and persona-sections-schema 2.md
- Mark T13 as merged in BACKLOG.md
@ogkranthi
Copy link
Copy Markdown
Owner Author

Implementation cherry-picked to main directly (commit 44c01ab). D22-D25 merged.

@ogkranthi ogkranthi closed this Mar 30, 2026
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.

1 participant