feat: integrate Consensus API evidence engine, pre-response QA gate, and BYOK settings - #89
Merged
Merged
Conversation
Owner
Author
PR Review Findings & VerificationReviewed the diff across all 33 files via
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates Consensus API into idstack as a cache-first evidence engine that provides live peer-reviewed literature grounding, an automated pre-response Evidence QA Gate, Bring Your Own Key (BYOK) support, and persistent zero-waste caching across both Claude Code skills and the Chrome Extension.
File-by-File Changes
bin/idstack-consensus: Standalone zero-dependency Python 3.9+ CLI implementing status, configure, query, verify, and sync subcommands with persistent hash caching at~/.idstack/cache/consensus/.bin/idstack-doctor: Added section 5 verifyingbin/idstack-consensusexecutable state, API key status, and cached query count.docs/superpowers/specs/2026-09-12-consensus-evidence-integration-design.md: Approved design specification.docs/superpowers/plans/2026-09-12-consensus-evidence-integration.md: Implementation plan executed via subagents.extension/manifest.json: Addedhttps://api.consensus.app/*tohost_permissions.extension/background/service-worker.js: Integrated background Consensus verification pass intoRUN_AUDITandCRAWL_AND_AUDIT_COURSE.extension/shared/consensus-client.js: Browser ES Module client for Consensus queries, neuromyth auto-correction, andchrome.storage.localcaching.extension/shared/consensus-client.cjs: CommonJS companion for test runners matching browser ESM logic.extension/shared/storage.js: AddedconsensusApiKeytogetSettings().extension/sidepanel/index.html: Added#consensus-api-key-inputBYOK field in the Settings drawer.extension/sidepanel/sidepanel.js: Handled loading and savingconsensusApiKeyin settings.extension/sidepanel/sidepanel.css: Added styles for.consensus-badgeand DOI anchor links conforming toDESIGN.md.extension/sidepanel/renderer-helper.js: Rendered.consensus-badgeand converted citations to clickable DOI links.extension/sidepanel/renderer-helper.cjs: CommonJS mirror of renderer logic for Node test runner.templates/preamble.md: Added Consensus status check in the shared skill preamble.skills/course-quality-review/SKILL.md.tmpl: Added pre-manifest Evidence QA Gate usingbin/idstack-consensus verify.skills/assessment-design/SKILL.md.tmpl: Added Evidence QA Gate for assessment findings.skills/red-team/SKILL.md.tmpl: Added Evidence QA Gate for adversarial findings.skills/accessibility-review/SKILL.md: Regenerated with Consensus evidence preamble.skills/assessment-design/SKILL.md: Regenerated with Consensus evidence preamble and QA gate.skills/course-builder/SKILL.md: Regenerated with Consensus evidence preamble.skills/course-export/SKILL.md: Regenerated with Consensus evidence preamble.skills/course-import/SKILL.md: Regenerated with Consensus evidence preamble.skills/course-quality-review/SKILL.md: Regenerated with Consensus evidence preamble and QA gate.skills/learn/SKILL.md: Regenerated with Consensus evidence preamble.skills/learning-objectives/SKILL.md: Regenerated with Consensus evidence preamble.skills/needs-analysis/SKILL.md: Regenerated with Consensus evidence preamble.skills/pipeline/SKILL.md: Regenerated with Consensus evidence preamble.skills/red-team/SKILL.md: Regenerated with Consensus evidence preamble and QA gate.test/test-consensus-cli.py: 22 unit tests for CLI caching, neuromyth auto-correction, tier calibration, and sync.test/test-consensus-extension.js: 6 unit tests for extension client caching and fallbacks.test/test-sidepanel-logic.js: Added Test 9 verifying consensus badge and DOI link rendering.test/smoke-test.sh: Wired Consensus CLI and extension tests into primary smoke test runner and updated CLI leak exclusion.What Could Break
references.mdcatalog without errors.try/catchblocks with local cache fallbacks and timeout guards.