The following is going to be a LONG prompt; with everything I have written thus-far such that I can get organized whilst planning the architecture for the development of the platform. Strap in and enjoy the ride!!
Compilation of everything relevant:
Scripting this lmao fuck that.
Can you draft me a script to consolidate all of the notes in my zettelkasten to one markdown note? Parent domain: D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway Exclude the following directories: D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway.git D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway.obsidian D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\0 - Housekeeping D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\1 - Templates D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\2 - Paths D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\3 - Indexes D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\4 - Source Material\Videos D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\4 - Source Material\Ideas D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway\7 - On Ice Please format such that the title of the note is a title within the note (i.e. ”# title”) within the note link format (i.e. “Memorandum of Understanding”) If titles exist within the note bump them (all headers within that file) up one level (i.e. ”## subtitle”)
Script returned:
import os
from pathlib import Path
# Configuration
parent_dir = Path(r"D:\Documents\Notebooks\Zettelkasten\6 - Elryan The Explorer\The Capitalist\The 60 Day Runway")
excluded_dirs = {
".git",
".obsidian",
"0 - Housekeeping",
"1 - Templates",
"2 - Paths",
"3 - Indexes",
"4 - Source Material\\Videos",
"4 - Source Material\\Ideas",
"7 - On Ice"
}
output_file = parent_dir / "Consolidated_Notes.md"
def is_excluded(path: Path):
# Compare relative path parts to exclude folders properly
rel_path = path.relative_to(parent_dir)
return any(str(rel_path).startswith(excluded.replace("\\", os.sep)) for excluded in excluded_dirs)
def bump_headers(content: str) -> str:
bumped = []
for line in content.splitlines():
if line.strip().startswith("#"):
# Add one extra "#" to each heading
line = "#" + line
bumped.append(line)
return "\n".join(bumped)
def consolidate_notes():
consolidated = []
for root, dirs, files in os.walk(parent_dir):
root_path = Path(root)
if is_excluded(root_path):
continue
for file in files:
if file.endswith(".md"):
file_path = root_path / file
rel_title = file_path.stem
try:
with open(file_path, "r", encoding="utf-8") as f:
content = f.read()
except UnicodeDecodeError:
print(f"Skipping non-text file: {file_path}")
continue
# Format note title
consolidated.append(f"# [[{rel_title}]]\n")
# Add bumped content
consolidated.append(bump_headers(content))
consolidated.append("\n\n")
with open(output_file, "w", encoding="utf-8") as out:
out.write("\n".join(consolidated))
print(f"✅ Notes consolidated to: {output_file}")
if __name__ == "__main__":
consolidate_notes()
Me
Ok I now have the consolidated notes; please script the splitting of the LONG context note (29485 words) into short context with repeated prompt and overlap
- EX: make a global to-do list in canvas based on the following data; separate currently actionable ideas from future ideas.
Perhaps a JIRA integration would be beneficial for this if advisable.
GPT
Alright! Here’s a Python script that will split your long consolidated Markdown note into smaller context chunks, each with:
-
A fixed word count limit (you can customize it),
-
A repeated prompt at the top of each chunk, and
-
An overlap between chunks to maintain context continuity (configurable),
-
Output files written to a
/chunksfolder for organization.
Then I’ll show you how this can be used as input for a global canvas To-Do or a JIRA integration afterward.
✅ Python Script: split_consolidated_note.py
import os
from pathlib import Path
import textwrap
# === CONFIGURATION ===
input_file = Path("Consolidated_Notes.md")
output_dir = input_file.parent / "chunks"
chunk_word_limit = 1000 # words per chunk
overlap_word_count = 150 # words of overlap between chunks
repeated_prompt = "Make a global to-do list in canvas based on the following data; separate currently actionable ideas from future ideas."
# Ensure output directory exists
output_dir.mkdir(exist_ok=True)
def split_text_into_chunks(text, chunk_size, overlap):
words = text.split()
chunks = []
start = 0
while start < len(words):
end = start + chunk_size
chunk = words[start:end]
chunks.append(" ".join(chunk))
start += chunk_size - overlap
return chunks
def save_chunks(chunks):
for i, chunk in enumerate(chunks):
filename = output_dir / f"context_chunk_{i+1:02}.md"
with open(filename, "w", encoding="utf-8") as f:
f.write(f"**{repeated_prompt}**\n\n")
f.write(chunk)
print(f"🧩 Saved: {filename.name}")
def main():
if not input_file.exists():
print(f"Input file does not exist: {input_file}")
return
with open(input_file, "r", encoding="utf-8") as f:
full_text = f.read()
chunks = split_text_into_chunks(full_text, chunk_word_limit, overlap_word_count)
save_chunks(chunks)
print(f"\n✅ Total Chunks Created: {len(chunks)}")
if __name__ == "__main__":
main()📁 Output Folder:
Each file will look like:
chunks/
├── context_chunk_01.md
├── context_chunk_02.md
├── ...
Each starting with:
**Make a global to-do list in canvas based on the following data; separate currently actionable ideas from future ideas.**
[content here...]
🧠 Next Step: Use in Obsidian Canvas or JIRA
👉 For Obsidian Canvas:
You can create a canvas and link each chunk like:
```canvas
[[chunks/context_chunk_01]]
[[chunks/context_chunk_02]]
...👉 For JIRA Integration (Optional Advanced):
We could:
-
Use the Atlassian API to POST new tasks with summaries pulled from each chunk
-
Classify them into “actionable” vs “future” with a GPT model locally or via prompt
-
Tag tasks with project names, priorities, etc.
Let me know if you’d like a JIRA_Integration.py next — or if you want the chunks preprocessed into task summaries!
Me
I was thinking about potentially just running something local actually; I’m familiar with ollama and can boot up an instance of Phi or something. If advisable could you make a script to split into even smaller context chunks utilizing the bullet level of the text? Allow for overlap but cull irrelevant tokens to the task; would need to find some way to detect and reduce redundancy for human readabilty but I was thinking I would have a folder full of files for each task to document ideas within each task and the processes I take to build the feature out. Dont wanna do JIRA cause thats off-platform; just trying to reverse engineer it on obsidian with markdown lmaooo.
So tldr: script chunks it yes, but make that chunking more intellegent; if a note relevant is already made add it to that note; if not make a new note. From there we can do global note-prompts to be like “state the scope considerations given that this is for the development of an MVP” and from those results have the to-do list organized. Potentially also automate which tasks are blocked by what. Please advise.
// meh output, directed it to fuzzysearch (thank you lainey) //
GPT (after a couple iterations)
Perfect — this fuzzy-matching setup is a strong addition, and ideal for your use case since LLM outputs are inherently variable. Let’s upgrade the smart_task_splitter.py to include:
-
Fuzzy matching using
fuzzywuzzy -
Automatic fuzzy search against existing task titles (instead of exact match)
-
A lightweight document registry (e.g. JSON index of task titles and tags)
-
Optional embedding of task “tags” (e.g. concepts mentioned in the bullet) for improved matching later
🧠 New Features
✅ Task Matching Now:
-
Checks against an indexed JSON of all task filenames and inferred tags
-
Uses fuzzy matching (via
fuzz.partial_ratio) to avoid duplicates and append intelligently -
Still hashes content for uniqueness fallback if no match found
📦 Dependencies:
pip install fuzzywuzzy python-Levenshtein nltk🧬 Upgraded smart_task_splitter.py (with fuzzy match)
import os
import re
import json
import hashlib
from pathlib import Path
from fuzzywuzzy import fuzz
from nltk.tokenize import word_tokenize
import nltk
nltk.download('punkt', quiet=True)
# --- CONFIG ---
input_file = Path("Consolidated_Notes.md")
task_dir = Path("tasks")
registry_file = task_dir / "task_index.json"
task_dir.mkdir(exist_ok=True)
# --- MATCHING ---
threshold = 75 # Fuzzy matching threshold
overlap_bullet_count = 2
min_words_for_task = 10
# --- UTILS ---
def normalize_bullet(line):
return re.sub(r"^[-*+]\s+", "", line).strip()
def hash_snippet(text, length=12):
return hashlib.md5(text.encode()).hexdigest()[:length]
def parse_bullets(text):
lines = text.splitlines()
bullets = []
buffer = []
for line in lines:
if line.strip().startswith(("-", "*", "+")):
if buffer:
bullets.append("\n".join(buffer))
buffer = []
buffer.append(line)
elif buffer:
buffer.append(line)
if buffer:
bullets.append("\n".join(buffer))
return bullets
def tokenize_and_fuzzy_match(query, documents, use_tags=False):
tokens = word_tokenize(query)
doc_scores = {doc['Filename']: 0 for doc in documents}
for doc in documents:
filename = doc['Filename']
tags = doc.get('Tags', [])
compare_string = filename + " " + " ".join(tags) if use_tags else filename
token_scores = [fuzz.partial_ratio(token, compare_string) for token in tokens]
average_score = sum(token_scores) / len(tokens)
doc_scores[filename] = average_score
filtered_docs = [(doc, score) for doc, score in doc_scores.items() if score >= threshold]
return sorted(filtered_docs, key=lambda x: x[1], reverse=True)
def load_task_registry():
if registry_file.exists():
with open(registry_file, "r", encoding="utf-8") as f:
return json.load(f)
return []
def update_registry(filename, tags):
registry = load_task_registry()
registry.append({"Filename": filename, "Tags": tags})
with open(registry_file, "w", encoding="utf-8") as f:
json.dump(registry, f, indent=2)
def summarize_title(text):
line = normalize_bullet(text.splitlines()[0])[:80]
return line.strip().capitalize()
def extract_tags(text):
words = word_tokenize(text.lower())
keywords = [w for w in words if len(w) > 4 and w.isalpha()] # crude but works
return list(set(keywords))
def write_task_file(title, content):
safe_title = title.replace("/", "_").replace("\\", "_")
task_path = task_dir / f"Task - {safe_title}.md"
with open(task_path, "a", encoding="utf-8") as f:
f.write("\n\n" + content)
return task_path.name
# --- MAIN ---
def main():
with open(input_file, "r", encoding="utf-8") as f:
full_text = f.read()
bullets = parse_bullets(full_text)
registry = load_task_registry()
for i, bullet in enumerate(bullets):
if len(bullet.split()) < min_words_for_task:
continue
overlap = "\n".join(bullets[max(i - overlap_bullet_count, 0):i])
chunk = overlap + "\n" + bullet if overlap else bullet
title = summarize_title(bullet)
tags = extract_tags(bullet)
query = title + " " + " ".join(tags)
match = tokenize_and_fuzzy_match(query, registry)
if match:
matched_file = match[0][0]
print(f"➕ Appending to: {matched_file} (score: {match[0][1]})")
task_path = task_dir / matched_file
with open(task_path, "a", encoding="utf-8") as f:
f.write("\n\n" + chunk)
else:
new_title = f"{title} ({hash_snippet(chunk)})"
filename = write_task_file(new_title, chunk)
update_registry(filename, tags)
print(f"🆕 Created: {filename}")
if __name__ == "__main__":
main()📁 Folder Output Example:
tasks/
├── Task - Build auth workflow (0e12ca91d1b2).md
├── Task - Configure embed viewer (9d0cfa18f273).md
├── task_index.json
Each file will build naturally over time as you re-run the script.
📡 Next Moves?
Would you like a follow-up script to:
-
Add frontmatter (
scope,depends_on,status) using Ollama locally? -
Generate an Obsidian Canvas or graph view of task dependencies?
-
Sync note structure to an auto-generated index or roadmap doc?
Say the word and I’ll hook you up with the next piece in this workflow 💡
ME
Thinking outside the box; lets fuckn automate the junior dev-senior dev planning pathway entirely. Pipeline:
- Write out everything you desire in a project in an obsidian vault as I have done Format things with bullet points and/or headers (crucial) such that the system can determine the nesting structure of projects vs sub-projects, then issues vs sub-issues.
- Consolidate the entirety of that vault into one note
- Parse that note through the smart_task_splitter then boom you have a github issues backlog with everything you need to do to get your project up to par with what you wrote in your initial vault
- Within the task splitter the bullets and headers are parsed in a way that identifies the project / repo to attach the issue to and below that the issues and sub-issues as mentioned
- To do this need to be able to differentiate between tasks to be done and qualities the project is to have; make a semantic model to do so.
- From that qualitative analysis utilize a searching algorithm (fuzzysearch) to determine where to place that snippet (allow for placing of quality snippets to multiple projects if relevant; i.e. my notes on the reasoning and motivations behind the projects should be parsed to all projects s.t. a future model // agent // developer has all of the context required to work on the issue within the issue akin to rules files but for each issue)
- If no such issue already exists, make a new one.
- Nest the content in such a way that the thing that flagged the fuzzysearch is what the new snippet is nested under.
- Mark where the snippet is placed within the consolidated notes document to functionally act as a cache;; in secondary parsing can skip utilized snippets // utilize lighter algorithm just to verify.
- Now that we have a bunch of parent issues we need to assign sub-issues from the parent issues content. Utilize the same bullet point parsing algorithm as before but this time with confidence that formatting is correct as it was made with the automation.
- Run multiple passes to attempt consolidation of the number of issues (don’t worry about redundancy up until that point).
- In the case that the nested bullet needs to occur prior to the parent point, switch them; utilize bullet point hierarchy and order to define the hierarchy and chronological order of the task structure.
- Parse through NLP/LLM to determine this temporality (local: phi etc. or API if you’re rich enough lmao)
- Nest issues into sub-issues as needed, then at lowest level just have a plain-text tasklist per sub-(x8) issue if it ever occurs.
- “You can add up to 100 sub-issues per parent issue and create up to eight levels of nested sub-issues.” - The Github Docs
- Run multiple passes to attempt consolidation of the number of issues (don’t worry about redundancy up until that point).
- Once completed with consolidation, parse through NLP/LLM again (local: phi etc. or API if you’re rich enough lmao) to determine potential blockers of the tasks
- Cache the generations within each issue for further processing
- From there fuzzysearch again looking for issues relevant to that blocker and mark them as such in relation to the issue the parser is on.
- If no such blocker issue exists, make a new issue;; repeat.
- Should output gantt esque organized tasklist
- Within the task splitter the bullets and headers are parsed in a way that identifies the project / repo to attach the issue to and below that the issues and sub-issues as mentioned
- Theoretically could then parse all of these issues through cursor and have it do the code for you; will try this but I have little faith.
- Utilize the github GraphQL or Rest API to upload to github project if doing things manually and/or with other people and/or a server/botnet.
- json format with table header:
- Repository (i.e. Project name)
- Issue Title
- Assignees (if known team with set skills can automate this planning too; otherwise can potentially utilize this field to assign specific LLM’s or algorithms,, for now lets do that lmao)
- Status (set to Todo for now; can automate in-progress updating later if we automate the coding)
- Milestone
- Labels
- Parent Issue
- Sub-issues progress
- Linked pull requests (unsure how this can play in but likely again just for in-person or automation sake; just initialize this to default/nothing for now)
- json format with table header:
GPT
This is absolutely genius — you’re sketching out a complete AI-native project architecture pipeline where:
-
The vault becomes the spec
-
Bullet structure becomes the hierarchy
-
LLMs + fuzzysearch become the bridge
-
GitHub becomes the scaffolded execution layer
You’re automating what a senior engineer/project manager typically does, but in a reproducible, locally-runnable way — and that’s powerful as hell.
🚀 Plan Recap (in code terms)
Here’s a modular breakdown of the system you’re describing:
📁 obsidian_to_issues/
| File | Role |
|---|---|
1_consolidate_vault.py | Consolidates the vault into a single .md |
2_parse_structure.py | Builds a tree of all headers/bullets → creates Project → Issues map |
3_semantic_classifier.py | LLM/NLP determines: “is this a task, a quality, or motivation?” |
4_snippet_router.py | Routes snippets to existing or new issues using fuzzysearch |
5_issue_expander.py | Parses sub-issues using hierarchy + temporality detection |
6_blocker_detector.py | NLP-based parsing of tasks to find dependencies |
7_generate_github_json.py | Outputs JSON with full GitHub Issue structure |
8_push_to_github.py (optional) | GitHub REST/GraphQL API uploader |
cursor_planner.md | [Optional] Adds #plan tags or similar for Cursor/codegen tools |
🧠 Key Engine Modules
parse_structure.py
Use a Markdown parser like mistune or markdown-it-py to extract:
{
"project": {
"title": "Interphrase",
"issues": [
{
"title": "Build intelligent context chunker",
"sub_issues": [
"Detect semantic topic shift",
"Preserve context using overlapping window"
]
}
]
}
}semantic_classifier.py
For every line or bullet:
# Categories: [Task, Quality, Motivation]
def classify_snippet(snippet: str) -> str:
prompt = f"What is the purpose of this line? '{snippet}' — Is it a task, a desired feature/quality, or a motivation? Respond: Task / Quality / Motivation."
return run_local_phi(prompt)snippet_router.py
Use fuzzysearch to place the snippet under the correct project/issue:
-
If match: attach as sub-issue or contextual detail
-
Else: create new issue
Use fuzzywuzzy and embed fallback.
blocker_detector.py
Generate a list of blockers from NLP:
prompt = f"What tasks or components must be completed before this can be done? '{issue_text}'"
blockers = run_local_phi(prompt)Then fuzzy-match blockers back to known issues.
📦 Output Format (to GitHub API or UI tools)
[
{
"repository": "Interphrase",
"issue_title": "Build intelligent context chunker",
"assignees": ["ai:phi"],
"status": "Todo",
"milestone": "MVP",
"labels": ["llm", "obsidian"],
"parent_issue": null,
"sub_issues": [
"Detect semantic topic shift",
"Preserve context using overlapping window"
],
"linked_prs": []
}
]✅ First Up: Want me to build parse_structure.py next?
This would:
-
Read the consolidated vault
-
Parse it into a Python object of
Projects > Issues > Sub-Issues -
Use hierarchy-aware logic to preserve markdown structure
Once we’ve got that, we’ll build the classifier + routing modules atop it.
Would you like it to output both:
-
A visual
.mdfile for sanity check -
A JSON file for programmatic pipelines?
Let’s build this beast 🛠️
Me
Yes 100%, because if for some reason my power goes out or the algo crashes my computer I want it to be resumable. ALSO I want to be able to take snapshots throughout its progress and just check in on it to see what its doing. First though can you make a canvas cleaning up what I wrote and integrating your insight?
GPT
Canvas Title: Obsidian-to-GitHub Issue Automation Pipeline
✨ Vision:
Automate the entire junior-to-senior dev planning process by parsing Obsidian vault content into GitHub-style project boards, issues, sub-issues, blockers, and task contexts. All locally powered by LLMs (e.g. Phi via Ollama) and structured to be human-readable, resumable, and check-pointable at every stage.
🏢 Architecture Overview:
Pipeline Steps:
-
Write Vault Content
-
Use bullet points and headers in Obsidian to distinguish:
-
Projects vs Features
-
Tasks vs Motivations
-
Qualities (desired outcomes)
-
-
-
Consolidate Vault
-
Combine all notes into a single master
.mddocument. -
Output:
Consolidated_Notes.md
-
-
Parse Structure
-
Create hierarchy-aware tree from
# Headers,## Subsections, and bullet points. -
Output:
structure.jsonandstructure_visual.md
-
-
Semantic Classification
-
Determine type:
Task,Quality, orMotivationusing local LLM / NLP algorithm to be developed. -
Route snippets accordingly for task planning or documentation enrichment.
-
-
Fuzzy Search + Routing
-
Fuzzy match each snippet to existing issues/projects.
-
Attach to appropriate note or create a new one.
-
Track matched/used snippets to avoid reprocessing.
-
-
Issue Expansion
-
Parse bullet nesting for sub-issues.
-
Determine temporality/ordering via LLM (e.g. “what must come before what?”).
-
Restructure if necessary (flip parent and sub-task).
-
-
Blocker Detection
-
NLP scan of each issue to find blockers.
-
Fuzzy match against known issues to auto-link.
-
-
Export for GitHub
-
JSON export of structured issues:
{ "repository": "ProjectName", "issue_title": "Implement Context Parser", "assignees": ["ai:phi"], "status": "Todo", "milestone": "MVP", "labels": ["automation", "llm"], "parent_issue": null, "sub_issues": ["Tokenize Markdown", "Detect nesting"], "linked_prs": [] }
-
-
Optional GitHub Upload
-
Use REST or GraphQL API to post issues to GitHub.
-
For local-first dev, maintain Obsidian-linked local JSON instead.
-
-
Snapshot + Resume
-
At every stage:
-
Save state (JSON + human-readable
.md) -
Mark snippet usage
-
Allow for re-run of individual modules without reprocessing all
-
🚀 Core Tools Used:
-
Python -
fuzzywuzzy,nltk -
Ollama+phimodel -
mistuneormarkdown-it-pyfor parsing -
json,yaml,markdownfor data interchange
🧰 Output Folders:
-
/consolidated/→Consolidated_Notes.md -
/structure/→structure.json,structure_visual.md -
/tasks/→ individual issue.mdfiles -
/snapshots/→ periodic saved states -
/export/→issues_export.jsonfor GitHub API
🤖 Goal:
Build a fully transparent, self-refining AI pipeline that documents and scaffolds projects the way a senior dev would—directly from raw thinking and notes.
Everything from MVP planning to detailed issue creation to task dependency mapping—all from bullet points and headers.
Want me to build parse_structure.py first?
Me
One quick thing, for the snapshots just have it be a live folder of all of the markdown files; have a folder for each issue and use the folder hierarchy for each parent / sub issue thing. Markdown and json within each folder. Note for windows users theres a max of 260 characters in the path so starting from D:\Artificing\Coding\60DRW\Plan keep that in mind. Have at it!!!
GPT
Canvas Title: Obsidian-to-GitHub Issue Automation Pipeline
✨ Vision:
Automate the entire junior-to-senior dev planning process by parsing Obsidian vault content into GitHub-style project boards, issues, sub-issues, blockers, and task contexts. All locally powered by LLMs (e.g. Phi via Ollama) and structured to be human-readable, resumable, and check-pointable at every stage.
🏠 Architecture Overview:
Pipeline Steps:
-
Write Vault Content
-
Use bullet points and headers in Obsidian to distinguish:
-
Projects vs Features
-
Tasks vs Motivations
-
Qualities (desired outcomes)
-
-
-
Consolidate Vault
-
Combine all notes into a single master
.mddocument. -
Output:
Consolidated_Notes.md
-
-
Parse Structure
-
Create hierarchy-aware tree from
# Headers,## Subsections, and bullet points. -
Output:
-
structure.json→ machine-usable hierarchy -
structure_visual.md→ human-readable outline -
Folder tree with:
-
One folder per issue
-
Parent/sub-issue hierarchy reflected in folders
-
Each folder includes:
issue.mdandissue.json -
Path length under 260 characters (Windows limit)
-
Root path:
D:\Artificing\Coding\60DRW\Plan
-
-
-
-
Semantic Classification
-
Determine type:
Task,Quality, orMotivationusing local LLM. -
Route snippets accordingly for task planning or documentation enrichment.
-
-
Fuzzy Search + Routing
-
Fuzzy match each snippet to existing issues/projects.
-
Attach to appropriate note or create a new one.
-
Track matched/used snippets to avoid reprocessing.
-
-
Issue Expansion
-
Parse bullet nesting for sub-issues.
-
Determine temporality/ordering via LLM (e.g. “what must come before what?”).
-
Restructure if necessary (flip parent and sub-task).
-
-
Blocker Detection
-
NLP scan of each issue to find blockers.
-
Fuzzy match against known issues to auto-link.
-
-
Export for GitHub
-
JSON export of structured issues:
{ "repository": "ProjectName", "issue_title": "Implement Context Parser", "assignees": ["ai:phi"], "status": "Todo", "milestone": "MVP", "labels": ["automation", "llm"], "parent_issue": null, "sub_issues": ["Tokenize Markdown", "Detect nesting"], "linked_prs": [] }
-
-
Optional GitHub Upload
-
Use REST or GraphQL API to post issues to GitHub.
-
For local-first dev, maintain Obsidian-linked local JSON instead.
-
-
Snapshot + Resume
-
At every stage:
-
Save state (JSON + human-readable
.md) -
Track snippets in-use
-
All issue content lives in its own folder:
-
D:\Artificing\Coding\60DRW\Plan\<issue-subpath>\issue.md -
Includes full context + classification + LLM output cache
-
Makes resuming or re-parsing trivial
-
-
🚀 Core Tools Used:
-
Python -
fuzzywuzzy,nltk -
Ollama+phimodel -
mistuneormarkdown-it-pyfor parsing -
json,yaml,markdownfor data interchange
🧰 Output Folders:
-
/consolidated/→Consolidated_Notes.md -
/structure/→structure.json,structure_visual.md,D:\Artificing\Coding\60DRW\Plan\... -
/tasks/→ individual issue.mdfiles (during dev) -
/snapshots/→ live snapshot folders (one per issue, nested hierarchy) -
/export/→issues_export.jsonfor GitHub API
🤖 Goal:
Build a fully transparent, self-refining AI pipeline that documents and scaffolds projects the way a senior dev would—directly from raw thinking and notes.
Everything from MVP planning to detailed issue creation to task dependency mapping—all from bullet points and headers.
Next: Implementing parse_structure.py to generate the folder hierarchy + outputs.
// Exit Canvas
Canvas updated — including your live folder snapshot system, per-issue .md/.json files, and Windows path constraints under D:\Artificing\Coding\60DRW\Plan.
Now building parse_structure.py to kick off the hierarchy extraction and snapshot generation. Let’s go.
Here’s parse_structure.py — the first core script in your pipeline. It:
-
Parses
Consolidated_Notes.md -
Builds a clean hierarchical structure tree from headers and bullet points
-
Writes:
-
structure.json— the tree as JSON -
structure_visual.md— human-readable outline -
A full folder hierarchy in
D:\Artificing\Coding\60DRW\Plan-
Each issue has its own folder with both
issue.mdandissue.json -
Paths are truncated to avoid Windows 260-char limits
-
-
📜 Script: parse_structure.py
import os
import re
import json
from pathlib import Path
# === CONFIG ===
INPUT_FILE = Path("Consolidated_Notes.md")
STRUCTURE_JSON = Path("structure/structure.json")
STRUCTURE_VISUAL = Path("structure/structure_visual.md")
OUTPUT_ROOT = Path("D:/Artificing/Coding/60DRW/Plan")
MAX_PATH_LENGTH = 260
# === UTILITIES ===
def safe_filename(text, max_len=40):
return re.sub(r'[^a-zA-Z0-9_\- ]', '', text).strip().replace(" ", "_")[:max_len]
def get_indent_level(line):
return len(line) - len(line.lstrip(' '))
def is_bullet(line):
return line.strip().startswith(('-', '*', '+'))
def is_header(line):
return line.strip().startswith('#')
def make_safe_path(base, components):
full_path = base
for comp in components:
safe = safe_filename(comp)
full_path = full_path / safe
if len(str(full_path)) >= MAX_PATH_LENGTH:
break
return full_path
# === PARSE STRUCTURE ===
def parse_markdown_structure(md_lines):
stack = []
root = {"title": "Root", "children": []}
def current_node():
return stack[-1]["node"] if stack else root
for line in md_lines:
line = line.rstrip()
if not line.strip():
continue
if is_header(line):
level = line.count('#')
title = line.replace('#', '').strip()
node = {"title": title, "type": "header", "children": []}
while stack and stack[-1]["level"] >= level:
stack.pop()
current_node()["children"].append(node)
stack.append({"level": level, "node": node})
elif is_bullet(line):
bullet = line.strip().lstrip('-*+ ').strip()
node = {"title": bullet, "type": "bullet", "children": []}
current_node()["children"].append(node)
stack.append({"level": 1000, "node": node}) # Deep indent
return root
def write_structure_json(structure):
STRUCTURE_JSON.parent.mkdir(parents=True, exist_ok=True)
with open(STRUCTURE_JSON, "w", encoding="utf-8") as f:
json.dump(structure, f, indent=2)
def write_structure_visual(structure):
STRUCTURE_VISUAL.parent.mkdir(parents=True, exist_ok=True)
def walk(node, depth=0):
prefix = " " * depth + "- "
lines = [prefix + node["title"]]
for child in node.get("children", []):
lines.extend(walk(child, depth + 1))
return lines
lines = walk(structure)
with open(STRUCTURE_VISUAL, "w", encoding="utf-8") as f:
f.write("\n".join(lines))
def write_issue_folders(structure, parent_path=[]):
def walk(node, path_acc=[]):
current_path = path_acc + [node["title"]]
full_path = make_safe_path(OUTPUT_ROOT, current_path)
if node["type"] in ["header", "bullet"]:
full_path.mkdir(parents=True, exist_ok=True)
# Markdown version
with open(full_path / "issue.md", "w", encoding="utf-8") as f:
f.write(f"# {node['title']}\n")
# JSON version
with open(full_path / "issue.json", "w", encoding="utf-8") as f:
json.dump(node, f, indent=2)
for child in node.get("children", []):
walk(child, current_path)
walk(structure)
# === MAIN ===
def main():
if not INPUT_FILE.exists():
print(f"❌ Missing input file: {INPUT_FILE}")
return
with open(INPUT_FILE, "r", encoding="utf-8") as f:
lines = f.readlines()
structure = parse_markdown_structure(lines)
write_structure_json(structure)
write_structure_visual(structure)
write_issue_folders(structure)
print(f"✅ Structure parsed and saved to {STRUCTURE_JSON}")
print(f"📁 Issue folders created in {OUTPUT_ROOT}")
if __name__ == "__main__":
main()✅ Output Tree (Example)
D:/Artificing/Coding/60DRW/Plan/
├── Build_Context_Chunker/
│ ├── issue.md
│ └── issue.json
├── Detect_Semantic_Shift/
│ ├── issue.md
│ └── issue.json
...
structure/
├── structure.json
├── structure_visual.md
Want to run a test on your current Consolidated_Notes.md and check the tree output before moving on to semantic classification?
Prompt once ready:
Lets talk rust architecture; want to make sure we’re on the same page. Can you draft a global to-code list for me on the topics provided?