aes-cli 0.9.0__tar.gz → 0.12.0__tar.gz

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.
Files changed (99) hide show
  1. {aes_cli-0.9.0 → aes_cli-0.12.0}/PKG-INFO +1 -1
  2. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/__init__.py +1 -1
  3. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/init.py +2 -0
  4. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/domains.py +29 -12
  5. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/i18n/_messages.py +1 -1
  6. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/i18n/ja.py +1 -1
  7. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/registry.py +4 -0
  8. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/instructions.md.jinja +2 -0
  9. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/ja/instructions.md.jinja +2 -0
  10. aes_cli-0.12.0/aes/scaffold/ja/memory_command.md.jinja +195 -0
  11. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/ja/operations.md.jinja +5 -4
  12. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/ja/orchestrator.md.jinja +4 -3
  13. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/ja/setup.md.jinja +20 -2
  14. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/ja/workflow_command.md.jinja +8 -5
  15. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/memory_command.md.jinja +98 -2
  16. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/operations.md.jinja +5 -4
  17. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/orchestrator.md.jinja +4 -3
  18. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/setup.md.jinja +71 -9
  19. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/workflow_command.md.jinja +8 -5
  20. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/_composer.py +40 -0
  21. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/claude.py +5 -12
  22. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/codex.py +13 -0
  23. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/copilot.py +6 -0
  24. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/cursor.py +6 -0
  25. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/openclaw.py +13 -0
  26. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/windsurf.py +6 -0
  27. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes_cli.egg-info/PKG-INFO +1 -1
  28. {aes_cli-0.9.0 → aes_cli-0.12.0}/pyproject.toml +1 -1
  29. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_sync.py +6 -6
  30. aes_cli-0.9.0/aes/scaffold/ja/memory_command.md.jinja +0 -99
  31. {aes_cli-0.9.0 → aes_cli-0.12.0}/README.md +0 -0
  32. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/__main__.py +0 -0
  33. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/analyzer.py +0 -0
  34. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/__init__.py +0 -0
  35. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/bom.py +0 -0
  36. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/inspect.py +0 -0
  37. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/install.py +0 -0
  38. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/publish.py +0 -0
  39. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/search.py +0 -0
  40. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/status.py +0 -0
  41. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/sync.py +0 -0
  42. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/upgrade.py +0 -0
  43. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/commands/validate.py +0 -0
  44. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/config.py +0 -0
  45. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/frameworks.py +0 -0
  46. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/global_config.py +0 -0
  47. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/i18n/__init__.py +0 -0
  48. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/i18n/domains_ja.py +0 -0
  49. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/mcp_server.py +0 -0
  50. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/migrations.py +0 -0
  51. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/agent.yaml.jinja +0 -0
  52. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/agentignore.jinja +0 -0
  53. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/bom.yaml.jinja +0 -0
  54. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/ja/skill.md.jinja +0 -0
  55. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/local.example.yaml.jinja +0 -0
  56. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/local.yaml.jinja +0 -0
  57. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/permissions.yaml.jinja +0 -0
  58. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/skill.md.jinja +0 -0
  59. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/skill.yaml.jinja +0 -0
  60. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/scaffold/workflow.yaml.jinja +0 -0
  61. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/agent.schema.json +0 -0
  62. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/bom.schema.json +0 -0
  63. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/decision-record.schema.json +0 -0
  64. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/instinct.schema.json +0 -0
  65. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/learning-config.schema.json +0 -0
  66. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/lifecycle.schema.json +0 -0
  67. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/permissions.schema.json +0 -0
  68. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/registry.schema.json +0 -0
  69. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/rules-config.schema.json +0 -0
  70. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/skill.schema.json +0 -0
  71. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/schemas/workflow.schema.json +0 -0
  72. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/__init__.py +0 -0
  73. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/targets/_base.py +0 -0
  74. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes/validator.py +0 -0
  75. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes_cli.egg-info/SOURCES.txt +0 -0
  76. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes_cli.egg-info/dependency_links.txt +0 -0
  77. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes_cli.egg-info/entry_points.txt +0 -0
  78. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes_cli.egg-info/requires.txt +0 -0
  79. {aes_cli-0.9.0 → aes_cli-0.12.0}/aes_cli.egg-info/top_level.txt +0 -0
  80. {aes_cli-0.9.0 → aes_cli-0.12.0}/setup.cfg +0 -0
  81. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_analyzer.py +0 -0
  82. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_bom.py +0 -0
  83. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_codex_target.py +0 -0
  84. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_frameworks.py +0 -0
  85. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_init.py +0 -0
  86. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_inspect.py +0 -0
  87. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_install.py +0 -0
  88. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_learning_validation.py +0 -0
  89. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_lifecycle_validation.py +0 -0
  90. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_mcp_server.py +0 -0
  91. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_openclaw_target.py +0 -0
  92. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_project_locale.py +0 -0
  93. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_publish.py +0 -0
  94. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_registry.py +0 -0
  95. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_rules_validation.py +0 -0
  96. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_search.py +0 -0
  97. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_status.py +0 -0
  98. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_upgrade.py +0 -0
  99. {aes_cli-0.9.0 → aes_cli-0.12.0}/tests/test_validate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aes-cli
3
- Version: 0.9.0
3
+ Version: 0.12.0
4
4
  Summary: CLI tool for the Agentic Engineering Standard
5
5
  Author: Hiro
6
6
  License: Apache-2.0
@@ -2,4 +2,4 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "0.9.0"
5
+ __version__ = "0.12.0"
@@ -459,6 +459,8 @@ def _print_post_init_summary(
459
459
  ("Cursor", ".cursorrules"),
460
460
  ("Copilot", ".github/copilot-instructions.md"),
461
461
  ("Windsurf", ".windsurfrules"),
462
+ ("Codex", "AGENTS.md"),
463
+ ("OpenClaw", ".openclaw/openclaw.json"),
462
464
  ]
463
465
  for tool_name, file_name in sync_targets:
464
466
  if (project_root / file_name).exists():
@@ -1485,23 +1485,40 @@ _ASSISTANT_SKILLS = [
1485
1485
  ),
1486
1486
  ]
1487
1487
 
1488
- _ASSISTANT_CONVERSE_COMMAND = CommandDef(
1489
- id="converse",
1490
- trigger="/converse",
1491
- description="Start or resume a conversation session with the assistant",
1492
- runbook_purpose="Run the assistant's main conversational loop. The agent listens across configured channels, responds to messages, executes skills on demand, and proactively checks heartbeat tasks.",
1493
- worker_specialty="Multi-platform conversational AI assistant",
1488
+ _ASSISTANT_BUILD_COMMAND = CommandDef(
1489
+ id="build",
1490
+ trigger="/build",
1491
+ description="Build the assistant project from scratch: identity, channels, skills, integrations, permissions, tests",
1492
+ runbook_purpose="Construct the complete assistant project. The agent sets up project structure, defines identity and model config, wires channel integrations, implements skills, configures security and permissions, and verifies with tests.",
1493
+ worker_specialty="Constructing assistant projects — identity, channels, skills, integrations",
1494
+ runbook_phases=[
1495
+ {"title": "Project Structure", "content": "Create directory layout matching the AES assistant convention: skills/, config/, scripts/, tests/. Set up pyproject.toml, environment files, and dependency management."},
1496
+ {"title": "Identity & Model", "content": "Configure identity (persona, name, emoji) in agent.yaml. Set up model provider, API key environment variables, and sandbox settings. Create USER.md template for user profile."},
1497
+ {"title": "Channel Integration", "content": "Wire messaging channels (Telegram, Discord, etc.). Set up bot token environment variables, configure channel-specific settings, and implement message routing stubs."},
1498
+ {"title": "Skill Wiring", "content": "Implement skill manifests and runbooks for each configured skill. Wire MCP servers if needed. Set up auto-activation rules and skill dependencies."},
1499
+ {"title": "Security & Permissions", "content": "Configure permissions.yaml with shell confirmation rules, action confirmations, and channel-specific security policies. Set up credential management via environment variables."},
1500
+ {"title": "Tests & Verification", "content": "Write unit tests for skill execution, channel routing, and permission checks. Add integration test that validates the full config. Verify all environment variables are documented."},
1501
+ ],
1502
+ )
1503
+
1504
+ _ASSISTANT_RUN_COMMAND = CommandDef(
1505
+ id="run",
1506
+ trigger="/run",
1507
+ description="Start the autonomous assistant loop: initialize, monitor channels, execute skills, maintain heartbeat",
1508
+ runbook_purpose="Run the assistant's autonomous agent loop. The agent initializes from stored state, monitors connected channels for messages, executes skills on demand or automatically, persists learnings to memory, and maintains the heartbeat cycle for proactive tasks.",
1509
+ worker_specialty="Running autonomous assistant agents — channel monitoring, skill execution, heartbeat maintenance",
1494
1510
  runbook_phases=[
1495
- {"title": "Session Setup", "content": "Load user profile from USER.md. Check HEARTBEAT.md for pending tasks. Review recent conversation history for context continuity."},
1496
- {"title": "Message Processing", "content": "Receive messages from connected channels. Determine intent — is this a greeting, a question, a skill invocation, or a general conversation? Route accordingly."},
1497
- {"title": "Skill Execution", "content": "When a skill is triggered (explicitly via command or automatically via context match), execute it and return results to the user."},
1498
- {"title": "Memory & Wrap-up", "content": "Persist important learnings to MEMORY.md. Update AGENTS.md if the user's preferences or context changed."},
1511
+ {"title": "Initialization", "content": "Load user profile from USER.md. Restore session state from MEMORY.md. Check HEARTBEAT.md for pending tasks. Review recent activity log for context continuity."},
1512
+ {"title": "Channel Monitoring", "content": "Connect to configured channels (Telegram, Discord, etc.). Listen for incoming messages. Determine intent — greeting, skill invocation, general conversation, or system command. Route accordingly."},
1513
+ {"title": "Skill Execution", "content": "When a skill is triggered (explicitly via command or automatically via context match), execute it within permission boundaries. Return results to the originating channel. Handle errors gracefully with user-facing messages."},
1514
+ {"title": "Memory & Learning", "content": "Persist important learnings to MEMORY.md. Update active instincts based on interaction patterns. Record conversation context for future sessions."},
1515
+ {"title": "Heartbeat & Maintenance", "content": "Execute heartbeat checklist at configured intervals. Proactively surface important updates (calendar, PRs, unread messages). Respect quiet hours. Log heartbeat results to activity log."},
1499
1516
  ],
1500
1517
  )
1501
1518
 
1502
1519
  ASSISTANT_CONFIG = DomainConfig(
1503
1520
  mode="agent-integrated",
1504
- workflow_commands=[_ASSISTANT_CONVERSE_COMMAND],
1521
+ workflow_commands=[_ASSISTANT_BUILD_COMMAND, _ASSISTANT_RUN_COMMAND],
1505
1522
 
1506
1523
  # Identity defaults for scaffold
1507
1524
  identity_persona=(
@@ -1527,7 +1544,7 @@ ASSISTANT_CONFIG = DomainConfig(
1527
1544
  "discord": {"enabled": "true", "bot_token_env": "DISCORD_BOT_TOKEN"},
1528
1545
  },
1529
1546
 
1530
- instructions_description="Personal AI assistant connected to messaging platforms via OpenClaw. Runs 24/7, responds across channels, and executes skills on demand.",
1547
+ instructions_description="Autonomous AI assistant powered by OpenClaw. Runs 24/7, monitors channels, executes skills, and maintains proactive heartbeat tasks.",
1531
1548
  instructions_quick_ref=(
1532
1549
  "```bash\n"
1533
1550
  "aes sync -t openclaw # generate .openclaw/ config\n"
@@ -178,7 +178,7 @@ MESSAGES: dict = {
178
178
  "init.type_skip": "Skip",
179
179
  "init.type_ml": "ML pipeline",
180
180
  "init.type_research": "Research / Content pipeline",
181
- "init.type_assistant": "Assistant (24/7 AI on messaging platforms)",
181
+ "init.type_assistant": "Assistant (24/7 autonomous agent)",
182
182
  "init.type_custom": "Custom",
183
183
  "init.overwrite_warning": "{agent_dir}/ already exists at {path}",
184
184
  "init.overwrite_confirm": "Overwrite existing files?",
@@ -178,7 +178,7 @@ MESSAGES: dict = {
178
178
  "init.type_skip": "スキップ",
179
179
  "init.type_ml": "ML パイプライン",
180
180
  "init.type_research": "研究 / コンテンツパイプライン",
181
- "init.type_assistant": "アシスタント(24時間メッセージングAI)",
181
+ "init.type_assistant": "アシスタント(24時間自律エージェント)",
182
182
  "init.type_custom": "カスタム",
183
183
  "init.overwrite_warning": "{path} に {agent_dir}/ が既に存在します",
184
184
  "init.overwrite_confirm": "既存のファイルを上書きしますか?",
@@ -15,6 +15,7 @@ from typing import Dict, List, Optional, Tuple
15
15
  REGISTRY_URL = os.environ.get("AES_REGISTRY_URL", "https://registry.aes-official.com")
16
16
  INDEX_PATH = "index.json"
17
17
  PACKAGES_PATH = "packages"
18
+ _USER_AGENT = "aes-cli/0.11.0"
18
19
 
19
20
 
20
21
  def _validate_registry_url(url: str) -> str:
@@ -131,6 +132,7 @@ def fetch_index(registry_url: Optional[str] = None) -> dict:
131
132
  url = f"{base.rstrip('/')}/{INDEX_PATH}"
132
133
 
133
134
  req = urllib.request.Request(url)
135
+ req.add_header("User-Agent", _USER_AGENT)
134
136
  token = os.environ.get("AES_REGISTRY_KEY")
135
137
  if token:
136
138
  req.add_header("Authorization", f"Bearer {token}")
@@ -158,6 +160,7 @@ def download_package(
158
160
  tarball_path = dest / f"{name}-{version}.tar.gz"
159
161
 
160
162
  req = urllib.request.Request(url)
163
+ req.add_header("User-Agent", _USER_AGENT)
161
164
  token = os.environ.get("AES_REGISTRY_KEY")
162
165
  if token:
163
166
  req.add_header("Authorization", f"Bearer {token}")
@@ -206,6 +209,7 @@ def upload_package(
206
209
  # Upload tarball — server auto-updates index from X-AES-* headers
207
210
  upload_url = f"{base.rstrip('/')}/{PACKAGES_PATH}/{name}/{version}.tar.gz"
208
211
  req = urllib.request.Request(upload_url, data=tarball_data, method="PUT")
212
+ req.add_header("User-Agent", _USER_AGENT)
209
213
  req.add_header("Authorization", f"Bearer {token}")
210
214
  req.add_header("Content-Type", "application/gzip")
211
215
  req.add_header("X-AES-Description", description)
@@ -20,6 +20,7 @@
20
20
  {% for rule in domain_config.instructions_rules %}
21
21
  {{ loop.index }}. {{ rule }}
22
22
  {% endfor %}
23
+ {{ domain_config.instructions_rules|length + 1 }}. **Memory discipline** — update `.agent/memory/operations.md` after every significant action. Run `/memory` at session end. Next session starts blind without this.
23
24
 
24
25
  ## Primary Workflow
25
26
 
@@ -165,6 +166,7 @@ Key rules: `aes_skill`/`aes_workflow` version key is **required**. `inputs` is a
165
166
  Example: "Python 3.9+ — use `from __future__ import annotations` everywhere." -->
166
167
 
167
168
  1. **Fail graceful** — Each item wrapped in try/except, log error, continue.
169
+ 2. **Memory discipline** — update `.agent/memory/operations.md` after every significant action. Run `/memory` at session end.
168
170
 
169
171
  ## Domain Model
170
172
 
@@ -20,6 +20,7 @@
20
20
  {% for rule in domain_config.instructions_rules %}
21
21
  {{ loop.index }}. {{ rule }}
22
22
  {% endfor %}
23
+ {{ domain_config.instructions_rules|length + 1 }}. **メモリ規律** — 重要なアクションの後に `.agent/memory/operations.md` を必ず更新してください。セッション終了時に `/memory` を実行してください。これを怠ると次のセッションが盲目的に開始されます。
23
24
 
24
25
  ## 主要ワークフロー
25
26
 
@@ -165,6 +166,7 @@ idempotency:
165
166
  例: "Python 3.9+ — `from __future__ import annotations` を全ファイルで使用。" -->
166
167
 
167
168
  1. **グレースフルフェイル** — 各アイテムをtry/exceptでラップし、エラーをログして続行。
169
+ 2. **メモリ規律** — 重要なアクションの後に `.agent/memory/operations.md` を必ず更新。セッション終了時に `/memory` を実行。
168
170
 
169
171
  ## ドメインモデル
170
172
 
@@ -0,0 +1,195 @@
1
+ # コマンド: /memory
2
+
3
+ 現在の会話をレビューし、記憶に値するアイテムを `.agent/memory/` に保存します。
4
+
5
+ ## 実行タイミング
6
+
7
+ - **手動**: `/memory` を実行して重要な学びを保存
8
+ - **自動トリガー**: 重要な作業セッションの終了時に実行 — コマンド完了後、アーキテクチャの意思決定後、困難なバグの解決後、大規模な実装作業の完了後
9
+
10
+ ## フェーズ 1: コンテキストのレビュー
11
+
12
+ 会話をスキャンし、保存する価値のあるアイテムを特定:
13
+
14
+ 1. **アーキテクチャの決定** — 新しいパターン、技術選択、根拠を伴うデザインのトレードオフ
15
+ 2. **苦労して得た解決策** — 診断に労力を要したバグ、非自明な修正、ワークアラウンド
16
+ 3. **プロジェクトの規約** — 複数のインタラクションで確認されたパターン
17
+ 4. **環境/インフラのメモ** — デプロイの詳細、ランタイムの癖、認証情報の設定
18
+ 5. **ステータスの変更** — 構築されたもの、進行中に移行したもの、計画されたもの
19
+
20
+ **無視するもの:**
21
+ - 一時的な状態(現在のタスクの詳細、進行中の作業の詳細)
22
+ - セッション間で未確認の単一観察による結論
23
+ - `.agent/instructions.md` に既に記載されている情報
24
+ - セッション固有の詳細(一時ファイルパス、エフェメラルID)
25
+
26
+ ## フェーズ 2: 既存メモリの確認
27
+
28
+ 重複を避けるために、現在のメモリファイルを読む:
29
+
30
+ 1. `.agent/memory/project.md` — 全セクションを確認
31
+ 2. `.agent/memory/learnings.yaml` — 既存の学習IDを確認
32
+
33
+ 各候補アイテムについて:
34
+ - 既存エントリを**更新**する場合 → 既存エントリをその場で修正
35
+ - 既存エントリと**矛盾**する場合 → 新しい理解で置き換え
36
+ - **真に新しい**場合 → 適切なセクションに追加
37
+ - 既存エントリと**重複**する場合 → スキップ
38
+
39
+ ## フェーズ 3: プロジェクトメモリへの保存
40
+
41
+ `.agent/memory/project.md` を以下のセクションに該当するアイテムで更新:
42
+
43
+ | セクション | 記載内容 |
44
+ |-----------|---------|
45
+ | **プロジェクト概要** | システム目的の変更、スコープの変更 |
46
+ | **アーキテクチャ** | 根拠を伴う新しい技術的決定 |
47
+ | **ステータス** | 構築済み、進行中、計画中のもの |
48
+ | **主要パターン** | コードベースから確認されたパターン |
49
+ | **環境メモ** | デプロイ、ランタイム、インフラの詳細 |
50
+
51
+ `project.md` を200行以下に維持してください。制限に近づいた場合は、超過するのではなく、古いエントリを統合または削除してください。
52
+
53
+ ### BOM チェック
54
+
55
+ このセッションで新しいAIモデル、フレームワーク、ツール、またはデータソースを導入した場合、`.agent/bom.yaml` を更新:
56
+ - 新しいモデル → `models:` にプロバイダー、バージョン、目的を追加
57
+ - 新しいフレームワーク/ライブラリ → `frameworks:` にバージョンを追加
58
+ - 新しいツール(MCPサーバー、CLI、API) → `tools:` にタイプを追加
59
+ - 新しいデータソース → `data_sources:` にタイプとURIを追加
60
+
61
+ ## フェーズ 4: 構造化された学習の保存
62
+
63
+ 明確な適用性を持つ苦労して得た教訓について、`.agent/memory/learnings.yaml` に追加:
64
+
65
+ ```yaml
66
+ - id: "ケバブケースid"
67
+ date: "YYYY-MM-DD"
68
+ context: "何が起きていたか"
69
+ observation: "何が観察されたか"
70
+ lesson: "一般化された教訓"
71
+ applies_when:
72
+ - "条件 1"
73
+ - "条件 2"
74
+ action: "これが適用される場合に何をするか"
75
+ ```
76
+
77
+ 構造化された学習は以下の場合にのみ作成:
78
+ - 複数の観察で確認された、または
79
+ - 発見に大きな労力を要した、または
80
+ - 忘れると実害が生じる
81
+
82
+ ## フェーズ 5: インスティンクトの抽出(`.agent/learning/` が存在する場合)
83
+
84
+ セッションをレビューし、インスティンクトとして体系化する価値のある繰り返しパターンを特定します。
85
+
86
+ ### 抽出する条件
87
+
88
+ パターンが以下の場合にのみ抽出:
89
+ - このセッションで2回以上成功して適用された、または
90
+ - ユーザーから与えられた恒久的な行動変更となるべき修正、または
91
+ - 発見に労力を要した非自明なテクニック
92
+
93
+ 些細なパターン、一回限りの修正、プロジェクト固有の詳細(それらは `project.md` に記載)は抽出しないでください。
94
+
95
+ ### 抽出方法
96
+
97
+ 1. `.agent/learning/config.yaml` を読んで抽出設定を確認
98
+ 2. 各候補パターンについて、`.agent/learning/instincts/candidates/` に新しいファイルを作成:
99
+
100
+ ```yaml
101
+ apiVersion: aes/v1
102
+ kind: Instinct
103
+
104
+ metadata:
105
+ id: "ケバブケースの説明的id"
106
+ created_at: "YYYY-MM-DDTHH:MM:SSZ"
107
+ last_validated: "YYYY-MM-DDTHH:MM:SSZ"
108
+ source_session: "YYYY-MM-DD"
109
+ tags: []
110
+
111
+ pattern:
112
+ description: "パターンの内容 — 明確な一文"
113
+ trigger: "このパターンが発動すべき条件"
114
+ action: "実行すべきステップ"
115
+
116
+ confidence:
117
+ score: 0.4
118
+ validations: 1
119
+ contradictions: 0
120
+ status: candidate
121
+ ```
122
+
123
+ 3. 設定の `max_candidates_per_session`(デフォルト: 3)を上限とする
124
+
125
+ ### 既存インスティンクトの管理
126
+
127
+ 1. `.agent/learning/instincts/candidates/` を確認 — 十分な検証があるものを昇格:
128
+ - `validations >= 3` かつ `score >= 0.6` の場合: ファイルを `active/` に移動し、`status: active` に設定
129
+ 2. `.agent/learning/instincts/active/` を確認 — 検証または反証:
130
+ - アクティブなインスティンクトがこのセッションで成功裏に適用された場合: `validations` をインクリメントし、`last_validated` を更新
131
+ - アクティブなインスティンクトが反証された場合: `contradictions` をインクリメントし、`score` を `decay_rate` 分減少
132
+ - `score < min_score`(デフォルト 0.3)の場合: ファイルを `archived/` に移動し、`status: archived` に設定
133
+
134
+ ## フェーズ 6: 重要な決定の記録
135
+
136
+ セッションで重要な技術的決定が行われた場合、決定記録を作成します。
137
+
138
+ ### 記録を作成する条件
139
+
140
+ - トレードオフのある複数の有効な選択肢から選んだ場合
141
+ - 規約やスタンダードなアプローチから逸脱した場合
142
+ - 試した後にアプローチを却下した場合(とその理由)
143
+ - 品質ゲートを上書きまたは調整した場合
144
+ - コンプライアンスに関連する選択をした場合
145
+
146
+ ### 作成方法
147
+
148
+ `.agent/memory/decisions/` で次の利用可能な番号を見つけて作成:
149
+
150
+ ```yaml
151
+ aes_decision: "1.4"
152
+ id: "dr-NNN-短いスラグ"
153
+ timestamp: "YYYY-MM-DDTHH:MM:SSZ"
154
+ summary: "一文: 何が決定されたか、なぜか"
155
+ context: "この決定を促した問題"
156
+ alternatives:
157
+ - option: "代替案A"
158
+ rejected_reason: "却下された理由"
159
+ rationale: "制約を考慮して選択されたアプローチが最適である理由"
160
+ outcome: "結果 — メトリクス、ステータス、成果物"
161
+ approval: auto
162
+ tags: []
163
+ ```
164
+
165
+ 実際の選択肢がないルーチン作業ではこのフェーズをスキップしてください。
166
+
167
+ ## フェーズ 7: セッションスナップショット
168
+
169
+ セッションが実質的な作業を含んでいた場合、`.agent/memory/sessions/YYYY-MM-DD.md` を作成:
170
+
171
+ ```markdown
172
+ # セッション: YYYY-MM-DD
173
+
174
+ ## 実施内容
175
+ - ...
176
+
177
+ ## 行われた決定
178
+ - ...
179
+
180
+ ## 未解決の質問
181
+ - ...
182
+ ```
183
+
184
+ 軽微なセッション(クイックフィックス、小さな設定変更)ではこのフェーズをスキップしてください。
185
+
186
+ ## フェーズ 8: 報告
187
+
188
+ 保存されたものを要約:
189
+ - `project.md` に追加または更新されたアイテム
190
+ - `learnings.yaml` に追加された学習(ある場合)
191
+ - 抽出または昇格されたインスティンクト(ある場合)
192
+ - 作成された決定記録(ある場合)
193
+ - 作成されたセッションファイル(ある場合)
194
+ - 重複としてスキップされたアイテム
195
+ - 更新されたBOMエントリ(ある場合)
@@ -1,9 +1,10 @@
1
1
  # {{ name }} — オペレーション記録
2
2
 
3
- > 全コマンド共通の時系列ログ。
4
- > コマンド開始時に**ログ全体を読んでください**他のワーカーのエントリがコンテキストを提供します。
5
- > 読了後、下の**読了カーソル**を更新し、次回どこまで読んだか記録してください。
6
- > 新しいエントリは自分のコマンドタグ付きでアクティビティログに追記してください。
3
+ > **必須**: すべてのコマンドは開始前にこのファイルを読み、各アクション後に更新しなければなりません。
4
+ > 1. アクティビティログ全体を読む 他のワーカーのエントリがコンテキストを提供します
5
+ > 2. 読了後、ワーカーテーブルの**読了カーソル**を更新する
6
+ > 3. 各アクション後、番号付きエントリをアクティビティログに追記する
7
+ > 4. メモリ更新をスキップしないでください — 次のセッションがこの状態に依存しています
7
8
 
8
9
  ## ワーカー
9
10
 
@@ -1,10 +1,11 @@
1
1
  {% if domain_config %}
2
2
  # {{ name }} — オーケストレーター
3
3
 
4
- ## オペレーション記録
4
+ ## オペレーション記録(必須)
5
5
 
6
- `.agent/memory/operations.md` で各コマンドワーカーの現在の状態を確認してください。
7
- 各コマンドにはアクティビティ履歴とチェックマーク付きのインデックスセクションがあります。
6
+ 決定を行う前に `.agent/memory/operations.md` を必ず読んでください。
7
+ 各コマンドワーカーは読了カーソルを保持しています — 自分のカーソル以降のエントリで他のワーカーの作業を確認してください。
8
+ `aes init` 後にアクティビティエントリがない場合は、新規開始です — 直ちにログ記録を開始してください。
8
9
  {% if domain_config.workflow_commands %}
9
10
  追跡中のコマンド:
10
11
  {% for cmd in domain_config.workflow_commands %}
@@ -112,7 +112,16 @@
112
112
  - インタビュー: 「APIキーや設定変数は必要ですか?」と確認
113
113
  必須変数とデフォルト値付きのオプション変数を列挙。
114
114
 
115
- ## フェーズ 8: 検証と同期
115
+ ## フェーズ 8: 学習の設定(`.agent/learning/` が存在する場合)
116
+
117
+ `.agent/learning/config.yaml` をレビュー:
118
+ 1. **抽出設定**: 予想されるセッション頻度に基づいて `max_candidates_per_session`(デフォルト3)と `min_session_length`(デフォルト5)を調整
119
+ 2. **信頼度の閾値**: `promotion_threshold`(0.6)と `promotion_min_validations`(3)をレビュー — 高速イテレーションには低い値、慎重な学習には高い値
120
+ 3. **コンテキスト読み込み**: コンテキストウィンドウの予算に基づいて `max_instincts_in_context`(デフォルト10)と `format`(compact vs full)を設定
121
+
122
+ `.agent/learning/` が存在しない場合(学習なしのdev-assistプロジェクト)はこのフェーズをスキップ。
123
+
124
+ ## フェーズ 9: 検証と同期
116
125
 
117
126
  ```bash
118
127
  aes validate
@@ -228,7 +237,16 @@ aes sync
228
237
  - インタビュー: 「APIキーや設定変数は必要ですか?」と確認
229
238
  必須変数とデフォルト値付きのオプション変数を列挙。
230
239
 
231
- ## フェーズ 8: 検証と同期
240
+ ## フェーズ 8: 学習の設定(`.agent/learning/` が存在する場合)
241
+
242
+ `.agent/learning/config.yaml` をレビュー:
243
+ 1. **抽出設定**: 予想されるセッション頻度に基づいて `max_candidates_per_session`(デフォルト3)と `min_session_length`(デフォルト5)を調整
244
+ 2. **信頼度の閾値**: `promotion_threshold`(0.6)と `promotion_min_validations`(3)をレビュー — 高速イテレーションには低い値、慎重な学習には高い値
245
+ 3. **コンテキスト読み込み**: コンテキストウィンドウの予算に基づいて `max_instincts_in_context`(デフォルト10)と `format`(compact vs full)を設定
246
+
247
+ `.agent/learning/` が存在しない場合(学習なしのdev-assistプロジェクト)はこのフェーズをスキップ。
248
+
249
+ ## フェーズ 9: 検証と同期
232
250
 
233
251
  ```bash
234
252
  aes validate
@@ -6,17 +6,18 @@
6
6
 
7
7
  あなたは **{{ cmd.trigger }}** ワーカーです — {{ cmd.worker_specialty or cmd.description }}。
8
8
 
9
- ## メモリ
9
+ ## メモリ(必須)
10
10
 
11
- 開始前に、`.agent/memory/operations.md` の**すべて**を読んでください。
11
+ 開始前に、`.agent/memory/operations.md` の**すべて**を読まなければなりません。
12
12
  前回の**読了カーソル**以降のアクティビティログエントリを確認してください — これらは他のワーカーがあなたの未確認の間に行った作業です。
13
13
  このコンテキストを作業に活用してください(例: `/build` が構築したもの、`/run` が遭遇した問題、行われた決定事項)。
14
14
 
15
- 各フェーズ完了後、`{{ cmd.trigger }}` タグ付きの番号付きエントリをアクティビティログに追記してください:
15
+ 各フェーズ完了後、`{{ cmd.trigger }}` タグ付きの番号付きエントリをアクティビティログに必ず追記してください:
16
16
  ```
17
17
  N. [{{ cmd.trigger }}] YYYY-MM-DD: 実施内容 — 結果
18
18
  ```
19
19
 
20
+ アクティビティログエントリを書くまで次のフェーズに進まないでください。
20
21
  完了時、ワーカーテーブルの**読了カーソル**を最後のエントリ番号に更新してください。
21
22
 
22
23
  ## 完了チェック
@@ -39,10 +40,12 @@ N. [{{ cmd.trigger }}] YYYY-MM-DD: 実施内容 — 結果
39
40
  {{ phase.content }}
40
41
  {% endfor %}
41
42
 
42
- ## 完了後
43
+ ## 完了後(必須)
43
44
 
44
45
  1. `.agent/memory/operations.md` を更新:
45
46
  - アクティビティログに最終エントリを追記
46
47
  - **読了カーソル**を最後のエントリ番号に更新
47
48
  - 横断的な課題や決定事項を「課題と決定事項」セクションに追加
48
- 2. 報告: 完了したフェーズ、処理したアイテム数、発生したエラー
49
+ 2. 重要な決定が行われた場合、`.agent/memory/decisions/` に決定記録を作成(フォーマットは `/memory` を参照)
50
+ 3. 確認: 完了報告の前にoperations.mdが更新されていることを確認
51
+ 4. 報告: 完了したフェーズ、処理したアイテム数、発生したエラー
@@ -50,6 +50,14 @@ Update `.agent/memory/project.md` with items that belong in these sections:
50
50
 
51
51
  Keep `project.md` under 200 lines. If approaching the limit, consolidate or remove outdated entries rather than exceeding it.
52
52
 
53
+ ### BOM Check
54
+
55
+ If this session introduced new AI models, frameworks, tools, or data sources, update `.agent/bom.yaml`:
56
+ - New model → add to `models:` with provider, version, purpose
57
+ - New framework/library → add to `frameworks:` with version
58
+ - New tool (MCP server, CLI, API) → add to `tools:` with type
59
+ - New data source → add to `data_sources:` with type and URI
60
+
53
61
  ## Phase 4: Save Structured Learnings
54
62
 
55
63
  For hard-won lessons with clear applicability, append to `.agent/memory/learnings.yaml`:
@@ -71,7 +79,92 @@ Only create structured learnings for insights that:
71
79
  - Required significant effort to discover, OR
72
80
  - Would cause real damage if forgotten
73
81
 
74
- ## Phase 5: Session Snapshot
82
+ ## Phase 5: Extract Instincts (if `.agent/learning/` exists)
83
+
84
+ Review the session for repeatable patterns worth codifying as instincts.
85
+
86
+ ### When to extract
87
+
88
+ Only extract when a pattern was:
89
+ - Applied successfully more than once in this session, OR
90
+ - A correction the user gave that should become permanent behavior, OR
91
+ - A non-obvious technique that took effort to discover
92
+
93
+ Do NOT extract trivial patterns, one-off fixes, or project-specific details (those go in `project.md`).
94
+
95
+ ### How to extract
96
+
97
+ 1. Read `.agent/learning/config.yaml` for extraction settings
98
+ 2. For each candidate pattern, create a new file in `.agent/learning/instincts/candidates/`:
99
+
100
+ ```yaml
101
+ apiVersion: aes/v1
102
+ kind: Instinct
103
+
104
+ metadata:
105
+ id: "kebab-case-descriptive-id"
106
+ created_at: "YYYY-MM-DDTHH:MM:SSZ"
107
+ last_validated: "YYYY-MM-DDTHH:MM:SSZ"
108
+ source_session: "YYYY-MM-DD"
109
+ tags: []
110
+
111
+ pattern:
112
+ description: "What the pattern is — one clear sentence"
113
+ trigger: "When this pattern should activate"
114
+ action: "Step-by-step what to do"
115
+
116
+ confidence:
117
+ score: 0.4
118
+ validations: 1
119
+ contradictions: 0
120
+ status: candidate
121
+ ```
122
+
123
+ 3. Limit to `max_candidates_per_session` from config (default: 3)
124
+
125
+ ### Manage existing instincts
126
+
127
+ 1. Check `.agent/learning/instincts/candidates/` — promote any with enough validations:
128
+ - If `validations >= 3` AND `score >= 0.6`: move file to `active/`, set `status: active`
129
+ 2. Check `.agent/learning/instincts/active/` — validate or contradict:
130
+ - If an active instinct was applied successfully this session: increment `validations`, update `last_validated`
131
+ - If an active instinct was contradicted: increment `contradictions`, reduce `score` by `decay_rate`
132
+ - If `score < min_score` (default 0.3): move file to `archived/`, set `status: archived`
133
+
134
+ ## Phase 6: Record Significant Decisions
135
+
136
+ If the session involved a significant technical decision, create a decision record.
137
+
138
+ ### When to create a record
139
+
140
+ - Chose between multiple valid alternatives with trade-offs
141
+ - Deviated from a convention or standard approach
142
+ - Rejected an approach after trying it (and why)
143
+ - Overrode or adjusted a quality gate
144
+ - Made a compliance-relevant choice
145
+
146
+ ### How to create
147
+
148
+ Find the next available number in `.agent/memory/decisions/` and create:
149
+
150
+ ```yaml
151
+ aes_decision: "1.4"
152
+ id: "dr-NNN-short-slug"
153
+ timestamp: "YYYY-MM-DDTHH:MM:SSZ"
154
+ summary: "One sentence: what was decided and why"
155
+ context: "What problem prompted this decision"
156
+ alternatives:
157
+ - option: "Alternative A"
158
+ rejected_reason: "Why it was rejected"
159
+ rationale: "Why the chosen approach is best given constraints"
160
+ outcome: "What resulted — metrics, status, artifacts"
161
+ approval: auto
162
+ tags: []
163
+ ```
164
+
165
+ Skip this phase for routine work that doesn't involve real alternatives.
166
+
167
+ ## Phase 7: Session Snapshot
75
168
 
76
169
  If the session involved substantial work, create `.agent/memory/sessions/YYYY-MM-DD.md`:
77
170
 
@@ -90,10 +183,13 @@ If the session involved substantial work, create `.agent/memory/sessions/YYYY-MM
90
183
 
91
184
  Skip this phase for minor sessions (quick fixes, small config changes).
92
185
 
93
- ## Phase 6: Report
186
+ ## Phase 8: Report
94
187
 
95
188
  Summarize what was persisted:
96
189
  - Items added or updated in `project.md`
97
190
  - Learnings added to `learnings.yaml` (if any)
191
+ - Instincts extracted or promoted (if any)
192
+ - Decision records created (if any)
98
193
  - Session file created (if any)
99
194
  - Items skipped as duplicates
195
+ - BOM entries updated (if any)
@@ -1,9 +1,10 @@
1
1
  # {{ name }} — Operations Memory
2
2
 
3
- > Unified chronological log across all commands.
4
- > **Read the entire log** when starting any command — entries from other workers give you context.
5
- > After reading, update your **Read Cursor** below so you know where you left off next time.
6
- > Append new entries to the Activity Log tagged with your command.
3
+ > **REQUIRED**: Every command MUST read this file before starting and update it after each action.
4
+ > 1. Read the entire Activity Log — entries from other workers give you context
5
+ > 2. After reading, update your **Read Cursor** in the Workers table
6
+ > 3. After each action, append a numbered entry to the Activity Log
7
+ > 4. Do NOT skip memory updates — the next session depends on this state
7
8
 
8
9
  ## Workers
9
10
 
@@ -1,10 +1,11 @@
1
1
  {% if domain_config %}
2
2
  # {{ name }} — Orchestrator
3
3
 
4
- ## Operations Memory
4
+ ## Operations Memory (REQUIRED)
5
5
 
6
- Check `.agent/memory/operations.md` for the current state of each command worker.
7
- Each command has its own indexed section with activity history and checkmarks.
6
+ You MUST read `.agent/memory/operations.md` before making any decisions.
7
+ Each command worker maintains its Read Cursor check for entries after yours to see what other workers have done.
8
+ If operations.md has no activity entries after `aes init`, you are starting fresh — begin logging immediately.
8
9
  {% if domain_config.workflow_commands %}
9
10
  Commands tracked:
10
11
  {% for cmd in domain_config.workflow_commands %}