@shiftleftpt/sbd-toe-mcp 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.js +107 -266
- package/dist/index.js.map +1 -1
- package/dist/resources/sbd-toe-resources.js +1 -1
- package/dist/resources/sbd-toe-resources.js.map +1 -1
- package/dist/serving/adjacency.d.ts +68 -0
- package/dist/serving/adjacency.js +127 -0
- package/dist/serving/adjacency.js.map +1 -0
- package/dist/serving/affordances.js +4 -5
- package/dist/serving/affordances.js.map +1 -1
- package/dist/serving/agent-guide.js +5 -3
- package/dist/serving/agent-guide.js.map +1 -1
- package/dist/serving/behaviour-notes.d.ts +2 -2
- package/dist/serving/behaviour-notes.js +2 -8
- package/dist/serving/behaviour-notes.js.map +1 -1
- package/dist/serving/notes.d.ts +41 -0
- package/dist/serving/notes.js +43 -0
- package/dist/serving/notes.js.map +1 -0
- package/dist/serving/payload-ceilings.d.ts +73 -11
- package/dist/serving/payload-ceilings.js +85 -24
- package/dist/serving/payload-ceilings.js.map +1 -1
- package/dist/serving/response-shaping.d.ts +10 -0
- package/dist/serving/response-shaping.js +26 -0
- package/dist/serving/response-shaping.js.map +1 -1
- package/dist/serving/server-surface.d.ts +10 -0
- package/dist/serving/server-surface.js +14 -2
- package/dist/serving/server-surface.js.map +1 -1
- package/dist/serving/surface-history.d.ts +118 -0
- package/dist/serving/surface-history.js +119 -0
- package/dist/serving/surface-history.js.map +1 -0
- package/dist/tools/assess-implementation.d.ts +9 -0
- package/dist/tools/assess-implementation.js +7 -1
- package/dist/tools/assess-implementation.js.map +1 -1
- package/dist/tools/get-guide-by-role.d.ts +40 -0
- package/dist/tools/get-guide-by-role.js +158 -4
- package/dist/tools/get-guide-by-role.js.map +1 -1
- package/dist/tools/get-macro-processes.js +18 -8
- package/dist/tools/get-macro-processes.js.map +1 -1
- package/dist/tools/get-threat-landscape.js +11 -5
- package/dist/tools/get-threat-landscape.js.map +1 -1
- package/dist/tools/ontology-loader.d.ts +7 -0
- package/dist/tools/ontology-loader.js +2 -0
- package/dist/tools/ontology-loader.js.map +1 -1
- package/dist/tools/prepare-codegen-context.d.ts +339 -276
- package/dist/tools/prepare-codegen-context.js +454 -530
- package/dist/tools/prepare-codegen-context.js.map +1 -1
- package/dist/tools/resolve-entities.js +8 -4
- package/dist/tools/resolve-entities.js.map +1 -1
- package/dist/tools/select-requirements.d.ts +2 -1
- package/dist/tools/select-requirements.js +23 -8
- package/dist/tools/select-requirements.js.map +1 -1
- package/package.json +1 -1
- package/prompts/sbd-toe-grounded-codegen.md +11 -11
|
@@ -79,6 +79,18 @@ export const RESOURCE_CATALOG = [
|
|
|
79
79
|
"Referenced by codegen_instructions_ref in dieted payloads.",
|
|
80
80
|
mimeType: "application/json"
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
uri: "sbd://toe/notes",
|
|
84
|
+
name: "SbD-ToE Notes (index)",
|
|
85
|
+
description: "Notes by reference: the static prose that explains payload blocks (prepare) lives here with stable ids; payloads carry `note_id` and one `notes` header. Index of every id and text.",
|
|
86
|
+
mimeType: "application/json"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
uri: "sbd://toe/notes/{id}",
|
|
90
|
+
name: "SbD-ToE Note",
|
|
91
|
+
description: "One note by id (e.g. sbd://toe/notes/prepare.repeat_call_hint). Unknown id returns a declared error listing the valid ids.",
|
|
92
|
+
mimeType: "application/json"
|
|
93
|
+
},
|
|
82
94
|
{
|
|
83
95
|
uri: "sbd://toe/version",
|
|
84
96
|
name: "SbD-ToE MCP Version",
|
|
@@ -90,7 +102,7 @@ export const RESOURCE_CATALOG = [
|
|
|
90
102
|
name: "SbD-ToE Grounded Codegen Guide",
|
|
91
103
|
description: "Agent-facing guide for using prepare_sbd_toe_codegen_context. " +
|
|
92
104
|
"Covers workflow, branching by status (ready_for_codegen / needs_clarification / " +
|
|
93
|
-
"needs_decomposition / unsupported_scope), output discipline (cite
|
|
105
|
+
"needs_decomposition / unsupported_scope), output discipline (cite `citations` ids, fill " +
|
|
94
106
|
"security_rationale, distinguish code/tests/evidence), and explicit prohibitions " +
|
|
95
107
|
"(no invented IDs, no compliance claims, no rastreabilidade-noise inside source files).",
|
|
96
108
|
mimeType: "text/markdown"
|
|
@@ -136,7 +148,7 @@ export const PROMPT_CATALOG = [
|
|
|
136
148
|
title: "Prepare Grounded Codegen (SbD-ToE)",
|
|
137
149
|
description: "MCP prompt that bundles the grounded-codegen guide with a user task and instructs the " +
|
|
138
150
|
"agent to call prepare_sbd_toe_codegen_context before producing code. Forces citation of " +
|
|
139
|
-
"
|
|
151
|
+
"ids from `citations`, fills security_rationale_template, distinguishes code/tests/evidence, " +
|
|
140
152
|
"blocks compliance claims, and routes needs_clarification / needs_decomposition / " +
|
|
141
153
|
"unsupported_scope to user dialog instead of silent guessing.",
|
|
142
154
|
arguments: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-surface.js","sourceRoot":"","sources":["../../src/serving/server-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;+EAC+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IACxB;QACE,GAAG,EAAE,uBAAuB;QAC5B,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,6QAA6Q;QAC/Q,QAAQ,EAAE,eAAe;KAC1B;IACD;QACE,GAAG,EAAE,6CAA6C;QAClD,IAAI,EAAE,+BAA+B;QACrC,WAAW,EACT,0JAA0J;QAC5J,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,uBAAuB;QAC5B,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,wRAAwR;QAC1R,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,yCAAyC;QAC/C,WAAW,EACT,mcAAmc;QACrc,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,IAAI,EAAE,+BAA+B;QACrC,WAAW,EACT,shBAAshB;QACxhB,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EACT,2LAA2L;QAC7L,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,oBAAoB;QACzB,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,uFAAuF;YACvF,wFAAwF;YACxF,6FAA6F;YAC7F,0FAA0F;QAC5F,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EACT,0FAA0F;YAC1F,6HAA6H;QAC/H,QAAQ,EAAE,eAAe;KAC1B;IACD;QACE,GAAG,EAAE,2BAA2B;QAChC,IAAI,EAAE,mCAAmC;QACzC,WAAW,EACT,8FAA8F;YAC9F,8FAA8F;QAChG,QAAQ,EAAE,eAAe;KAC1B;IACD;QACE,GAAG,EAAE,uCAAuC;QAC5C,IAAI,EAAE,yCAAyC;QAC/C,WAAW,EACT,2FAA2F;YAC3F,sFAAsF;YACtF,2FAA2F;YAC3F,wFAAwF;YACxF,4DAA4D;QAC9D,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,mBAAmB;QACxB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,6QAA6Q;QAC1R,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACT,gEAAgE;YAChE,kFAAkF;YAClF,
|
|
1
|
+
{"version":3,"file":"server-surface.js","sourceRoot":"","sources":["../../src/serving/server-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;+EAC+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IACxB;QACE,GAAG,EA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AAwF;YACxF,0FAA0F;YAC1F,8FAA8F;YAC9F,mFAAmF;YACnF,8DAA8D;QAChE,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,iFAAiF;gBAC9F,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,oDAAoD;gBACjE,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,mCAAmC;gBAChD,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,WAAW,EACT,sMAAsM;gBACxM,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,qDAAqD;gBAClE,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,sBAAsB;gBAC5B,WAAW,EACT,8GAA8G;gBAChH,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,0BAA0B;gBAChC,WAAW,EAAE,iEAAiE;gBAC9E,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;CAAC,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.21 §6-d — HISTÓRICO DA SUPERFÍCIE, verbatim.
|
|
3
|
+
*
|
|
4
|
+
* As descrições das tools carregavam o changelog (0.19.4, beta.26, s3c…) e misturavam duas
|
|
5
|
+
* línguas — 7–10k tokens de schema pagos em TODAS as voltas de um agente. Passam a ≤600
|
|
6
|
+
* caracteres, uma língua; o que lá estava NÃO se apaga: vive aqui, tal e qual estava em
|
|
7
|
+
* tools/list @ 6ea4789 (antes desta fase), e serve-se em sbd://toe/version.surface_history.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SURFACE_HISTORY: {
|
|
10
|
+
readonly note: "Descrições das tools tal como eram servidas antes da 0.21 §6-d (verbatim). O changelog vive no CHANGELOG.md e aqui; as descrições servidas hoje só dizem o que a tool faz.";
|
|
11
|
+
readonly captured_at: "0.21 @ 6ea4789 (2026-09-25)";
|
|
12
|
+
readonly tools: {
|
|
13
|
+
readonly search_sbd_toe_manual: {
|
|
14
|
+
readonly previous_description: "NÃO-NORMATIVO — leitura e orientação, NUNCA caminho para um conjunto de requisitos. Pesquisa semântica sobre os chunks publicados do manual: serve para LER e localizar passagens (e para tu, LLM, formares a tua leitura), não para decidir âmbito. O conjunto de requisitos vem de select_sbd_toe_requirements com activadores DECLARADOS (vocabulário em sbd://toe/activation-vocabulary) — o que aqui sai não selecciona nada e não deve ser citado como se fosse selecção.";
|
|
15
|
+
};
|
|
16
|
+
readonly answer_sbd_toe_manual: {
|
|
17
|
+
readonly previous_description: "SERVE CONTEXTO PARA O TEU MODELO RESPONDER — não responde: a resposta é do modelo do cliente, via sampling, e o juízo é de quem pergunta. Recupera contexto do Manual e pede a resposta final ao modelo do cliente via MCP sampling. Requires sampling support from the MCP client. Without sampling, falls back to formatted retrieval output (same as search_sbd_toe_manual). Prefer search_sbd_toe_manual for clients without sampling support.";
|
|
18
|
+
};
|
|
19
|
+
readonly inspect_sbd_toe_retrieval: {
|
|
20
|
+
readonly previous_description: "Inspects retrieval, context selection and final prompt without requesting an answer from the client model.";
|
|
21
|
+
};
|
|
22
|
+
readonly list_sbd_toe_chapters: {
|
|
23
|
+
readonly previous_description: "Lists SbD-ToE manual chapters with id, canonical title, a clean readableTitle, graduated applicability (all levels true) and derived demand_by_level (0.14.0 — the binary minLevel theory is retired).";
|
|
24
|
+
};
|
|
25
|
+
readonly query_sbd_toe_entities: {
|
|
26
|
+
readonly previous_description: "Queries manual entities by text, entity type, chapter or risk level.";
|
|
27
|
+
};
|
|
28
|
+
readonly get_sbd_toe_chapter_brief: {
|
|
29
|
+
readonly previous_description: "Returns an operational summary of a chapter: title, objective, role, phases, artefacts (fields are present when the substrate carries them).";
|
|
30
|
+
};
|
|
31
|
+
readonly plan_sbd_toe_repo_governance: {
|
|
32
|
+
readonly previous_description: "PROJECÇÃO DOS ARTEFACTOS PUBLICADOS — não governa o teu repositório: serve o que o Manual identifica, por capítulo, para tu decidires o que instalas. Lista de artefactos/documentos do SbD-ToE, grouped by chapter, with risk level applicability. Optionally filter by riskLevel (L1/L2/L3). All data comes from the manual indices — nothing is invented. The manual does not provide templates; ask the LLM to generate one if needed.";
|
|
33
|
+
};
|
|
34
|
+
readonly generate_sbd_toe_skill: {
|
|
35
|
+
readonly previous_description: "GERA A PARTIR DO PUBLICADO, SEM VALIDAR O TEU AMBIENTE — não instala, não configura e não verifica nada do teu lado: devolve o texto para TU instalares onde souberes. Use this tool when asked to 'create a skill for SbD-ToE', 'set up instructions', 'configure this client/agent to use SbD-ToE', 'configure yourself for role X', or 'integrate SbD-ToE'. Without arguments returns the canonical skill content from sbd://toe/agent-guide. With role= returns a role-specialised skill (format=skill) or an installable sub-agent definition (format=subagent) grounded on the role's manual slice — flavour=harnessed grants the mcp__sbd-toe__* tools (queries live); flavour=skilled embeds the frozen slice with no MCP tools. Save the returned content to suggested_path (or the client equivalent).";
|
|
36
|
+
};
|
|
37
|
+
readonly map_sbd_toe_review_scope: {
|
|
38
|
+
readonly previous_description: "Given a set of changed files, maps which SbD-ToE knowledge bundles should be reviewed, with explicit reasoning per path.";
|
|
39
|
+
};
|
|
40
|
+
readonly get_sbd_toe_chapter_implementation_checklist: {
|
|
41
|
+
readonly previous_description: "The canon/20 'how to implement chapter NN' checklist — retrieval-grounded prose from the implementation profile (the operational 'Aplicação no Ciclo de Vida' guidance). Use to answer 'how do I implement chapter NN / this area?'. Coverage-preserving; cites chunk ids; nothing invented. For the level-sharp structured Definition-of-Done use get_guide_by_role(include_detail=true).";
|
|
42
|
+
};
|
|
43
|
+
readonly get_sbd_toe_operating_model: {
|
|
44
|
+
readonly previous_description: "The operating model — RACI, decision-rights, governance cadences, org-model — from the rollout playbook (implementation profile). Retrieval-grounded prose; coverage-preserving; nothing invented. Use to answer 'who is responsible / how do we govern the SbD rollout?'.";
|
|
45
|
+
};
|
|
46
|
+
readonly get_sbd_toe_verification_matrix: {
|
|
47
|
+
readonly previous_description: "The EXPECTED side of verification: per requirement/control at a risk level, the validation method + expected evidence + EvidencePattern reference (the published patterns — totals declared per response). The deterministic complement of the auditor's expectation and the test-plan. Cited per row; coverage-preserving — declares the requirements with no EvidencePattern. Use to answer 'how do I prove chapter/level X?' — or 'how do I prove THESE requirements?' via requirement_ids (o fecho requisito→prova a partir do select).";
|
|
48
|
+
};
|
|
49
|
+
readonly assess_sbd_toe_implementation: {
|
|
50
|
+
readonly previous_description: "SERVE OS LIMIARES PUBLICADOS APLICADOS AOS VALORES QUE DECLARASTE — a leitura é tua: não mede, não verifica os teus valores e não emite juízo de suficiência. Aritmética sobre dado publicado. Progresso auto-declarado: compara os KPI submetidos com os limiares publicados por nível thresholds (metrics.json) → posture (below/at/above) + gaps per KPI. Stateless self-report — values in, posture out, nothing stored; thresholds never invented; an applicable KPI with no value is not_reported (never a pass). Use to answer 'am I compliant at L2 / where are my gaps?'.";
|
|
51
|
+
};
|
|
52
|
+
readonly plan_sbd_toe_rollout: {
|
|
53
|
+
readonly previous_description: "CONSULTA À SEQUÊNCIA PUBLICADA — não planeia por ti: serve a ordem das fases que o Manual publica, mapeada aos capítulos que cada uma atravessa. O roteiro é teu; isto é o que existe para o fazeres. MVP — phase-ordered, the dependency DAG is deferred (declared, not faked). Grounded in the published runtime; nothing invented. Use to answer 'in what order do we roll out SbD?'.";
|
|
54
|
+
};
|
|
55
|
+
readonly get_sbd_toe_macro_processes: {
|
|
56
|
+
readonly previous_description: "LEITURA PROGRAMA (0.20.0-beta.37) — «por onde começamos e com que SEQUÊNCIA?». Serve os cinco macro-processos MP-01..05 que o Manual publica (pergunta, continuidade, invariante, dono, participantes, percurso de capítulos, indicadores, pontos de controlo, evidência esperada, proporcionalidade L1-L3) e a **ORDEM DE ADOPÇÃO publicada**. A ordem deriva EXCLUSIVAMENTE das arestas `dependency`: as `feedback` são realimentação e ficam FORA dela — se entrassem, os cinco macro-processos ciclariam. NÃO é a leitura GUIDE (que requisitos se aplicam a uma tarefa) nem a IMPL (a capacidade de um capítulo): devolver os 274 requisitos, ou um capítulo isolado, seria responder a outra pergunta. Limites DECLARADOS na resposta: não existe entidade «programa» (recusa de curadoria, ratificada); a travessia MP↔fase do SDLC é lacuna publicada e não se deriva; e MacroProcess, capítulo e fase são três segmentações paralelas — `traverses_bundles` é percurso, nunca contenção.";
|
|
57
|
+
};
|
|
58
|
+
readonly explain_sbd_toe_topic: {
|
|
59
|
+
readonly previous_description: "LEITURA CONSULT (0.20.0-beta.35) — «o que é que o Manual DIZ sobre X?», pergunta de CONHECIMENTO, sem tarefa e sem projecto. Atravessa o Manual: requisitos (com `applies_at`), ORIENTAÇÃO (práticas), PROVAS, AMEAÇAS, **ANTIPADRÕES** («o que NÃO fazer» — a metade que não tinha caminho próprio) e onde no ciclo. Distingue requisito de orientação e marca a proveniência manual-grounded. **`risk_level` é OPCIONAL aqui e ANOTA, nunca filtra** — uma pergunta de conhecimento não tem nível. Fronteira deliberada: o nível continua OBRIGATÓRIO na selecção (`select_sbd_toe_requirements`), no `prepare_sbd_toe_codegen_context` e na vista de capacidade, onde a pergunta é «o que se aplica ao MEU caso». Pede por conceito (`concern`) ou por estrutura (`category` / `chapter`).";
|
|
60
|
+
};
|
|
61
|
+
readonly get_sbd_toe_chapter_capability: {
|
|
62
|
+
readonly previous_description: "LEITURA IMPL (0.20.0-beta.34) — «a organização quer implementar o cap. N: que capacidade precisa de ter, como sabe que está capaz, e COMO MEDE?». Publica os KPIs que o MANUAL define para o capítulo, com os `thresholds_by_level` (L1/L2/L3) como dado — é isso que distingue MEDIR de listar — mais os ARTEFACTOS que a capacidade tem de produzir. NÃO é a leitura GUIDE: se a pergunta é «que requisitos se aplicam a ESTA tarefa», isso é `select_sbd_toe_requirements`. A resposta declara qual das duas recebeste no campo `reading`. Alcançável por capítulo (`chapter`), por KPI (`metric_id`) ou por dimensão (`dimension`); `risk_level` acrescenta o alvo desse nível. Fecha o ciclo com `assess_sbd_toe_implementation`, que avalia os valores que TU medires contra estes mesmos KPIs.";
|
|
63
|
+
};
|
|
64
|
+
readonly get_sbd_toe_playbook: {
|
|
65
|
+
readonly previous_description: "CAMINHO NORMATIVO para cross-checks e playbooks (0.20.0-beta.33). Responde a «somos sujeitos ao DORA/NIS2/CRA/RGPD/AI-Act — como é que o SbD-ToE nos serve?» com o PLAYBOOK publicado pelo Manual: mapa artigo→capítulo→acção, fases com marcos e checklist de leitura, servidos com a AUTORIDADE declarada. Ao contrário do `search_sbd_toe_manual` (NÃO-NORMATIVO, leitura), esta superfície é normativa. Sem argumentos devolve o ÍNDICE (barato); `framework=\"DORA\"` os playbooks desse diploma; `playbook_id=…` as secções paginadas. Os EXEMPLOS ILUSTRATIVOS vêm em banda SEPARADA e nunca com o estatuto dos cross-checks. Framework sem cross-check publicado (ISO 27001, HIPAA, PCI-DSS, SOC2, FedRAMP, CSA STAR) devolve `status: \"no_cross_check\"` com o roadmap do próprio Manual — declarado, nunca improvisado. Toda a resposta traz a DELIMITAÇÃO: o SbD-ToE não é uma norma, e implementá-lo não é conformidade.";
|
|
66
|
+
};
|
|
67
|
+
readonly map_sbd_toe_regulatory_activation: {
|
|
68
|
+
readonly previous_description: "Regulatory lens (reverse of provenance): given a framework (DORA, NIS2, CRA, RGPD), returns which SbD-ToE manual areas/chapters it activates, grouped with mapping + obligation counts per chapter (coverage-preserving — never a blind dump). Data from the published overlay mappings; nothing invented. Use to answer 'framework X → what do I need to implement?'.";
|
|
69
|
+
};
|
|
70
|
+
readonly map_sbd_toe_applicability: {
|
|
71
|
+
readonly previous_description: "GRADUATED applicability (0.14.0): every chapter applies at every level — returns per-chapter authored demand (obrigatório/recomendado/opcional/specific) derived from the bundle, anchored on the chapter-01 canonical matrix; plus context-conditional bundles for the given technologies. projectRole adds a per-role view. Nothing is excluded by level.";
|
|
72
|
+
readonly previous_long_params: {
|
|
73
|
+
readonly projectRole: "Papel canónico do vocabulário publicado. **AFECTA a resposta**: produz a vista `role_view` por capítulo (as user stories atribuídas a este papel) — não altera é a activação de capítulos/controlos, que deriva do `riskLevel` e das `technologies`. Aliases publicados em `roles.json` são aceites e a resposta declara a resolução em `role_vocabulary`. Os valores legados desta tool (`architect`, `security`, `manager`) continuam aceites mas NÃO são papéis do vocabulário: devolvem vista vazia, declarada.";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly read_sbd_toe_resource: {
|
|
77
|
+
readonly previous_description: "Mirror of resources/read for clients without MCP resource support (e.g. Claude Desktop): returns the content of any server resource by URI — including templated ones with the value in the URI (e.g. sbd://toe/codegen-instructions/codegen). Makes the codegen-instructions reference copy (slots + detail_encoding legend) resolvable on ANY client, and sbd://toe/version readable as a tool. Valid URIs: sbd://toe/agent-guide, sbd://toe/chapter-applicability/{riskLevel}, sbd://toe/quick-start, sbd://toe/model, sbd://toe/activation-vocabulary, sbd://toe/index-compact, sbd://toe/ontology, sbd://toe/skill/{role}, sbd://toe/subagent/{role}, sbd://toe/codegen-instructions/{mode}, sbd://toe/version, sbd://toe/grounded-codegen-guide. Unknown URI returns a declared error listing the valid set (never silent).";
|
|
78
|
+
};
|
|
79
|
+
readonly trace_sbd_toe_requirement_sources: {
|
|
80
|
+
readonly previous_description: "Onde está a FONTE de cada requisito: fontes DIRECTAS (source_anchors — autoria do Manual, marcador «Fontes») e cadeia COMPENSADA REQ→CTRL→ACO→fontes com tipo/confiança por salto (rótulo coverage_compensated — COBERTURA por correspondência entre modelos, NÃO autoria; related não cobre). Servida verbatim da superfície publicada (contrato v1.17 §1.24); os sem-fonte-declarada vêm DECLARADOS; ids desconhecidos idem.";
|
|
81
|
+
};
|
|
82
|
+
readonly select_sbd_toe_requirements: {
|
|
83
|
+
readonly previous_description: "START HERE — para qualquer tarefa concreta esta é a 1ª tool. Arranque: lê sbd://toe/agent-guide (read_sbd_toe_resource); setup_sbd_toe_agent é um PROMPT MCP — clientes sem prompts (p.ex. Desktop) não o expõem: segue directo por aqui. DECLARATIVO PRIMEIRO (contrato v1.18-beta, linha 0.20): TU tens o contexto — lê o pedido, o código e a conversa e DECLARA o que interpretaste (risk_level, concerns, exposure, data_sensitivity, technologies, changed_files). EU NÃO INTERPRETO PROSA: respondo com o que o KG sabe sobre o declarado, mais as adjacências do grafo, de forma reproduzível. Vocabulário fechado em sbd://toe/activation-vocabulary. O `task` fica REGISTADO para auditoria e NÃO influencia o resultado; sem nenhuma declaração devolvo needs_input com o vocabulário e candidatos A CONFIRMAR (nunca adivinho, nunca devolvo zero em silêncio); a baseline do nível pede-se explicitamente (mode='baseline'); o motor inferencial antigo fica em mode='discover' (exploratório). The MP1 selection operation (Classificar → Seleccionar): which requirements apply to THIS task in THIS context. Composes the reference semantics the published ontology declares — baseline (cap. 02 base catalogue, by risk level) ∪ domain chapters activated by the DECLARED activators (concerns, exposure, data_sensitivity, technologies, changed_files) ∪ the categories the published vocabulary promises ⊕ regulatory overlay (extend) — then narrows deterministically by those same declarations. The task text is NEVER an activator in declarative mode (it is recorded context; it is only an engine in mode='discover'). Returns the bands: selected[] (each with its selection_trace: source/trigger/score), narrowed_out[] (eligible-without-signal, grouped by category, with reason), excluded_by_level[] and out_of_scope_chapters (what no declaration activated, by chapter and count, with how to bring it in) — never silent, and the SCOPE of that promise is the universe, not just the baseline. Paginated. coverage pagina `selected` por ORDEM DE ID (alfabética por categoria: ACC primeiro, VAL por último) — NÃO é ordem de relevância, e com uma selecção grande as últimas categorias ficam nas páginas finais (ex.: VAL em offset=200). Se procuras uma categoria específica, declara o concern que a activa, ou pede-a por estrutura (`categories=[…]`), em vez de paginar até lá. All data from the published deterministic runtime bundle — nothing is invented.";
|
|
84
|
+
readonly previous_long_params: {
|
|
85
|
+
readonly chapters: "FORMA B — pedir por ESTRUTURA (0.20.0-beta.30). Ids de capítulo do catálogo publicado (`list_sbd_toe_chapters`), ex.: [\"14-governanca-contratacao\"]. Declaração VERDADEIRA e verificável: não depende de existir um atalho de `concerns` nem de inventar `changed_files`. Mesmas bandas, mesmo traço (`layer: \"declared_structure\"`), mesmos denominadores. Um valor que o catálogo não conhece vem em `unknown_structural`.";
|
|
86
|
+
readonly detail: "Nível de SERIALIZAÇÃO da resposta (0.20.0-beta.26; default `full` = comportamento anterior, byte-idêntico). `standard` e `minimal` movem as justificações DISTINTAS do `selection_trace` para `selection_trace_legend` e deixam cada item a referi-las em `trace` — medido: −40% e −48% de payload numa selecção de 115 requisitos (12 justificações distintas para 115 entradas), com o MESMO conjunto de ids. Dieta de serialização, nunca de conteúdo: nenhum id e nenhuma justificação se perdem. `minimal` elide ainda `type` e `source_chapter` (deriváveis).";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly consult_security_requirements: {
|
|
90
|
+
readonly previous_description: "Deterministic resolution of security requirements, controls and artifacts for a given application context. Filters requirements by risk level, optionally narrows by concern domains (auth, logging, api, etc.), then resolves controls via the published runtime bundle, complementing with ontology domain_mapping when needed. Requirements with no published control link are served and declared in coverage_gaps (never omitted). Os corpos devolvidos são PROJECÇÕES (id/name/category/type) — detalhe completo via resolve_entities; ≤3 concerns por chamada (âmbito recomendado; maxItems no schema). All data comes from the published SbD-ToE deterministic runtime bundle — nothing is invented.";
|
|
91
|
+
readonly previous_long_params: {
|
|
92
|
+
readonly concerns: "Concern domains DECLARADOS (intersecta com o filtro de nível, não o substitui). Conjunto FECHADO de 24 valores, gerado do mesmo vocabulário que sbd://toe/activation-vocabulary publica (com o que cada valor activa e quantos requisitos traz por nível). Valores fora do conjunto são DECLARADOS na resposta (unknown_concerns), nunca descartados em silêncio. O `maxItems: 5` NÃO é um limite do vocabulário: é um tecto de PAYLOAD medido (5 concerns ≈4,3k tk) — o ensino recomenda ≤3.";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
readonly get_threat_landscape: {
|
|
96
|
+
readonly previous_description: "ROTEAMENTO ≠ COBERTURA (0.20.0-beta.29): aceita os 24 concerns do vocabulário sem erro, mas só 11 têm capítulo de ameaças PRÓPRIO — architecture, build, deployment, distribution, iac, logging, monitoring, release, supply_chain, testing, threat_modeling. Para os outros 13 as ameaças chegam pelos capítulos onde se DEFINEM os controlos que o concern activa: são reais e do âmbito activado, mas NÃO são «as ameaças deste domínio». A resposta declara-o em `routing_basis` (`domain_chapter` | `activated_controls`) — e a tabela acima diz-to ANTES de gastares a chamada. Em detail='standard'/'minimal' os nomes e ids dos controlos vêm por REFERÊNCIA à `associated_control_legend` — a promessa de campos completos é do detail='full'. ORDEM: por PERTENÇA ao âmbito declarado — capítulo de domínio dos concerns primeiro, depois os restantes capítulos activados, e os caps. 01/02 (classificação e meta-ameaças de PROCESSO) por último; dentro de cada escalão, mitigation_confidence, capítulo e id. A paginação segue esta ordem, por isso a página 1 É a parte relevante. Qualquer outro concern é VÁLIDO e tem requisitos, mas não é roteável AQUI: vem declarado em `unsupported_concerns`, e se TODOS os declarados forem não-roteáveis a resposta é `needs_input` em vez de um payload cheio de ameaças de governação sem relação com o pedido. Deterministic threat resolution for an application context using the SbD-ToE ontology threats pipeline. Returns threats from the published runtime bundle relevant to the active requirement/chapter scope (the defining chapters of activated controls count as in-scope), with structural mitigation confidence, antipattern enrichment, per-threat associated_control_ids (structural CTRL-* ids with declared derivation) and associated_control_names (readable control names, 233/233 since contract v1.16). Optionally narrowed by concern domains. All data comes from the published SbD-ToE deterministic runtime bundle — nothing is invented.";
|
|
97
|
+
};
|
|
98
|
+
readonly get_guide_by_role: {
|
|
99
|
+
readonly previous_description: "Returns runtime-grounded practices, assignments and user stories for a given risk level, optionally filtered by role and/or lifecycle phase. Each assignment carries its required ARTIFACTS (the requirement→evidence link, served from the bundle since contract v1.16). Roles are resolved via canonical aliases (e.g. 'appsec' → 'appsec-engineer', 'sre' → 'devops-sre', 'security-engineer' → 'appsec-engineer'). Results grouped by role and phase. All data from the published SbD-ToE deterministic runtime bundle — nothing is invented.";
|
|
100
|
+
};
|
|
101
|
+
readonly resolve_entities: {
|
|
102
|
+
readonly previous_description: "Low-level entity resolver over the published SbD-ToE deterministic artefacts. Three sources are routed by record_type, each with its own provenance: (1) runtime v0 (data/publish/runtime/*.json) for requirement / control / threat / artifact and related links; (2) AppSec Core v1 (data/publish/runtime/v1/*) for appsec_slice, control_objective, mechanism, appsec_practice, appsec_artifact and appsec_relation; (3) regulatory overlay (data/publish/overlay/*) for regulatory_framework, regulatory_obligation, regulatory_mapping and regulatory_playbook. Query any entity type by record_type with optional field filters. Supports dot-notation for nested fields (e.g. 'applicable_levels.L2'), comparison operators ({gte, lte} for numbers, {in: [...]} for set membership), and array membership checks. If the regulatory overlay is not published in this deployment, regulatory record types return total: 0 with an absent-reason note instead of throwing. Use this when the high-level tools (consult_security_requirements, get_threat_landscape, get_guide_by_role) do not cover your specific query. All data from the published SbD-ToE deterministic artefacts — nothing is invented.";
|
|
103
|
+
readonly previous_long_params: {
|
|
104
|
+
readonly record_type: "Entity type to query. Runtime v0 (data/publish/runtime/*.json): requirement, control, practice, threat, user_story, assignment, role, phase, artifact, evidence_pattern, signal, antipattern, requirement_control_link, signal_evidence_link, antipattern_requirement_link, antipattern_threat_link. AppSec Core v1 (data/publish/runtime/v1/*): appsec_slice, control_objective, mechanism, appsec_practice, appsec_artifact, appsec_relation. Regulatory overlay (data/publish/overlay/*): regulatory_framework, regulatory_obligation, regulatory_mapping, regulatory_playbook. Read sbd://toe/ontology to see the schemas.";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly trace_sbd_toe_graph: {
|
|
108
|
+
readonly previous_description: "Curated multi-hop traversal over the AppSec Core v1 relation graph (slices, control objectives, mechanisms, practices). Answers traceability questions the high-level tools do not expose directly. Pick a `lens`: 'slice_implementation' (a slice -> its control objectives -> the mechanisms that implement and practices that realize them); 'objective_realization' (a control objective -> its mechanisms + practices); 'mechanism_provenance' (a mechanism/practice -> the objectives it serves -> their slices). Optionally scope with `anchor` (an entity id). Results are deterministic and paginated (total + cursor; never silently truncated). All edges from the published deterministic runtime — nothing is invented.";
|
|
109
|
+
};
|
|
110
|
+
readonly prepare_sbd_toe_codegen_context: {
|
|
111
|
+
readonly previous_description: "MONTA CONTEXTO, NÃO AGE — não escreve, não altera e não valida o teu código: reúne o contexto determinístico e citável para TU gerares. Contexto grounded, em porções, para um LLM a jusante gerar, review or plan tests for code. This tool DOES NOT generate code and DOES NOT edit files. It runs a scope gate (rejecting vague or overly broad asks), an auditable semantic activation step (explicit concerns, single-token lexicon, compound phrases such as 'endpoint seguro', PT/EN alias expansion via the semantic gateway, and a whole-word intent classifier — every activation carries a deterministic score in [0,1]), and deterministic resolution against runtime v0, runtime v1 and the regulatory overlay. Returns one of four statuses: ready_for_codegen, needs_clarification, needs_decomposition, unsupported_scope. On ready_for_codegen the output carries activation_trace (with score, source and reason), activated_scope, g2_context, manual_grounding, regulatory_overlay, citations (0.21 §3: invertido em todos os níveis — legenda por fonte + ids referenciados por caminho; citation_map já não existe), adjacency (0.21 §2, em TODOS os níveis: os sinais do vocabulário que NÃO declaraste e que mudariam o conjunto, com quantos ids cada um acrescentaria — aritmética sobre a declaração, nunca leitura da tarefa; resumo top-5 + denominadores; detalhe inline em standard/full, por referência em lista), completeness_report (incl. `verification`: denominadores da verificação fundida), llm_codegen_instructions and security_rationale_template — with provenance for each section. 0.21 §1 — O REQUISITO FUNDIDO: cada requisito activado é UM objecto {id, name, type, description, verify, evidence}, verbatim do bundle, em TODOS os níveis — a descrição nunca sai; `verify`/`evidence` são o padrão de evidência do próprio requisito (1:1). Já não há bloco g2_context.evidence_patterns nem cap: o que não vai inline (evidence_pattern_id, control_id, expected_artifact_type_ids) vem por referência executável (completeness_report.verification.by_ref → get_sbd_toe_verification_matrix). No canonical IDs are ever invented; names are surfaced only when manual_rastreabilidade publishes them.";
|
|
112
|
+
readonly previous_long_params: {
|
|
113
|
+
readonly selection_mode: "Semântica da SELECÇÃO (não confundir com `mode`, que é codegen/review/test-plan). declarative (default, contrato v1.18-beta): o conjunto vem do que DECLARASTE (concerns/exposure/data_sensitivity/technologies/changed_files) — sem declarações devolvo needs_input com o vocabulário; o `task` serve para grounding/citações e auditoria, não para escolher requisitos. discover: motor inferencial histórico (a prosa activa), exploratório.";
|
|
114
|
+
readonly detail: "Nível da resposta (0.21 §5): o eixo é «o que está INLINE e o que está POR REFERÊNCIA» — a descrição de cada requisito nunca sai, em nenhum nível, e o conjunto de ids citáveis é o mesmo em todos (invariante 3). 'lista': todo o requisito activado completo e verbatim (id, name, type, description, verify, evidence) + ids citáveis (`citations` invertido) + instruções e template inline; manual_grounding por referência (counts + entries_ref → 'full'); relations por referência (relations_ref, ou include_relations=true); trace só com debug=true; adjacência em RESUMO (top-5 do que NÃO declaraste e mudaria o conjunto + denominadores) com detail_ref. 'standard': o que a lista promete E a adjacência DETALHADA inline (todos os sinais). 'full' (default): o que o standard promete E manual_grounding verbatim inline, relations_ref executável (include_relations=true inlina-as), activation_trace inline, citations invertido — sem tecto, preço declarado em size_estimate. Em lista/standard as relations SAEM (relations_summary com a contabilidade exacta; 0.21 §3). TECTO de requisitos por chamada (ratificado 2026-09-25): lista 83, standard 88 (envelopes herdados 8.450/9.200 tk); acima ⇒ needs_decomposition com requirement_ceiling e divisão ensinada. 'ultrathin' retirou-se (cortava a descrição); 'minimal' passou a 'lista' — ambos devolvem erro que diz para onde foram.";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.21 §6-d — HISTÓRICO DA SUPERFÍCIE, verbatim.
|
|
3
|
+
*
|
|
4
|
+
* As descrições das tools carregavam o changelog (0.19.4, beta.26, s3c…) e misturavam duas
|
|
5
|
+
* línguas — 7–10k tokens de schema pagos em TODAS as voltas de um agente. Passam a ≤600
|
|
6
|
+
* caracteres, uma língua; o que lá estava NÃO se apaga: vive aqui, tal e qual estava em
|
|
7
|
+
* tools/list @ 6ea4789 (antes desta fase), e serve-se em sbd://toe/version.surface_history.
|
|
8
|
+
*/
|
|
9
|
+
export const SURFACE_HISTORY = {
|
|
10
|
+
note: "Descrições das tools tal como eram servidas antes da 0.21 §6-d (verbatim). O changelog vive no CHANGELOG.md e aqui; as descrições servidas hoje só dizem o que a tool faz.",
|
|
11
|
+
captured_at: "0.21 @ 6ea4789 (2026-09-25)",
|
|
12
|
+
tools: {
|
|
13
|
+
"search_sbd_toe_manual": {
|
|
14
|
+
previous_description: "NÃO-NORMATIVO — leitura e orientação, NUNCA caminho para um conjunto de requisitos. Pesquisa semântica sobre os chunks publicados do manual: serve para LER e localizar passagens (e para tu, LLM, formares a tua leitura), não para decidir âmbito. O conjunto de requisitos vem de select_sbd_toe_requirements com activadores DECLARADOS (vocabulário em sbd://toe/activation-vocabulary) — o que aqui sai não selecciona nada e não deve ser citado como se fosse selecção."
|
|
15
|
+
},
|
|
16
|
+
"answer_sbd_toe_manual": {
|
|
17
|
+
previous_description: "SERVE CONTEXTO PARA O TEU MODELO RESPONDER — não responde: a resposta é do modelo do cliente, via sampling, e o juízo é de quem pergunta. Recupera contexto do Manual e pede a resposta final ao modelo do cliente via MCP sampling. Requires sampling support from the MCP client. Without sampling, falls back to formatted retrieval output (same as search_sbd_toe_manual). Prefer search_sbd_toe_manual for clients without sampling support."
|
|
18
|
+
},
|
|
19
|
+
"inspect_sbd_toe_retrieval": {
|
|
20
|
+
previous_description: "Inspects retrieval, context selection and final prompt without requesting an answer from the client model."
|
|
21
|
+
},
|
|
22
|
+
"list_sbd_toe_chapters": {
|
|
23
|
+
previous_description: "Lists SbD-ToE manual chapters with id, canonical title, a clean readableTitle, graduated applicability (all levels true) and derived demand_by_level (0.14.0 — the binary minLevel theory is retired)."
|
|
24
|
+
},
|
|
25
|
+
"query_sbd_toe_entities": {
|
|
26
|
+
previous_description: "Queries manual entities by text, entity type, chapter or risk level."
|
|
27
|
+
},
|
|
28
|
+
"get_sbd_toe_chapter_brief": {
|
|
29
|
+
previous_description: "Returns an operational summary of a chapter: title, objective, role, phases, artefacts (fields are present when the substrate carries them)."
|
|
30
|
+
},
|
|
31
|
+
"plan_sbd_toe_repo_governance": {
|
|
32
|
+
previous_description: "PROJECÇÃO DOS ARTEFACTOS PUBLICADOS — não governa o teu repositório: serve o que o Manual identifica, por capítulo, para tu decidires o que instalas. Lista de artefactos/documentos do SbD-ToE, grouped by chapter, with risk level applicability. Optionally filter by riskLevel (L1/L2/L3). All data comes from the manual indices — nothing is invented. The manual does not provide templates; ask the LLM to generate one if needed."
|
|
33
|
+
},
|
|
34
|
+
"generate_sbd_toe_skill": {
|
|
35
|
+
previous_description: "GERA A PARTIR DO PUBLICADO, SEM VALIDAR O TEU AMBIENTE — não instala, não configura e não verifica nada do teu lado: devolve o texto para TU instalares onde souberes. Use this tool when asked to 'create a skill for SbD-ToE', 'set up instructions', 'configure this client/agent to use SbD-ToE', 'configure yourself for role X', or 'integrate SbD-ToE'. Without arguments returns the canonical skill content from sbd://toe/agent-guide. With role= returns a role-specialised skill (format=skill) or an installable sub-agent definition (format=subagent) grounded on the role's manual slice — flavour=harnessed grants the mcp__sbd-toe__* tools (queries live); flavour=skilled embeds the frozen slice with no MCP tools. Save the returned content to suggested_path (or the client equivalent)."
|
|
36
|
+
},
|
|
37
|
+
"map_sbd_toe_review_scope": {
|
|
38
|
+
previous_description: "Given a set of changed files, maps which SbD-ToE knowledge bundles should be reviewed, with explicit reasoning per path."
|
|
39
|
+
},
|
|
40
|
+
"get_sbd_toe_chapter_implementation_checklist": {
|
|
41
|
+
previous_description: "The canon/20 'how to implement chapter NN' checklist — retrieval-grounded prose from the implementation profile (the operational 'Aplicação no Ciclo de Vida' guidance). Use to answer 'how do I implement chapter NN / this area?'. Coverage-preserving; cites chunk ids; nothing invented. For the level-sharp structured Definition-of-Done use get_guide_by_role(include_detail=true)."
|
|
42
|
+
},
|
|
43
|
+
"get_sbd_toe_operating_model": {
|
|
44
|
+
previous_description: "The operating model — RACI, decision-rights, governance cadences, org-model — from the rollout playbook (implementation profile). Retrieval-grounded prose; coverage-preserving; nothing invented. Use to answer 'who is responsible / how do we govern the SbD rollout?'."
|
|
45
|
+
},
|
|
46
|
+
"get_sbd_toe_verification_matrix": {
|
|
47
|
+
previous_description: "The EXPECTED side of verification: per requirement/control at a risk level, the validation method + expected evidence + EvidencePattern reference (the published patterns — totals declared per response). The deterministic complement of the auditor's expectation and the test-plan. Cited per row; coverage-preserving — declares the requirements with no EvidencePattern. Use to answer 'how do I prove chapter/level X?' — or 'how do I prove THESE requirements?' via requirement_ids (o fecho requisito→prova a partir do select)."
|
|
48
|
+
},
|
|
49
|
+
"assess_sbd_toe_implementation": {
|
|
50
|
+
previous_description: "SERVE OS LIMIARES PUBLICADOS APLICADOS AOS VALORES QUE DECLARASTE — a leitura é tua: não mede, não verifica os teus valores e não emite juízo de suficiência. Aritmética sobre dado publicado. Progresso auto-declarado: compara os KPI submetidos com os limiares publicados por nível thresholds (metrics.json) → posture (below/at/above) + gaps per KPI. Stateless self-report — values in, posture out, nothing stored; thresholds never invented; an applicable KPI with no value is not_reported (never a pass). Use to answer 'am I compliant at L2 / where are my gaps?'."
|
|
51
|
+
},
|
|
52
|
+
"plan_sbd_toe_rollout": {
|
|
53
|
+
previous_description: "CONSULTA À SEQUÊNCIA PUBLICADA — não planeia por ti: serve a ordem das fases que o Manual publica, mapeada aos capítulos que cada uma atravessa. O roteiro é teu; isto é o que existe para o fazeres. MVP — phase-ordered, the dependency DAG is deferred (declared, not faked). Grounded in the published runtime; nothing invented. Use to answer 'in what order do we roll out SbD?'."
|
|
54
|
+
},
|
|
55
|
+
"get_sbd_toe_macro_processes": {
|
|
56
|
+
previous_description: "LEITURA PROGRAMA (0.20.0-beta.37) — «por onde começamos e com que SEQUÊNCIA?». Serve os cinco macro-processos MP-01..05 que o Manual publica (pergunta, continuidade, invariante, dono, participantes, percurso de capítulos, indicadores, pontos de controlo, evidência esperada, proporcionalidade L1-L3) e a **ORDEM DE ADOPÇÃO publicada**. A ordem deriva EXCLUSIVAMENTE das arestas `dependency`: as `feedback` são realimentação e ficam FORA dela — se entrassem, os cinco macro-processos ciclariam. NÃO é a leitura GUIDE (que requisitos se aplicam a uma tarefa) nem a IMPL (a capacidade de um capítulo): devolver os 274 requisitos, ou um capítulo isolado, seria responder a outra pergunta. Limites DECLARADOS na resposta: não existe entidade «programa» (recusa de curadoria, ratificada); a travessia MP↔fase do SDLC é lacuna publicada e não se deriva; e MacroProcess, capítulo e fase são três segmentações paralelas — `traverses_bundles` é percurso, nunca contenção."
|
|
57
|
+
},
|
|
58
|
+
"explain_sbd_toe_topic": {
|
|
59
|
+
previous_description: "LEITURA CONSULT (0.20.0-beta.35) — «o que é que o Manual DIZ sobre X?», pergunta de CONHECIMENTO, sem tarefa e sem projecto. Atravessa o Manual: requisitos (com `applies_at`), ORIENTAÇÃO (práticas), PROVAS, AMEAÇAS, **ANTIPADRÕES** («o que NÃO fazer» — a metade que não tinha caminho próprio) e onde no ciclo. Distingue requisito de orientação e marca a proveniência manual-grounded. **`risk_level` é OPCIONAL aqui e ANOTA, nunca filtra** — uma pergunta de conhecimento não tem nível. Fronteira deliberada: o nível continua OBRIGATÓRIO na selecção (`select_sbd_toe_requirements`), no `prepare_sbd_toe_codegen_context` e na vista de capacidade, onde a pergunta é «o que se aplica ao MEU caso». Pede por conceito (`concern`) ou por estrutura (`category` / `chapter`)."
|
|
60
|
+
},
|
|
61
|
+
"get_sbd_toe_chapter_capability": {
|
|
62
|
+
previous_description: "LEITURA IMPL (0.20.0-beta.34) — «a organização quer implementar o cap. N: que capacidade precisa de ter, como sabe que está capaz, e COMO MEDE?». Publica os KPIs que o MANUAL define para o capítulo, com os `thresholds_by_level` (L1/L2/L3) como dado — é isso que distingue MEDIR de listar — mais os ARTEFACTOS que a capacidade tem de produzir. NÃO é a leitura GUIDE: se a pergunta é «que requisitos se aplicam a ESTA tarefa», isso é `select_sbd_toe_requirements`. A resposta declara qual das duas recebeste no campo `reading`. Alcançável por capítulo (`chapter`), por KPI (`metric_id`) ou por dimensão (`dimension`); `risk_level` acrescenta o alvo desse nível. Fecha o ciclo com `assess_sbd_toe_implementation`, que avalia os valores que TU medires contra estes mesmos KPIs."
|
|
63
|
+
},
|
|
64
|
+
"get_sbd_toe_playbook": {
|
|
65
|
+
previous_description: "CAMINHO NORMATIVO para cross-checks e playbooks (0.20.0-beta.33). Responde a «somos sujeitos ao DORA/NIS2/CRA/RGPD/AI-Act — como é que o SbD-ToE nos serve?» com o PLAYBOOK publicado pelo Manual: mapa artigo→capítulo→acção, fases com marcos e checklist de leitura, servidos com a AUTORIDADE declarada. Ao contrário do `search_sbd_toe_manual` (NÃO-NORMATIVO, leitura), esta superfície é normativa. Sem argumentos devolve o ÍNDICE (barato); `framework=\"DORA\"` os playbooks desse diploma; `playbook_id=…` as secções paginadas. Os EXEMPLOS ILUSTRATIVOS vêm em banda SEPARADA e nunca com o estatuto dos cross-checks. Framework sem cross-check publicado (ISO 27001, HIPAA, PCI-DSS, SOC2, FedRAMP, CSA STAR) devolve `status: \"no_cross_check\"` com o roadmap do próprio Manual — declarado, nunca improvisado. Toda a resposta traz a DELIMITAÇÃO: o SbD-ToE não é uma norma, e implementá-lo não é conformidade."
|
|
66
|
+
},
|
|
67
|
+
"map_sbd_toe_regulatory_activation": {
|
|
68
|
+
previous_description: "Regulatory lens (reverse of provenance): given a framework (DORA, NIS2, CRA, RGPD), returns which SbD-ToE manual areas/chapters it activates, grouped with mapping + obligation counts per chapter (coverage-preserving — never a blind dump). Data from the published overlay mappings; nothing invented. Use to answer 'framework X → what do I need to implement?'."
|
|
69
|
+
},
|
|
70
|
+
"map_sbd_toe_applicability": {
|
|
71
|
+
previous_description: "GRADUATED applicability (0.14.0): every chapter applies at every level — returns per-chapter authored demand (obrigatório/recomendado/opcional/specific) derived from the bundle, anchored on the chapter-01 canonical matrix; plus context-conditional bundles for the given technologies. projectRole adds a per-role view. Nothing is excluded by level.",
|
|
72
|
+
previous_long_params: {
|
|
73
|
+
"projectRole": "Papel canónico do vocabulário publicado. **AFECTA a resposta**: produz a vista `role_view` por capítulo (as user stories atribuídas a este papel) — não altera é a activação de capítulos/controlos, que deriva do `riskLevel` e das `technologies`. Aliases publicados em `roles.json` são aceites e a resposta declara a resolução em `role_vocabulary`. Os valores legados desta tool (`architect`, `security`, `manager`) continuam aceites mas NÃO são papéis do vocabulário: devolvem vista vazia, declarada.",
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"read_sbd_toe_resource": {
|
|
77
|
+
previous_description: "Mirror of resources/read for clients without MCP resource support (e.g. Claude Desktop): returns the content of any server resource by URI — including templated ones with the value in the URI (e.g. sbd://toe/codegen-instructions/codegen). Makes the codegen-instructions reference copy (slots + detail_encoding legend) resolvable on ANY client, and sbd://toe/version readable as a tool. Valid URIs: sbd://toe/agent-guide, sbd://toe/chapter-applicability/{riskLevel}, sbd://toe/quick-start, sbd://toe/model, sbd://toe/activation-vocabulary, sbd://toe/index-compact, sbd://toe/ontology, sbd://toe/skill/{role}, sbd://toe/subagent/{role}, sbd://toe/codegen-instructions/{mode}, sbd://toe/version, sbd://toe/grounded-codegen-guide. Unknown URI returns a declared error listing the valid set (never silent)."
|
|
78
|
+
},
|
|
79
|
+
"trace_sbd_toe_requirement_sources": {
|
|
80
|
+
previous_description: "Onde está a FONTE de cada requisito: fontes DIRECTAS (source_anchors — autoria do Manual, marcador «Fontes») e cadeia COMPENSADA REQ→CTRL→ACO→fontes com tipo/confiança por salto (rótulo coverage_compensated — COBERTURA por correspondência entre modelos, NÃO autoria; related não cobre). Servida verbatim da superfície publicada (contrato v1.17 §1.24); os sem-fonte-declarada vêm DECLARADOS; ids desconhecidos idem."
|
|
81
|
+
},
|
|
82
|
+
"select_sbd_toe_requirements": {
|
|
83
|
+
previous_description: "START HERE — para qualquer tarefa concreta esta é a 1ª tool. Arranque: lê sbd://toe/agent-guide (read_sbd_toe_resource); setup_sbd_toe_agent é um PROMPT MCP — clientes sem prompts (p.ex. Desktop) não o expõem: segue directo por aqui. DECLARATIVO PRIMEIRO (contrato v1.18-beta, linha 0.20): TU tens o contexto — lê o pedido, o código e a conversa e DECLARA o que interpretaste (risk_level, concerns, exposure, data_sensitivity, technologies, changed_files). EU NÃO INTERPRETO PROSA: respondo com o que o KG sabe sobre o declarado, mais as adjacências do grafo, de forma reproduzível. Vocabulário fechado em sbd://toe/activation-vocabulary. O `task` fica REGISTADO para auditoria e NÃO influencia o resultado; sem nenhuma declaração devolvo needs_input com o vocabulário e candidatos A CONFIRMAR (nunca adivinho, nunca devolvo zero em silêncio); a baseline do nível pede-se explicitamente (mode='baseline'); o motor inferencial antigo fica em mode='discover' (exploratório). The MP1 selection operation (Classificar → Seleccionar): which requirements apply to THIS task in THIS context. Composes the reference semantics the published ontology declares — baseline (cap. 02 base catalogue, by risk level) ∪ domain chapters activated by the DECLARED activators (concerns, exposure, data_sensitivity, technologies, changed_files) ∪ the categories the published vocabulary promises ⊕ regulatory overlay (extend) — then narrows deterministically by those same declarations. The task text is NEVER an activator in declarative mode (it is recorded context; it is only an engine in mode='discover'). Returns the bands: selected[] (each with its selection_trace: source/trigger/score), narrowed_out[] (eligible-without-signal, grouped by category, with reason), excluded_by_level[] and out_of_scope_chapters (what no declaration activated, by chapter and count, with how to bring it in) — never silent, and the SCOPE of that promise is the universe, not just the baseline. Paginated. coverage pagina `selected` por ORDEM DE ID (alfabética por categoria: ACC primeiro, VAL por último) — NÃO é ordem de relevância, e com uma selecção grande as últimas categorias ficam nas páginas finais (ex.: VAL em offset=200). Se procuras uma categoria específica, declara o concern que a activa, ou pede-a por estrutura (`categories=[…]`), em vez de paginar até lá. All data from the published deterministic runtime bundle — nothing is invented.",
|
|
84
|
+
previous_long_params: {
|
|
85
|
+
"chapters": "FORMA B — pedir por ESTRUTURA (0.20.0-beta.30). Ids de capítulo do catálogo publicado (`list_sbd_toe_chapters`), ex.: [\"14-governanca-contratacao\"]. Declaração VERDADEIRA e verificável: não depende de existir um atalho de `concerns` nem de inventar `changed_files`. Mesmas bandas, mesmo traço (`layer: \"declared_structure\"`), mesmos denominadores. Um valor que o catálogo não conhece vem em `unknown_structural`.",
|
|
86
|
+
"detail": "Nível de SERIALIZAÇÃO da resposta (0.20.0-beta.26; default `full` = comportamento anterior, byte-idêntico). `standard` e `minimal` movem as justificações DISTINTAS do `selection_trace` para `selection_trace_legend` e deixam cada item a referi-las em `trace` — medido: −40% e −48% de payload numa selecção de 115 requisitos (12 justificações distintas para 115 entradas), com o MESMO conjunto de ids. Dieta de serialização, nunca de conteúdo: nenhum id e nenhuma justificação se perdem. `minimal` elide ainda `type` e `source_chapter` (deriváveis).",
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"consult_security_requirements": {
|
|
90
|
+
previous_description: "Deterministic resolution of security requirements, controls and artifacts for a given application context. Filters requirements by risk level, optionally narrows by concern domains (auth, logging, api, etc.), then resolves controls via the published runtime bundle, complementing with ontology domain_mapping when needed. Requirements with no published control link are served and declared in coverage_gaps (never omitted). Os corpos devolvidos são PROJECÇÕES (id/name/category/type) — detalhe completo via resolve_entities; ≤3 concerns por chamada (âmbito recomendado; maxItems no schema). All data comes from the published SbD-ToE deterministic runtime bundle — nothing is invented.",
|
|
91
|
+
previous_long_params: {
|
|
92
|
+
"concerns": "Concern domains DECLARADOS (intersecta com o filtro de nível, não o substitui). Conjunto FECHADO de 24 valores, gerado do mesmo vocabulário que sbd://toe/activation-vocabulary publica (com o que cada valor activa e quantos requisitos traz por nível). Valores fora do conjunto são DECLARADOS na resposta (unknown_concerns), nunca descartados em silêncio. O `maxItems: 5` NÃO é um limite do vocabulário: é um tecto de PAYLOAD medido (5 concerns ≈4,3k tk) — o ensino recomenda ≤3.",
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"get_threat_landscape": {
|
|
96
|
+
previous_description: "ROTEAMENTO ≠ COBERTURA (0.20.0-beta.29): aceita os 24 concerns do vocabulário sem erro, mas só 11 têm capítulo de ameaças PRÓPRIO — architecture, build, deployment, distribution, iac, logging, monitoring, release, supply_chain, testing, threat_modeling. Para os outros 13 as ameaças chegam pelos capítulos onde se DEFINEM os controlos que o concern activa: são reais e do âmbito activado, mas NÃO são «as ameaças deste domínio». A resposta declara-o em `routing_basis` (`domain_chapter` | `activated_controls`) — e a tabela acima diz-to ANTES de gastares a chamada. Em detail='standard'/'minimal' os nomes e ids dos controlos vêm por REFERÊNCIA à `associated_control_legend` — a promessa de campos completos é do detail='full'. ORDEM: por PERTENÇA ao âmbito declarado — capítulo de domínio dos concerns primeiro, depois os restantes capítulos activados, e os caps. 01/02 (classificação e meta-ameaças de PROCESSO) por último; dentro de cada escalão, mitigation_confidence, capítulo e id. A paginação segue esta ordem, por isso a página 1 É a parte relevante. Qualquer outro concern é VÁLIDO e tem requisitos, mas não é roteável AQUI: vem declarado em `unsupported_concerns`, e se TODOS os declarados forem não-roteáveis a resposta é `needs_input` em vez de um payload cheio de ameaças de governação sem relação com o pedido. Deterministic threat resolution for an application context using the SbD-ToE ontology threats pipeline. Returns threats from the published runtime bundle relevant to the active requirement/chapter scope (the defining chapters of activated controls count as in-scope), with structural mitigation confidence, antipattern enrichment, per-threat associated_control_ids (structural CTRL-* ids with declared derivation) and associated_control_names (readable control names, 233/233 since contract v1.16). Optionally narrowed by concern domains. All data comes from the published SbD-ToE deterministic runtime bundle — nothing is invented."
|
|
97
|
+
},
|
|
98
|
+
"get_guide_by_role": {
|
|
99
|
+
previous_description: "Returns runtime-grounded practices, assignments and user stories for a given risk level, optionally filtered by role and/or lifecycle phase. Each assignment carries its required ARTIFACTS (the requirement→evidence link, served from the bundle since contract v1.16). Roles are resolved via canonical aliases (e.g. 'appsec' → 'appsec-engineer', 'sre' → 'devops-sre', 'security-engineer' → 'appsec-engineer'). Results grouped by role and phase. All data from the published SbD-ToE deterministic runtime bundle — nothing is invented."
|
|
100
|
+
},
|
|
101
|
+
"resolve_entities": {
|
|
102
|
+
previous_description: "Low-level entity resolver over the published SbD-ToE deterministic artefacts. Three sources are routed by record_type, each with its own provenance: (1) runtime v0 (data/publish/runtime/*.json) for requirement / control / threat / artifact and related links; (2) AppSec Core v1 (data/publish/runtime/v1/*) for appsec_slice, control_objective, mechanism, appsec_practice, appsec_artifact and appsec_relation; (3) regulatory overlay (data/publish/overlay/*) for regulatory_framework, regulatory_obligation, regulatory_mapping and regulatory_playbook. Query any entity type by record_type with optional field filters. Supports dot-notation for nested fields (e.g. 'applicable_levels.L2'), comparison operators ({gte, lte} for numbers, {in: [...]} for set membership), and array membership checks. If the regulatory overlay is not published in this deployment, regulatory record types return total: 0 with an absent-reason note instead of throwing. Use this when the high-level tools (consult_security_requirements, get_threat_landscape, get_guide_by_role) do not cover your specific query. All data from the published SbD-ToE deterministic artefacts — nothing is invented.",
|
|
103
|
+
previous_long_params: {
|
|
104
|
+
"record_type": "Entity type to query. Runtime v0 (data/publish/runtime/*.json): requirement, control, practice, threat, user_story, assignment, role, phase, artifact, evidence_pattern, signal, antipattern, requirement_control_link, signal_evidence_link, antipattern_requirement_link, antipattern_threat_link. AppSec Core v1 (data/publish/runtime/v1/*): appsec_slice, control_objective, mechanism, appsec_practice, appsec_artifact, appsec_relation. Regulatory overlay (data/publish/overlay/*): regulatory_framework, regulatory_obligation, regulatory_mapping, regulatory_playbook. Read sbd://toe/ontology to see the schemas.",
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"trace_sbd_toe_graph": {
|
|
108
|
+
previous_description: "Curated multi-hop traversal over the AppSec Core v1 relation graph (slices, control objectives, mechanisms, practices). Answers traceability questions the high-level tools do not expose directly. Pick a `lens`: 'slice_implementation' (a slice -> its control objectives -> the mechanisms that implement and practices that realize them); 'objective_realization' (a control objective -> its mechanisms + practices); 'mechanism_provenance' (a mechanism/practice -> the objectives it serves -> their slices). Optionally scope with `anchor` (an entity id). Results are deterministic and paginated (total + cursor; never silently truncated). All edges from the published deterministic runtime — nothing is invented."
|
|
109
|
+
},
|
|
110
|
+
"prepare_sbd_toe_codegen_context": {
|
|
111
|
+
previous_description: "MONTA CONTEXTO, NÃO AGE — não escreve, não altera e não valida o teu código: reúne o contexto determinístico e citável para TU gerares. Contexto grounded, em porções, para um LLM a jusante gerar, review or plan tests for code. This tool DOES NOT generate code and DOES NOT edit files. It runs a scope gate (rejecting vague or overly broad asks), an auditable semantic activation step (explicit concerns, single-token lexicon, compound phrases such as 'endpoint seguro', PT/EN alias expansion via the semantic gateway, and a whole-word intent classifier — every activation carries a deterministic score in [0,1]), and deterministic resolution against runtime v0, runtime v1 and the regulatory overlay. Returns one of four statuses: ready_for_codegen, needs_clarification, needs_decomposition, unsupported_scope. On ready_for_codegen the output carries activation_trace (with score, source and reason), activated_scope, g2_context, manual_grounding, regulatory_overlay, citations (0.21 §3: invertido em todos os níveis — legenda por fonte + ids referenciados por caminho; citation_map já não existe), adjacency (0.21 §2, em TODOS os níveis: os sinais do vocabulário que NÃO declaraste e que mudariam o conjunto, com quantos ids cada um acrescentaria — aritmética sobre a declaração, nunca leitura da tarefa; resumo top-5 + denominadores; detalhe inline em standard/full, por referência em lista), completeness_report (incl. `verification`: denominadores da verificação fundida), llm_codegen_instructions and security_rationale_template — with provenance for each section. 0.21 §1 — O REQUISITO FUNDIDO: cada requisito activado é UM objecto {id, name, type, description, verify, evidence}, verbatim do bundle, em TODOS os níveis — a descrição nunca sai; `verify`/`evidence` são o padrão de evidência do próprio requisito (1:1). Já não há bloco g2_context.evidence_patterns nem cap: o que não vai inline (evidence_pattern_id, control_id, expected_artifact_type_ids) vem por referência executável (completeness_report.verification.by_ref → get_sbd_toe_verification_matrix). No canonical IDs are ever invented; names are surfaced only when manual_rastreabilidade publishes them.",
|
|
112
|
+
previous_long_params: {
|
|
113
|
+
"selection_mode": "Semântica da SELECÇÃO (não confundir com `mode`, que é codegen/review/test-plan). declarative (default, contrato v1.18-beta): o conjunto vem do que DECLARASTE (concerns/exposure/data_sensitivity/technologies/changed_files) — sem declarações devolvo needs_input com o vocabulário; o `task` serve para grounding/citações e auditoria, não para escolher requisitos. discover: motor inferencial histórico (a prosa activa), exploratório.",
|
|
114
|
+
"detail": "Nível da resposta (0.21 §5): o eixo é «o que está INLINE e o que está POR REFERÊNCIA» — a descrição de cada requisito nunca sai, em nenhum nível, e o conjunto de ids citáveis é o mesmo em todos (invariante 3). 'lista': todo o requisito activado completo e verbatim (id, name, type, description, verify, evidence) + ids citáveis (`citations` invertido) + instruções e template inline; manual_grounding por referência (counts + entries_ref → 'full'); relations por referência (relations_ref, ou include_relations=true); trace só com debug=true; adjacência em RESUMO (top-5 do que NÃO declaraste e mudaria o conjunto + denominadores) com detail_ref. 'standard': o que a lista promete E a adjacência DETALHADA inline (todos os sinais). 'full' (default): o que o standard promete E manual_grounding verbatim inline, relations_ref executável (include_relations=true inlina-as), activation_trace inline, citations invertido — sem tecto, preço declarado em size_estimate. Em lista/standard as relations SAEM (relations_summary com a contabilidade exacta; 0.21 §3). TECTO de requisitos por chamada (ratificado 2026-09-25): lista 83, standard 88 (envelopes herdados 8.450/9.200 tk); acima ⇒ needs_decomposition com requirement_ceiling e divisão ensinada. 'ultrathin' retirou-se (cortava a descrição); 'minimal' passou a 'lista' — ambos devolvem erro que diz para onde foram.",
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=surface-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-history.js","sourceRoot":"","sources":["../../src/serving/surface-history.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,4KAA4K;IAClL,WAAW,EAAE,6BAA6B;IAC1C,KAAK,EAAE;QACL,uBAAuB,EAAE;YACvB,oBAAoB,EAAE,idAAid;SACxe;QACD,uBAAuB,EAAE;YACvB,oBAAoB,EAAE,obAAob;SAC3c;QACD,2BAA2B,EAAE;YAC3B,oBAAoB,EAAE,4GAA4G;SACnI;QACD,uBAAuB,EAAE;YACvB,oBAAoB,EAAE,wMAAwM;SAC/N;QACD,wBAAwB,EAAE;YACx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AAE,8qBAA8qB;YACpsB,oBAAoB,EAAE;gBACpB,UAAU,EAAE,+dAA+d;aAC5e;SACF;QACD,sBAAsB,EAAE;YACtB,oBAAoB,EAAE,u6DAAu6D;SAC97D;QACD,mBAAmB,EAAE;YACnB,oBAAoB,EAAE,mhBAAmhB;SAC1iB;QACD,kBAAkB,EAAE;YAClB,oBAAoB,EAAE,mpCAAmpC;YACzqC,oBAAoB,EAAE;gBACpB,aAAa,EAAE,gmBAAgmB;aAChnB;SACF;QACD,qBAAqB,EAAE;YACrB,oBAAoB,EAAE,ssBAAssB;SAC7tB;QACD,iCAAiC,EAAE;YACjC,oBAAoB,EAAE,8nEAA8nE;YACppE,oBAAoB,EAAE;gBACpB,gBAAgB,EAAE,ibAAib;gBACnc,QAAQ,EAAE,s1CAAs1C;aACj2C;SACF;KACF;CACO,CAAC"}
|
|
@@ -49,6 +49,13 @@ export interface KpiResult {
|
|
|
49
49
|
threshold_raw?: string;
|
|
50
50
|
threshold_value?: number;
|
|
51
51
|
operator?: string;
|
|
52
|
+
/**
|
|
53
|
+
* 2026-09-11 despacho §2 — a UNIDADE do threshold, ecoada em CADA veredicto. O dado sempre
|
|
54
|
+
* a trouxe (`thresholds_by_level_parsed.unit`, 93/99 métricas) e o serving descartava-a:
|
|
55
|
+
* um KPI submetido em minutos era julgado contra «4» (horas) e saía `below` sem ninguém
|
|
56
|
+
* poder ver o erro. `unit: null` = threshold sem unidade parseada (só `threshold_raw`).
|
|
57
|
+
*/
|
|
58
|
+
unit?: string | null;
|
|
52
59
|
value?: number;
|
|
53
60
|
status: KpiStatus;
|
|
54
61
|
/** Source citation — the published KPI catalog document the threshold is grounded in. */
|
|
@@ -68,6 +75,8 @@ export interface AssessData {
|
|
|
68
75
|
gaps: number;
|
|
69
76
|
not_reported: number;
|
|
70
77
|
};
|
|
78
|
+
/** 2026-09-11 §2 — regra das unidades, dita onde os números são julgados. */
|
|
79
|
+
units_note: string;
|
|
71
80
|
/** 0.20.0-beta.36 — âmbito da avaliação e o DENOMINADOR explicado. */
|
|
72
81
|
scope: {
|
|
73
82
|
chapter?: string;
|
|
@@ -118,6 +118,7 @@ export function handleAssessImplementation(args) {
|
|
|
118
118
|
...(t.raw ? { threshold_raw: t.raw } : {}),
|
|
119
119
|
threshold_value: t.value,
|
|
120
120
|
operator: t.operator,
|
|
121
|
+
unit: t.unit ?? null,
|
|
121
122
|
status: "not_reported",
|
|
122
123
|
...(source ? { source } : {})
|
|
123
124
|
};
|
|
@@ -178,6 +179,9 @@ export function handleAssessImplementation(args) {
|
|
|
178
179
|
posture,
|
|
179
180
|
per_kpi: page.items,
|
|
180
181
|
gaps: boundedGaps,
|
|
182
|
+
units_note: "Cada veredicto ecoa `unit` (do threshold publicado): submete `kpi_values` NA UNIDADE do " +
|
|
183
|
+
"KPI — um valor noutra unidade produz meets/below ERRADO e este servidor não converte " +
|
|
184
|
+
"(não inventa a unidade do que recebeu). `unit: null` = compara contra `threshold_raw` à mão.",
|
|
181
185
|
totals: { applicable, meets, gaps: gaps.length, not_reported: notReported },
|
|
182
186
|
...(unknownChapter ? { unknown_chapter: unknownChapter } : {}),
|
|
183
187
|
scope: {
|
|
@@ -217,7 +221,9 @@ export function handleAssessImplementation(args) {
|
|
|
217
221
|
// os thresholds por nível; esta tool avalia os valores que ele medir.
|
|
218
222
|
intent: "os KPIs que o MANUAL define para o capítulo, com os thresholds por nível (traz-os para cá)",
|
|
219
223
|
tool: "get_sbd_toe_chapter_capability",
|
|
220
|
-
|
|
224
|
+
// 0.21 §6 — `next` GERADO do contexto, nunca constante: o capítulo é o avaliado (ou o do
|
|
225
|
+
// KPI em falta), o nível é o pedido.
|
|
226
|
+
with: chapterScope !== undefined ? `chapter="${chapterScope}", risk_level="${riskLevel}"` : `chapter=<per_kpi[].chapter do KPI em falta>, risk_level="${riskLevel}"`,
|
|
221
227
|
kind: "structural"
|
|
222
228
|
},
|
|
223
229
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assess-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;AAED,0CAA0C;AAC1C,MAAM,UAAU,kBAAkB;IAChC,aAAa,GAAG,SAAS,CAAC;AAC5B,CAAC"}
|
|
@@ -51,6 +51,17 @@ export interface AssignmentSlim {
|
|
|
51
51
|
proportionality_level?: string;
|
|
52
52
|
sdlc_integration?: UserStory["sdlc_integration"];
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* 2026-09-11 §6 — a MESMA história em várias atribuições da resposta é embebida UMA vez;
|
|
56
|
+
* as repetições trazem esta referência (a US-13 saía 3× verbatim, ≈1,8k tokens).
|
|
57
|
+
*/
|
|
58
|
+
user_story_ref?: {
|
|
59
|
+
us_id?: string;
|
|
60
|
+
id?: string;
|
|
61
|
+
title: string;
|
|
62
|
+
embedded_at_assignment_id: string;
|
|
63
|
+
note: string;
|
|
64
|
+
};
|
|
54
65
|
}
|
|
55
66
|
/** Aggregated DoD view of a role's user stories — the "what must role X fulfil" answer. */
|
|
56
67
|
export interface RoleChecklistEntry {
|
|
@@ -85,6 +96,24 @@ export interface GetGuideByRoleResult {
|
|
|
85
96
|
note: string;
|
|
86
97
|
absence?: unknown;
|
|
87
98
|
};
|
|
99
|
+
/** 2026-09-11 §1: papel INEXISTENTE — erro declarado com did_you_mean, nunca canonicidade fabricada. */
|
|
100
|
+
unknown_role?: {
|
|
101
|
+
requested: string;
|
|
102
|
+
resolved: null;
|
|
103
|
+
did_you_mean: string[];
|
|
104
|
+
supported_values: string[];
|
|
105
|
+
note: string;
|
|
106
|
+
};
|
|
107
|
+
/** 2026-09-11 adenda §2: repartição declarada (secops/soc) com ponteiro para o outro papel. */
|
|
108
|
+
role_scope_split?: {
|
|
109
|
+
perspective: string;
|
|
110
|
+
role_id: string;
|
|
111
|
+
covers: string;
|
|
112
|
+
counterpart_role_ids: string[];
|
|
113
|
+
counterpart_covers?: Record<string, string>;
|
|
114
|
+
source: string;
|
|
115
|
+
note: string;
|
|
116
|
+
};
|
|
88
117
|
meta: {
|
|
89
118
|
assignmentCount: number;
|
|
90
119
|
userStoryCount: number;
|
|
@@ -129,6 +158,10 @@ export interface GetGuideByRoleOutput {
|
|
|
129
158
|
note: string;
|
|
130
159
|
absence?: unknown;
|
|
131
160
|
};
|
|
161
|
+
/** 2026-09-11 §1: papel INEXISTENTE — erro declarado com did_you_mean, nunca canonicidade fabricada. */
|
|
162
|
+
unknown_role?: GetGuideByRoleResult["unknown_role"];
|
|
163
|
+
/** 2026-09-11 adenda §2: repartição declarada (secops/soc) com ponteiro para o outro papel. */
|
|
164
|
+
role_scope_split?: GetGuideByRoleResult["role_scope_split"];
|
|
132
165
|
role_summary: Record<string, number>;
|
|
133
166
|
phase_summary: Record<string, number>;
|
|
134
167
|
meta: {
|
|
@@ -145,4 +178,11 @@ export interface GetGuideByRoleOutput {
|
|
|
145
178
|
next: Affordance[];
|
|
146
179
|
}
|
|
147
180
|
export declare function _resolveGuideByRole(args: Record<string, unknown>, ontologyData: ReturnType<typeof getOntologyData>): GetGuideByRoleResult;
|
|
181
|
+
/**
|
|
182
|
+
* 2026-09-11 §6 — dedupe do conteúdo embebido: a primeira atribuição de cada história leva o
|
|
183
|
+
* `user_story` completo; as seguintes levam `user_story_ref`. As atribuições continuam TODAS
|
|
184
|
+
* presentes (desduplicar atribuições perderia o eixo fase — beta.31); só o texto deixa de se
|
|
185
|
+
* repetir verbatim.
|
|
186
|
+
*/
|
|
187
|
+
export declare function dedupeEmbeddedStories(assignments: AssignmentSlim[]): AssignmentSlim[];
|
|
148
188
|
export declare function handleGetGuideByRole(args: Record<string, unknown>): GetGuideByRoleOutput;
|