feat(B.5): política verificable por perfil (FAST/STANDARD/ADVANCED/SAFE/RESEARCH_MAX/ROP) - #5
Merged
Merged
Conversation
… formatting B.5: each profile now carries an enforced, unit-tested contract (src/profile_policy.py, evaluate_profile_policy -> PolicyCheck with violations / open_questions / notes): - FAST: normalises constraints, generates ZERO new questions (its open_questions is empty by definition) — pinned - STANDARD: passes input ambiguities through as reported questions, never drops or silently resolves them - ADVANCED: REQUIRES goal + inputs + output + acceptance criteria; missing ones produce violations. Extractor fallbacks (answer_user_request / direct_answer) are recognised as SYSTEM inventions and do NOT count as user declarations — B.1.4's 'never invent requirements' made enforceable - SAFE: every missing critical safety constraint becomes an explicit open question to the user; nothing is ever added to constraints - RESEARCH_MAX: facts / hypotheses / uncertainty three-way separation verified against the B.4 layers (or template outputs without them) - ROP: scaffolding must live in proposals; a simulated leak of proposal content into user requirements is flagged (ROP_SCAFFOLD_CROSSED_TO_REQUIREMENTS) Integration (additive): policy_check in both compile_prompt and compile_for_gui results; test asserts the SAME input yields DIFFERENT verdicts per profile (FAST passes sparse input, ADVANCED fails it). Hallazgo del camino: el extractor rellena tasks/output con fallbacks canónicos cuando no detecta nada; antes de este cambio un input esquivo pasaba la validación ADVANCED con requisitos inventados. Suite: 268 passed + 10 subtests.
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.
Eje B — B.5
src/profile_policy.py: cada perfil lleva un contrato de producto verificable, no solo formato.evaluate_profile_policy() -> PolicyCheck(violations / open_questions / notes), 100% determinista.answer_user_request/direct_answer) cuentan como no-declarados — un input esquivo ya no valida con requisitos inventados (hallazgo B.1.4)constraintsIntegración aditiva
policy_checken ambos entry points. Test clave: el mismo input produce veredictos distintos por perfil (FAST pasa input esquivo, ADVANCED lo rechaza).18 tests nuevos. Suite: 268 passed + 10 subtests, ruff limpio.