From 55c0fd1c5221606474a1770eacf8f61f5486d6ca Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 25 Feb 2026 19:12:02 -0500 Subject: [PATCH] feat(mma): Implement Role-Scoped Document selection logic --- scripts/mma_exec.py | 12 ++++++++++++ tests/test_mma_exec.py | 11 +++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/scripts/mma_exec.py b/scripts/mma_exec.py index af40245..a226721 100644 --- a/scripts/mma_exec.py +++ b/scripts/mma_exec.py @@ -1,5 +1,14 @@ import argparse +def get_role_documents(role: str) -> list[str]: + if role == 'tier1': + return ['conductor/product.md', 'conductor/product-guidelines.md'] + elif role == 'tier2': + return ['conductor/tech-stack.md', 'conductor/workflow.md'] + elif role == 'tier3': + return ['conductor/workflow.md'] + return [] + def create_parser(): parser = argparse.ArgumentParser(description="MMA Execution Script") parser.add_argument( @@ -20,6 +29,9 @@ def main(): args = parser.parse_args() print(f"Role: {args.role}") print(f"Prompt: {args.prompt}") + + docs = get_role_documents(args.role) + print(f"Selected Documents: {docs}") if __name__ == "__main__": main() \ No newline at end of file diff --git a/tests/test_mma_exec.py b/tests/test_mma_exec.py index fda0899..cf3f5e1 100644 --- a/tests/test_mma_exec.py +++ b/tests/test_mma_exec.py @@ -1,5 +1,5 @@ import pytest -from scripts.mma_exec import create_parser +from scripts.mma_exec import create_parser, get_role_documents def test_parser_role_choices(): """Test that the parser accepts valid roles and the prompt argument.""" @@ -29,4 +29,11 @@ def test_parser_help(): parser = create_parser() with pytest.raises(SystemExit) as excinfo: parser.parse_args(['--help']) - assert excinfo.value.code == 0 \ No newline at end of file + assert excinfo.value.code == 0 + +def test_get_role_documents(): + """Test that get_role_documents returns the correct documentation paths for each tier.""" + assert get_role_documents('tier1') == ['conductor/product.md', 'conductor/product-guidelines.md'] + assert get_role_documents('tier2') == ['conductor/tech-stack.md', 'conductor/workflow.md'] + assert get_role_documents('tier3') == ['conductor/workflow.md'] + assert get_role_documents('tier4') == [] \ No newline at end of file