Skip to content

feat(agent): conservative automatic node growth for discovery import - #6

Merged
simonperegrinvs merged 5 commits into
mainfrom
feat/auto-node-growth-v2
Feb 18, 2026
Merged

simonperegrinvs merged 5 commits into
mainfrom
feat/auto-node-growth-v2

Conversation

@simonperegrinvs

Copy link
Copy Markdown
Owner

Summary

  • add conservative automatic node growth to discovery import, including parent selection, confidence scoring, duplicate guards, and governance gate enforcement
  • keep reference import behavior intact while reporting node outcomes (nodesProposed, nodesCreated, nodeDuplicates, nodeRejected, nodeDetails, skipReasons)
  • wire new CLI controls for both agent discovery ingest --auto-import and agent discovery import
  • enable auto node growth in run-agent.sh only for real runs (RUN_MODE=real), with conservative defaults
  • update docs in CLI.md and README.md

Key Behavior Changes

  • imported discovery candidates can now create new nodes + implication edges when:
    • node growth is enabled
    • confidence passes conservative threshold
    • duplicate checks pass
    • governance publish gate allows creation
  • weak or missing scope uses fallback signals with stricter confidence requirements
  • zero-node runs remain successful but return structured skip reasons

CLI Additions

  • --auto-node-growth
  • --max-new-nodes <n>
  • --min-node-confidence <n>
  • --node-review-status <status>
  • --node-similarity-threshold <n>

Script Behavior

  • run-agent.sh now supports RUN_MODE=real|smoke
  • node growth flags are applied only in RUN_MODE=real

Tests

  • added/extended behavioral tests in src/agent/__tests__/discovery-import.test.ts for:
    • node creation success
    • low-confidence fallback skip
    • duplicate blocking
    • governance rejection
  • added CLI integration coverage in src/cli/commands/__tests__/agent-discovery-import-cli.test.ts
  • full suite pass: npm test (123 tests)

Validation

  • npm test passed
  • npm run lint passed with 2 pre-existing react-hooks warnings unrelated to this PR

@simonperegrinvs
simonperegrinvs merged commit d7ffcd8 into main Feb 18, 2026
1 check passed
@simonperegrinvs
simonperegrinvs deleted the feat/auto-node-growth-v2 branch February 18, 2026 14:48
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