feat(mma): Implement Role-Scoped Document selection logic

This commit is contained in:
2026-02-25 19:12:02 -05:00
parent 067cfba7f3
commit 55c0fd1c52
2 changed files with 21 additions and 2 deletions

View File

@@ -1,5 +1,14 @@
import argparse 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(): def create_parser():
parser = argparse.ArgumentParser(description="MMA Execution Script") parser = argparse.ArgumentParser(description="MMA Execution Script")
parser.add_argument( parser.add_argument(
@@ -20,6 +29,9 @@ def main():
args = parser.parse_args() args = parser.parse_args()
print(f"Role: {args.role}") print(f"Role: {args.role}")
print(f"Prompt: {args.prompt}") print(f"Prompt: {args.prompt}")
docs = get_role_documents(args.role)
print(f"Selected Documents: {docs}")
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@@ -1,5 +1,5 @@
import pytest import pytest
from scripts.mma_exec import create_parser from scripts.mma_exec import create_parser, get_role_documents
def test_parser_role_choices(): def test_parser_role_choices():
"""Test that the parser accepts valid roles and the prompt argument.""" """Test that the parser accepts valid roles and the prompt argument."""
@@ -29,4 +29,11 @@ def test_parser_help():
parser = create_parser() parser = create_parser()
with pytest.raises(SystemExit) as excinfo: with pytest.raises(SystemExit) as excinfo:
parser.parse_args(['--help']) parser.parse_args(['--help'])
assert excinfo.value.code == 0 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') == []