8.4 KiB
Skill: Execute Content Structuring Process Overview
Step 1
Do not use below, yet. Use the skills in steps 2 and 3 in the README.md file, using the home.md page, manually with an AI chat. The reason is that the human and the AI need to iterate on selecting the best metadata content to be used in this projoect from the CIS Envelope. Once this is done, the human can proceed with having AI execute the following skill, below, for the remaining websie pages. When new pages are added, the human can most likely just use this skill below. Only if the home page content of the website is substanitally different might the interative process of adding metadata from the CIS Envelope be required. If so, then it is possible that all pages are processed again, but maybe not. It really depends. Use this interative process to discuss with AI. Or, if pages added to the website start to drift from the initial metadata used, then the human and I come back to this interative process. By referencing the initial home page, that can be flagged in the skill below.
Step 2
Use this skill when the human wants to process one or more authored Markdown pages through the iNDX website semantic publishing workflow.
This skill coordinates the repo-level process described in README.md, especially:
- Step 2: enrich authored Markdown with front matter, semantic chunk boundaries, and stable identifiers.
- Step 3: materialize the enriched page into
chunks.jsonandqa.json.
It does not replace the lower-level skills. It tells the AI how to use them together consistently.
Required References
Before editing or generating anything, review:
-
README.md- Understand the repo purpose, website build process, and directory structure.
-
content/home.md- Treat the front matter and chunk marker style as the canonical page shape.
-
data/open/pages/home/chunks.json- Treat this as the canonical
chunks.jsonmetadata shape.
- Treat this as the canonical
-
data/open/pages/home/qa.json- Treat this as the canonical
qa.jsonmetadata shape.
- Treat this as the canonical
-
Local skills in
skills-scripts/author-content-structuring-skill.mdcis-guided-semantic-chunk-generation-skill.mdsemantic-qa-materialization-skill.md
Do not use the CIS envelope reference page unless the human explicitly asks for it. The current project uses the already-established home page metadata model as the practical canonical schema.
Canonical Output Model
For every source page:
-
Update the source
.mdfile with:- YAML front matter.
- Semantic chunk boundaries.
- Stable
chunk_idvalues. - Stable
knowledge_idvalues. - Human-readable
chunk_labelvalues. - Human-readable
knowledge_labelvalues.
-
Create a folder under:
data/open/pages/<same relative content path>/<slug>/
Example:
content/community-summaries/paddling/example-page.md
data/open/pages/community-summaries/paddling/example-page/
- Create:
chunks.json
qa.json
inside that folder.
Human Prompt Template
Use or adapt this prompt when asking AI to process pages:
The README.md file explains what this repo is, the process for building website pages, and the directory structure. Please reference it.
The home page has already been manually processed and checked. Use content/home.md plus data/open/pages/home/chunks.json and data/open/pages/home/qa.json as the canonical examples for front matter, identifiers, metadata, chunk structure, chunks.json, and qa.json.
Process the following page or pages through README steps 2 and 3:
<list source markdown files here>
For each page:
- preserve the author's meaning and voice;
- add front matter using the home.md metadata model;
- add semantic chunk boundaries with chunk_id, knowledge_id, chunk_label, and knowledge_label;
- create the corresponding chunks.json;
- create the corresponding qa.json;
- put chunks.json and qa.json in data/open/pages/<relative content path>/<slug>/;
- create directories as needed;
- do not use the CIS envelope reference page unless explicitly instructed.
Before writing files, review the task, identify any confusion, and ask only necessary questions. Once clear, proceed.
After writing files, validate that:
- JSON parses;
- every chunk_id in chunks.json appears in the markdown;
- every QA chunk reference points to an existing chunk;
- slugs and paths match the source page;
- no unrelated files were changed.
Workflow
1. Read Context
Read the README and canonical home outputs before processing new pages.
Use the home page to learn:
- front matter fields;
- document metadata naming;
- slug style;
- chunk marker format;
- identifier style;
chunks.jsondocument fields;chunks.jsonchunk fields;qa.jsondocument fields;qa.jsonQA pair fields.
2. Read Source Pages
Read every source .md page before deciding chunk boundaries.
For multiple pages, it is acceptable to batch a few pages at a time when the model and tooling can handle it. If the pages are long or complex, process fewer pages per batch.
3. Create Enriched Markdown
Follow author-content-structuring-skill.md.
Rules:
- Preserve original meaning.
- Preserve links.
- Preserve useful headings.
- Do not rewrite into marketing copy.
- Clean obvious encoding damage only when it preserves the intended text.
- Split chunks by semantic reasoning shifts, not by formatting alone.
- Use durable opaque IDs for
chunk_idandknowledge_id. - Use readable semantic labels for
chunk_labelandknowledge_label.
4. Create chunks.json
Follow cis-guided-semantic-chunk-generation-skill.md, using the home page output as the practical schema.
For this static website, use the lightweight/static-plus projection already established by the home page and community summary pages:
- document metadata;
- chunk IDs;
- knowledge IDs;
- labels;
- order;
- heading paths;
- content;
- summaries;
- tags;
- light semantic/context fields where already established.
5. Create qa.json
Follow semantic-qa-materialization-skill.md, using the home page output as the practical schema.
Generate QA pairs that improve:
- retrieval;
- semantic understanding;
- navigation;
- synthesis;
- workflow execution when the source contains actions.
Every meaningful chunk should be referenced by at least one QA pair.
6. Validate
Always perform a final inference and consistency pass.
Check:
- the enriched
.mdexists; chunks.jsonexists;qa.jsonexists;- both JSON files parse;
- all
chunk_idvalues inchunks.jsonappear in the.md; - all
knowledge_idvalues inchunks.jsonappear in the.md; - all
qa.jsonchunk_idspoint to real chunks; - all
qa.jsonknowledge_idspoint to real knowledge IDs; - document slug matches the source filename;
source_pathmatches the source page;canonical_urlfollows the site URL pattern;- no orphaned output folders were created;
- no unrelated files were changed.
Windows And PowerShell Notes
Be careful on Windows PowerShell:
- Paths with drive letters and long filenames are easy to quote incorrectly.
- Very large inline
powershell -Commandstrings can fail with command-length errors. - Redirection and heredoc-style scripting can behave differently than expected.
- Some sandboxed shells may not have the same
pythonpath as elevated shells. - Git may report dubious ownership when the repo is accessed from a sandbox user.
Preferred approach:
- Use direct PowerShell reads such as
Get-Content -Raw. - Use
apply_patchfor edits inside the writable workspace. - For large generated outputs, write a small deterministic generator script in the workspace, then run it.
- If writing outside the writable workspace, request approval cleanly.
- For Git status on this repo, use a one-off safe-directory flag rather than changing global config:
git -c safe.directory=C:/projects/indx/indx-front-website -C C:\projects\indx\indx-front-website status --short
Safety Notes
- Do not revert user changes.
- Do not delete
_originalfiles unless the human explicitly asks; they may be retained as reference copies. - Do not run destructive Git commands.
- Prefer deterministic, repeatable generation when processing many pages.
- Keep the source directory backed up or preserve originals before large batch work when appropriate.
Completion Report
At the end, report:
- pages processed;
- files created or updated;
- chunk and QA counts per page;
- validation results;
- any unrelated pre-existing repo changes noticed but left alone.