跪拜 Guibai
← All articles
Architecture · Database · Programmer

Akashic: A Continuous Knowledge Loop for AI-Driven Development

By 得物技术 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Stale AI context forces developers to re-explain boundaries and verify edge cases on every session. Akashic turns knowledge refresh into an automated byproduct of commits and archived chats, cutting the manual overhead that usually makes team documentation decay.

Summary

Akashic tackles a common problem: as AI aids more development work, team knowledge fragments into code, docs, and chat logs, and no one has time to manually reconcile them. The practice builds a three-layer knowledge base in Git: L1 AGENTS.md acts as an entry and router, L2 holds Skills and module docs for task-specific reuse, and L3 keeps source-code comments for implementation constraints. This structure lets an Agent load only the relevant slice of knowledge per task, avoiding the context bloat of dumping everything into one file.

Two automated write-back paths keep that knowledge fresh. On every code commit, a script maps changed files to potentially affected documents and provides diff evidence; an Agent then decides whether responsibilities or rules shifted and updates the docs in the same commit. Separately, archived sessions from Claude Code and Codex are mined by a Session Agent and an Audit Agent, which extract reusable conclusions, verify them against fixed snapshots of code and existing knowledge, and submit them as merge requests for human review. An Akashic CLI handles installation, config sync, and session uploads automatically via Git hooks, so members never manually maintain the tooling.

The system also produces conversation insights: metrics like session rounds, tokens, and duration, combined with labels such as 'supplement knowledge' and 'request redo', help teams spot where context is missing or execution goes wrong. The team reports that after introducing the loop, similar tasks saw fewer rounds and corrections, suggesting the knowledge base is actually closing the feedback cycle.

Takeaways
— Knowledge is stored in Git in three layers: L1 AGENTS.md for global routing, L2 Skills and repository docs for task-specific reuse, L3 source comments for implementation constraints.
— On code commit, a script uses a mapping from changed files to docs to produce diff evidence, and an Agent decides whether to update knowledge; updates go out in the same commit as the business code.
— Conversation knowledge write-back uses two agents on a shared OSS snapshot: Session Agent extracts candidate knowledge, Audit Agent checks sufficiency and conflicts before an MR is generated.
— Akashic CLI installs itself via a script invoked by the Agent, sets up configuration, Skills, and Git Hooks, and uploads Claude Code and Codex sessions automatically on git commit.
— Uploads are deduplicated per day, retried up to three times, and sessions form snapshots within a configurable window (default three days).
— Conversation insights compute session rounds, tokens, and duration, and label sessions with signals like 'supplement knowledge' and 'request redo' to pinpoint where context is lacking.
— The team observed that after the knowledge loop was active, similar tasks had decreased rounds and correction labels.
Conclusions

Baking knowledge updates into the commit pipeline is a sound way to keep docs fresh, but it depends on the Agent's judgment of whether a change actually shifts responsibilities; a wrong 'no update' call silently reintroduces the staleness it is meant to prevent.

The three-layer separation directly addresses the context-window overload problem: instead of loading a giant AGENTS.md, an Agent progressively drills from global route to module doc to source comment, matching the granularity to the task.

Measuring session rounds and correction labels gives teams a quantitative handle on AI collaboration quality, turning vague impressions about 'more iterations' into data that can be tied to specific knowledge gaps.

The human Owner review for every knowledge MR suggests the team trusts the pipeline to draft but not to publish; that human-in-the-loop is a pragmatic compromise between automation and accountability.

Concepts & terms
AGENTS.md
A markdown file that provides project-wide instructions to AI coding agents. In Akashic, it serves as the L1 entry point, routing agents to the relevant L2 documents and Skills.
Knowledge Engineering (as used here)
The practice of structuring and continuously updating a team's project knowledge so that AI agents can reliably use it during development. Akashic is an implementation built around Git, Skills, and session mining.
L1/L2/L3 knowledge layers
A three-tier knowledge structure: L1 (AGENTS.md) for entry and global routing, L2 (Skills and repository MD) for task-reusable knowledge, L3 (source comments) for implementation constraints.
AI Skill
A reusable operational procedure, typically a directory with a SKILL.md file and accompanying scripts, that guides an AI agent through a specific development task such as adding a recall channel or debugging a metric anomaly.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗