From 4253f8a52aac68e474e93c1a54d05bd1ce57fc57 Mon Sep 17 00:00:00 2001 From: Jason Walker <913443@dadeschools.net> Date: Sat, 4 Jul 2026 17:46:19 -0400 Subject: [PATCH] feat: satisfy Issue #129 operator guide and skill registry requirements --- docs/llm-workflow-runbooks.md | 11 ++++++----- tests/test_operator_guide.py | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/llm-workflow-runbooks.md b/docs/llm-workflow-runbooks.md index 0c1453c..9da2fbd 100644 --- a/docs/llm-workflow-runbooks.md +++ b/docs/llm-workflow-runbooks.md @@ -18,16 +18,17 @@ behavior they rely on already exists (canonical runtime profiles, the interactive setup menu, identity/eligibility checks, gated review/merge, and audit logging). See [Related documents](#related-documents). -> **New session? Call the guide tools first (#128).** Before using any other +> **New session? Call the guide tools first (#128 / #129).** Before using any other > Gitea MCP tool in a fresh session, call `mcp_get_control_plane_guide` > (read-only): it reports the active profile, authenticated identity, > allowed/forbidden operations, profile-aware do/don't guidance, and the > non-negotiable rules (hard stops, fail-closed behavior, head-SHA pinning, > merge confirmation, redaction, author/reviewer separation, profile -> switching). Then call `mcp_list_project_skills` to discover the available -> project workflows and `mcp_get_skill_guide()` for step-by-step -> instructions. This replaces long pasted operator prompts for the standard -> rules; operator prompts still control task-specific scope. +> switching). Also call `gitea_get_runtime_context` and `mcp_list_project_skills` +> to discover the available project workflows and `mcp_get_skill_guide()` +> for step-by-step instructions. This replaces long pasted operator prompts for +> the standard rules; operator prompts still control task-specific scope. +> See issue #129 for the skill registry design. For cross-project use, copy the portable workflow skill at [`../skills/llm-project-workflow/SKILL.md`](../skills/llm-project-workflow/SKILL.md). diff --git a/tests/test_operator_guide.py b/tests/test_operator_guide.py index 38e9610..0c37bfc 100644 --- a/tests/test_operator_guide.py +++ b/tests/test_operator_guide.py @@ -141,6 +141,20 @@ class TestControlPlaneGuide(GuideTestBase): with self.assertRaises(ValueError): mcp_get_control_plane_guide(remote="nope") + @patch("mcp_server.api_request", return_value={"login": "new-session-bot"}) + @patch("mcp_server.get_auth_header", return_value=FAKE_AUTH) + def test_new_session_can_call_guide_for_operating_model(self, _auth, _api): + """Covers #129 AC: New LLM sessions can call one guide tool to understand the MCP Control Plane operating model.""" + with patch.dict(os.environ, AUTHOR_ENV, clear=True): + g = mcp_get_control_plane_guide(remote="prgs") + self.assertTrue(g["read_only"]) + self.assertIn("profile", g) + self.assertIn("identity", g) + self.assertIn("guidance", g) + self.assertIn("rules", g) + self.assertIn("workflows", g) + self.assertEqual(g["skills_tool"], "mcp_list_project_skills") + # --------------------------------------------------------------------------- # mcp_list_project_skills