Skip to content

feat: complexity-based doc triggers with fallback#31

Merged
montfort merged 1 commit intomainfrom
feat/complexity-based-doc-triggers
Apr 2, 2026
Merged

feat: complexity-based doc triggers with fallback#31
montfort merged 1 commit intomainfrom
feat/complexity-based-doc-triggers

Conversation

@montfort
Copy link
Copy Markdown
Contributor

@montfort montfort commented Apr 2, 2026

Summary

  • Replace the static ">20 lines of business logic" AILOG trigger with devtrail analyze --output json as the primary method across all governance docs, agent directives, and skills/workflows
  • Agents check summary.above_threshold > 0 in the JSON output to decide when to create AILOGs (default cognitive complexity threshold: 8)
  • The >20 lines heuristic is preserved as an explicit fallback when the DevTrail CLI is unavailable
  • Updated 18 files across governance, directives, skills, and docs in both EN and ES

Test plan

  • cargo test — all 22 tests pass
  • grep confirms no standalone ">20 lines" references remain in dist/ (only as fallback context)
  • grep confirms devtrail analyze appears consistently in all updated files
  • Manual review: verify markdown tables render correctly in GitHub

🤖 Generated with Claude Code

…back

Replace the static ">20 lines of business logic" heuristic with a
two-tier approach: agents now run `devtrail analyze --output json` on
changed files and create AILOGs when `summary.above_threshold > 0`.
The >20 lines rule is preserved as an explicit fallback when the CLI
is unavailable.

Updated 18 files across governance (AGENT-RULES, DEVTRAIL.md,
AI-GOVERNANCE-POLICY, QUICK-REFERENCE), agent directives (Claude,
Gemini, Copilot, Cursor), skills/workflows, and CLI-REFERENCE docs
in both EN and ES.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@montfort montfort merged commit ada5e82 into main Apr 2, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 2, 2026

CLA assistant check
All committers have signed the CLA.

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