Skip to content

fix: address governance PR review feedback - #681

Closed
rafaelscosta wants to merge 6 commits into
mainfrom
chore/pr-678-governance-review-fixes
Closed

fix: address governance PR review feedback#681
rafaelscosta wants to merge 6 commits into
mainfrom
chore/pr-678-governance-review-fixes

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Supersedes #678.

Summary

  • Rebased the approved governance proposal work on current main.
  • Addressed review feedback around proposal status terminology, code fence languages, sibling proposal IDs, story dependency/status metadata, env var ordering, and CLAUDE ownership annotations.
  • Kept the original useful governance content while avoiding force-push on the contributor fork branch.

Validation

  • npm run lint -- --quiet
  • npm run typecheck
  • npm run validate:manifest
  • npm run validate:semantic-lint
  • npm run test:ci -- --silent

Notes

Summary by CodeRabbit

  • New Features

    • Expanded integration support: Added DeepSeek, OpenRouter, Exa, Context7, Supabase, ClickUp, n8n, Sentry, Railway, and Vercel configuration options.
  • Chores

    • Introduced formal governance framework for audit findings and evolution proposals.
    • Consolidated framework documentation and added comprehensive audit/governance structure.
    • Updated version to 2.2.0 and added Portuguese language support.

Alencaf and others added 5 commits May 7, 2026 19:55
…md ao atingir 5+

Estabelece regra operacional de governança de pipelines longos:

- Threshold: 5+ handoffs YAML para mesmo pipeline → MUST consolidar
- RUN-LOG.md vai em docs/stories/epics/{epic}/RUN-LOG.md (preferred)
- Handoff mais recente sempre fica individual (next session reads first)
- Originais arquivados em .aiox/handoffs/_archive/ (default)
- Preserva: contexto estratégico, ADRs, blockers resolvidos, schema changes
- Descarta: investigation steps, alternativas rejeitadas, tool sequences

Trigger desta sessão: pipeline meta-messaging Wave 1 → Wave 2 transition.
Mirror em business-ai-first/.claude/rules/handoff-consolidation.md (PR #59).

Atualiza CLAUDE.md (tabela de rules) com referência à nova regra.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
)

Establishes formal AIOX framework R&D pipeline triggered by Wave 1.A
correction in business-ai-first that exposed two systemic gaps:

1. No formal route for project-level audit findings to evolve framework
2. @aiox-master orchestrator has no triage.routing_matrix to consult
   specialized squads first when topic matches their domain

## What this PR adds

### audits/
- README.md — folder doctrine
- c-dev-organization-2026-05-07.md — narrative audit of C:/dev workspace
- promoted/AF-20260507-vocabulary-contract-failure.yaml — finding
- promoted/AF-20260507-aiox-master-routing-gap.yaml — finding

### governance/
- README.md — folder index
- evolution-pipeline.md — formal R&D pipeline spec (audit -> proposal -> Eliel approval -> PR)
- squad-activation-strategy.md — conditional consult-squad-first routing
- templates/audit-finding-tmpl.yaml — AuditFinding template
- templates/framework-proposal-tmpl.yaml — FrameworkProposal template
- proposals/README.md — proposal lifecycle doc
- proposals/PROP-20260507-vocabulary-contract.yaml — pending Eliel approval
- proposals/PROP-20260507-squad-routing-strategy.yaml — pending Eliel approval
- patterns/README.md — pattern catalog (catalog scaffold)

## Why this matters

Without the pipeline, every project re-discovers the same lessons,
voice-clone squads stay dormant, claude-code-mastery never gets invoked
from outside, and tokens burn on context redundancy. Eliel's diagnostic:
"todos os plans criados cogitaram em nenhum momento a perfeita
integração desses squads".

The pipeline is the discipline; the routing matrix is the mechanism.

## What this PR does NOT do (deferred to follow-up PRs after approval)

- Patch aiox-master.md to add triage block (separate PR per proposal approval)
- Add aiox-core/hooks/migration-dictionary-guard.cjs (separate PR)
- Add aiox-core/hooks/squad-suggestion-advisor.cjs (separate PR)
- Constitution amendment Article VII (separate PR)

This PR is governance-only. Implementation follows once Eliel signs the
two pending proposals.

## Authority

- Authors: @aiox-master (Orion) on Eliel's request
- Approver of governance content: Eliel (sole orchestrator approver)
- Reference: voice-clone formal opinions captured in business-ai-first
  ADR-DBOPS-V1-vocabulary-contract-failure.md

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Eliel approved both proposals on 2026-05-07T19:15:00Z:

- PROP-20260507-vocabulary-contract: APPROVED
  Closes Akita's Article VII gap. Generalizes migration-dictionary-guard
  hook from business-ai-first project-local copy to framework. Prevents
  Wave 1.A failure mode (V1 reverted) in any future AIOX project.

- PROP-20260507-squad-routing-strategy: APPROVED
  Adds triage.routing_matrix to @aiox-master. Advisory hook suggests
  squads (voice-clones, claude-code-mastery, audience-engine, db-inventory)
  by keyword match. Closes Eliel-declared squad integration gap.

Implementation order: vocabulary-contract first, then squad-routing
references Article VII once formalized.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment May 7, 2026 11:27pm

Request Review

@github-actions github-actions Bot added area: agents Agent system related area: workflows Workflow system related squad mcp type: test Test coverage and quality area: core Core framework (.aios-core/core/) area: installer Installer and setup (packages/installer/) area: synapse SYNAPSE context engine area: cli CLI tools (bin/, packages/aios-pro-cli/) area: pro Pro features (pro/) area: health-check Health check system area: docs Documentation (docs/) area: devops CI/CD, GitHub Actions (.github/) labels May 7, 2026
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR establishes the governance infrastructure for aiox-core framework evolution: a formal audit-to-proposal pipeline for converting consumer project findings into framework improvements, along with configuration updates, workspace management rules, and a squad activation routing strategy for intelligent agent consultation.

Changes

Framework Governance System

Layer / File(s) Summary
Governance Overview
governance/README.md
Documents governance scope, artifact catalog, repository layout, and authority roles (Eliel as approver).
Evolution Pipeline & Workflow
governance/evolution-pipeline.md, governance/templates/*
Defines formal audit → proposal → approval → PR → distribution pipeline with YAML schemas for AuditFinding and FrameworkProposal, decision flows, and worked Wave 1.A example.
Squad Activation Strategy
governance/squad-activation-strategy.md, .claude/rules/handoff-consolidation.md
Specifies conditional consult-first routing for orchestrator agents, squad inventory, routing matrix mappings, direct-answer domains, hook specification, and rollout plan; includes handoff consolidation rules (5+ threshold).
Framework Proposals
governance/proposals/PROP-20260507-squad-routing-strategy.yaml, governance/proposals/PROP-20260507-vocabulary-contract.yaml, governance/proposals/README.md
Concrete governance proposals implementing audit findings: Squad Activation Routing (triage matrix for @aiox-master) and Vocabulary Contract Store (data contract pattern for DB migrations), with proposal status taxonomy and authority rules.
Pattern Catalog
governance/patterns/README.md
Catalog structure for approved framework patterns with documentation requirements and governance authority process.

Audit & Finding Infrastructure

Layer / File(s) Summary
Audit System Structure
audits/README.md
Documents audits directory purpose, when to create narrative vs structured YAMLs, promotion authority, links to evolution pipeline.
Specific Audit Findings
audits/promoted/AF-20260507-aiox-master-routing-gap.yaml, audits/promoted/AF-20260507-vocabulary-contract-failure.yaml
Two critical framework-candidate findings with evidence, impact assessment, and proposed dispositions: missing squad routing in orchestrator agent and missing vocabulary contract pattern for DB migrations.
Workspace Audit Report
audits/c-dev-organization-2026-05-07.md
Complete C:/dev workspace audit with inventory snapshot, asset classification, relocation recommendations, proposed directory structure, decision matrix for Eliel, and follow-up runbook instructions.

Configuration, Rules & Workspace Setup

Layer / File(s) Summary
Agent Configuration & Language
.claude/CLAUDE.md, .claude/settings.json
Consolidates detailed framework docs into compact Portuguese-language instructions (agents, workflows, commands); adds language: "portuguese" setting.
Environment Template
.env.example
Restructures template from AIOX-focused to comprehensive integration config (DeepSeek, OpenRouter, Supabase, ClickUp, n8n, Sentry, Railway, Vercel) with AIOX_VERSION=2.2.0 and NODE_ENV=development defaults.
Bootstrap Story
.claude/commands/AIOX/stories/story-7.1.1.md
Story 7.1.1 documenting objective to clone aiox-dashboard into C:/dev with root convenience package.json, acceptance criteria, scope boundaries, dependencies, and expected artifacts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The PR introduces substantial governance structure and audit documentation (406 lines for evolution pipeline alone, 306 for squad activation strategy) with mixed complexity: governance templates and rules are straightforward documentation, but the squad activation routing matrix, proposal mechanics, and audit finding structures require careful verification that processes are coherent and operationally sound. Configuration and story changes are straightforward additions. Heterogeneous across governance/audit/config domains demands separate reasoning for each, but individual sections follow clear patterns.

Possibly related PRs

  • SynkraAI/aiox-core#641: Migrates Claude agent definitions into .claude/skills SKILL.md files, converts legacy .claude/commands/* agent files, adds codex bootstrap/sync scripts, and updates IDE-sync/doctor checks — provides complementary agent infrastructure that works alongside the governance audit system introduced here.

Suggested labels

type: docs, area: agents, area: workflows, area: governance, area: devops

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the PR's main objective: addressing governance review feedback on prior proposal work (PR #681), as confirmed by the PR summary and commit messages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/pr-678-governance-review-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/rules/handoff-consolidation.md:
- Line 19: The table row currently in Portuguese ("5+ recurrente | Reconsolidar
a cada 5 novos handoffs") must be converted to the same language as the rest of
the document; replace that exact row with an English equivalent such as "5+
recurring | Reconsolidate after every 5 new handoffs" so the threshold language
is consistent; update the string matching "5+ recurrente | Reconsolidar a cada 5
novos handoffs" accordingly in .claude/rules/handoff-consolidation.md.

In @.env.example:
- Line 47: Add a prominent security warning for SUPABASE_SERVICE_ROLE_KEY near
the variable declaration (the SUPABASE_SERVICE_ROLE_KEY entry) explaining that
it bypasses Postgres Row Level Security (RLS), grants unrestricted DB access,
and must never be committed to VCS or used in client-side code; update the
existing generic header (around the top comment) to call out this elevated risk
and recommend using SUPABASE_ANON_KEY for frontend and secrets management (e.g.,
environment/secret manager) for service role usage.

In `@audits/promoted/AF-20260507-vocabulary-contract-failure.yaml`:
- Line 56: The path in the commit message/diff contains a stray leading dot:
update the string ".aiox-core/constitution.md" to "aiox-core/constitution.md" so
it matches the other entry and standard non-hidden directory naming; locate the
occurrence in the diff line that reads 'Add Article VII (Vocabulary Contract) to
.aiox-core/constitution.md' and remove the leading period from the directory
segment.
- Line 50: The path entry uses a shell-style brace
"{fabio-akita,lucas-montano}.md" which is treated as a single YAML string;
replace it with two explicit entries so each persona has its own path (e.g.,
create separate list items with path:
"business-ai-first/squads/voice-clones/agents/fabio-akita.md" and path:
"business-ai-first/squads/voice-clones/agents/lucas-montano.md"), or if the
schema requires a single scalar per object, add a second top-level object
(duplicate the existing kind: voice-clone-personas block) with the other path;
update the "path" field(s) and/or duplicate the entry accordingly so the YAML
contains two real paths instead of a brace-expanded literal.

In `@governance/evolution-pipeline.md`:
- Around line 281-282: Replace the invalid "kind: voice-clone-opinions" entry
with one of the allowed taxonomy kinds from the templates so the example is
schema-valid; specifically locate the "kind: voice-clone-opinions" line (and its
associated path
"business-ai-first/squads/voice-clones/agents/{fabio-akita,lucas-montano}.md")
and change the kind value to a permitted kind name listed in the templates
(e.g., the appropriate opinions or agent-related kind) so the example conforms
to the documented schema.
- Around line 49-50: The docs reference the wrong approval field name: update
the "If APPROVED" bullet so it states the proposal is signed using the schema
field approval.eliel_decision (and include timestamp and rationale) instead of
eliel_approval; ensure any adjacent text that describes metadata/PR creation
reflects this exact field path so runtime code reading proposal metadata will
match the defined schema.

In `@governance/proposals/PROP-20260507-squad-routing-strategy.yaml`:
- Around line 73-75: The implementation block currently has an empty pr_url and
merged_at which breaks the decision→implementation trace; update the
implementation object by setting pr_url to the actual implementation PR URL (or
a clear token like "PENDING: <reason>" if the PR is not yet opened) and adjust
merged_at to either the merge timestamp once merged or leave it as an explicit
pending marker (e.g., "PENDING") so consumers of the PROP-... document can
unambiguously know the implementation status; modify the fields in the
implementation section (pr_url and merged_at) accordingly.

In `@governance/proposals/PROP-20260507-vocabulary-contract.yaml`:
- Around line 74-76: The proposal's implementation block is missing the
implementing PR link; update the implementation.pr_url field in
PROP-20260507-vocabulary-contract.yaml (and set implementation.merged_at when
the PR is merged) by adding the implementing pull request URL or the literal
"pending PR creation" to maintain an auditable approval→implementation trace;
ensure you edit the implementation.pr_url value (and later populate
implementation.merged_at with an ISO timestamp when merged).

In `@governance/squad-activation-strategy.md`:
- Around line 248-253: The hook spec is inconsistent: it labels the hook as
"PreToolUse" but states it "runs only on UserPromptSubmit"; decide which trigger
model is correct (either PreToolUse or UserPromptSubmit), update the Trigger
line to match the chosen model, and ensure any descriptive text (e.g., the
comment header "// PreToolUse hook" and the line "runs only on
UserPromptSubmit") and downstream references use the same term; verify the
Trigger: description ("any user message that contains squad-routing keywords")
and the Execution context/Mode remain correct for the selected trigger so
implementations wiring the PreToolUse or UserPromptSubmit hook will be
unambiguous.

In `@governance/templates/framework-proposal-tmpl.yaml`:
- Around line 20-23: The template comments for the fields layer, artifact_type,
and operation currently imply single-value enums; update them to explicitly
permit composite/multi-value syntax (e.g., "L1+L2", "create + modify") or pick a
single canonical approach — if allowing composites, change the inline comments
on the layer, artifact_type, and operation lines to state "single value or
'+'-separated list (e.g., 'L1+L2')" and give an example for operation like
"create + modify"; if standardizing to single values, update the template
comments to state "single value only" and remove any examples that show
composites. Ensure the changes are applied to the layer, artifact_type, and
operation comment lines so semantic validation rules can be implemented
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7f355e0d-f070-4ce2-868f-7f58d9069966

📥 Commits

Reviewing files that changed from the base of the PR and between e161b9b and b1044e5.

📒 Files selected for processing (18)
  • .claude/CLAUDE.md
  • .claude/commands/AIOX/stories/story-7.1.1.md
  • .claude/rules/handoff-consolidation.md
  • .claude/settings.json
  • .env.example
  • audits/README.md
  • audits/c-dev-organization-2026-05-07.md
  • audits/promoted/AF-20260507-aiox-master-routing-gap.yaml
  • audits/promoted/AF-20260507-vocabulary-contract-failure.yaml
  • governance/README.md
  • governance/evolution-pipeline.md
  • governance/patterns/README.md
  • governance/proposals/PROP-20260507-squad-routing-strategy.yaml
  • governance/proposals/PROP-20260507-vocabulary-contract.yaml
  • governance/proposals/README.md
  • governance/squad-activation-strategy.md
  • governance/templates/audit-finding-tmpl.yaml
  • governance/templates/framework-proposal-tmpl.yaml

|---|---|
| 1-4 | Keep as individual YAMLs |
| **5+** | **MUST consolidate** older handoffs into `RUN-LOG.md` |
| 5+ recurrente | Reconsolidar a cada 5 novos handoffs |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Standardize the threshold row language.

Line 19 switches to Portuguese (5+ recurrente | Reconsolidar a cada 5 novos handoffs) while the rest of the rule is in English. Keep this row in one language to avoid interpretation drift in governance enforcement.

🧰 Tools
🪛 LanguageTool

[grammar] ~19-~19: Ensure spelling is correct
Context: ...older handoffs into RUN-LOG.md | | 5+ recurrente | Reconsolidar a cada 5 novos handoffs ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~19-~19: Ensure spelling is correct
Context: ...s into RUN-LOG.md | | 5+ recurrente | Reconsolidar a cada 5 novos handoffs | ## Consolidation Pr...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/rules/handoff-consolidation.md at line 19, The table row currently
in Portuguese ("5+ recurrente | Reconsolidar a cada 5 novos handoffs") must be
converted to the same language as the rest of the document; replace that exact
row with an English equivalent such as "5+ recurring | Reconsolidate after every
5 new handoffs" so the threshold language is consistent; update the string
matching "5+ recurrente | Reconsolidar a cada 5 novos handoffs" accordingly in
.claude/rules/handoff-consolidation.md.

Comment thread .env.example
# Supabase (database, auth, storage)
# Get from your Supabase project settings
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add a security warning for SUPABASE_SERVICE_ROLE_KEY — it bypasses RLS entirely.

Unlike SUPABASE_ANON_KEY, the service role key skips every Postgres Row Level Security policy and has unrestricted database access. The generic header on line 5 ("DO NOT commit .env with real credentials") does not communicate this elevated risk, making it easy for a developer to set and forget without understanding the blast radius of a leak.

🛡️ Proposed addition
-SUPABASE_SERVICE_ROLE_KEY=
+# ⚠️  WARNING: This key bypasses ALL Row Level Security (RLS) policies.
+# Treat it like a root password — never expose it to browser or client code.
+SUPABASE_SERVICE_ROLE_KEY=
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.example at line 47, Add a prominent security warning for
SUPABASE_SERVICE_ROLE_KEY near the variable declaration (the
SUPABASE_SERVICE_ROLE_KEY entry) explaining that it bypasses Postgres Row Level
Security (RLS), grants unrestricted DB access, and must never be committed to
VCS or used in client-side code; update the existing generic header (around the
top comment) to call out this elevated risk and recommend using
SUPABASE_ANON_KEY for frontend and secrets management (e.g., environment/secret
manager) for service role usage.

- kind: hook
path: "business-ai-first/.claude/hooks/migration-dictionary-guard.cjs"
- kind: voice-clone-personas
path: "business-ai-first/squads/voice-clones/agents/{fabio-akita,lucas-montano}.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Shell brace expansion {fabio-akita,lucas-montano}.md is a literal YAML string, not two paths.

YAML does not expand shell braces, so this resolves to the single string "...agents/{fabio-akita,lucas-montano}.md" — a path that does not exist. Two separate list entries are needed.

🔧 Proposed fix
-      path: "business-ai-first/squads/voice-clones/agents/{fabio-akita,lucas-montano}.md"
+      path:
+        - "business-ai-first/squads/voice-clones/agents/fabio-akita.md"
+        - "business-ai-first/squads/voice-clones/agents/lucas-montano.md"

Note: if the schema enforces path as a scalar string, use two separate - kind: voice-clone-personas entries instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@audits/promoted/AF-20260507-vocabulary-contract-failure.yaml` at line 50, The
path entry uses a shell-style brace "{fabio-akita,lucas-montano}.md" which is
treated as a single YAML string; replace it with two explicit entries so each
persona has its own path (e.g., create separate list items with path:
"business-ai-first/squads/voice-clones/agents/fabio-akita.md" and path:
"business-ai-first/squads/voice-clones/agents/lucas-montano.md"), or if the
schema requires a single scalar per object, add a second top-level object
(duplicate the existing kind: voice-clone-personas block) with the other path;
update the "path" field(s) and/or duplicate the entry accordingly so the YAML
contains two real paths instead of a brace-expanded literal.


proposed_disposition:
- "Promote business-ai-first/.claude/hooks/migration-dictionary-guard.cjs → aiox-core/hooks/ as framework hook"
- "Add Article VII (Vocabulary Contract) to .aiox-core/constitution.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Likely typo: .aiox-core/ should be aiox-core/ (no leading dot).

Line 56 uses .aiox-core/constitution.md while line 57 correctly uses aiox-core/governance/.... A hidden directory name here would be non-standard and inconsistent.

✏️ Proposed fix
-    - "Add Article VII (Vocabulary Contract) to .aiox-core/constitution.md"
+    - "Add Article VII (Vocabulary Contract) to aiox-core/constitution.md"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- "Add Article VII (Vocabulary Contract) to .aiox-core/constitution.md"
- "Add Article VII (Vocabulary Contract) to aiox-core/constitution.md"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@audits/promoted/AF-20260507-vocabulary-contract-failure.yaml` at line 56, The
path in the commit message/diff contains a stray leading dot: update the string
".aiox-core/constitution.md" to "aiox-core/constitution.md" so it matches the
other entry and standard non-hidden directory naming; locate the occurrence in
the diff line that reads 'Add Article VII (Vocabulary Contract) to
.aiox-core/constitution.md' and remove the leading period from the directory
segment.

Comment on lines +49 to +50
- If APPROVED: signs the proposal with `eliel_approval` field + timestamp
- Approval triggers PR creation against `aiox-core`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix approval field name to match the actual schema.

Line 49 says proposals are signed with eliel_approval, but the defined schema uses approval.eliel_decision (+ timestamp/rationale). This mismatch can produce invalid proposal metadata during execution of the process.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@governance/evolution-pipeline.md` around lines 49 - 50, The docs reference
the wrong approval field name: update the "If APPROVED" bullet so it states the
proposal is signed using the schema field approval.eliel_decision (and include
timestamp and rationale) instead of eliel_approval; ensure any adjacent text
that describes metadata/PR creation reflects this exact field path so runtime
code reading proposal metadata will match the defined schema.

Comment on lines +281 to +282
- kind: voice-clone-opinions
path: "business-ai-first/squads/voice-clones/agents/{fabio-akita,lucas-montano}.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use a reference kind that exists in the allowed taxonomy.

The worked example uses kind: voice-clone-opinions, which does not match the allowed kinds documented in the templates. Please replace it with an allowed value to keep examples schema-valid.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@governance/evolution-pipeline.md` around lines 281 - 282, Replace the invalid
"kind: voice-clone-opinions" entry with one of the allowed taxonomy kinds from
the templates so the example is schema-valid; specifically locate the "kind:
voice-clone-opinions" line (and its associated path
"business-ai-first/squads/voice-clones/agents/{fabio-akita,lucas-montano}.md")
and change the kind value to a permitted kind name listed in the templates
(e.g., the appropriate opinions or agent-related kind) so the example conforms
to the documented schema.

Comment on lines +73 to +75
implementation:
pr_url: ""
merged_at: ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add the implementation PR URL after approval.

With approval already granted, leaving Line 74 blank breaks the expected governance chain from decision → implementation artifact. Please fill pr_url (or note explicit pending state).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@governance/proposals/PROP-20260507-squad-routing-strategy.yaml` around lines
73 - 75, The implementation block currently has an empty pr_url and merged_at
which breaks the decision→implementation trace; update the implementation object
by setting pr_url to the actual implementation PR URL (or a clear token like
"PENDING: <reason>" if the PR is not yet opened) and adjust merged_at to either
the merge timestamp once merged or leave it as an explicit pending marker (e.g.,
"PENDING") so consumers of the PROP-... document can unambiguously know the
implementation status; modify the fields in the implementation section (pr_url
and merged_at) accordingly.

Comment on lines +74 to +76
implementation:
pr_url: ""
merged_at: ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Populate implementation PR link for approved proposal traceability.

Since this proposal is already APPROVED, Line 75 should include the implementing PR URL (or explicitly mark “pending PR creation”) to keep the approval-to-implementation chain auditable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@governance/proposals/PROP-20260507-vocabulary-contract.yaml` around lines 74
- 76, The proposal's implementation block is missing the implementing PR link;
update the implementation.pr_url field in PROP-20260507-vocabulary-contract.yaml
(and set implementation.merged_at when the PR is merged) by adding the
implementing pull request URL or the literal "pending PR creation" to maintain
an auditable approval→implementation trace; ensure you edit the
implementation.pr_url value (and later populate implementation.merged_at with an
ISO timestamp when merged).

Comment on lines +248 to +253
// PreToolUse hook
// Trigger: any user message that contains squad-routing keywords
// Action: emit stderr advisory listing relevant squads
// Mode: advisory (does not block)
// Cost: ~1ms per check; runs only on UserPromptSubmit (not every tool call)
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Resolve the hook trigger contradiction.

Line 248 says this is a PreToolUse hook, but Line 252 says it runs only on UserPromptSubmit. Please pick one trigger model and keep the spec consistent, otherwise implementation can wire the hook incorrectly.

Proposed doc fix
-// PreToolUse hook
+// UserPromptSubmit hook
 // Trigger: any user message that contains squad-routing keywords
 // Action: emit stderr advisory listing relevant squads
 // Mode: advisory (does not block)
-// Cost: ~1ms per check; runs only on UserPromptSubmit (not every tool call)
+// Cost: ~1ms per check; runs only on UserPromptSubmit
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@governance/squad-activation-strategy.md` around lines 248 - 253, The hook
spec is inconsistent: it labels the hook as "PreToolUse" but states it "runs
only on UserPromptSubmit"; decide which trigger model is correct (either
PreToolUse or UserPromptSubmit), update the Trigger line to match the chosen
model, and ensure any descriptive text (e.g., the comment header "// PreToolUse
hook" and the line "runs only on UserPromptSubmit") and downstream references
use the same term; verify the Trigger: description ("any user message that
contains squad-routing keywords") and the Execution context/Mode remain correct
for the selected trigger so implementations wiring the PreToolUse or
UserPromptSubmit hook will be unambiguous.

Comment on lines +20 to +23
layer: "" # L1 (Core) | L2 (Templates) | L3 (Project Config)
artifact_type: "" # agent | rule | hook | task | template | governance | workflow
artifact_path: "" # intended path in aiox-core
operation: "" # create | modify | deprecate

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Align enum guidance with actual multi-value proposal usage.

Lines 20–23 currently imply single-value enums, but approved proposal files in this PR use composite values (e.g., L1+L2, create + modify). Please either (a) formally allow list/composite syntax in the template comments or (b) standardize proposals to strict single values, so semantic validation is unambiguous.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@governance/templates/framework-proposal-tmpl.yaml` around lines 20 - 23, The
template comments for the fields layer, artifact_type, and operation currently
imply single-value enums; update them to explicitly permit composite/multi-value
syntax (e.g., "L1+L2", "create + modify") or pick a single canonical approach —
if allowing composites, change the inline comments on the layer, artifact_type,
and operation lines to state "single value or '+'-separated list (e.g.,
'L1+L2')" and give an example for operation like "create + modify"; if
standardizing to single values, update the template comments to state "single
value only" and remove any examples that show composites. Ensure the changes are
applied to the layer, artifact_type, and operation comment lines so semantic
validation rules can be implemented accordingly.

@rafaelscosta

Copy link
Copy Markdown
Collaborator Author

Closed as superseded by #682, which carried the #678 governance proposal content plus the review fixes and was merged into main as fb312dd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Agent system related area: cli CLI tools (bin/, packages/aios-pro-cli/) area: core Core framework (.aios-core/core/) area: devops CI/CD, GitHub Actions (.github/) area: docs Documentation (docs/) area: health-check Health check system area: installer Installer and setup (packages/installer/) area: pro Pro features (pro/) area: synapse SYNAPSE context engine area: workflows Workflow system related mcp squad type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants