feat: refactor work item file retrieval to use Python script for improved error handling and readability
This commit is contained in:
@@ -6,37 +6,20 @@ Load and internalize the reusable workspace core and the active project context
|
||||
|
||||
Read core:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@core/integrations/memory-vault-model.md
|
||||
@core/integrations/communication-model.md
|
||||
@core/profiles/create-project-profile.md
|
||||
@agent-memory/README.md
|
||||
@profiles/fidelity/profile.md
|
||||
@agent-memory/behavior/agent-behavior.md
|
||||
@agent-memory/behavior/learning-sessions.md
|
||||
@agent-memory/behavior/self-maintenance.md
|
||||
@agent-memory/memory/operational-memory.md
|
||||
@agent-memory/integrations/memory-interface.md
|
||||
@agent-memory/integrations/obsidian.md
|
||||
@agent-memory/integrations/communication-sources.md
|
||||
@agent-memory/memory/promotion-rules.md
|
||||
@agent-memory/integrations/technical-verification.md
|
||||
|
||||
Read active workspace memory:
|
||||
|
||||
@README.md
|
||||
@project-knowledge/00-start/start-here.md
|
||||
@project-knowledge/00-start/onboarding.md
|
||||
@project-knowledge/01-current/current-work.md
|
||||
@project-knowledge/01-current/work-items.md
|
||||
@project-knowledge/07-maps/current-work.md
|
||||
@project-knowledge/07-maps/fidelity-domain.md
|
||||
@project-knowledge/07-maps/work-items.md
|
||||
@project-knowledge/07-maps/people.md
|
||||
@project-knowledge/03-context/project.md
|
||||
@project-knowledge/03-context/process/communication.md
|
||||
@agent-memory/integrations/technical-verification.md
|
||||
@agent-memory/memory/context-maintenance.md
|
||||
@agent-memory/workflows/workspace-model.md
|
||||
@agent-memory/behavior/agent-behavior.md
|
||||
@agent-memory/memory/promotion-rules.md
|
||||
@project-knowledge/03-context/ios/index.md
|
||||
@project-knowledge/04-people/manager.md
|
||||
@project-knowledge/04-people/index.md
|
||||
|
||||
@@ -52,13 +35,34 @@ Today's canonical daily note, if present:
|
||||
|
||||
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
|
||||
|
||||
Recent daily notes available:
|
||||
Latest daily notes available:
|
||||
|
||||
!`if [ -d project-knowledge/06-daily ]; then ls -1 project-knowledge/06-daily 2>/dev/null | sort | tail -n 5; else echo "No daily notes directory available."; fi`
|
||||
!`if [ -d project-knowledge/06-daily ]; then ls -1 project-knowledge/06-daily 2>/dev/null | sort | tail -n 3; else echo "No daily notes directory available."; fi`
|
||||
|
||||
Detailed active work item files, if available:
|
||||
|
||||
!`if [ -d project-knowledge/02-work-items ]; then for f in project-knowledge/02-work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
|
||||
!`python3 - <<'PY'
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
summary = Path("project-knowledge/01-current/work-items.md")
|
||||
if not summary.is_file():
|
||||
print("No work item files available.")
|
||||
raise SystemExit(0)
|
||||
|
||||
text = summary.read_text()
|
||||
paths = re.findall(r"Detail: `(project-knowledge/02-work-items/[^`]+)`", text)
|
||||
if not paths:
|
||||
print("No work item files available.")
|
||||
raise SystemExit(0)
|
||||
|
||||
for rel in paths:
|
||||
path = Path(rel)
|
||||
if not path.is_file():
|
||||
continue
|
||||
print(f"\n### {rel}")
|
||||
print(path.read_text())
|
||||
PY`
|
||||
|
||||
Latest communication inbox, if available:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user