CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

service-factory/gds-assessment-plugin

Granular 4-phase, 4-role GDS Service Standard assurance skills, panel orchestrator, and synthesis engine.

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

library_paths.pyskills/gds-assessment-how-to/

"""Find the past-assessment library.

The published plugin does not contain the GOV.UK reports. A project builds its
own library by running scrape_gds_reports.py. This checkout also keeps an
older library under context/.
"""

import os
from pathlib import Path

PROJECT_LIBRARY = ("docs", "past-assessments")


def plugin_root(start):
    for candidate in [Path(start), *Path(start).parents]:
        if (candidate / ".tessl-plugin" / "plugin.json").is_file():
            return candidate
    return None


def project_dirs(library):
    library = Path(library)
    return library / "reports", library / "catalogue"


def legacy_dirs(root):
    return root / "context" / "few-shot-examples", root / "context" / "past-assessments"


def locations_for(library=None, start=None):
    """Return (reports_dir, catalogue_dir) for a scrape or a catalogue build."""
    env = os.environ.get("GDS_PAST_ASSESSMENTS")
    if library is None and env:
        library = env
    if library is not None:
        library = Path(library)
        if library.name == "few-shot-examples":
            return library, library.parent / "past-assessments"
        return project_dirs(library)

    start = Path(start) if start else Path(__file__).resolve()
    root = plugin_root(start)
    if root is not None:
        reports, catalogue = legacy_dirs(root)
        if reports.is_dir():
            return reports, catalogue

    return project_dirs(Path.cwd().joinpath(*PROJECT_LIBRARY))


def find_existing(start=None):
    """Return the library the assessment server should read."""
    env = os.environ.get("GDS_PAST_ASSESSMENTS")
    if env:
        return project_dirs(env)

    cwd = Path.cwd()
    for candidate in [cwd, *list(cwd.parents)[:6]]:
        catalogue = candidate.joinpath(*PROJECT_LIBRARY) / "catalogue"
        if catalogue.is_dir() and any(catalogue.glob("*.json")):
            library = candidate.joinpath(*PROJECT_LIBRARY)
            return library / "reports", catalogue

    start = Path(start) if start else Path(__file__).resolve()
    root = plugin_root(start)
    if root is not None:
        reports, catalogue = legacy_dirs(root)
        if catalogue.is_dir():
            return reports, catalogue

    return project_dirs(cwd.joinpath(*PROJECT_LIBRARY))

skills

gds-assessment-how-to

build_past_assessment_catalogue.py

create-evidence-kit.py

create-example.py

library_paths.py

reports_mcp_server.py

scrape_gds_reports.py

SKILL.md

.mcp.json

README.md

tile.json