Skip to content

Commit 470693c

Browse files
committed
add the validator script
1 parent 961c26a commit 470693c

File tree

7 files changed

+2931
-0
lines changed

7 files changed

+2931
-0
lines changed

dev/docs-validator/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MODEL = "gemini-2.5-flash"
2+
INTEGRATIONS_DIR = "~/git/integrations"
3+
#PACKAGE_NAME = "cisco_ise"

dev/docs-validator/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.env
2+
.env.*
3+
!.env.example
4+
5+
.venv

dev/docs-validator/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Docs Validator
2+
3+
This script validates the `system_info.md` knowledge-base markdown file by:
4+
5+
1. Reading the markdown file and extracting URLs.
6+
2. Validating the URLs.
7+
3. Validating the markdown file's format against a template.
8+
9+
## Installation
10+
11+
This project uses `uv` for package management. To install the dependencies, run:
12+
13+
```bash
14+
uv venv && uv sync
15+
```
16+
17+
## Usage
18+
19+
To run the script, execute the `validate.py` file:
20+
21+
```bash
22+
uv run validate.py
23+
```
24+
25+
## Environment Variables
26+
27+
The script uses the following environment variables:
28+
29+
* `MODEL`: The model to use for the AI agents. Defaults to `google-gla:gemini-2.5-flash`.
30+
* `INTEGRATIONS_REPO_PATH`: The path to the integrations repository. Defaults to the parent directory of the script.
31+
* `PACKAGE_NAME`: The name of the package to validate. Defaults to `cisco_ftd`.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# Service Info
3+
4+
## Common use cases
5+
/* Common use cases that this will facilitate */
6+
7+
## Data types collected
8+
/* What types of data this integration can collect */
9+
10+
## Compatibility
11+
/* Information on the vendor versions this integration is compatible with or has been tested against */
12+
13+
## Scaling and Performance
14+
/* Vendor-specific information on what performance can be expected, how to set up scaling, etc. */
15+
16+
# Set Up Instructions
17+
18+
## Vendor prerequisites
19+
/* Add any vendor specific prerequisites, e.g. "an API key with permission to access <X, Y, Z> is required" */
20+
21+
## Elastic prerequisites
22+
/* If there are any Elastic specific prerequisites, add them here
23+
The stack version and agentless support is not needed, as this can be taked from the manifest */
24+
25+
## Vendor set up steps
26+
/* List the specific steps that are needed in the vendor system to send data to Elastic.
27+
If multiple input types are supported, add instructions for each in a subsection */
28+
29+
## Kibana set up steps
30+
/* List the specific steps that are needed in Kibana to add and configure the integration to begin ingesting data */
31+
32+
# Validation Steps
33+
/* List the steps that are needed to validate the integration is working, after ingestion has started.
34+
This may include steps on the vendor system to trigger data flow, and steps on how to check the data is correct in Kibana dashboards or alerts. */
35+
36+
# Troubleshooting
37+
/* Add lists of "*Issue* / *Solutions*" for troubleshooting knowledge base into the most appropriate section below */
38+
39+
## Common Configuration Issues
40+
/* For generic problems such as "service failed to start" or "no data collected" */
41+
42+
## Ingestion Errors
43+
/* For problems that involve "error.message" being set on ingested data */
44+
45+
## API Authentication Errors
46+
/* For API authentication failures, credential errors, and similar */
47+
48+
## Vendor Resources
49+
/* If the vendor has a troubleshooting specific help page, add it here */
50+
51+
# Documentation sites
52+
/* List of URLs that contain info on the service (reference pages, set up help, API docs, etc. */
53+

dev/docs-validator/pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[project]
2+
name = "validator-mcp"
3+
version = "0.1.0"
4+
description = "This project provides a tool for validating documentation markdown files. It checks for broken URLs and ensures that the files adhere to a predefined format template, leveraging AI to enhance the validation process."
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = [
8+
"fastmcp>=2.13.0.2",
9+
"langchain[google-genai]>=1.0.5",
10+
"markdown-analysis>=0.1.5",
11+
"markdown-it-pyrs>=0.4.0",
12+
"pydantic-ai>=1.14.1",
13+
"python-markdown>=0.1.0",
14+
"rich>=14.2.0",
15+
]

0 commit comments

Comments
 (0)