Skip to content

feat: adaptive learning engine + cross-layer validator + starter templates (v3.5.0)#4

Merged
bc1plainview merged 4 commits into
mainfrom
loop/adaptive-learning-engine
Mar 13, 2026
Merged

feat: adaptive learning engine + cross-layer validator + starter templates (v3.5.0)#4
bc1plainview merged 4 commits into
mainfrom
loop/adaptive-learning-engine

Conversation

@bc1plainview

Copy link
Copy Markdown
Owner

Summary

  • Pattern store (learning/patterns.yaml): Auto-extracts anti-patterns from retrospectives into structured YAML. Deduplicates, tracks occurrence counts, auto-promotes to knowledge slices at 3+ occurrences.
  • Agent performance scoring (learning/agent-scores.yaml): Rolling metrics per agent — success rate, cycles to pass, tokens consumed. Suggests model upgrades for underperformers after 5+ sessions.
  • Cross-layer validator (agents/cross-layer-validator.md): READ-ONLY agent that catches ABI-to-frontend mismatches, parameter type errors, contract address inconsistencies, and network config conflicts before the auditor runs.
  • OP-20 starter template (templates/starters/op20-token/): Complete contract + frontend scaffold for OP-20 tokens with customization manifest.
  • Orchestrator integration: Phase 4 Step 0 enhanced with 4-step learning consultation (patterns, scores, retrospectives, templates). New Step 2b.5 for cross-layer validation. Phase 6 calls extraction scripts.

New Files (12)

  • learning/patterns.yaml + learning/agent-scores.yaml
  • scripts/extract-patterns.sh + scripts/update-scores.sh
  • agents/cross-layer-validator.md + knowledge/slices/cross-layer-validation.md
  • templates/starters/op20-token/ (7 files)

Test plan

  • bash tests/plugin-tests.sh — 272/272 pass (37 new tests)
  • bash -n scripts/extract-patterns.sh — syntax valid
  • bash -n scripts/update-scores.sh — syntax valid
  • Cross-layer validator has all 5 required agent sections
  • All 3 hook scripts include validating phase
  • plugin.json version matches CHANGELOG
  • buidl.md references patterns.yaml, agent-scores.yaml, cross-layer-validator, starters

…layer validator, starter templates (v3.5.0)

Self-learning across sessions: patterns auto-extracted from retrospectives into
structured YAML store, agent performance scored with rolling metrics, cross-layer
validator catches ABI mismatches before audit, and OP-20 starter template
eliminates boilerplate for the most common project type.

272/272 tests pass.
… update README

- CRITICAL: Rewrite extract-patterns.sh and update-scores.sh to pass all
  variable data via sys.argv/sys.stdin instead of string interpolation into
  Python source code. Eliminates 3 code injection vectors.
- MAJOR: Create missing useToken.ts hook referenced by design.md and App.tsx.
- MAJOR: Fix cross-layer-validator Write tool contradiction (agent is READ-ONLY,
  now outputs report as text for orchestrator to save).
- MAJOR: Wire up $OUTCOME parameter in update-scores.sh as fallback for
  ambiguous agent statuses.
- MAJOR: Update README.md for v3.5.0 (adaptive learning, cross-layer validator,
  starter templates, 12 agents, 272 tests, 26 categories).
- MINOR: Add cross-layer-validator to agent-scores.yaml.
- MINOR: Remove unused Selector import from contract template.
- NIT: Replace "latest" with "^1.0.0" in frontend template package.json.
…eferred scope

- Fix pipefail crash: add || true to grep pipelines in extract-patterns.sh so
  missing sections don't cause script exit before the empty-check guard
- Implement actual knowledge slice promotion: patterns with 3+ occurrences now
  append to the relevant knowledge/slices/*.md file with [LEARNED] tag
- Add 200-pattern cap with pruning (lowest frequency + oldest first)
- Mark US-6 (score-based routing) and US-8 (project-type profiles) as explicitly
  deferred to v3.6 in CHANGELOG — user scoped this PR to items 1-4 only
- Add loop-explorer and loop-researcher to agent-scores.yaml
- Comment out unused React imports in App.tsx template
- Fix template.yaml: "@rc tags" -> "semver ranges"
…import

- Remove duplicate case block in extract-patterns.sh that used unset $CATEGORY
  variable (would crash under set -u). Keep only the correct
  $CATEGORY_FOR_SLICE lookup.
- Remove unused Map import from contract template.
@bc1plainview bc1plainview merged commit 30c4579 into main Mar 13, 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