Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .kyzn/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# kyzn — gitignored local data
history/
reports/
35 changes: 35 additions & 0 deletions .kyzn/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# kyzn configuration — commit this file
# Generated by: kyzn init
# Date: 2026-03-17T21:55:04Z

project:
name: bloxcue
type: generic

preferences:
mode:
How aggressive should improvements be?
Comment on lines +10 to +11
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make .kyzn/config.yaml a parseable YAML config

.kyzn/config.yaml is not valid YAML as committed: the prompt transcript after preferences.mode is emitted as bare text, and ruby -e 'require "yaml"; YAML.load_file(".kyzn/config.yaml")' fails with could not find expected ':' at line 11. In any environment where kyzn (or another YAML reader) tries to load this committed config, it will abort before applying the project settings, so this needs to be rewritten as actual key/value YAML instead of the interactive init output.

Useful? React with 👍 / 👎.

1) Deep — real improvements only (no cosmetic changes)
2) Clean — dead weight cleanup (remove unused code, fix naming)
3) Full — everything (maximum value per run)

Choice [1]: 1
budget: Budget per run (USD) [2.50]: 2.50
max_turns: 30
diff_limit: 2000
trust:
Trust level for auto-merging?
1) Guardian — always create PR, always wait for approval (recommended)
2) Autopilot — auto-merge if build passes + tests pass + diff < threshold

Choice [1]: 1
on_build_fail:
If the build breaks after improvements, what should kyzn do?
1) Write a report explaining what happened (recommended)
2) Silently discard the branch
3) Create a draft PR so you can see what was attempted

Choice [1]: 1

focus:
priorities: []
2 changes: 1 addition & 1 deletion scripts/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def get_file_content(path: str) -> str:
return ""

if resolved_path.exists():
content = resolved_path.read_text()
content = resolved_path.read_text(encoding="utf-8")
_, body = parse_frontmatter(content)
return body
return ""
Expand Down
16 changes: 14 additions & 2 deletions scripts/pg_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def fetch_learnings(url: str, limit: int = 500, since: Optional[str] = None) ->
if not HAS_PSYCOPG2 or not url:
return []

conn = None
try:
conn = psycopg2.connect(url, connect_timeout=5)
conn.set_session(readonly=True)
Expand All @@ -92,7 +93,6 @@ def fetch_learnings(url: str, limit: int = 500, since: Optional[str] = None) ->
rows = cur.fetchall()

cur.close()
conn.close()

learnings = []
for row in rows:
Expand All @@ -109,6 +109,12 @@ def fetch_learnings(url: str, limit: int = 500, since: Optional[str] = None) ->
except Exception as e:
print(f"[BloxCue PG] Failed to fetch learnings: {e}", file=sys.stderr)
return []
finally:
if conn is not None:
try:
conn.close()
except Exception:
pass


def fetch_learning_content(url: str, learning_id: str) -> str:
Expand All @@ -124,6 +130,7 @@ def fetch_learning_content(url: str, learning_id: str) -> str:
if not HAS_PSYCOPG2 or not url or not learning_id:
return ""

conn = None
try:
conn = psycopg2.connect(url, connect_timeout=5)
conn.set_session(readonly=True)
Expand All @@ -136,7 +143,6 @@ def fetch_learning_content(url: str, learning_id: str) -> str:
row = cur.fetchone()

cur.close()
conn.close()

if not row:
return ""
Expand Down Expand Up @@ -171,6 +177,12 @@ def fetch_learning_content(url: str, learning_id: str) -> str:
except Exception as e:
print(f"[BloxCue PG] Failed to fetch learning {learning_id}: {e}", file=sys.stderr)
return ""
finally:
if conn is not None:
try:
conn.close()
except Exception:
pass


def learning_to_index_entry(learning: Dict, extract_keywords_fn: Callable) -> Optional[Dict]:
Expand Down
Loading