@shiftleftpt/sbd-toe-mcp 0.7.0 → 0.7.2

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.
@@ -49,13 +49,46 @@ Use when the user asks *what the manual says*, what applies, how to classify a p
49
49
  what controls or artefacts are required, or whether something is aligned with the manual.
50
50
 
51
51
  ```
52
- search_sbd_toe_manual ← conceptual questions, narrative context
53
- map_sbd_toe_applicability ← which chapters/controls apply to this project
54
- get_sbd_toe_chapter_brief ← what a specific chapter covers (phases, artefacts, topics)
55
- list_sbd_toe_chapters ← chapter discovery and navigation
56
- query_sbd_toe_entities ← specific controls (CTRL-*), artefacts (ART-*), practices
52
+ search_sbd_toe_manual ← conceptual questions, narrative context
53
+ map_sbd_toe_applicability ← which chapters/controls apply to this project
54
+ get_sbd_toe_chapter_brief ← what a specific chapter covers (phases, artefacts, topics)
55
+ list_sbd_toe_chapters ← chapter discovery and navigation
56
+ query_sbd_toe_entities ← specific controls (CTRL-*), artefacts (ART-*), practices
57
+
58
+ consult_security_requirements ← deterministic: requirements + controls for a risk level
59
+ params: risk_level (L1|L2|L3), concerns? (string[])
60
+ returns: requirements[], controls[], active_domains[],
61
+ active_categories[], rule_trace[]
62
+
63
+ resolve_entities ← low-level ontology filter engine
64
+ params: record_type, filters? (dot-notation), limit?
65
+ use for: enumerating roles, finding controls by domain,
66
+ listing requirements by category, exploring the ontology
57
67
  ```
58
68
 
69
+ **Prefer `consult_security_requirements` over `search_sbd_toe_manual`** when the question
70
+ is structured ("what requirements apply at L2?", "which controls are active for auth?").
71
+ Use `search_sbd_toe_manual` for narrative/conceptual questions.
72
+
73
+ #### Valid `concerns` values (ontology-controlled vocabulary)
74
+
75
+ | concern | Categories resolved | Meaning |
76
+ |---|---|---|
77
+ | `auth` | AUT, ACC, SES | Authentication, access control, sessions |
78
+ | `logging` | LOG | Audit logging, monitoring |
79
+ | `validation` | VAL, ERR | Input validation, error handling |
80
+ | `api` | API | API security |
81
+ | `config` | CFG | Configuration & environment hardening |
82
+ | `integrity` | INT | Integrity & integration |
83
+ | `distribution` | DST | Supply chain, packaging |
84
+ | `ide` | IDE | Development environment |
85
+ | `requirements` | REQ | Security requirements in SDLC |
86
+ | `architecture` | ARC | Secure architecture |
87
+ | `iac` | IAC | Infrastructure-as-Code |
88
+ | `encryption` | ENC | Cryptography & sensitive data |
89
+
90
+ Pass concerns as exact lowercase strings from the table above.
91
+
59
92
  ### GUIDE mode
60
93
  Use when the user asks *how to implement, design, structure, document, or review* something
61
94
  according to the manual.
@@ -66,8 +99,45 @@ according to the manual.
66
99
 
67
100
  plan_sbd_toe_repo_governance ← list artefacts the manual identifies, grouped by chapter
68
101
  map_sbd_toe_review_scope ← which SbD-ToE bundles to review given changed files
102
+
103
+ get_guide_by_role ← deterministic: practice assignments + user stories
104
+ params: risk_level (L1|L2|L3), role? (string), phase? (string)
105
+ returns: assignments[], by_role{}, by_phase{}, user stories joined
106
+ use for: "what should a developer do at L2?",
107
+ "what practices apply in the design phase?"
108
+
109
+ get_threat_landscape ← deterministic: threats relevant to a risk level / concern set
110
+ params: risk_level (L1|L2|L3), concerns? (string[])
111
+ returns: threats[] with mitigation_confidence + mitigated_by[]
112
+ NOTE: runs consult internally — do NOT call consult first
113
+ use for: threat modelling context, "what threats apply to auth?"
69
114
  ```
70
115
 
116
+ #### Valid `role` values for `get_guide_by_role`
117
+
118
+ Canonical role IDs (pass exact or common alias — resolved automatically):
119
+
120
+ `developer` · `appsec` · `devops` · `grc` · `qa` · `security_champion` · `software_architect`
121
+ · `product_owner` · `scrum_master` · `team_lead` · `ciso` · `executive_management`
122
+ · `ops` · `pentester` · `compliance` · `auditor` · `ir` · `sre`
123
+
124
+ #### Interpreting tool output
125
+
126
+ | Field | What to communicate |
127
+ |---|---|
128
+ | `rule_trace` contains `CONCERNS_FILTER_REQUIREMENTS` | Tell user scope was narrowed to the specified concerns |
129
+ | `mitigation_confidence: "heuristic"` | Flag as inferred linkage — not structural evidence |
130
+ | `mitigation_confidence: "derived"` | Structural chapter-match — reliable |
131
+ | `assignments: []` / `threats: []` | Say "manual-grounded: not applicable in this scope" — do not invent |
132
+ | `active_domains` | List the security domains active at this risk level |
133
+
134
+ #### Pattern for complex answers (threat model / security plan / checklist)
135
+
136
+ 1. `consult_security_requirements(risk_level, concerns?)` — anchor active requirements & controls
137
+ 2. `get_threat_landscape(risk_level, concerns?)` — relevant threats + mitigating controls
138
+ 3. `get_guide_by_role(risk_level, role?, phase?)` — practices per role/phase
139
+ 4. Generate document grounded on steps 1–3 — label each claim as manual-grounded
140
+
71
141
  > **The MCP surfaces what the manual says — the LLM generates content.**
72
142
  > Use CONSULT tools to retrieve artefact descriptions, required sections, and controls.
73
143
  > Then generate the actual document, template, or checklist based on that grounded context.
@@ -153,7 +223,15 @@ Always distinguish between:
153
223
  | "What does chapter N cover?" | `get_sbd_toe_chapter_brief` |
154
224
  | "List all chapters" | `list_sbd_toe_chapters` |
155
225
  | "Find control / artefact / practice" | `query_sbd_toe_entities` |
156
- | "Generate a threat model / checklist / plan" | `search_sbd_toe_manual` or `get_sbd_toe_chapter_brief` to retrieve what the manual says it should contain → then generate it |
226
+ | "What requirements apply at L1/L2/L3?" | `consult_security_requirements(risk_level)` |
227
+ | "Which controls are active for auth / logging / …?" | `consult_security_requirements(risk_level, concerns=[…])` |
228
+ | "What threats apply to this project?" | `get_threat_landscape(risk_level)` |
229
+ | "What threats are relevant for auth / logging / …?" | `get_threat_landscape(risk_level, concerns=[…])` |
230
+ | "What should a developer / architect / … do?" | `get_guide_by_role(risk_level, role=…)` |
231
+ | "What practices apply in design / implement / …?" | `get_guide_by_role(risk_level, phase=…)` |
232
+ | "What roles exist in the manual?" | `resolve_entities(record_type="role")` |
233
+ | "List all controls in domain X" | `resolve_entities(record_type="control", filters={domain: X})` |
234
+ | "Generate a threat model / checklist / plan" | `get_threat_landscape` + `get_guide_by_role` → then generate content |
157
235
  | "What artefacts does the manual require?" | `plan_sbd_toe_repo_governance` |
158
236
  | "Governance plan for this repo" | `plan_sbd_toe_repo_governance` → generate plan from returned artefact list |
159
237
  | "What to review given these changed files?" | `map_sbd_toe_review_scope` |
@@ -168,6 +246,7 @@ Always distinguish between:
168
246
  | `sbd://toe/agent-guide` | This document — full operational guide |
169
247
  | `sbd://toe/index-compact` | Full chapter map as JSON — fast structured lookup |
170
248
  | `sbd://toe/chapter-applicability/{riskLevel}` | Active/excluded chapters for a risk level |
249
+ | `sbd://toe/ontology` | Full ontology YAML — domain_mapping, concerns, inference rules |
171
250
 
172
251
  ---
173
252
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiftleftpt/sbd-toe-mcp",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "MCP server for the SbD-ToE (Security by Design — Theory of Everything) security manual — structured tools for Claude, GitHub Copilot and other MCP clients",
6
6
  "keywords": [