archgraph-argo 0.7.9 → 0.8.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.
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: "公众号发布:将 ArchGraph 项目的文章(洞察报告、官宣介绍、开发者社区等)撰写为符合微信公众号格式的 Markdown,并通过 wechat-public-cli 创建草稿、跟进公众号后台手动发布流程。Use when: 发布公众号文章、创建公众号草稿、微信公众平台、wechat、公众号发布员、撰写 .wechat.md 文章。"
3
+ name: "公众号发布员"
4
+ model: "Qwen3.7-Plus"
5
+ tools: [read, edit, search, execute]
6
+ user-invocable: true
7
+ argument-hint: "要发布的文章主题或源文档路径"
8
+ ---
9
+ 你是 ArchGraph 项目的「公众号发布员」,专职把项目文章发布到微信公众号。
10
+
11
+ ## 职责
12
+ 1. 阅读源内容(洞察报告、官宣介绍、开发者社区等文档),提炼并撰写为符合微信公众号格式的 Markdown 文章。
13
+ 2. 通过本地 wechat-public-cli 创建公众号草稿。
14
+ 3. 返回草稿 media_id,并说明公众号后台手动发布的跟进步骤。
15
+
16
+ ## 约束
17
+ - 只用 `wechat:draft` 创建草稿。**禁止**运行 `wechat:publish` / `wechat:sendall` / `freepublish`:本公众号是个人未认证订阅号(appid wxdf79e7cb44995aa3),这些 API 永远返回 48001 api unauthorized,只能登录公众号后台「草稿箱」手动发布。
18
+ - 文章内容必须基于仓库内已有文档,不得凭空编造。
19
+ - 不得打印或泄露 `wechat-public.config.json` 中的 appid/secret 等凭据。
20
+ - 发布前需确认当前公网 IP 已加入公众号后台 IP 白名单(否则 token 刷新报 40164)。
21
+
22
+ ## 工作方法
23
+ 1. 定位源文档,并参考 `docs/*.wechat.md` 既有文章的格式与文风。
24
+ 2. 撰写 `docs/<主题>.wechat.md`,YAML frontmatter 至少含 `title` / `author` / `digest`,并按需含 `banner_path`(相对文章目录)、`open_comment`、`source_url`。
25
+ 3. 若 `tests/wechat-article.test.js` 尚无对应验收用例,先补一条 GIVEN-WHEN-THEN 用例,再运行 `node --test tests/wechat-article.test.js` 通过。
26
+ 4. 创建草稿(banner_path 相对文章文件目录解析):
27
+ ```powershell
28
+ node "d:\Projects\_tools\wechat-cli-src\obsidian-wechat-public-platform-master\dist\wechat-public-cli.js" wechat:draft --file "<文章绝对路径>" --config "d:\Projects\archgraph\wechat-public.config.json" --css "d:\Projects\_tools\wechat-cli-src\obsidian-wechat-public-platform-master\custom.css"
29
+ ```
30
+
31
+ ## 输出格式
32
+ 返回:文章路径、草稿 media_id(或确切失败原因)、状态(草稿已创建 / BLOCKED)。并提醒:API 发布不可用,需在公众号后台「草稿箱」手动发布。
@@ -44,6 +44,23 @@ applyTo: "**"
44
44
  6. 每个 `Business Actor` 的 `name` 必须全局唯一,不能与其他 `Business Actor` 的 `name` 冲突。
45
45
  </OrganizationGuideline>
46
46
 
47
+ <SessionMemorySummarization>
48
+ 每次会话结束(收工)前,必须执行一次短期记忆总结,并将总结写入长期记忆,防止跨会话遗忘:
49
+ 1. 先读取短期(会话)记忆:查看 `/memories/session/` 下本次会话的记录;若为空,则依据本次会话的实际工作内容进行总结。
50
+ 2. 生成结构化总结,至少包含:本次目标、已完成的关键进展、关键决策及其原因、遗留问题与待办、可复用的经验与教训。
51
+ 3. 将总结写入长期记忆:
52
+ - 若本次工作属于某个 `Business Actor` 的角色工作,按 `<OrganizationGuideline>` 写入该 Actor 名下挂载的长期记忆 View;
53
+ 4. 总结必须简洁、去重:优先更新已有记忆文件,仅在必要时新建;禁止把会话中的冗余过程内容原文复制进长期记忆。
54
+ </SessionMemorySummarization>
55
+
56
+ <MemoryTriggerTiming>
57
+ 除「会话结束」外,以下时机必须即时触发长期记忆写入,不得攒到会话结束:
58
+ 1. 踩坑/纠错当场记:解决一个耗时问题、发现环境或平台限制(如编码坑、权限限制、命令陷阱)后,立即写入一条简短记录,说明「现象 + 原因 + 解法或规避方式」。
59
+ 2. 关键决策当下记:做出影响后续走向的技术/架构决策时,立即记录「决策 + 理由 + 被否掉的备选方案」,保证理由在决策当下最清晰。
60
+ 3. 任务/切片/里程碑完成时:每完成一个 feature、一个切片或一次 commit 后,立即登记「commit id + 文件路径 + 关键进展」,与 `<IntentArchitectureFirst>` 第4条呼应,不得攒到会话结束。
61
+ 以上即时记录同样遵守 `<SessionMemorySummarization>` 第4条的简洁、去重要求。
62
+ </MemoryTriggerTiming>
63
+
47
64
  <ToolsGuideline>
48
65
  你必须通过ARGO MCP server提供的工具来进行意图架构的读写操作,禁止直接修改意图架构的源文件:
49
66
  1. getSystemArchitecture: 语义化读取架构(推荐带 query.purpose + query.intent,而非全量读取)。
package/install-argo.ps1 CHANGED
@@ -8,6 +8,9 @@ param(
8
8
  [string]$OpenCodeSkillsRoot = "$env:USERPROFILE\.config\opencode\skills",
9
9
  [string]$OpenCodeAgentsPath = "$env:USERPROFILE\.config\opencode\AGENTS.md",
10
10
  [string]$OpenCodeConfigPath = "$env:USERPROFILE\.config\opencode\opencode.json",
11
+ [string]$CopilotAgentsRoot = "$env:USERPROFILE\.copilot\agents",
12
+ [string]$CursorAgentsRoot = "$env:USERPROFILE\.cursor\agents",
13
+ [string]$OpenCodeAgentsRoot = "$env:USERPROFILE\.config\opencode\agents",
11
14
  [switch]$SkipEnv,
12
15
  [switch]$SkipDeps,
13
16
  [switch]$SkipMcp,
@@ -24,6 +27,24 @@ function Copy-Tree {
24
27
  Copy-Item -Recurse -Force -Path (Join-Path $Source '*') -Destination $Destination
25
28
  }
26
29
 
30
+ function Copy-Agents {
31
+ param(
32
+ [string]$Source,
33
+ [string]$Destination,
34
+ [switch]$AsMd
35
+ )
36
+ New-Item -ItemType Directory -Force -Path $Destination | Out-Null
37
+ $files = @(Get-ChildItem -Path (Join-Path $Source '*.agent.md') -ErrorAction SilentlyContinue)
38
+ foreach ($file in $files) {
39
+ if ($AsMd) {
40
+ $targetName = ($file.BaseName -replace '\.agent$', '') + '.md'
41
+ } else {
42
+ $targetName = $file.Name
43
+ }
44
+ Copy-Item -Force -Path $file.FullName -Destination (Join-Path $Destination $targetName)
45
+ }
46
+ }
47
+
27
48
  function Write-McpConfig {
28
49
  param(
29
50
  [string]$Path,
@@ -107,46 +128,56 @@ Write-Host '==> Deploying Argo toolchain'
107
128
 
108
129
  $schemaSrc = Join-Path $argoDir 'schema'
109
130
  $schemaDest = Join-Path $ArgoRoot 'schema'
110
- Write-Host "[1/6] argo\schema -> $schemaDest"
131
+ Write-Host "[1/12] argo\schema -> $schemaDest"
111
132
  Copy-Tree -Source $schemaSrc -Destination $schemaDest
112
133
 
113
134
  $scriptsSrc = Join-Path $argoDir 'scripts'
114
135
  $scriptsDest = Join-Path $ArgoRoot 'scripts'
115
- Write-Host "[2/6] argo\scripts -> $scriptsDest"
136
+ Write-Host "[2/12] argo\scripts -> $scriptsDest"
116
137
  Copy-Tree -Source $scriptsSrc -Destination $scriptsDest
117
138
 
118
139
  $defaultsSrc = Join-Path $argoDir 'defaults'
119
140
  $defaultsDest = Join-Path $ArgoRoot 'defaults'
120
- Write-Host "[3/6] argo\defaults -> $defaultsDest"
141
+ Write-Host "[3/12] argo\defaults -> $defaultsDest"
121
142
  Copy-Tree -Source $defaultsSrc -Destination $defaultsDest
122
143
 
123
144
  $skillSrc = Join-Path (Join-Path $argoDir 'skills') 'argo-init'
124
145
  $skillDest = Join-Path $SkillsRoot 'argo-init'
125
- Write-Host "[4/6] argo\skills\argo-init -> $skillDest"
146
+ Write-Host "[4/12] argo\skills\argo-init -> $skillDest"
126
147
  Copy-Tree -Source $skillSrc -Destination $skillDest
127
148
 
128
149
  $ruleSrc = Join-Path (Join-Path $argoDir 'rules') 'archgraph.instructions.md'
129
150
  $ruleDest = Join-Path $PromptsRoot 'archgraph.instructions.md'
130
- Write-Host "[5/6] argo\rules\archgraph.instructions.md -> $ruleDest"
151
+ Write-Host "[5/12] argo\rules\archgraph.instructions.md -> $ruleDest"
131
152
  New-Item -ItemType Directory -Force -Path $PromptsRoot | Out-Null
132
153
  Copy-Item -Force -Path $ruleSrc -Destination $ruleDest
133
154
 
134
155
  $depsSrc = Join-Path $argoDir 'package.json'
135
156
  $depsDest = Join-Path $ArgoRoot 'package.json'
136
- Write-Host "[6/6] argo\package.json -> $depsDest"
157
+ Write-Host "[6/12] argo\package.json -> $depsDest"
137
158
  Copy-Item -Force -Path $depsSrc -Destination $depsDest
138
159
 
139
160
  $cursorSkillDest = Join-Path $CursorSkillsRoot 'argo-init'
140
- Write-Host "[7/10] argo\skills\argo-init -> $cursorSkillDest (Cursor)"
161
+ Write-Host "[7/12] argo\skills\argo-init -> $cursorSkillDest (Cursor)"
141
162
  Copy-Tree -Source $skillSrc -Destination $cursorSkillDest
142
163
 
143
164
  $openCodeSkillDest = Join-Path $OpenCodeSkillsRoot 'argo-init'
144
- Write-Host "[8/10] argo\skills\argo-init -> $openCodeSkillDest (OpenCode)"
165
+ Write-Host "[8/12] argo\skills\argo-init -> $openCodeSkillDest (OpenCode)"
145
166
  Copy-Tree -Source $skillSrc -Destination $openCodeSkillDest
146
167
 
147
- Write-Host "[9/10] argo\rules\archgraph.instructions.md -> $OpenCodeAgentsPath (OpenCode global AGENTS.md)"
168
+ Write-Host "[9/12] argo\rules\archgraph.instructions.md -> $OpenCodeAgentsPath (OpenCode global AGENTS.md)"
148
169
  Add-AgentsRule -AgentsPath $OpenCodeAgentsPath -RulePath $ruleSrc
149
170
 
171
+ $agentsSrc = Join-Path $argoDir 'agents'
172
+ Write-Host "[10/12] argo\agents -> $CopilotAgentsRoot (Copilot user-level)"
173
+ Copy-Agents -Source $agentsSrc -Destination $CopilotAgentsRoot
174
+
175
+ Write-Host "[11/12] argo\agents -> $CursorAgentsRoot (Cursor user-level, renamed to .md)"
176
+ Copy-Agents -Source $agentsSrc -Destination $CursorAgentsRoot -AsMd
177
+
178
+ Write-Host "[12/12] argo\agents -> $OpenCodeAgentsRoot (OpenCode user-level, renamed to .md)"
179
+ Copy-Agents -Source $agentsSrc -Destination $OpenCodeAgentsRoot -AsMd
180
+
150
181
  if ($SkipDeps) {
151
182
  Write-Host 'Skipped dependency install (-SkipDeps).'
152
183
  } elseif (Get-Command npm -ErrorAction SilentlyContinue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo",
3
- "version": "0.7.9",
3
+ "version": "0.8.1",
4
4
  "description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "argo/scripts",
11
11
  "argo/schema",
12
12
  "argo/defaults",
13
+ "argo/agents",
13
14
  "argo/skills/argo-init",
14
15
  "argo/rules",
15
16
  "argo/package.json",