feat: add Write discipline section to prevent direct file edits#5
Open
WorksOnMyVM wants to merge 1 commit into
Open
feat: add Write discipline section to prevent direct file edits#5WorksOnMyVM wants to merge 1 commit into
WorksOnMyVM wants to merge 1 commit into
Conversation
f45bf4c to
c247235
Compare
c247235 to
7063881
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
loopany 是 agent 长期记忆系统,使用 markdown + frontmatter 存储 artifact,并通过 append-only JSONL 存储引用关系。Agent 在日常使用中会频繁创建和修改 artifact,因此写入路径需要保持一致。
修改内容
skills/loopany-core/SKILL.md的 Anti-patterns 前新增Write discipline小节。loopany artifact create、loopany artifact append、loopany artifact set、loopany artifact status和loopany refs add。artifacts/下文件,以及使用cat >、sed、awk、editor writes 等绕过 CLI 的写法。createdAt、updatedAt。skills/loopany-capture/SKILL.md的 capture 流程附近补充必须通过 loopany CLI 写入 artifact 的提示。Direct file writes instead of loopany CLI。为什么重要
直接写文件会绕过 loopany CLI 提供的关键机制,包括 schema 校验、状态机约束、audit 日志、journal 自动关联和 reference indexing。这会让 artifact 看起来写入成功,但系统索引、追踪和后续 reflect/review 流程可能缺失必要元数据或关系。
测试
bun test通过bun run typecheck通过SKILL.md的 frontmatter 并检查新增标题通过