Skip to content

feat(packet): alternatives+trap guidance in analysis packet; honest failure_count contract#18

Merged
hannsxpeter merged 2 commits into
mainfrom
codex/adhd-analysis-packet
Jul 23, 2026
Merged

feat(packet): alternatives+trap guidance in analysis packet; honest failure_count contract#18
hannsxpeter merged 2 commits into
mainfrom
codex/adhd-analysis-packet

Conversation

@hannsxpeter

Copy link
Copy Markdown
Owner

What

Implements the actionable outcome of an evaluation of the ADHD skill (github.com/UditAkhourii/adhd), a parallel-divergent-frames-then-critic pattern.

1. Analysis prompt packet now carries hard-to-reverse guidance (both runtimes).
The failure and review packets already ask for 2-3 labeled approaches with tradeoffs. This mirrors that into the analysis packet and adds a trap clause (name the one that looks good but is not and why), so planning surfaces flag a seductive-but-broken option before committing.

  • scripts/mythify_router.py build_analysis_prompt_packet
  • mcp-server/src/workflow-tools.js mirror, folded onto an existing lines.push so the file stays at its 1500 non-blank line ceiling
  • test assertion added in tests/test_mythify.py

2. Honest escalation.evidence_source contract.
Changed executed_verification_failure_count to host_supplied_executed_verification_failure_count in both mirrored model-capabilities.json copies. Nothing auto-derives that count; requested_failure_count reads only --failure-count / MYTHIFY_FAILURE_COUNT, so the old value overstated an automatic source.

Why not more

The divergence primitive already exists (fanout_start is ADHD Phase 1). The real gap was planning content and a recorded choice, not new machinery. A mythify diverge command, a .mythify/ideas state family, ADHD's numeric scoring in state, and an adhd-agent dependency were all considered and rejected; rationale is recorded in .mythify durable state (decision adhd-leverage-decision plus three lessons).

Verification

All executed locally, green:

  • python -m unittest discover -s tests -> 345/345
  • mcp-server npm test -> 180/180
  • python -m unittest tests.test_interop -> 12/12
  • check_surface_manifest.mjs, check_classification_rules_manifest.mjs
  • check_runtime_source_size.py (workflow-tools.js held at 1500/1500)
  • build_variants.py and build_registry_docs.mjs produce no diff

An independent codex gpt-5.6-sol (xhigh) read-only review confirmed the fold is formatter-safe and the evidence_source change is limited to the two JSON copies.

🤖 Generated with Claude Code

…nalysis packet

Mirror the alternatives guidance the failure and review prompt packets
already carry into the analysis packet, in both the Python and Node
runtimes, and name a trap so planning surfaces flag a seductive but
broken option before committing to one approach. Derived from evaluating
the ADHD skill (github.com/UditAkhourii/adhd): the divergence primitive
already exists as fanout_start, so the real gap was planning content and
recording the choice, not new machinery.

Also correct escalation.evidence_source in model-capabilities.json (both
mirrored copies) from executed_verification_failure_count to
host_supplied_executed_verification_failure_count. Nothing auto-derives
that count; requested_failure_count only reads --failure-count and
MYTHIFY_FAILURE_COUNT, so the old value overstated an automatic source.

The Node analysis packet line is folded onto an existing lines.push so
mcp-server/src/workflow-tools.js stays at its 1500 non-blank line ceiling.

Verified: python 345/345, node 180/180, interop 12/12, surface and rules
manifests, runtime size guard, and generated-file sync all green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

…rides

CI npm audit --audit-level=moderate was red on main and on this branch,
independent of the feature change:
  - fast-uri 3.1.3 (high, GHSA-v2hh-gcrm-f6hx)
  - @hono/node-server <2.0.5 (moderate, GHSA-frvp-7c67-39w9), transitive
    via @modelcontextprotocol/sdk

The latest SDK (1.29.0, already pinned) still depends on the vulnerable
@hono/node-server ^1.19.9, so there is no forward SDK bump. npm audit fix
--force would downgrade the SDK to 1.24.3 (breaking). Instead, pin the two
transitive packages to patched versions via overrides. Mythify uses only
StdioServerTransport, so the hono HTTP path is never exercised.

Verified: npm audit --audit-level=moderate reports 0 vulnerabilities,
npm ci clean, node 180/180, and the MCP server still lists 41 tools
matching protocol/surface-manifest.json.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@hannsxpeter
hannsxpeter merged commit c70fefd into main Jul 23, 2026
6 checks passed
@hannsxpeter
hannsxpeter deleted the codex/adhd-analysis-packet branch July 23, 2026 00:41
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