Zoner Vector Store Pipeline
This repository can prepare the beta ordinance content for the ZonerSDK OpenAI vector store. The pipeline reads the ordinance Markdown in _pages/, creates smaller section-level chunk files, checks that each chunk has citation metadata, and uploads the chunks to the configured OpenAI vector store.
The City of Lebanon’s official zoning ordinance PDF remains the controlling legal source. This repository and the vector store are presentation and search aids only.
What The Pipeline Does
- Reads ordinance source pages from
_pages/. - Includes article pages, Appendix A, Appendix B, Appendix C, and the amendments page.
- Skips support pages such as
how-to-update.mdand the appendix index page. - Creates one Markdown file per section, subsection, or Appendix A definition in
generated/vector-chunks/. - Uploads those generated chunk files to the OpenAI vector store named by
ZONER_VECTOR_STORE_ID. - Tags uploaded vector store files as managed by this GitHub Action so later replace runs remove only this pipeline’s files.
The generator preserves ordinance wording. It does not summarize, rewrite, renumber, or change the legal effect of the ordinance.
Required GitHub Settings
Add these repository secrets:
OPENAI_API_KEYZONER_VECTOR_STORE_ID
Add these repository variables:
ZONER_PUBLIC_BASE_URL, normallyhttps://3dmcd.github.io/ZoningOrdinanceZONER_DOCUMENT_ID, normallylebanon-zoning-ordinanceZONER_JURISDICTION, normallyLebanon, NH
Do not commit API keys, vector store IDs, MCP URLs, local tokens, or generated upload manifests.
Running The Workflow
The workflow is manual only:
- Open the repository’s Actions tab on GitHub.
- Choose
Update Zoner Vector Store. - Run the workflow manually.
The workflow builds the Jekyll site first, then runs:
node scripts/vector/generate-vector-chunks.mjs
node scripts/vector/validate-vector-chunks.mjs
node scripts/vector/upload-vector-store.mjs --replace
Replace mode removes only vector store files with this pipeline’s managed attributes:
managed_by=zoner-github-actionsource_repo=3DMcD/ZoningOrdinancedocument_idmatching the configured document IDjurisdictionmatching the configured jurisdiction
It does not remove unrelated vector store files.
Local Checks
Maintainers can generate and validate chunks locally without uploading:
bundle exec jekyll build
node scripts/vector/generate-vector-chunks.mjs
node scripts/vector/validate-vector-chunks.mjs
Generated chunk files and generated/vector-upload-manifest.json are ignored by git. The upload manifest can contain OpenAI file IDs and should stay local to the workflow or workstation that created it.
MCP
This pipeline does not connect to MCP or GIS lookup services. It only prepares and uploads ordinance source chunks for the configured OpenAI vector store.