Five expert personas independently analyze proposed changes before implementation to catch architectural, security, performance, and UX issues early. Uses mind_mcp for project context and graph_mcp for code impact analysis. Produces GO/CAUTION/STOP verdict with consensus agreements, conflict resolutions, and risk mitigations. Use before major features, refactors, or risky changes.
Five-expert-persona pre-analysis that debates proposed changes using MCP-assisted code context before any code is written.
When To Use / When NOT
Use: before major features, refactors, competing approaches, assumption stress-tests, implementation gates. Skip: trivial changes, already-approved work, pure dep upgrades, docs-only.
All personas aligned, no critical risks, proceed with confidence
CAUTION
Concerns exist but manageable — mitigations identified, proceed carefully
STOP
Critical unresolved issue found — redesign or more information needed
STOP Triggers (any one is sufficient)
Security persona identifies auth bypass or data exposure with no viable mitigation
Architect identifies fundamental design incompatibility requiring significant rework
Performance persona identifies unacceptable latency or query explosion with no workaround
Devil's Advocate exposes a false assumption that invalidates the entire approach
Orchestration Workflow
Phase 0 — Code Context (3min): Parse the proposal and query mind_mcp.hybrid_search for architecture context. In graph_mcp, resolve named functions with search_functions(query, parser_type) and use query_subgraph(direction:"all", max_depth:2) for immediate callers/callees. Use trace_flow with direction out or in, selected rel_types, and max_depth:6 for indirect or callback-aware runtime paths; use find_paths for known start/end anchors and analyze_workflow_impact for affected workflows, severity, and risk. Build one evidence-scoped context package.
Phase 1 — Independent Analysis (5min): Each persona analyzes in isolation (no cross-reading), using MCP context + code reading. Record findings per the persona_output_format below.
Phase 2 — Consensus Debate (3min): Compare outputs side-by-side. Agreements = 4+ personas align. Conflicts = meaningful disagreement → weigh tradeoffs, document resolution with rationale per conflict_resolution_rules.
Phase 3 — Verdict & Report (1min): Synthesize findings, generate risk summary, produce recommendations, format report. GO: 0 Critical, <3 High, clear mitigations. CAUTION: 1-2 mitigatable Critical OR 3+ High. STOP: any unmitigatable Critical or false assumption detected.
conflict_resolution_rules:
- "Security vs Performance → Security wins unless performance makes system unusable"
- "Architect vs UX → Defer to UX for user-facing features, Architect for backend"
- "Devil's Advocate vs Everyone → If assumption is unvalidated, CAUTION"
- "Any persona at Critical severity → cannot be GO"
Output Contract
Minimum report fields: title + date + depth + verdict; executive summary (2-3 sentences); agreements list; conflicts table (topic × 5 personas + resolution); risk summary table (risk/severity/persona/mitigation); per-persona detail block (concerns, threats, bottlenecks, issues, challenged assumptions + recommendations/mitigations/impact/alternatives); numbered recommendations with rationale; next steps tied to verdict (GO → hi-plan, CAUTION → address mitigations, STOP → redesign).
Non-Negotiable Rules
Personas MUST analyze independently — no cross-contamination during analysis phase
Security persona findings always weighted higher for auth/data concerns
Devil's Advocate must challenge at least one core assumption
STOP verdict requires explicit documentation of what must change
Every risk must have a concrete mitigation, not just identification
Conflict resolutions must include rationale, not just the winner
Error Handling & Fallback
Preflight: validate proposal, abort on failure. MCP-unavailable: skip code context, analyze proposal text only, mark code-derived findings lower confidence, note "MCP unavailable". Persona timeout: mark incomplete and continue. Unresolvable conflict: document as unresolved in report.
Known Limitations
Static analysis only — cannot predict runtime behavior; quality depends on proposal detail; MCP-unavailable mode is less confident.
Personas cannot ask clarifying questions (one-pass); business nuances may be missed without domain expert input.
Deliverables
prediction_report_{timestamp}.md — Full prediction report with all persona analyses, conflicts, verdict, and recommendations
References
references/persona-playbook.md — Detailed analysis framework per persona with example prompts
../
wiki/en/hi-predict-skill.md
Wiki guide
Hi Predict Skill: Complete Guide
hi-predict is a pre-analysis gate used before major features, refactors, competing approaches, or high-risk changes. Five independent personas analyze the proposal from the angles of architecture, security, performance, UX, and assumptions, then debate, resolve conflicts, and produce a GO, CAUTION, or STOP verdict.
1. What problem does Hi Predict solve?
A proposal can sound reasonable yet contain risks before the first line of code is written:
a new architecture creates coupling or cycles;
an endpoint opens an attack surface but lacks auth;
a query/API call increases latency or N+1s;
UX has no loading/error/empty/accessibility states;
a foundational assumption is wrong;
scope is larger than necessary;
a simpler alternative has not been considered.
hi-predict brings multiple independent lenses in before implementation, to surface problems while the cost of change is still low.
It is not:
a code review after implementation;
runtime testing or performance benchmarking;
a replacement for the product owner/domain expert;
a decision about implementation made on behalf of the team;
a guarantee that the proposal will be correct in production.
2. Overall mental model
Loading diagram…
3. When to use it?
3.1 Should use
major features;
refactors affecting many modules;
competing architecture approaches;
assumption stress-testing;
implementation gate before code;
authentication/authorization changes;
data model/migration;
payment, compliance, or PII;
hot path/performance-sensitive features;
important user-facing workflows.
3.2 No need to use
trivial changes;
work already approved with unchanged scope;
pure dependency upgrades with no behavior/architecture impact;
docs-only changes;
changes too small that already have clear verification.
hi-predict should not be used to add ceremony to every small bug. It is valuable when early risk analysis is cheaper than rework after implementation.
4. Input contract
4.1 Proposal
proposal must:
not be empty;
be 10-5000 characters long;
be natural language;
describe the change/problem/goal;
not be only a code snippet without context.
A good proposal:
Add refresh-token rotation for all browser sessions, store token-family
revocation state, and invalidate the family when reuse is detected.
A weak proposal:
function rotateToken() { ... }
4.2 Optional inputs
--files <glob>: limits the files/modules under consideration;
Fast pre-analysis for the main proposal and major risks
deep
Extended context, code paths, assumptions, and conflict analysis
Quick does not mean dropping the Security persona or Devil's Advocate. The five personas remain the core model; depth controls the depth of context and analysis.
5. The five personas
Persona
Focus
Core question
Architect
System design, scalability, coupling
Does it fit the architecture and scale without creating new coupling?
Security
Attack surface, data, auth
Where can it be abused and where does data leak?
Performance
Latency, memory, query, resource
What is the latency/N+1/memory/contention impact?
UX
Flow, accessibility, errors
Is it intuitive, accessible, and with clear error states?
Devil's Advocate
Assumptions, alternatives, worst case
Why not do nothing, and which assumptions could be wrong?
Personas must analyze independently in Phase 1 and not cross-read each other's outputs. This reduces anchoring and prevents one persona from pulling the whole group toward the same assumption before independent analysis exists.
6. Four-phase workflow
6.1 Phase 0: Code Context
Target time: 3 minutes, timeout 180 seconds.
Steps:
parse the proposal;
read architecture/project context;
query mind_mcp.hybrid_search for architecture docs;
query graph_mcp.semantic_search for affected code;
use trace_flow for runtime/call paths;
build the context package;
report phase_start/phase_complete.
The context package should include:
affected modules/files;
entry points;
state mutations;
external calls;
dependencies/call paths;
existing architectural patterns;
relevant requirements/decisions;
known constraints.
Loading diagram…
MCP being unavailable does not immediately fail the proposal. Fall back to text-only analysis, mark code-derived findings as low confidence, and record MCP unavailable.
6.2 Phase 1: Independent Analysis
Target time: 5 minutes, timeout 300 seconds.
Each persona:
reads the same proposal/context;
analyzes through its own lens;
does not look at other personas' outputs;
records concerns/threats/bottlenecks/issues/assumptions;
records recommendations/mitigations/alternatives;
records confidence.
Loading diagram…
6.3 Phase 2: Consensus Debate
Target time: 3 minutes, timeout 180 seconds.
Compare outputs side-by-side:
Agreement: 4+ personas align;
Conflict: a meaningful disagreement;
Gap: a concern only one persona sees but that has not been refuted;
Does the change create new coupling between modules?
Does it scale to 10x the current load?
Does it follow established patterns?
Is there an existing abstraction to reuse?
How does the dependency graph change?
7.3 Red flags
new circular dependency;
bypassing the service/repository layer;
god component;
module boundary violation;
duplicate abstractions;
a new architecture style without justification.
7.4 Output format
architect:
concerns:
- "New service bypasses repository boundary"
recommendations:
- "Reuse existing gateway abstraction"
confidence: "high|medium|low"
8. Persona: Security
8.1 Focus
attack surface;
data exposure/protection;
authentication/authorization boundary;
input validation/injection;
secret/token handling;
logging and transmission.
8.2 Key questions
Where is the new attack surface?
Where is user data stored/transmitted/logged?
Is there an auth check at every entry point?
How is input accepted and validated?
Are there new secret/token paths?
8.3 Red flags
new endpoint missing auth;
plaintext user data in logs;
SQL/NoSQL string concatenation;
new secrets without a rotation plan;
IDOR/horizontal privilege escalation;
sensitive error details;
unclear CORS/CSRF boundary.
8.4 Security priority
Security findings are weighted higher in auth/data concerns. A Security Critical cannot become GO just because the other personas agree.
security:
threats:
- "New endpoint accepts tenantId from client without ownership check"
severity: "critical"
mitigations:
- "Derive tenant from verified session and enforce authorization at service boundary"
9. Persona: Performance
9.1 Focus
critical path latency;
N+1 queries;
memory usage/leaks;
resource contention;
database indexes;
external call timing;
peak load behavior.
9.2 Key questions
How much latency is added on the critical user path?
Performance concerns should include numbers/estimates when possible. "Might be slow" is not as strong as a specific latency path, query count, payload size, or resource model.
10. Persona: UX
10.1 Focus
user flow;
intuitive behavior;
loading/empty/error states;
accessibility;
mobile/slow networks;
abort/resume;
feedback after actions.
10.2 Key questions
How are error states displayed?
Can keyboard/screen reader users use it?
What about mobile and slow connections?
What is the state when a user aborts mid-flow?
Does every action have clear feedback?
10.3 Red flags
silent failures;
errors leaking internal details;
mobile overflow/non-responsive layout;
async operations without loading states;
focus lost after validation;
destructive actions without confirm/recover.
10.4 Output format
ux:
issues:
- "Async export has no progress or retry state"
edge_cases:
- "User navigates away while export is processing"
a11y_concerns:
- "Status updates are not announced to screen readers"
11. Persona: Devil's Advocate
11.1 Focus
hidden assumptions;
simpler alternatives;
worst-case failure;
cost of doing nothing;
organizational/knowledge risk;
scope reduction;
buy vs build.
11.2 Key questions
Why not do nothing? What is the cost of inaction?
What is the simplest version that solves the problem?
Which assumption is most likely to be wrong?
If half the scope were cut, what would still work?
Is there an existing solution/buy option?
11.3 Red flags
using technology the team does not know;
not seriously considering simple alternatives;
success depending on one person;
a timeline assuming no interruptions/scope changes;
a proposal solving a symptom rather than the need;
false assumptions about user behavior or scale.
11.4 Special rules
Devil's Advocate must challenge at least one core assumption. If an assumption has not been validated, the conflict rule requires at least CAUTION, never an automatic GO.
devils_advocate:
assumptions_challenged:
- "All clients can migrate to the new API in one release"
simpler_alternatives:
- "Add compatibility adapter first"
worst_case: "Partial rollout creates inconsistent authorization behavior"
Output is not just a list of concerns. Each risk needs a concrete mitigation.
13. Consensus and conflict resolution
13.1 Agreement
Agreement is when 4 or more personas align on a finding/decision. Agreement does not erase a minority concern; the concern still needs to be recorded if it has high severity.
13.2 Conflict table
The report should include:
Topic
Architect
Security
Performance
UX
Devil's Advocate
Resolution
Sync provider call
Acceptable
Token exposure concern
Latency risk
Progress state needed
Async simpler
Async with explicit user state
13.3 Conflict resolution rules
Conflict
Rule
Security vs Performance
Security wins, unless performance makes the system unusable
Architect vs UX
UX for user-facing features, Architect for backend
Devil's Advocate vs everyone
An unvalidated assumption means at least CAUTION
Any persona Critical
Cannot be GO
13.4 Resolution with rationale
A resolution cannot just say "Security wins". It must record:
Security wins because the proposed performance shortcut bypasses tenant authorization.
Mitigation: cache verified authorization result with bounded TTL instead of removing the check.
13.5 Unresolvable conflict
If a conflict cannot be resolved:
keep the conflict in the report;
mark it unresolved;
state the information/experiment/owner needed;
the verdict must not pretend to be GO.
14. Verdict levels
14.1 GO
Meaning: it is safe to proceed with confidence.
Conditions:
no persona has a remaining critical concern;
0 Critical;
fewer than 3 High;
mitigations are clear and feasible;
no unvalidated core assumptions;
conflicts are resolved.
Next step:
GO -> hi-plan
GO does not mean the code is correct. It only means the proposal is safe enough to move into planning.
14.2 CAUTION
Meaning: there are concerns, but it can proceed conditionally.
Typical triggers:
1-2 Critical items with feasible mitigations;
3+ High;
assumptions need validation but do not invalidate the whole approach;
unresolved trade-offs that are not fully blocking.
The report must keep all persona analyses, conflicts, verdict, and recommendations. Do not save only the final verdict and lose the dissenting evidence.
17. Progress and timeout
Timeout targets:
Phase
Timeout
Phase 0: Code Context
180s
Phase 1: Independent Analysis
300s
Phase 2: Consensus Debate
180s
Phase 3: Verdict & Report
60s
Total
720s / 12 minutes
Progress events:
phase_start;
persona_progress;
conflict_resolving;
final_summary.
17.1 Persona timeout
If a persona times out:
mark it incomplete;
continue with the remaining personas;
do not treat a timed-out persona as agreement;
lower confidence;
record the gap in the report;
consider CAUTION/STOP depending on the missing lens.
A missing Security or Architect persona for a high-risk proposal is a significant gap and should not be silently treated as a pass.
18. MCP fallback
18.1 Preflight
validate proposal/depth;
check MCP health;
abort if the proposal is invalid.
18.2 MCP unavailable
The proposal can still be analyzed text-only, but must:
record MCP unavailable;
mark code-derived findings with lower confidence;
not claim affected paths are verified;
state a recommendation to rerun with repository context.
Loading diagram…
19. Independent analysis and bias control
19.1 Why independence?
If personas read output beforehand:
Architect may anchor Security to its own design;
Security may miss UX because it already saw "handled";
everyone may falsely converge through groupthink;
Devil's Advocate loses its challenging role.
19.2 Control process
provide the same baseline context;
do not share persona outputs in Phase 1;
store outputs separately;
only compare in Phase 2;
keep minority findings if not refuted;
record rationale when resolving conflicts.
20. Example: refresh-token rotation
Proposal:
Add refresh-token rotation for browser sessions, persist token-family
revocation state, and revoke the family on token reuse.
Architect
reuse the existing session/token repository;
check dependencies between login, refresh, and logout;
avoid introducing a second token store;
assess multi-instance consistency.
Security
token replay and family revocation;
tokens must not be logged in plaintext;
auth check at every refresh entry point;
atomic compare-and-rotate.
Performance
added DB read/write on every refresh;
index token family/session;
caching can make revocation stale;
concurrency/lock contention.
UX
how a reused token logs the user out;
clear session-expired message;
multi-tab refresh race;
retry must not create a loop.
Devil's Advocate
is rotation really needed for every client;
simplest version: rotate only browser or high-risk sessions;
assumption: every client supports cookie/session updates;
Performance wants caching, Security worries about stale state
Security wins; only cache negative/short TTL and authoritative check when rotating
Reuse response
UX wants silent refresh, Security needs to revoke the family
Security wins; clear user-facing session-expired state
Storage
Architect wants to reuse the store, Performance worries about write cost
Keep the store, batch/index/measure instead of adding a new store
Verdict
It could be CAUTION if the token reuse policy has no integration test or the cache semantics are undecided. After mitigation and verification, rerun to reach GO.
21. Example: payment gateway refactor
Proposal:
Replace direct payment provider calls with a shared PaymentGateway abstraction.
Persona concerns:
Architect: does the interface create a god abstraction; do implementations share the same semantics;
Performance: the added wrapper is negligible, but retry/middleware may duplicate;
UX: provider error mapping and retry messages;
Devil's Advocate: is an adapter really needed if there is only one provider?
STOP triggers if:
the abstraction loses provider-specific fraud/authorization checks;
the direct call path is bypassed without a migration plan;
retry semantics cause duplicate charges.
22. Example: export report UI feature
Persona lenses:
Architect: async job/status endpoint and storage lifecycle;
Security: report authorization, signed URL expiry, PII;
Performance: large datasets, streaming, queue, memory;
UX: progress, cancel, retry, download states;
Devil's Advocate: is a full export needed, or can it be filtered/paginated.
GO is only reasonable when:
access control and URL expiry are clear;
large exports do not block the request path;
error/cancel states have a design;
retention/cleanup is defined;
assumptions about export size have evidence.
23. How to verify hi-predict?
23.1 Input/context verify
Proposal is 10-5000 chars, natural language.
Depth is reasonable.
Files/glob scope is valid if provided.
MCP health was checked.
Context package has code/docs evidence or a clear gap.
23.2 Persona verify
All five personas are present.
Analysis is independent, with no cross-contamination.
Devil's Advocate challenges at least one core assumption.
Security is weighted correctly for auth/data.
Every concern/risk has a mitigation or a reason for being unresolved.
23.3 Debate verify
Agreements are only claimed when 4+ align.
Conflicts include the personas' positions.
Resolutions have rationale.
Unresolvable conflicts are kept.
Minority concerns are not deleted just because they are not consensus.
23.4 Verdict verify
Critical count is correct.
GO only when 0 Critical, <3 High, and mitigations are clear.
CAUTION has an action/owner/acceptance condition.
STOP clearly states the blocker and rerun conditions.
Verdict does not claim runtime/production guarantees.
23.5 Report verify
Has title/date/depth/verdict.
Executive summary is 2-3 sentences.
Conflict table is complete.
Risk summary has severity/persona/mitigation.
Per-persona details are not lost.
Next steps match the verdict.
Timeout/MCP gaps/confidence are recorded.
24. Relationship with other skills
Loading diagram…
Skill
Relationship
hi-plan
Receives a proposal that has passed pre-analysis to create a plan
hi-craft
Implements after GO or a handled CAUTION
hi-scenario
Adds edge cases/test scenarios derived from persona risks
hi-security
Deep-audits the security risks that were found
hi-debug
Investigates assumptions/flow when evidence is missing or conflicting
hi-repository-search
Provides code/document context for Phase 0
hi-red-team/plan red-team
Adversarial review of the plan after the proposal is finalized
hi-predict and red-team are not the same:
hi-predict: before implementation, debates the proposal/approach;
red-team: reviews the written plan, finding weaknesses in the artifact.
25. Limitations to understand correctly
25.1 Static analysis only
The skill does not simulate runtime, benchmark, or prove production behavior. It predicts risks based on the proposal/context.
25.2 Quality depends on the proposal
A proposal that is too short or lacks constraints makes personas analyze on assumptions. If business nuance is missing, a domain expert review is needed.
25.3 One-pass, no clarification questions
Personas do not ask for clarification during the workflow. Missing-context questions must appear in gaps/next steps, never be filled in by assumption.
25.4 GO is not implementation approval
GO only says the proposal is safe enough to move to hi-plan. Planning, testing, code review, and runtime verification are still required.
25.5 CAUTION does not mean "ignore warnings"
Every CAUTION needs a mitigation/action condition. If left unhandled, it can escalate to STOP.
25.6 STOP is not failure
STOP is an early warning that helps avoid writing code against an approach with blockers. Its value is pointing out exactly what needs redesign or verification.
26. Quick summary
Loading diagram…
The shortest sentence to remember:
hi-predict brings five independent perspectives in before the code, so a proposal is not only asked "can it be done?" but also challenged on architecture, security, performance, UX, and assumptions before the cost of rework rises.