spark: add line counter utility script

This commit is contained in:
spark committed 2026-10-29 13:54:30 +00:00
1 parent 5b7d838ebf
commit 58ce4011b5
4 files changed
+120

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env python3
"""Line counter utility - counts lines in any text file."""
import sys
def count_lines(filepath):
with open(filepath, 'r') as f:
return sum(1 for _ in f)
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: count_lines.py <filepath>")
sys.exit(1)
count = count_lines(sys.argv[1])
print(f"Line count: {count}")
+41
View File
@@ -0,0 +1,41 @@
{
"hermes_profile": {
"exists": true,
"items": 42,
"skills_count": 24
},
"hermes_skills": {
"exists": true,
"count": 13
},
"file_structure": {
"/root/.hermes/profiles/spark/skills": {
"exists": true,
"is_dir": true
},
"/root/.hermes/profiles/spark/memories": {
"exists": true,
"is_dir": true
},
"/root/.hermes/profiles/spark/plugins": {
"exists": true,
"is_dir": true
},
"/root/.hermes/profiles/spark/cron": {
"exists": true,
"is_dir": true
},
"/root/.hermes/profiles/spark/scratch": {
"exists": false,
"is_dir": false
}
},
"python_env": {
"python_version": "3.14.7",
"executable": "/root/.hermes/installs/76f6e7e5145b5f39/environments/c5b879e2036d4c909805dd1858587925/venv/bin/python3"
},
"forge_token": {
"set": true,
"length": 40
}
}
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env python3
"""Hermes environment diagnostic utility - quick inspection of key systems."""
import os
import sys
import json
from pathlib import Path
def check_hermes_profile():
"""Check Hermes profile directory."""
profile_path = Path("/root/.hermes/profiles/spark")
if profile_path.exists():
dirs = list(profile_path.iterdir())
return {"exists": True, "items": len(dirs), "skills_count": len([d for d in dirs if d.is_dir() and d.name != "__pycache__"])}
return {"exists": False}
def check_hermes_skills():
"""Count available skills."""
skills_path = Path("/root/.hermes/profiles/spark/skills")
if skills_path.exists():
skill_dirs = [d for d in skills_path.iterdir() if d.is_dir()]
return {"exists": True, "count": len(skill_dirs)}
return {"exists": False}
def check_file_structure():
"""Check key Hermes directories."""
paths = [
"/root/.hermes/profiles/spark/skills",
"/root/.hermes/profiles/spark/memories",
"/root/.hermes/profiles/spark/plugins",
"/root/.hermes/profiles/spark/cron",
"/root/.hermes/profiles/spark/scratch",
]
result = {}
for p in paths:
path = Path(p)
result[p] = {"exists": path.exists(), "is_dir": path.is_dir() if path.exists() else False}
return result
def check_python_env():
"""Check Python environment."""
return {
"python_version": sys.version.split()[0],
"executable": sys.executable,
}
def check_forge_token():
"""Check if FORGE_TOKEN is set."""
token = os.environ.get('FORGE_TOKEN', '')
return {"set": bool(token), "length": len(token)}
def main():
report = {
"hermes_profile": check_hermes_profile(),
"hermes_skills": check_hermes_skills(),
"file_structure": check_file_structure(),
"python_env": check_python_env(),
"forge_token": check_forge_token(),
}
print(json.dumps(report, indent=2))
if __name__ == "__main__":
main()
+2
View File
@@ -0,0 +1,2 @@
cutover,decided,exported_at,pending,source
"Until Timmy's page is verified live, the Muse artifact `inbox` remains the live inbox. This file is a build seed, not live state.","[{""created_at"": ""2026-09-26T14:28:33.128Z"", ""decided_at"": ""2026-09-26T14:51:11.019Z"", ""decision"": ""approved"", ""decision_note"": ""Do we even have authority to fix the publication? Add our note and escalate it to the author and mag publisher"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Flag 7 of 7. Grade: overstated.\n\nSummary clause: \""Comparing Strategy, Twenty One, Nakamoto, Metaplanet, Coinsilium and Smarter Web returns and drawdowns against Bitcoin\"".\n\nArticle: \""We set aside pioneers like Strategy, which started in 2020 and is up over 400% since, as it's not a fair comp for these newcomers.\"" Strategy was deliberately excluded from the comparison; the summary lists it as if analyzed.\n\nProposed correction: drop Strategy from the compared list."", ""id"": 13, ""proposed_action"": ""Approve: publish the corrected wording to the live magazine-091 page."", ""summary"": ""Archive fix: magazine-091 lists Strategy among compared firms""}]",2026-09-26T17:31:00Z,"[{""created_at"": ""2026-09-26T14:28:32.716Z"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Flag 3 of 7. Grade: contradicted.\n\nSummary clause: \""(only Loko and Happy responded)\"".\n\nArticle: \""Then after a few minutes I checked the chat. A few positive responses. Some funny shit talking, oh look, Happy even added some lyrics!\"" - more than two people responded; \""only\"" is wrong.\n\nProposed correction: \""(Loko and Happy among those who responded)\""."", ""id"": 1, ""proposed_action"": ""Approve: publish the corrected wording to the live magazine-021 page."", ""summary"": ""Archive fix: magazine-021 says only Loko and Happy responded""}, {""created_at"": ""2026-09-26T14:28:32.852Z"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Local branch, committed, not pushed. Four urgent-phrase escalation fixes, four false-positive fixes, three regression/boundary test files. npm test 92/92 on 2026-09-20. Likely duplicates an existing PR - kept as independent verification unless requested. No push without maintainer approval per your authority rules."", ""id"": 2, ""proposed_action"": ""Approve: push the branch to the forge for maintainer review."", ""summary"": ""Turd app: approve pushing branch zephyrus/62-symptom-escalation-regression""}, {""created_at"": ""2026-09-26T14:28:32.874Z"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Flag 2 of 7. Grade: unsupported.\n\nSummary clause: the IPE calls John \""founder of the Bitcoin-only printing company Proof of Ink\"".\n\nThe article never uses the word \""founder\""; byline is \""Proof of Ink by -John\"". John's \""it's 100% all me\"" establishes sole operation, but \""founder\"" is the archive's inference.\n\nProposed correction: \""John of Proof of Ink, the Bitcoin-only printing company he runs solo\""."", ""id"": 3, ""proposed_action"": ""Approve: publish the corrected wording to the live magazine-011 page."", ""summary"": ""Archive fix: magazine-011 calls John the 'founder' of Proof of Ink""}, {""created_at"": ""2026-09-26T14:28:32.895Z"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Local branch, commit 03def65, not pushed. Accessibility changes plus eight Playwright gates. Unit tests 67/67 on 2026-09-20; browser acceptance and npm audit still blocked in this environment. Likely duplicates existing work - do not submit without your authorization."", ""id"": 4, ""proposed_action"": ""Approve: submit the pull request for maintainer review."", ""summary"": ""Turd app: approve submitting the a11y PR from zephyrus/65-a11y-gates""}, {""created_at"": ""2026-09-26T14:28:32.922Z"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Local branch, commit b730f5f, not pushed. Explicit Type 1-2 follow-up question; no image inference. npm test 75/75 on 2026-09-20. Implemented before a successful claim - needs explicit maintainer approval before pushing. Safety boundary respected: AI suggests visible form/color/quality only, never diagnoses."", ""id"": 5, ""proposed_action"": ""Approve: push the branch to the forge for maintainer review."", ""summary"": ""Turd app: approve pushing branch zephyrus/67-hard-stool-followup""}, {""created_at"": ""2026-09-26T14:28:32.953Z"", ""escalated_by"": ""Zephyrus"", ""evidence"": ""Flag 1 of 7 from the Q8 summary-fidelity pilot (recoveries/summary-fidelity-pilot.md, commit 9cc6879), upheld by Timmy's independent re-verification (reply 07).\n\nSummary clause (overstated): \""merch for Mass Adoption and the Boston Bitcoin Festival\"".\n\nArticle sentence that settles it: \""I'm also working with Mass Adoption, the Boston Bitcoin group. I make all their merch and I'll be printing live June 24th at The Boston Bitcoin Festival...\""\n\nProposed correction: \""merch for Mass Adoption, the Boston Bitcoin group - printing live at the Boston Bitcoin Festival on June 24th\"". The merch is for Mass Adoption; the festival is wLine truncated