Skip to content

PE hyperstack: one framework - personas auto-triggered, compiled from manifests - #133

Merged
KailasMahavarkar merged 1 commit into
mainfrom
f-PE-hyperstack-persona-autotrigger
Jul 18, 2026
Merged

PE hyperstack: one framework - personas auto-triggered, compiled from manifests#133
KailasMahavarkar merged 1 commit into
mainfrom
f-PE-hyperstack-persona-autotrigger

Conversation

@KailasMahavarkar

Copy link
Copy Markdown
Collaborator

Unifies MCP + skills + roles + personas into one declared Hyperstack framework, and makes personas AUTO-TRIGGER: the compiled bootstrap now carries the full trigger table generated from persona manifests, so hyper engages a persona the moment a trigger matches - the user never has to name it.

The sync problem this solves

personas/<id>/persona.json held engages_when triggers that never reached the runtime context; the bootstrap's persona bullets were hand-maintained prose in skills/hyperstack/SKILL.md - two sources, guaranteed drift, and no deterministic trigger list in front of the agent.

Before                                    After
──────────────────────────────────        ──────────────────────────────────────────
persona.json (triggers)  ──▸ nowhere      persona.json (id, mode, description,
SKILL.md hand bullets    ──▸ bootstrap        triggers) ──▸ compiler ──▸ bootstrap
   (drift between the two)                SKILL.md ──▸ pointer only (no duplication)

Proof of sync: a trigger appended to bro/persona.json appeared in the recompiled bootstrap with zero SKILL.md edits.

Changes

Piece Intent
context-compiler.ts compilePersonaLines() generates the Personas layer from loadPersonas() (injectable param keeps the function pure for tests); gates sorted first; markers extended (marketing, reflect, Triggers:)
Personas layer wording "auto-engaged by trigger, never waiting to be named"; acting defined (inspection/classification only pre-gate); PASS requires evidence - populated fields = NEEDS-INPUT; net-new vs tweak boundary
skills/hyperstack/SKILL.md critical block: ONE framework, four layers; 1% Rule covers persona triggers; Persona Registry section becomes a pointer to the manifests
persona.schema.json + 4 manifests description field (compiled into the bootstrap bullet)
bro sidekick format quote block: word+reading, kanji breakdown, how natives actually use it, simplified usage - never a dense run-on line; no CJK in box-drawing
reflect feature review reviews features (shipped or planned) as value verdicts (want / don't care / against + the flipping condition), never invented-UI commentary; screens still get the react; panel mode covers features

Pressure-test evidence

hyper agent, given only the compiled bootstrap and "let's add a referral program - build it" (no persona, skill, or gate named):

  • auto-engaged product-manager, quoting the exact trigger line ("net-new feature; build request")
  • engaged BEFORE any design/build step, citing "the trigger is the contract"
  • ran 4 product_manager_* MCP tools, then HELD the gate at NEEDS-INPUT because its own assessments lacked evidence - even though the MCP resolve tool returned a mechanical PASS
  • queued the correct post-PASS pipeline (worktree -> blueprint -> designer -> forge-plan -> test-first -> security-review -> ship-gate -> deliver)
  • reported 5 wording gaps; the top 4 are closed by this PR (evidence-PASS, "acting" defined, net-new boundary, gates-before-design ordering)

Verification

  • bun test: 87 pass, 0 fail (compiler invariant test feeds an explicit minimal manifest)
  • tsc --noEmit: clean
  • manifest-edit -> bootstrap sync proven end to end
  • em-dash sweep on touched files: clean

…rom manifests

Personas, skills, MCP, roles declared and wired as ONE framework:

- Bootstrap critical block: Three-Layer Ecosystem -> ONE framework with
  four layers; 1% Rule extended to persona triggers ('the user never has
  to name them')
- Personas layer now GENERATED from personas/<id>/persona.json manifests
  (single source of truth): id, mode, description, full engages_when
  trigger table compiled into every session's bootstrap. Hand-maintained
  bullets in skills/hyperstack/SKILL.md removed (drift killed) - proof:
  a manifest trigger edit reaches the bootstrap with zero SKILL.md edits
- persona.schema.json + all 4 manifests gain description field
- Markers extended: marketing, reflect, Triggers: guarded at compile
- Gate semantics hardened from live-test gaps: PASS requires evidence
  (populated fields = NEEDS-INPUT), 'acting' defined (inspection and
  classification only pre-gate), net-new vs tweak boundary stated

Also folded in (user feedback):
- bro sidekick format: quote-block with kanji breakdown + how natives
  ACTUALLY use the word + simplified usage - never a dense run-on line
- reflect reviews features too (shipped or planned): value verdict
  (want it / don't care / against + the one flipping condition), never
  invented-UI commentary; screens still get the react; panel mode works
  on features (value collisions)

Pressure evidence: hyper agent given only the compiled bootstrap and
'build a referral program' (no persona named) auto-engaged product-manager
per the trigger line, ran 4 product_manager_* MCP tools, held the gate
NEEDS-INPUT for lack of evidence, and queued the full skill pipeline
post-PASS. Its 5 reported wording gaps: top 4 closed here.

87 tests pass; compiler invariant test now feeds an explicit minimal
manifest (compiler stays pure via injectable personas param).
@KailasMahavarkar
KailasMahavarkar merged commit f29b360 into main Jul 18, 2026
3 checks passed
@KailasMahavarkar
KailasMahavarkar deleted the f-PE-hyperstack-persona-autotrigger branch July 18, 2026 09: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