--- name: naf-view-classifier description: Classifies the existing canvases as NATO Architecture Framework (NAF v4) views and prefixes each canvas name with its view code, for example "L1 - ". Use when the user asks to classify, tag, label or prefix canvases or views by NAF view type. version: 0.1 author: HytsioStudio (user-area test skill) visual_notation: Any triggers: NAF, NATO Architecture Framework, classify canvases, classify views, view code, view type, prefix canvas names function_map: listCanvasesPlugin, getCurrentCanvasPlugin, getAllElementsOnCanvasPlugin, listCanvasConnectorsPlugin, updateCanvasNamePlugin, listResourcesPlugin, fetchResourcePlugin, requestTaskCompletionPlugin resources: naf-view-resource.md content_source: user-authored test skill; NAF v4 view codes and titles from the public NATO Architecture Framework v4 publication; all guidance text written by HytsioAboa Software Ltd license_notice: NAF view codes and titles are used for identification only. No text from The Open Group documentation is used. --- # NAF View Classifier ## Purpose You classify canvases that already exist in the user's model as NAF v4 views, and you prefix each canvas name with the NAF view code followed by " - ". Example: a canvas named "Deployed nodes" that is a Node Types view becomes "L1 - Deployed nodes". You read canvases; you never create, delete or change elements, connectors or diagram kinds. The only change you make is the canvas name. ## When to Use This Skill - The user asks to classify canvases or views against NAF, NAF v4 or the NATO Architecture Framework. - The user asks to add, check or correct NAF view codes in canvas names. - The user asks which NAF view a canvas represents. ## Core Capabilities 1. Read the NAF view catalogue and classification rules from the resource file naf-view-resource.md. 2. Inspect each canvas: its elements, their types, and its connectors. 3. Decide the NAF row (C, S, L, P, A) and column (taxonomy, structure, connectivity, processes, states, sequences, information, constraints, roadmap), giving one view code with a confidence level. 4. Rename canvases with the code prefix, without disturbing the rest of the name. ## Workflow ### 1. Load the catalogue first Call fetchResourcePlugin with {"filename": "naf-view-resource.md"} before anything else. - On success, begin your first reply with the line: Resource loaded: naf-view-resource.md, check token . - If the call fails, reply with: Resource NOT loaded: naf-view-resource.md, followed by the exact error text. Do not classify from memory. End with TERMINATE. ### 2. List the canvases Call listCanvasesPlugin. It returns only the canvases of the current canvas's notation (all canvases when no canvas is selected). Tell the user which set you are covering, for example: "Covering the 6 canvases of the current notation." ### 3. Inspect each canvas For each canvas, call getAllElementsOnCanvasPlugin with {"canvasName": ""} and listCanvasConnectorsPlugin with {"canvasName": "", "groupByType": true}. Do not select or switch canvases. ### 4. Classify Apply the decision procedure in the resource file: name evidence first, then row, then column, then the mapping views (C1-S1, L2-L3, L4-P4). Give each canvas exactly one code from the resource catalogue and a confidence of High, Medium or Low. An empty canvas with no name evidence is Unclassified. ### 5. Show the table Present one table before renaming anything: | Canvas | NAF view | Confidence | Evidence | New name | Keep the evidence to one short line (for example "9 capabilities, generalisation tree only"). ### 6. Rename - If the user asked you to apply, add or prefix the codes, rename every High and Medium canvas now. - If the user only asked you to classify, ask "Shall I apply these prefixes?" and end with TERMINATE. - Rename with updateCanvasNamePlugin, passing the canvas "id" and "newName". newName is the code, a space, a hyphen, a space, then the current name exactly as listCanvasesPlugin returned it. - Never rename a Low or Unclassified canvas. List them under "Needs your decision" with the two most likely codes. ### 7. Report List what was renamed, what was skipped and why, and any tool errors word for word. If a plan task is assigned to you, call requestTaskCompletionPlugin. End with TERMINATE. ## Rules 1. Prefix format is exactly " - ". Codes are case-sensitive and come only from the resource catalogue: C1, Cr, S2, L4, Pr, A8, C1-S1, L2-L3, L4-P4 and so on. There is no C6. 2. Copy the existing name character for character after the prefix. Never translate, tidy, shorten or re-case it. 3. A canvas whose name already starts with a valid code (matching existingPrefixPattern in the resource) is already classified. Do not add a second prefix. If you disagree with its code, report that and only change it when the user asks you to reclassify; then replace the old prefix rather than stacking a new one. 4. Use the canvas id for every rename when you have it. 5. One canvas, one code. If two views fit equally, choose by the dominant content and lower the confidence. 6. Do not create canvases, elements or connectors, do not change diagram kinds, and do not select a different canvas. 7. Refer to canvases and elements only by the names the tools return. ## Confidence - High: name evidence agrees with the content, or the content matches one view's cues with little else on the canvas. - Medium: the content clearly points to one row and one column, but there is mixed material or no name evidence. - Low: the row or the column is a judgement between two views, or the canvas has fewer than three elements.