Document generated command surface
This commit is contained in:
parent
cd3c761988
commit
f0dea0cedc
4 changed files with 17 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
# DocForge command reference
|
||||
|
||||
> Generated from the live CLI parser and MCP registrations. Do not edit this file by hand.
|
||||
|
||||
Global CLI options are documented in `docforge --help` and are not repeated in each command row. The MCP table is the complete generic application-enabled surface; the fixed reference-adapter server exposes only its read rows.
|
||||
|
||||
## CLI commands
|
||||
|
||||
| Command | Invocation |
|
||||
|
|
|
|||
|
|
@ -143,6 +143,12 @@ def render_command_reference_markdown(
|
|||
"""Render the complete deterministic CLI and MCP command reference."""
|
||||
|
||||
return (
|
||||
"# DocForge command reference\n\n"
|
||||
"> Generated from the live CLI parser and MCP registrations. Do not edit this file "
|
||||
"by hand.\n\n"
|
||||
"Global CLI options are documented in `docforge --help` and are not repeated in each "
|
||||
"command row. The MCP table is the complete generic application-enabled surface; "
|
||||
"the fixed reference-adapter server exposes only its read rows.\n\n"
|
||||
"## CLI commands\n\n"
|
||||
f"{render_cli_reference_markdown(cli_references)}"
|
||||
"\n## MCP tools\n\n"
|
||||
|
|
|
|||
|
|
@ -113,6 +113,9 @@ class CommandReferenceTests(unittest.IsolatedAsyncioTestCase):
|
|||
)
|
||||
self.assertEqual(1, complete.count("## CLI commands"))
|
||||
self.assertEqual(1, complete.count("## MCP tools"))
|
||||
self.assertTrue(complete.startswith("# DocForge command reference\n"))
|
||||
self.assertIn("Do not edit this file by hand.", complete)
|
||||
self.assertIn("fixed reference-adapter server exposes only its read rows", complete)
|
||||
|
||||
def test_mcp_reference_fails_closed_on_registration_drift(self) -> None:
|
||||
known = Tool(
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ class CommandReferenceToolTests(unittest.TestCase):
|
|||
self.assertEqual(before, middle)
|
||||
self.assertEqual(before, _tree_snapshot(ALPHA))
|
||||
self.assertTrue(first.endswith(b"\n"))
|
||||
self.assertTrue(first.startswith(b"# DocForge command reference\n"))
|
||||
self.assertIn(b"Do not edit this file by hand.", first)
|
||||
self.assertEqual(1, first.count(b"## CLI commands"))
|
||||
self.assertEqual(1, first.count(b"## MCP tools"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue