forcedotcom/sf-skills / plugins/builder/agentforce-adlc/skills/agentforce-architecture-analyze
agentforce-architecture-analyze
VerifiedDeclared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable architecture document and Mermaid invocation graph from design-time metadata (not runtime audit rows). TRIGGER when user asks to describe, diagram, inventory, audit, document, or diff (e.g. v3 vs v5) the architecture / action tree / topic structure / tool inventory of a specific agent by agent API name in a specific org. DO NOT TRIGGER for runtime session traces, conversation transcripts, generation timings, or gateway audit chains — this skill reads design-time metadata only (use agentforce-d360-analyze for session traces).
scripts/tests/test_fs_guard.py
View on GitHub"""Tests for fs_guard Python-importable validators + api_version check."""
from __future__ import annotations
import unittest
from . import _bootstrap # noqa: F401
from config import fs_guard # type: ignore — re-exported from _shared/
class ValidateApiNameTests(unittest.TestCase):
def test_valid_name_passes(self):
fs_guard.validate_api_name("MyAgent", label="name")
fs_guard.validate_api_name("Foo_v2", label="name")
fs_guard.validate_api_name("x", label="name")
def test_dotdot_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name("..", label="agent_api_name")
def test_slash_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name("foo/bar", label="agent_api_name")
def test_dotdot_in_path_segment_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name("foo/../bar", label="agent_api_name")
def test_null_byte_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name("foo\x00bar", label="name")
def test_empty_string_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name("", label="name")
def test_none_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name(None, label="name")
def test_non_string_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_name(42, label="name")
def test_validation_error_carries_label(self):
with self.assertRaises(fs_guard.ValidationError) as ctx:
fs_guard.validate_api_name("bad/name", label="agent_api_name")
self.assertEqual(ctx.exception.label, "agent_api_name")
class ValidateApiVersionTests(unittest.TestCase):
def test_v60_0_ok(self):
fs_guard.validate_api_version("v60.0", label="api_version")
def test_v66_0_ok(self):
fs_guard.validate_api_version("v66.0", label="api_version")
def test_v60_no_minor_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_version("v60", label="api_version")
def test_bare_number_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_version("60.0", label="api_version")
def test_slash_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_version("v60.0/../", label="api_version")
def test_dotdot_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_version("..", label="api_version")
def test_empty_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_api_version("", label="api_version")
class ValidateOrgId15Tests(unittest.TestCase):
def test_valid_15_char_alnum_ok(self):
fs_guard.validate_org_id_15("00Dxx0000000000", label="org_id_15")
def test_slash_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_org_id_15("00D/x0000000000", label="org_id_15")
def test_wrong_length_rejected(self):
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_org_id_15("00Dxx000000000", label="org_id_15")
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_org_id_15("00Dxx0000000000X", label="org_id_15")
def test_underscore_rejected(self):
# ORG_ID_15_RE forbids underscores — stricter than api_name.
with self.assertRaises(fs_guard.ValidationError):
fs_guard.validate_org_id_15("00Dxx00000000_0", label="org_id_15")
class CliApiVersionCheckTests(unittest.TestCase):
"""The api_version check type is registered in VALID_CHECKS + CHECKS."""
def test_registered_in_valid_checks(self):
self.assertIn("api_version", fs_guard.VALID_CHECKS)
def test_registered_in_checks_dispatch(self):
self.assertIn("api_version", fs_guard.CHECKS)
def test_check_function_exists(self):
self.assertTrue(callable(fs_guard.check_api_version))
if __name__ == "__main__":
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |