mirror of
https://github.com/johndoe6345789/MetalOS.git
synced 2026-04-24 13:45:02 +00:00
Add microagents scaffolding for SDLC workflows
- Created ExampleAgent, BuildAgent, TestAgent, LintAgent, DocGenAgent, DeployAgent, DepUpdateAgent, RoadmapAgent under agents/ - Added CLI stubs and READMEs for each agent - Updated AGENTS.md with all agent entries Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
25
agents/DocGenAgent/README.md
Normal file
25
agents/DocGenAgent/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# DocGenAgent
|
||||
|
||||
DocGenAgent generates and optionally validates project documentation using Sphinx.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.6+
|
||||
- Sphinx installed
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
./agents/DocGenAgent/main.py [--output-dir DIR]
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
- `-o, --output-dir DIR`: Output directory for generated docs (default: `docs/_build`).
|
||||
|
||||
## Examples
|
||||
|
||||
Build docs:
|
||||
```bash
|
||||
./agents/DocGenAgent/main.py
|
||||
```
|
||||
36
agents/DocGenAgent/main.py
Executable file
36
agents/DocGenAgent/main.py
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="DocGenAgent: generate and validate documentation"
|
||||
)
|
||||
parser.add_argument(
|
||||
'--output-dir', '-o',
|
||||
default='docs/_build',
|
||||
help='Output directory for generated docs'
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Generate docs (e.g., Sphinx)
|
||||
print(f"Building docs in {args.output_dir}...")
|
||||
ret = subprocess.run(['sphinx-build', '-b', 'html', 'docs', args.output_dir])
|
||||
if ret.returncode != 0:
|
||||
print("Documentation build failed.", file=sys.stderr)
|
||||
sys.exit(ret.returncode)
|
||||
|
||||
# Optionally validate
|
||||
# ret = subprocess.run(['sphinx-build', '-b', 'linkcheck', 'docs', args.output_dir])
|
||||
# if ret.returncode != 0:
|
||||
# print("Documentation validation failed.", file=sys.stderr)
|
||||
# sys.exit(ret.returncode)
|
||||
|
||||
print("Documentation generation complete.")
|
||||
sys.exit(0)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user