# PR-19.1 - PBS Topic 19 Spec Propagation and Normative Cutover ## Briefing As decisions `19.1` a `19.5` fecharam a arquitetura de globals, lifecycle markers, published wrapper, lowering e conformance para PBS v1. Esta PR abre a execucao da familia `19` pela frente editorial normativa: 1. propagar as decisions para specs PBS e specs gerais relevantes; 2. remover lacunas documentais entre source model, lowering e publication contract; 3. alinhar o contrato final com entrypoint fisico `0` e sem autoridade de `entrypoint` no `manifest.json`. ## Target Atualizar o baseline normativo para o modelo final de topic `19` em: 1. syntax and AST, 2. static semantics, 3. dynamic semantics, 4. diagnostics, 5. lowering, 6. bytecode/publication handoff. ## Dependencies Prerequisitos diretos: 1. `Globals Surface, Identity, and Module Boundaries Decision.md` 2. `Lifecycle Markers, Program Init, and Frame Root Semantics Decision.md` 3. `Published Entrypoint, Synthetic Wrapper, and FRAME_RET Ownership Decision.md` 4. `Globals and Lifecycle Lowering to IRBackend and IRVM Decision.md` 5. `Diagnostics, Manifest Propagation, and Conformance Coverage Decision.md` ## Scope 1. Atualizar: - PBS 3, - PBS 4, - PBS 7, - PBS 9, - PBS 11, - PBS 12, - PBS 13. 2. Atualizar: - General 15, - General 20. 3. Fixar normativamente: - `declare global`, - `[Init]`, - `[Frame]`, - `[InitAllowed]`, - wrapper publicado, - `FRAME_RET` no wrapper, - entrypoint fisico `0`, - `manifest.json` sem `entrypoint`. ## Non-Goals 1. Nao alterar parser, AST classes ou semantics code. 2. Nao implementar lowering. 3. Nao adicionar fixtures executaveis nesta PR. 4. Nao produzir `learn`. ## Method 1. Aplicar as decisions 19.x sem reabrir arquitetura. 2. Escrever os contratos em ingles normativo e com terminologia uniforme. 3. Fazer o corte documental completo do antigo modelo nominal de entrypoint. 4. Nomear explicitamente dependencias cross-domain quando a spec PBS depender do runtime protocol ja aceito. ## Acceptance Criteria 1. Nenhuma spec normativa relevante da linha PBS/general contradiz as decisions 19.x. 2. `declare global`, `[Init]`, `[Frame]` e `[InitAllowed]` aparecem com semantica consistente entre syntax, AST e static semantics. 3. O publication contract normativo aponta para wrapper sintetico em `func_id = 0`. 4. O `manifest.json` deixa de carregar autoridade de entrypoint nas specs PBS. 5. As specs gerais de handoff refletem o wrapper e o entrypoint fisico `0`. ## Tests 1. Revisao editorial integral dos documentos afetados. 2. Se houver harness de spec-to-test matrix para as specs gerais/pbs, mantelo verde. ## Affected Documents 1. `docs/compiler/pbs/specs/3. Core Syntax Specification.md` 2. `docs/compiler/pbs/specs/4. Static Semantics Specification.md` 3. `docs/compiler/pbs/specs/7. Cartridge Manifest and Runtime Capabilities Specification.md` 4. `docs/compiler/pbs/specs/9. Dynamic Semantics Specification.md` 5. `docs/compiler/pbs/specs/11. AST Specification.md` 6. `docs/compiler/pbs/specs/12. Diagnostics Specification.md` 7. `docs/compiler/pbs/specs/13. Lowering IRBackend Specification.md` 8. `docs/compiler/general/specs/15. Bytecode and PBX Mapping Specification.md` 9. `docs/compiler/general/specs/20. IRBackend to IRVM Lowering Specification.md` ## Open Questions 1. Nenhuma. Esta PR e de propagacao normativa.