diff --git a/act_operator/act_operator/__init__.py b/act_operator/act_operator/__init__.py index f1380ee..c11f861 100644 --- a/act_operator/act_operator/__init__.py +++ b/act_operator/act_operator/__init__.py @@ -1 +1 @@ -__version__ = "0.1.7" +__version__ = "0.1.9" diff --git a/act_operator/act_operator/cli.py b/act_operator/act_operator/cli.py index 0de90d1..0e56aa2 100644 --- a/act_operator/act_operator/cli.py +++ b/act_operator/act_operator/cli.py @@ -668,6 +668,7 @@ def _copy_cast_test(rendered_root: Path) -> None: "act_slug": act_variants.slug, "act_snake": act_variants.snake, "cast_name": cast_variants.title, + "cast_slug": cast_variants.slug, "cast_snake": cast_variants.snake, "cast_pascal": cast_variants.pascal, "language": _normalize_lang(language), @@ -681,6 +682,7 @@ def _copy_cast_test(rendered_root: Path) -> None: try: update_langgraph_registry( act_path / LANGGRAPH_FILE, + cast_variants.slug, cast_variants.snake, ) except RuntimeError as error: diff --git a/act_operator/act_operator/scaffold/{{ cookiecutter.act_slug }}/.claude/skills/architecting-act/scripts/validate_architecture.py b/act_operator/act_operator/scaffold/{{ cookiecutter.act_slug }}/.claude/skills/architecting-act/scripts/validate_architecture.py index 8d8b0be..0f77427 100644 --- a/act_operator/act_operator/scaffold/{{ cookiecutter.act_slug }}/.claude/skills/architecting-act/scripts/validate_architecture.py +++ b/act_operator/act_operator/scaffold/{{ cookiecutter.act_slug }}/.claude/skills/architecting-act/scripts/validate_architecture.py @@ -118,7 +118,7 @@ def parse_act_claude_md(content: str) -> dict: # Extract casts from table # Format: | CastName | purpose | [link](path) | - cast_table_pattern = r"\| ([A-Z][a-zA-Z0-9]+) \| .* \| \[.*?\]\((casts/[^/]+/CLAUDE\.md)\)" + cast_table_pattern = r"\| ([A-Z][a-zA-Z0-9 ]+) \| .* \| \[.*?\]\((casts/[^/]+/CLAUDE\.md)\)" matches = re.findall(cast_table_pattern, content) data["casts_in_table"] = [ {"name": name, "path": path} for name, path in matches @@ -332,9 +332,9 @@ def validate_distributed_architecture(project_root: Path) -> ValidationReport: if cast_claude.exists(): # Extract cast name from file cast_content = cast_claude.read_text(encoding="utf-8") - cast_name_match = re.search(r"# Cast: (\w+)", cast_content) + cast_name_match = re.search(r"# Cast: ([A-Z][a-zA-Z0-9 ]+)", cast_content) if cast_name_match: - cast_name = cast_name_match.group(1) + cast_name = cast_name_match.group(1).strip() cast_files[cast_name] = cast_claude else: report.add(False, "Casts directory not found at project root", "warning") @@ -344,7 +344,7 @@ def validate_distributed_architecture(project_root: Path) -> ValidationReport: cast_content = cast_path.read_text(encoding="utf-8") cast_data = parse_cast_claude_md(cast_content, cast_name) - validate_cast_level(cast_data, cast_path, report) + validate_cast_level(cast_data, report) validate_cast_diagram(cast_data, report) validate_cast_nodes(cast_data, report) diff --git a/act_operator/act_operator/utils.py b/act_operator/act_operator/utils.py index 9d77189..0fd1845 100644 --- a/act_operator/act_operator/utils.py +++ b/act_operator/act_operator/utils.py @@ -373,6 +373,7 @@ def _build_graph_reference(cast_snake: str) -> str: def update_langgraph_registry( langgraph_path: Path, + cast_slug: str, cast_snake: str, ) -> None: """Update the LangGraph registry in langgraph.json. @@ -382,7 +383,8 @@ def update_langgraph_registry( Args: langgraph_path: Path to the langgraph.json file. - cast_snake: Snake-case name of the cast to register. + cast_slug: Hyphenated cast name used as the graph key. + cast_snake: Snake-case cast name used in the graph path. Raises: RuntimeError: If langgraph.json is not found. @@ -398,7 +400,7 @@ def update_langgraph_registry( # Update graphs only (dependencies use wildcard patterns) graphs = payload.setdefault("graphs", {}) graph_reference = _build_graph_reference(cast_snake) - graphs.setdefault(cast_snake, graph_reference) + graphs.setdefault(cast_slug, graph_reference) # Write updated content updated_content = json.dumps(payload, ensure_ascii=False, indent=2) + "\n" diff --git a/act_operator/pyproject.toml b/act_operator/pyproject.toml index a55f363..460c5e1 100644 --- a/act_operator/pyproject.toml +++ b/act_operator/pyproject.toml @@ -55,8 +55,8 @@ force-include = { "act_operator" = "act_operator" } include = ["act_operator", "tests", "README.md", "LICENSE", ".gitignore"] [tool.pytest.ini_options] -addopts = "-ra" -testpaths = ["tests"] +addopts = "-ra --ignore=act_operator/scaffold" +testpaths = ["act_operator/tests"] [tool.ruff] extend-exclude = [