opencode-skills-collection 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +24 -1
- package/bundled-skills/007/SKILL.md +2 -2
- package/bundled-skills/10-andruia-skill-smith/SKILL.md +1 -1
- package/bundled-skills/agent-squad/SKILL.md +5 -0
- package/bundled-skills/agent-squad/alex/SKILL.md +3 -0
- package/bundled-skills/agent-squad/aria/SKILL.md +3 -0
- package/bundled-skills/agent-squad/dep/SKILL.md +3 -0
- package/bundled-skills/agent-squad/luna/SKILL.md +4 -1
- package/bundled-skills/agent-squad/mason/SKILL.md +3 -0
- package/bundled-skills/agent-squad/max/SKILL.md +3 -0
- package/bundled-skills/agent-squad/quinn/SKILL.md +3 -0
- package/bundled-skills/agent-squad/rex/SKILL.md +3 -0
- package/bundled-skills/angular/metadata.json +1 -1
- package/bundled-skills/angular-best-practices/metadata.json +1 -1
- package/bundled-skills/angular-state-management/metadata.json +1 -1
- package/bundled-skills/angular-ui-patterns/metadata.json +1 -1
- package/bundled-skills/antigravity-skill-orchestrator/SKILL.md +2 -2
- package/bundled-skills/apify-actor-development/SKILL.md +2 -2
- package/bundled-skills/apple-container/SKILL.md +165 -0
- package/bundled-skills/apple-container/references/commands.md +1593 -0
- package/bundled-skills/apple-container/references/concepts.md +294 -0
- package/bundled-skills/apple-container/references/configuration.md +499 -0
- package/bundled-skills/apple-container/references/workflows.md +498 -0
- package/bundled-skills/ask-copilot/SKILL.md +112 -0
- package/bundled-skills/auto-research/SKILL.md +126 -0
- package/bundled-skills/brooks-lint/SKILL.md +1 -1
- package/bundled-skills/browser-harness/references/install.md +3 -1
- package/bundled-skills/chrome-extension-developer/SKILL.md +1 -1
- package/bundled-skills/clean-code-guard/SKILL.md +184 -0
- package/bundled-skills/clean-code-guard/references/ai-failure-modes.md +345 -0
- package/bundled-skills/clean-code-guard/references/comments-and-formatting.md +115 -0
- package/bundled-skills/clean-code-guard/references/dry-kiss-yagni.md +133 -0
- package/bundled-skills/clean-code-guard/references/naming-and-functions.md +187 -0
- package/bundled-skills/clean-code-guard/references/review-checklist.md +150 -0
- package/bundled-skills/clean-code-guard/references/solid.md +280 -0
- package/bundled-skills/clean-code-guard/references/sources.md +47 -0
- package/bundled-skills/cloudflare-security-audit/SKILL.md +137 -0
- package/bundled-skills/cloudflare-security-audit/references/AI-AND-LLM.md +67 -0
- package/bundled-skills/cloudflare-security-audit/references/ATTACK-CLASSES.md +116 -0
- package/bundled-skills/cloudflare-security-audit/references/CLIENT-SIDE.md +67 -0
- package/bundled-skills/cloudflare-security-audit/references/HUNTING.md +110 -0
- package/bundled-skills/cloudflare-security-audit/references/MEMORY-SAFETY-AND-BINARY.md +58 -0
- package/bundled-skills/cloudflare-security-audit/references/RECONNAISSANCE.md +46 -0
- package/bundled-skills/cloudflare-security-audit/references/VALIDATION-AND-REPORTING.md +109 -0
- package/bundled-skills/cloudflare-security-audit/references/WEB-PROTOCOL-AND-AUTH.md +85 -0
- package/bundled-skills/cloudflare-security-audit/resources/report-schema.json +210 -0
- package/bundled-skills/comfyui-gateway/references/troubleshooting.md +1 -1
- package/bundled-skills/commit/SKILL.md +2 -1
- package/bundled-skills/deepapi/SKILL.md +6 -6
- package/bundled-skills/docs/README.md +1 -1
- package/bundled-skills/docs/contributors/quality-bar.md +1 -1
- package/bundled-skills/docs/contributors/security-guardrails.md +1 -1
- package/bundled-skills/docs/integrations/jetski-cortex.md +5 -5
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +3 -3
- package/bundled-skills/docs/maintainers/ci-drift-fix.md +7 -5
- package/bundled-skills/docs/maintainers/merge-batch.md +24 -7
- package/bundled-skills/docs/maintainers/pr-autonomy.md +89 -0
- package/bundled-skills/docs/maintainers/release-notes-7.2.0.md +1 -1
- package/bundled-skills/docs/maintainers/release-process.md +9 -9
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +5 -5
- package/bundled-skills/docs/maintainers/skills-date-tracking.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +2 -2
- package/bundled-skills/docs/users/{antigravity-awesome-skills-vs-awesome-claude-skills.md → agentic-awesome-skills-vs-awesome-claude-skills.md} +5 -5
- package/bundled-skills/docs/users/ai-agent-skills.md +4 -4
- package/bundled-skills/docs/users/best-claude-code-skills-github.md +3 -3
- package/bundled-skills/docs/users/best-cursor-skills-github.md +3 -3
- package/bundled-skills/docs/users/bundles.md +56 -57
- package/bundled-skills/docs/users/claude-code-skills.md +6 -6
- package/bundled-skills/docs/users/codex-cli-skills.md +5 -5
- package/bundled-skills/docs/users/cursor-skills.md +3 -3
- package/bundled-skills/docs/users/faq.md +27 -15
- package/bundled-skills/docs/users/gemini-cli-skills.md +4 -4
- package/bundled-skills/docs/users/getting-started.md +22 -12
- package/bundled-skills/docs/users/kiro-integration.md +7 -7
- package/bundled-skills/docs/users/plugins.md +8 -9
- package/bundled-skills/docs/users/security-skills.md +1 -1
- package/bundled-skills/docs/users/skills-vs-mcp-tools.md +1 -1
- package/bundled-skills/docs/users/specialized-plugin-roadmap.md +3 -4
- package/bundled-skills/docs/users/usage.md +9 -9
- package/bundled-skills/docs/users/visual-guide.md +7 -7
- package/bundled-skills/docs/users/windows-truncation-recovery.md +1 -1
- package/bundled-skills/docs/users/workflows.md +1 -1
- package/bundled-skills/docs/vietnamese/BUNDLES.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/FAQ.vi.md +15 -8
- package/bundled-skills/docs/vietnamese/GETTING_STARTED.vi.md +12 -5
- package/bundled-skills/docs/vietnamese/QUALITY_BAR.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/README.vi.md +21 -17
- package/bundled-skills/docs/vietnamese/SECURITY_GUARDRAILS.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/SKILLS_README.vi.md +2 -2
- package/bundled-skills/docs/vietnamese/TRANSLATION_PLAN.vi.md +1 -1
- package/bundled-skills/docs/vietnamese/VISUAL_GUIDE.vi.md +8 -8
- package/bundled-skills/docs-guard/SKILL.md +109 -0
- package/bundled-skills/docs-guard/references/code-samples.md +46 -0
- package/bundled-skills/docs-guard/references/docstrings.md +60 -0
- package/bundled-skills/docs-guard/references/review-checklist.md +45 -0
- package/bundled-skills/docs-guard/references/sources.md +22 -0
- package/bundled-skills/docs-guard/references/verification.md +51 -0
- package/bundled-skills/efficient-web-research/SKILL.md +4 -0
- package/bundled-skills/electron-development/SKILL.md +1 -1
- package/bundled-skills/event-staffing-compliance/SKILL.md +3 -0
- package/bundled-skills/event-staffing-ordering/SKILL.md +3 -0
- package/bundled-skills/feature-tracking/SKILL.md +222 -0
- package/bundled-skills/flutter-expert/SKILL.md +6 -1
- package/bundled-skills/flutter-expert/resources/implementation-playbook.md +214 -0
- package/bundled-skills/gemini-deep-research/README.md +246 -0
- package/bundled-skills/gemini-deep-research/SKILL.md +136 -0
- package/bundled-skills/gemini-deep-research/requirements.txt +2 -0
- package/bundled-skills/gemini-deep-research/scripts/research.py +692 -0
- package/bundled-skills/git-pushing/SKILL.md +21 -4
- package/bundled-skills/git-pushing/scripts/smart_commit.sh +206 -11
- package/bundled-skills/go-in-depth/scripts/workflow-script.js +4 -1
- package/bundled-skills/grok-build/SKILL.md +167 -0
- package/bundled-skills/grok-build/references/cli.md +99 -0
- package/bundled-skills/huggingface-tool-builder/references/find_models_by_paper.sh +1 -1
- package/bundled-skills/idea-autopsy/SKILL.md +147 -0
- package/bundled-skills/it-manager-hospital/README.md +1 -1
- package/bundled-skills/it-manager-pro/README.md +1 -1
- package/bundled-skills/itil-expert/README.md +1 -1
- package/bundled-skills/langgraph/SKILL.md +1 -1
- package/bundled-skills/linkedin-content-generator/SKILL.md +1 -1
- package/bundled-skills/lint-and-validate/scripts/lint_runner.py +23 -23
- package/bundled-skills/lint-and-validate/scripts/type_coverage.py +30 -30
- package/bundled-skills/logic-lens/SKILL.md +1 -1
- package/bundled-skills/lore/LICENSE +21 -0
- package/bundled-skills/lore/README.md +386 -0
- package/bundled-skills/lore/README.zh-CN.md +386 -0
- package/bundled-skills/lore/SKILL.md +453 -0
- package/bundled-skills/lore/WORKFLOWS.md +216 -0
- package/bundled-skills/lore/WORKFLOWS.zh-CN.md +216 -0
- package/bundled-skills/lore/references/audit-template.md +60 -0
- package/bundled-skills/lore/references/compatibility.md +228 -0
- package/bundled-skills/lore/references/config.md +125 -0
- package/bundled-skills/lore/references/entry-format.md +70 -0
- package/bundled-skills/lore/references/history-command.md +106 -0
- package/bundled-skills/lore/references/monorepo-detection.md +78 -0
- package/bundled-skills/lore/references/platform-mirrors.md +377 -0
- package/bundled-skills/lore/references/stale-new-markers.md +62 -0
- package/bundled-skills/lore/references/summary-template.md +98 -0
- package/bundled-skills/lore/scripts/README.md +54 -0
- package/bundled-skills/lore/scripts/README.zh-CN.md +54 -0
- package/bundled-skills/lore/scripts/find_duplicates.py +211 -0
- package/bundled-skills/lore/scripts/find_stale.py +116 -0
- package/bundled-skills/lore/scripts/history.py +527 -0
- package/bundled-skills/lore/scripts/id_hash.py +32 -0
- package/bundled-skills/lore/scripts/list_entries.py +183 -0
- package/bundled-skills/lovable-cleanup/SKILL.md +3 -3
- package/bundled-skills/makepad-splash/SKILL.md +1 -1
- package/bundled-skills/mmx-cli/SKILL.md +14 -1
- package/bundled-skills/monopoly/SKILL.md +5 -0
- package/bundled-skills/monopoly/patterns/SKILL.md +4 -0
- package/bundled-skills/monopoly/scale-benchmarks/SKILL.md +4 -0
- package/bundled-skills/monopoly/security-checklist/SKILL.md +4 -0
- package/bundled-skills/monopoly/tech-matrix/SKILL.md +4 -0
- package/bundled-skills/mtls-configuration/SKILL.md +1 -1
- package/bundled-skills/network-101/SKILL.md +4 -5
- package/bundled-skills/nika/SKILL.md +270 -0
- package/bundled-skills/not-a-vibe-coder/SKILL.md +4 -0
- package/bundled-skills/ontoly-software-graph/SKILL.md +160 -0
- package/bundled-skills/openclaw-github-repo-commander/SKILL.md +1 -1
- package/bundled-skills/pilot-protocol/SKILL.md +6 -3
- package/bundled-skills/postgres-readonly-queries/README.md +77 -0
- package/bundled-skills/postgres-readonly-queries/SKILL.md +152 -0
- package/bundled-skills/postgres-readonly-queries/connections.example.json +34 -0
- package/bundled-skills/postgres-readonly-queries/requirements.txt +1 -0
- package/bundled-skills/postgres-readonly-queries/scripts/query.py +262 -0
- package/bundled-skills/pptx-deck-creation/SKILL.md +275 -0
- package/bundled-skills/pptx-deck-creation/references/audit-checklist.md +156 -0
- package/bundled-skills/pptx-deck-creation/references/design-profiles.md +96 -0
- package/bundled-skills/pptx-deck-creation/references/python-snippets.md +150 -0
- package/bundled-skills/pptx-deck-creation/references/reference-deck-analysis.md +91 -0
- package/bundled-skills/pptx-deck-creation/references/visual-asset-adapters.md +158 -0
- package/bundled-skills/privilege-escalation-methods/SKILL.md +1 -1
- package/bundled-skills/product-decision-agent/SKILL.md +94 -0
- package/bundled-skills/product-decision-agent/agents/openai.yaml +7 -0
- package/bundled-skills/product-decision-agent/references/methodology-basis.md +232 -0
- package/bundled-skills/product-decision-agent/references/product-playbooks.md +813 -0
- package/bundled-skills/product-decision-agent/references/reasoning-engine.md +289 -0
- package/bundled-skills/product-decision-agent/references/response-examples.md +279 -0
- package/bundled-skills/product-decision-agent/scripts/quality_gate.py +221 -0
- package/bundled-skills/product-decision-agent/scripts/test_quality_gate.py +94 -0
- package/bundled-skills/pytest-skill/reference/playbook.md +358 -0
- package/bundled-skills/quit-sponsor/SKILL.md +96 -0
- package/bundled-skills/rclone-cli/references/providers/s3.md +1 -1
- package/bundled-skills/security-and-hardening/SKILL.md +1 -1
- package/bundled-skills/semgrep-rule-creator/SKILL.md +6 -6
- package/bundled-skills/skill-creator/README.md +3 -3
- package/bundled-skills/skill-creator/SKILL.md +8 -4
- package/bundled-skills/skill-creator/scripts/quick_validate.py +1 -1
- package/bundled-skills/sql-injection-testing/SKILL.md +4 -4
- package/bundled-skills/subagent-orchestrator/README.md +1 -1
- package/bundled-skills/super-code/bash/SKILL.md +3 -0
- package/bundled-skills/super-code/c/SKILL.md +3 -0
- package/bundled-skills/super-code/cpp/SKILL.md +3 -0
- package/bundled-skills/super-code/csharp/SKILL.md +3 -0
- package/bundled-skills/super-code/dart/SKILL.md +3 -0
- package/bundled-skills/super-code/elixir/SKILL.md +3 -0
- package/bundled-skills/super-code/go/SKILL.md +3 -0
- package/bundled-skills/super-code/java/SKILL.md +3 -0
- package/bundled-skills/super-code/kotlin/SKILL.md +3 -0
- package/bundled-skills/super-code/php/SKILL.md +3 -0
- package/bundled-skills/super-code/python/SKILL.md +3 -0
- package/bundled-skills/super-code/ruby/SKILL.md +3 -0
- package/bundled-skills/super-code/rust/SKILL.md +3 -0
- package/bundled-skills/super-code/scala/SKILL.md +3 -0
- package/bundled-skills/super-code/swift/SKILL.md +3 -0
- package/bundled-skills/super-code/typescript/SKILL.md +3 -0
- package/bundled-skills/telegram-bot-messaging/README.md +185 -0
- package/bundled-skills/telegram-bot-messaging/SKILL.md +101 -0
- package/bundled-skills/telegram-bot-messaging/scripts/telegram.sh +420 -0
- package/bundled-skills/test-guard/SKILL.md +132 -0
- package/bundled-skills/test-guard/references/jest.md +50 -0
- package/bundled-skills/test-guard/references/llm-app-testing.md +40 -0
- package/bundled-skills/test-guard/references/phpunit.md +56 -0
- package/bundled-skills/test-guard/references/pytest.md +65 -0
- package/bundled-skills/trading-ledger/SKILL.md +11 -3
- package/bundled-skills/uizze-ui-research/SKILL.md +93 -0
- package/bundled-skills/vibe-code-auditor/SKILL.md +1 -1
- package/bundled-skills/vibecode-production-qa-validator/SKILL.md +1 -1
- package/bundled-skills/videodb/scripts/ws_listener.py +29 -15
- package/bundled-skills/voice-ai-engine-development/README.md +1 -1
- package/bundled-skills/vulnerability-scanner/SKILL.md +1 -1
- package/bundled-skills/warehouse/SKILL.md +154 -0
- package/bundled-skills/woo-guard/SKILL.md +113 -0
- package/bundled-skills/woo-guard/references/checkout-and-money.md +64 -0
- package/bundled-skills/woo-guard/references/hpos-and-crud.md +87 -0
- package/bundled-skills/woo-guard/references/review-checklist.md +44 -0
- package/bundled-skills/woo-guard/references/sources.md +17 -0
- package/bundled-skills/wp-guard/SKILL.md +119 -0
- package/bundled-skills/wp-guard/references/i18n.md +88 -0
- package/bundled-skills/wp-guard/references/performance.md +70 -0
- package/bundled-skills/wp-guard/references/review-checklist.md +57 -0
- package/bundled-skills/wp-guard/references/security.md +100 -0
- package/bundled-skills/wp-guard/references/sources.md +27 -0
- package/bundled-skills/writing-skills/gotchas.md +1 -1
- package/bundled-skills/writing-skills/references/standards/metadata-standard.md +1 -1
- package/bundled-skills/x-twitter-scraper/SKILL.md +14 -32
- package/bundled-skills/xss-html-injection/SKILL.md +3 -3
- package/bundled-skills/youtube-seo-optimizer/SKILL.md +1 -1
- package/bundled-skills/youtube-summarizer/CHANGELOG.md +2 -2
- package/package.json +1 -1
- package/skills_index.json +273 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Workflows
|
|
2
|
+
|
|
3
|
+
lore has seven workflows. This document explains when to use each one, in plain language. For the operational specification the agent follows when running them, see [`SKILL.md`](SKILL.md).
|
|
4
|
+
|
|
5
|
+
> [中文版](./WORKFLOWS.zh-CN.md)
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
| Workflow | What it does | Frequency |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| [`init`](#init) | Set up `.lore/` and platform mirror files | Once per project |
|
|
12
|
+
| [`sync`](#sync) | Update `.lore/` after a code change | After each feature |
|
|
13
|
+
| [`query`](#query) | Search `.lore/` for an answer | Every session |
|
|
14
|
+
| [`audit`](#audit) | Find stale or contradictory entries | Quarterly |
|
|
15
|
+
| [`compress`](#compress) | Rebuild `SUMMARY.md` | When SUMMARY is stale |
|
|
16
|
+
| [`mirror`](#mirror) | Regenerate platform files from `.lore/` | After batch of syncs |
|
|
17
|
+
| [`history`](#history) | Show git commits for an entry / file / scope | When investigating |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## `init`
|
|
22
|
+
|
|
23
|
+
**One-line**: Create `.lore/` and take over your existing `CLAUDE.md` / `AGENTS.md`.
|
|
24
|
+
|
|
25
|
+
**When you say it**: "lore init" — once per project, or when adding lore to a project that already has platform files.
|
|
26
|
+
|
|
27
|
+
**What happens**:
|
|
28
|
+
1. Agent scans for existing platform files (`CLAUDE.md`, `AGENTS.md`, `.cursorrules`, etc.)
|
|
29
|
+
2. For each file found, asks you: take over / preserve / abort
|
|
30
|
+
3. Detects monorepo structure (pnpm workspaces, Cargo workspace, etc.) and proposes scope list
|
|
31
|
+
4. Writes initial `.lore/` draft (entries with `#added:<today>` + deterministic IDs)
|
|
32
|
+
5. Shows you a summary of what will be created
|
|
33
|
+
6. On your confirm: moves draft to `.lore/`, generates `SUMMARY.md`, refreshes platform files
|
|
34
|
+
|
|
35
|
+
**Real scenarios**:
|
|
36
|
+
- New project, first time using lore → `lore init`
|
|
37
|
+
- Old project already has `CLAUDE.md`, want lore to manage it → `lore init` and take over
|
|
38
|
+
- Monorepo with separate `frontend/` and `backend/` → init detects both, asks for scope names
|
|
39
|
+
|
|
40
|
+
**Output**: Full `.lore/` directory + updated platform files + populated `.config.json`.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## `sync`
|
|
45
|
+
|
|
46
|
+
**One-line**: After a code change, update `.lore/` with what changed.
|
|
47
|
+
|
|
48
|
+
**When you say it**: "lore sync" — after committing a feature, refactor, or new dependency.
|
|
49
|
+
|
|
50
|
+
**What happens**:
|
|
51
|
+
1. Agent runs `git diff --stat HEAD` to see what changed
|
|
52
|
+
2. If changes are significant (≥50 lines / ≥2 dirs, or new module/dir/dep), agent proactively proposes
|
|
53
|
+
3. For each change, agent classifies it as `[NEW]` / `[STALE]` / `[REFINED]`
|
|
54
|
+
4. Emits a proposal with markers
|
|
55
|
+
5. You accept or reject per marker
|
|
56
|
+
6. Accepted markers get applied to `.lore/*.md`
|
|
57
|
+
|
|
58
|
+
**Real scenarios**:
|
|
59
|
+
- "I just added a new dependency — update lore" → `lore sync`
|
|
60
|
+
- "We decided to stop using React Query, switch to SWR" → `lore sync` after the code change
|
|
61
|
+
- "There's a new module — capture it" → `lore sync`
|
|
62
|
+
|
|
63
|
+
**Output**: Updated `.lore/*.md` files with new entries (and `#verified` / `#stale` tags where appropriate).
|
|
64
|
+
|
|
65
|
+
**Note**: `sync` does NOT update platform mirror files (that's a separate `mirror` command). Reason: keeps `git log` of agent-facing files readable.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## `query`
|
|
70
|
+
|
|
71
|
+
**One-line**: Search `.lore/` for an answer to a question.
|
|
72
|
+
|
|
73
|
+
**When you say it**: "lore query <term>" — any time you want to know what's in memory.
|
|
74
|
+
|
|
75
|
+
**What happens**:
|
|
76
|
+
1. Agent reads `.lore/SUMMARY.md` (the table of contents)
|
|
77
|
+
2. Fuzzy matches your query against entries
|
|
78
|
+
3. Returns matched entries with stable `[file#ID]` references
|
|
79
|
+
4. Optionally drills into specific scope files for more detail
|
|
80
|
+
|
|
81
|
+
**Real scenarios**:
|
|
82
|
+
- "What database does this project use?" → `lore query database`
|
|
83
|
+
- "Why did we pick Zustand?" → `lore query zustand`
|
|
84
|
+
- "What are the conventions for backend modules?" → `lore query backend:conventions`
|
|
85
|
+
|
|
86
|
+
**Output**: Bounded list of matched entries:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
[_global/DECISIONS.md#DEC-2026-07-11-6137] Picked OpenAI-compatible LLM API
|
|
90
|
+
[scopes/backend/CONVENTIONS.md#CONV-2026-07-11-9b89] Embedding has two backends
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The `[file#ID]` reference lets the agent `cat` the file for full text.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## `audit`
|
|
98
|
+
|
|
99
|
+
**One-line**: Find stale or contradictory entries in `.lore/`.
|
|
100
|
+
|
|
101
|
+
**When you say it**: "lore audit" — quarterly review, or before a big refactor.
|
|
102
|
+
|
|
103
|
+
**What happens**:
|
|
104
|
+
1. Runs `find_stale.py` to find entries with `#added` > 90 days ago and no `#verified`
|
|
105
|
+
2. Runs `find_duplicates.py` to find entries that contradict each other
|
|
106
|
+
3. Cross-checks entry-referenced code paths against current filesystem
|
|
107
|
+
4. Emits an `[ALERT]` report
|
|
108
|
+
|
|
109
|
+
**Real scenarios**:
|
|
110
|
+
- "Are there any lore entries that contradict the current code?" → `lore audit`
|
|
111
|
+
- Quarterly hygiene check → `lore audit`
|
|
112
|
+
- Before onboarding a new contributor → `lore audit` to clean up stale entries
|
|
113
|
+
|
|
114
|
+
**Output**: A report grouped by issue type:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
[ALERT] 5 entries may be stale (no #verified in >90 days):
|
|
118
|
+
- ARCH-2026-01-15-d7a3 last verified 2026-04-12
|
|
119
|
+
...
|
|
120
|
+
|
|
121
|
+
[ALERT] 2 entries contradict current code:
|
|
122
|
+
- CONV-2026-03-01-1f8c says "use webpack"; project now uses Vite
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Note**: `audit` does NOT modify files. To act on findings, run `sync` with proposal-driven updates.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## `compress`
|
|
130
|
+
|
|
131
|
+
**One-line**: Rebuild `.lore/SUMMARY.md` from current entries.
|
|
132
|
+
|
|
133
|
+
**When you say it**: "lore compress" — when SUMMARY is stale (entries > 500, or > 30 days since last compress), or before sharing lore with someone new.
|
|
134
|
+
|
|
135
|
+
**What happens**:
|
|
136
|
+
1. Enumerates all entries via `list_entries.py`
|
|
137
|
+
2. Skips recently-stale entries
|
|
138
|
+
3. For each `(scope, layer)` pair, picks 3–5 most important entries
|
|
139
|
+
4. Writes `SUMMARY.md` per template
|
|
140
|
+
5. If `auto_mirror: true` in config, regenerates platform mirrors; otherwise asks per target and only writes the ones you accept. (This is the second mirror update trigger — `sync` deliberately does not regenerate mirrors.)
|
|
141
|
+
6. Stops after mirror regeneration has either written or been declined per target.
|
|
142
|
+
|
|
143
|
+
**Real scenarios**:
|
|
144
|
+
- "Refresh the summary" → `lore compress`
|
|
145
|
+
- "I haven't compressed in 2 months" → `lore compress`
|
|
146
|
+
- "Onboard a new contributor — make sure SUMMARY is fresh" → `lore compress`
|
|
147
|
+
|
|
148
|
+
**Output**: Updated `SUMMARY.md` (and possibly mirror files).
|
|
149
|
+
|
|
150
|
+
**Idempotent**: Running twice produces the same result (modulo date stamp).
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## `mirror`
|
|
155
|
+
|
|
156
|
+
**One-line**: Regenerate platform files (`CLAUDE.md`, `AGENTS.md`, etc.) from current `.lore/`.
|
|
157
|
+
|
|
158
|
+
**When you say it**: "lore mirror" — after a batch of syncs, or to manually sync mirrors after editing `.lore/*.md`.
|
|
159
|
+
|
|
160
|
+
**What happens**:
|
|
161
|
+
1. Reads current `.lore/SUMMARY.md` and scope indices
|
|
162
|
+
2. For each target, detects section boundary (`## Lore` / `---` / `## My notes`)
|
|
163
|
+
3. Computes new Lore section content
|
|
164
|
+
4. **Content-based dedup**: skips write if byte-identical to existing
|
|
165
|
+
5. Replaces Lore section; preserves My notes verbatim
|
|
166
|
+
6. Writes file back
|
|
167
|
+
|
|
168
|
+
**Real scenarios**:
|
|
169
|
+
- "I just did a batch of syncs — update the agent-facing files" → `lore mirror`
|
|
170
|
+
- "I edited `.lore/SUMMARY.md` manually — propagate to mirrors" → `lore mirror`
|
|
171
|
+
- "Verify the mirror hasn't drifted" → `lore mirror` (no-op reports confirm)
|
|
172
|
+
|
|
173
|
+
**Output**: Updated `CLAUDE.md` / `AGENTS.md` / etc., or "No changes needed" if nothing changed.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## `history`
|
|
178
|
+
|
|
179
|
+
**One-line**: Show git commits related to an entry, file, or scope.
|
|
180
|
+
|
|
181
|
+
**When you say it**: "lore history <entry-id>|<file-path>|--scope=<name>" — when investigating "why does this exist" or "when did this change".
|
|
182
|
+
|
|
183
|
+
**What happens**:
|
|
184
|
+
- **Entry form**: `lore history DEC-2026-02-03-7c19` — finds the entry, derives its `#added` date, runs `git log --since=<date>` on the referenced code file
|
|
185
|
+
- **File form**: `lore history frontend/src/store.ts` — runs `git log --since=1970` on that path
|
|
186
|
+
- **Scope form**: `lore history --scope=frontend` — runs file form on every `.lore/scopes/frontend/*.md`
|
|
187
|
+
|
|
188
|
+
**Real scenarios**:
|
|
189
|
+
- "Why did we pick Postgres?" → find the entry via `query`, then `lore history <id>`
|
|
190
|
+
- "When did this file change?" → `lore history <file>`
|
|
191
|
+
- Debugging: "what's the recent history of this module?" → `lore history <path>`
|
|
192
|
+
|
|
193
|
+
**Output**:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
# history: [DEC-2026-02-03-7c19]
|
|
197
|
+
|
|
198
|
+
abc1234 2026-05-12 refactor: extract chat agent_loop (#87)
|
|
199
|
+
def5678 2026-03-08 feat: switch chat chain to chat_fast (#74)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Quick reference
|
|
205
|
+
|
|
206
|
+
| I want to... | Use |
|
|
207
|
+
|---|---|
|
|
208
|
+
| Start lore on a project | `init` |
|
|
209
|
+
| Update lore after a code change | `sync` |
|
|
210
|
+
| Find what's in memory | `query` |
|
|
211
|
+
| Find stale entries | `audit` |
|
|
212
|
+
| Refresh the summary | `compress` |
|
|
213
|
+
| Update agent-facing files | `mirror` |
|
|
214
|
+
| Trace why something exists | `history` |
|
|
215
|
+
|
|
216
|
+
For the operational specification (what the agent actually does step-by-step), see [`SKILL.md`](SKILL.md). For per-platform file mapping (which platforms read which files), see [`references/platform-mirrors.md`](references/platform-mirrors.md).
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# 工作流
|
|
2
|
+
|
|
3
|
+
lore 有七个工作流。本文用平实语言解释每个什么时候用。Agent 跑它们时的 operational 规范见 [`SKILL.md`](SKILL.md)。
|
|
4
|
+
|
|
5
|
+
> [English](./WORKFLOWS.md)
|
|
6
|
+
|
|
7
|
+
## 概览
|
|
8
|
+
|
|
9
|
+
| Workflow | 做什么 | 频率 |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| [`init`](#init) | 建 `.lore/` + 接管平台 mirror 文件 | 每个项目 1 次 |
|
|
12
|
+
| [`sync`](#sync) | 代码变更后更新 `.lore/` | 每个 feature 后 |
|
|
13
|
+
| [`query`](#query) | 搜 `.lore/` 找答案 | 每个 session |
|
|
14
|
+
| [`audit`](#audit) | 找 stale / 矛盾的 entry | 季度 |
|
|
15
|
+
| [`compress`](#compress) | 重建 `SUMMARY.md` | SUMMARY 过期时 |
|
|
16
|
+
| [`mirror`](#mirror) | 从 `.lore/` 重新生成平台文件 | 一批 sync 后 |
|
|
17
|
+
| [`history`](#history) | 列出 entry / 文件 / scope 的 git commits | 调查时 |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## `init`
|
|
22
|
+
|
|
23
|
+
**一句话**:建 `.lore/`,接管你已有的 `CLAUDE.md` / `AGENTS.md`。
|
|
24
|
+
|
|
25
|
+
**怎么用**:`lore init` —— 每个项目 1 次,或老项目第一次接入 lore。
|
|
26
|
+
|
|
27
|
+
**agent 做什么**:
|
|
28
|
+
1. 扫现有平台文件(`CLAUDE.md`、`AGENTS.md`、`.cursorrules` 等)
|
|
29
|
+
2. 每个文件问你:接管 / 保留 / 中止
|
|
30
|
+
3. 检测 monorepo 结构(pnpm workspaces、Cargo workspace 等),给 scope 列表
|
|
31
|
+
4. 写初始 `.lore/draft/`(entry 带 `#added:<today>` + 确定性 ID)
|
|
32
|
+
5. 给你看 summary
|
|
33
|
+
6. 你确认后:移到 `.lore/`,生成 `SUMMARY.md`,刷新平台文件
|
|
34
|
+
|
|
35
|
+
**真实场景**:
|
|
36
|
+
- 新项目第一次用 lore → `lore init`
|
|
37
|
+
- 老项目已有 `CLAUDE.md`,想让 lore 接管 → `lore init` 选「接管」
|
|
38
|
+
- Monorepo 有 `frontend/` 和 `backend/` → init 自动识别两个 scope,问名字
|
|
39
|
+
|
|
40
|
+
**输出**:完整 `.lore/` 目录 + 更新过的平台文件 + 写好的 `.config.json`。
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## `sync`
|
|
45
|
+
|
|
46
|
+
**一句话**:代码改了,把变化落到 `.lore/`。
|
|
47
|
+
|
|
48
|
+
**怎么用**:`lore sync` —— 提交完 feature / refactor / 依赖变更后。
|
|
49
|
+
|
|
50
|
+
**agent 做什么**:
|
|
51
|
+
1. 跑 `git diff --stat HEAD` 看变更
|
|
52
|
+
2. 变更显著时(≥50 行 / 跨 ≥2 目录,或新 module/dir/dep),agent 主动提议
|
|
53
|
+
3. 每个变更分类成 `[NEW]` / `[STALE]` / `[REFINED]`
|
|
54
|
+
4. 输出 marker 提案
|
|
55
|
+
5. 你按 marker 接受 / 拒绝
|
|
56
|
+
6. 接受的 marker 落到 `.lore/*.md`
|
|
57
|
+
|
|
58
|
+
**真实场景**:
|
|
59
|
+
- 「我刚加了新依赖 —— 更新 lore」 → `lore sync`
|
|
60
|
+
- 「我们决定不用 React Query 了,换 SWR」 → 代码改完后 `lore sync`
|
|
61
|
+
- 「新加了个 module —— 记一下」 → `lore sync`
|
|
62
|
+
|
|
63
|
+
**输出**:更新过的 `.lore/*.md` 文件(新 entry 和 `#verified` / `#stale` tag)。
|
|
64
|
+
|
|
65
|
+
**注意**:`sync` 不会更新平台 mirror 文件(那是独立的 `mirror` 命令)。理由:保持 agent 端文件 `git log` 可读。
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## `query`
|
|
70
|
+
|
|
71
|
+
**一句话**:搜 `.lore/` 找答案。
|
|
72
|
+
|
|
73
|
+
**怎么用**:`lore query <term>` —— 任何想问「memory 里有什么」的时候。
|
|
74
|
+
|
|
75
|
+
**agent 做什么**:
|
|
76
|
+
1. 读 `.lore/SUMMARY.md`(目录)
|
|
77
|
+
2. 对 entry 文本做模糊匹配
|
|
78
|
+
3. 返回命中 entry,带稳定 `[file#ID]` 引用
|
|
79
|
+
4. 可选地深入具体 scope 文件拿更完整上下文
|
|
80
|
+
|
|
81
|
+
**真实场景**:
|
|
82
|
+
- 「这个项目用什么数据库?」 → `lore query database`
|
|
83
|
+
- 「为什么选 Zustand?」 → `lore query zustand`
|
|
84
|
+
- 「backend module 的约定是什么?」 → `lore query backend:conventions`
|
|
85
|
+
|
|
86
|
+
**输出**:bounded 命中列表:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
[_global/DECISIONS.md#DEC-2026-07-11-6137] Picked OpenAI-compatible LLM API
|
|
90
|
+
[scopes/backend/CONVENTIONS.md#CONV-2026-07-11-9b89] Embedding has two backends
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`[file#ID]` 引用让 agent `cat` 文件对应行拿完整文本。
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## `audit`
|
|
98
|
+
|
|
99
|
+
**一句话**:找 `.lore/` 里的 stale / 矛盾 entry。
|
|
100
|
+
|
|
101
|
+
**怎么用**:`lore audit` —— 季度 review,或大重构前。
|
|
102
|
+
|
|
103
|
+
**agent 做什么**:
|
|
104
|
+
1. 跑 `find_stale.py` 找 `#added` > 90 天且无 `#verified` 的 entry
|
|
105
|
+
2. 跑 `find_duplicates.py` 找互相矛盾的 entry
|
|
106
|
+
3. 交叉检查 entry 引用的代码路径
|
|
107
|
+
4. 输出 `[ALERT]` 报告
|
|
108
|
+
|
|
109
|
+
**真实场景**:
|
|
110
|
+
- 「有没有跟现状矛盾的 lore entry?」 → `lore audit`
|
|
111
|
+
- 季度体检 → `lore audit`
|
|
112
|
+
- onboarding 新贡献者前 → `lore audit` 清 stale
|
|
113
|
+
|
|
114
|
+
**输出**:按问题类型分组的报告:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
[ALERT] 5 entries may be stale (no #verified in >90 days):
|
|
118
|
+
- ARCH-2026-01-15-d7a3 last verified 2026-04-12
|
|
119
|
+
...
|
|
120
|
+
|
|
121
|
+
[ALERT] 2 entries contradict current code:
|
|
122
|
+
- CONV-2026-03-01-1f8c says "use webpack"; project now uses Vite
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**注意**:`audit` 不改文件。要落地整改,跑 `sync` 走提案流程。
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## `compress`
|
|
130
|
+
|
|
131
|
+
**一句话**:从当前 entry 重建 `.lore/SUMMARY.md`。
|
|
132
|
+
|
|
133
|
+
**怎么用**:`lore compress` —— SUMMARY 过期时(entries > 500 或 > 30 天没压),或分享 lore 前。
|
|
134
|
+
|
|
135
|
+
**agent 做什么**:
|
|
136
|
+
1. 跑 `list_entries.py` 枚举所有 entry
|
|
137
|
+
2. 跳过 recently-stale 的 entry
|
|
138
|
+
3. 每个 `(scope, layer)` 对,按规则挑 3–5 条最重要的
|
|
139
|
+
4. 按模板写 `SUMMARY.md`
|
|
140
|
+
5. 如果 config 里 `auto_mirror: true`,重生成平台 mirror;否则每个 mirror 目标单独问,只写你确认的(这是第二个 mirror 触发点——`sync` 故意不更新 mirror)
|
|
141
|
+
6. mirror 处理完(写或拒绝)后停止
|
|
142
|
+
|
|
143
|
+
**真实场景**:
|
|
144
|
+
- 「刷新一下 summary」 → `lore compress`
|
|
145
|
+
- 「两个月没压了」 → `lore compress`
|
|
146
|
+
- 「onboarding 新人 —— 确保 SUMMARY 是最新的」 → `lore compress`
|
|
147
|
+
|
|
148
|
+
**输出**:更新过的 `SUMMARY.md`(以及可能的 mirror 文件)。
|
|
149
|
+
|
|
150
|
+
**幂等**:跑两次产出同样的结果(日期戳除外)。
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## `mirror`
|
|
155
|
+
|
|
156
|
+
**一句话**:从 `.lore/` 重新生成平台文件(`CLAUDE.md`、`AGENTS.md` 等)。
|
|
157
|
+
|
|
158
|
+
**怎么用**:`lore mirror` —— 一批 sync 之后,或手动改过 `.lore/*.md` 想同步到 mirror。
|
|
159
|
+
|
|
160
|
+
**agent 做什么**:
|
|
161
|
+
1. 读当前 `.lore/SUMMARY.md` 和 scope 索引
|
|
162
|
+
2. 对每个 target 检测段边界(`## Lore` / `---` / `## My notes`)
|
|
163
|
+
3. 计算新 Lore 段内容
|
|
164
|
+
4. **Content-based dedup**:跟现有 byte-identical 就跳过
|
|
165
|
+
5. 替换 Lore 段;My notes 段原样保留
|
|
166
|
+
6. 写回文件
|
|
167
|
+
|
|
168
|
+
**真实场景**:
|
|
169
|
+
- 「刚做完一批 sync —— 同步到 agent 端文件」 → `lore mirror`
|
|
170
|
+
- 「我手动改过 `.lore/SUMMARY.md` —— 推到 mirror」 → `lore mirror`
|
|
171
|
+
- 「验证 mirror 没漂移」 → `lore mirror`(无变化报告即确认)
|
|
172
|
+
|
|
173
|
+
**输出**:更新过的 `CLAUDE.md` / `AGENTS.md` 等,或「No changes needed」无变化报告。
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## `history`
|
|
178
|
+
|
|
179
|
+
**一句话**:列出与某 entry / 文件 / scope 相关的 git commits。
|
|
180
|
+
|
|
181
|
+
**怎么用**:`lore history <entry-id>|<file-path>|--scope=<name>` —— 调查「为什么有这个」或「什么时候改的」。
|
|
182
|
+
|
|
183
|
+
**agent 做什么**:
|
|
184
|
+
- **Entry 形式**:`lore history DEC-2026-02-03-7c19` —— 找 entry,导 `#added` 日期,跑 `git log --since=<date>` 在引用的代码文件上
|
|
185
|
+
- **File 形式**:`lore history frontend/src/store.ts` —— 跑 `git log --since=1970` 在该路径上
|
|
186
|
+
- **Scope 形式**:`lore history --scope=frontend` —— 对 `.lore/scopes/frontend/*.md` 每个跑 file 形式
|
|
187
|
+
|
|
188
|
+
**真实场景**:
|
|
189
|
+
- 「为什么选 Postgres?」 → 先 `query` 找到 entry,再 `lore history <id>`
|
|
190
|
+
- 「这个文件什么时候改的?」 → `lore history <file>`
|
|
191
|
+
- 调试:「这个 module 最近的 history?」 → `lore history <path>`
|
|
192
|
+
|
|
193
|
+
**输出**:
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
# history: [DEC-2026-02-03-7c19]
|
|
197
|
+
|
|
198
|
+
abc1234 2026-05-12 refactor: extract chat agent_loop (#87)
|
|
199
|
+
def5678 2026-03-08 feat: switch chat chain to chat_fast (#74)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 速查
|
|
205
|
+
|
|
206
|
+
| 我想…… | 用 |
|
|
207
|
+
|---|---|
|
|
208
|
+
| 在项目上启动 lore | `init` |
|
|
209
|
+
| 代码改了更新 lore | `sync` |
|
|
210
|
+
| 找 memory 里有什么 | `query` |
|
|
211
|
+
| 找 stale entry | `audit` |
|
|
212
|
+
| 刷新 summary | `compress` |
|
|
213
|
+
| 更新 agent 端文件 | `mirror` |
|
|
214
|
+
| 查「为什么有这个」 | `history` |
|
|
215
|
+
|
|
216
|
+
Agent 跑命令时的 operational 规范(一步步做什么)见 [`SKILL.md`](SKILL.md)。各平台文件映射(哪些 agent 读哪些文件)见 [`references/platform-mirrors.md`](references/platform-mirrors.md)。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Audit report template
|
|
2
|
+
|
|
3
|
+
`audit` writes its output to `.lore/audit/audit-YYYY-MM-DD.md`. This file is read-only with respect to `.lore/*.md` (see main `SKILL.md` Conflict resolution — audit never mutates and never ALERTs).
|
|
4
|
+
|
|
5
|
+
## Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Memory Audit Report
|
|
9
|
+
|
|
10
|
+
> Date: 2026-07-09
|
|
11
|
+
> Total entries audited: <N>
|
|
12
|
+
> Findings: <X> CONFLICT, <Y> STALE, <Z> UNVERIFIED
|
|
13
|
+
|
|
14
|
+
## Global (`_global/`)
|
|
15
|
+
|
|
16
|
+
### CONFLICT
|
|
17
|
+
- [CONV-2026-01-20-b1e8] claims "all packages TypeScript strict mode"
|
|
18
|
+
Evidence: `packages/legacy/tsconfig.json` has `"strict": false`
|
|
19
|
+
|
|
20
|
+
### STALE
|
|
21
|
+
- [ARCH-2026-01-15-d7a3] references `nx.json`
|
|
22
|
+
Evidence: file no longer exists at repo root
|
|
23
|
+
|
|
24
|
+
### UNVERIFIED
|
|
25
|
+
- [DEC-2026-02-03-7c19] last verified 2025-09-12 (>90 days)
|
|
26
|
+
|
|
27
|
+
## Scope: frontend
|
|
28
|
+
|
|
29
|
+
### CONFLICT
|
|
30
|
+
- ...
|
|
31
|
+
|
|
32
|
+
### STALE
|
|
33
|
+
- ...
|
|
34
|
+
|
|
35
|
+
### UNVERIFIED
|
|
36
|
+
- ...
|
|
37
|
+
|
|
38
|
+
## Summary
|
|
39
|
+
|
|
40
|
+
Recommended action: run `lore sync` to address these findings.
|
|
41
|
+
Audit itself does not modify any entry.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Severity definitions
|
|
45
|
+
|
|
46
|
+
| Severity | Meaning |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `CONFLICT` | Code/config directly contradicts the entry content (e.g. memory says `react@18`, `package.json` says `16`) |
|
|
49
|
+
| `STALE` | Entry references a resource (file, API, version) that no longer exists |
|
|
50
|
+
| `UNVERIFIED` | Entry's `#verified` date is >90 days; needs re-confirmation |
|
|
51
|
+
|
|
52
|
+
## Required rules
|
|
53
|
+
|
|
54
|
+
- The audit report **never** modifies any `.lore/*.md` file.
|
|
55
|
+
- The audit report **never** emits ALERT blocks (ALERT noise is contained to `sync` and `query`).
|
|
56
|
+
- Audit is a pure read-and-report operation. To act on findings, the user runs `sync`.
|
|
57
|
+
|
|
58
|
+
## Evidence format
|
|
59
|
+
|
|
60
|
+
Each finding includes a one-line `Evidence:` reference pointing to the file path and (when possible) line number that triggered the finding. The agent must verify the evidence exists before writing the report.
|