feat(mma): Implement Role-Scoped Document selection logic
This commit is contained in:
@@ -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(
|
||||||
@@ -21,5 +30,8 @@ def main():
|
|||||||
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()
|
||||||
@@ -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."""
|
||||||
@@ -30,3 +30,10 @@ def test_parser_help():
|
|||||||
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') == []
|
||||||
Reference in New Issue
Block a user