Skip to content

Add Knowledge Loop agent#18

Open
Svaag wants to merge 1 commit into
mainfrom
feature/knowledge-loop-agent
Open

Add Knowledge Loop agent#18
Svaag wants to merge 1 commit into
mainfrom
feature/knowledge-loop-agent

Conversation

@Svaag

@Svaag Svaag commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • save the Knowledge Loop phase plan under docs/plans/
  • add hyrule-knowledge loop --once as a governed producer agent skeleton
  • phase 1: lock, per-day ledger, deterministic ingest/validation, optional dry-run enrichment plumbing, PR publication, JSON reports, optional Icinga heartbeat
  • phase 2: opt-in OpenRouter enrichment targets and learning-event import with daily budgets
  • document usage in README and add regression coverage

Validation

  • uv run ruff check src tests
  • uv run mypy --strict src
  • uv run pytest
  • uv run hyrule-knowledge validate okf
  • uv run hyrule-knowledge quality --check
  • uv run hyrule-knowledge export --check
  • uv run hyrule-knowledge eval --check
  • uv run hyrule-knowledge ledger --check
  • uv run hyrule-knowledge ledger lifecycle --check
  • uv run hyrule-knowledge scan-secrets okf exports reports evals ledger schema

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edf29e8dea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated
Comment thread src/hyrule_knowledge/knowledge_loop.py
Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4e5572099

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated
Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated
@Svaag Svaag force-pushed the feature/knowledge-loop-agent branch from e4e5572 to e02684d Compare June 24, 2026 04:46
@Svaag

Svaag commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e02684d717

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated
Comment thread src/hyrule_knowledge/knowledge_loop.py
@Svaag Svaag force-pushed the feature/knowledge-loop-agent branch from e02684d to edf1078 Compare June 24, 2026 04:53
@Svaag

Svaag commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edf1078731

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hyrule_knowledge/knowledge_loop.py
Comment thread src/hyrule_knowledge/knowledge_loop.py
@Svaag Svaag force-pushed the feature/knowledge-loop-agent branch from edf1078 to 3c70367 Compare June 24, 2026 05:00
@Svaag

Svaag commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c70367201

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated
@Svaag Svaag force-pushed the feature/knowledge-loop-agent branch from 3c70367 to eb89f7c Compare June 24, 2026 05:09
@Svaag

Svaag commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb89f7cb43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/hyrule_knowledge/knowledge_loop.py Outdated
Comment thread src/hyrule_knowledge/cli.py Outdated
@Svaag Svaag force-pushed the feature/knowledge-loop-agent branch from eb89f7c to 82a014f Compare June 24, 2026 05:18
@Svaag

Svaag commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82a014fe08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

runner: CommandRunner,
report: KnowledgeLoopReport,
) -> None:
_run_checked(_knowledge_cmd(config, "ingest"), repo, runner, report)

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 Keep idle loop runs from publishing timestamp-only refreshes

When the loop runs in the intended systemd/local context with no GITHUB_RUN_ID, this unconditional ingest call rewrites generated concepts and exports with fresh utc_now()/run_id() metadata (last_verified_at, manifest run_id, claim timestamps) even if the source snapshots are unchanged. _git_dirty() will then see a dirty worktree and --create-pr can open a PR containing only refresh timestamps, so the new idle path is effectively unreachable for real ingest runs despite the loop being documented/tested as deterministic when no knowledge changed.

Useful? React with 👍 / 👎.

report.ledger = ledger
return report

learning_event_count = _learning_event_count(config.learning_event_paths)

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 Resolve learning-event paths against the repo

With --repo-path set and a relative --learning-event path, the budget preflight counts events in the supervisor's current directory here, but the actual ledger import subprocess later interprets the same relative path with cwd=repo. In deployments that invoke the loop from outside the checkout, valid repo-relative inputs can fail before import or be counted from a different location than the files that are imported, which makes the daily learning-event budget and phase-2 import behavior inconsistent.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant