ac-framework 1.7.0 → 1.9.0
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/README.md +26 -0
- package/bin/postinstall.js +21 -1
- package/framework/.agent/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.agent/workflows/ac-lite.md +192 -0
- package/framework/.agent/workflows/ac.md +40 -0
- package/framework/.amazonq/prompts/ac-lite.md +192 -0
- package/framework/.amazonq/prompts/ac.md +40 -0
- package/framework/.amazonq/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.antigravity/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.antigravity/workflows/ac-lite.md +192 -0
- package/framework/.antigravity/workflows/ac.md +40 -0
- package/framework/.augment/commands/ac-lite.md +192 -0
- package/framework/.augment/commands/ac.md +40 -0
- package/framework/.augment/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.claude/commands/opsx/ac-lite.md +192 -0
- package/framework/.claude/commands/opsx/ac.md +40 -0
- package/framework/.claude/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.cline/commands/opsx/ac-lite.md +192 -0
- package/framework/.cline/commands/opsx/ac.md +40 -0
- package/framework/.cline/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.clinerules/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.clinerules/workflows/ac-lite.md +192 -0
- package/framework/.clinerules/workflows/ac.md +40 -0
- package/framework/.codebuddy/commands/opsx/ac-lite.md +192 -0
- package/framework/.codebuddy/commands/opsx/ac.md +40 -0
- package/framework/.codebuddy/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.codex/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.continue/prompts/ac-lite.md +192 -0
- package/framework/.continue/prompts/ac.md +40 -0
- package/framework/.continue/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.cospec/openspec/commands/ac-lite.md +192 -0
- package/framework/.cospec/openspec/commands/ac.md +40 -0
- package/framework/.cospec/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.crush/commands/opsx/ac-lite.md +192 -0
- package/framework/.crush/commands/opsx/ac.md +40 -0
- package/framework/.crush/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.cursor/commands/ac-lite.md +192 -0
- package/framework/.cursor/commands/ac.md +40 -0
- package/framework/.cursor/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.factory/commands/ac-lite.md +192 -0
- package/framework/.factory/commands/ac.md +40 -0
- package/framework/.factory/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.gemini/commands/opsx/ac-lite.md +192 -0
- package/framework/.gemini/commands/opsx/ac.md +40 -0
- package/framework/.gemini/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.github/prompts/ac-lite.md +192 -0
- package/framework/.github/prompts/ac.md +40 -0
- package/framework/.github/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.iflow/commands/ac-lite.md +192 -0
- package/framework/.iflow/commands/ac.md +40 -0
- package/framework/.iflow/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.kilocode/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.kilocode/workflows/ac-lite.md +192 -0
- package/framework/.kilocode/workflows/ac.md +40 -0
- package/framework/.kimi/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.kimi/workflows/ac-lite.md +192 -0
- package/framework/.kimi/workflows/ac.md +40 -0
- package/framework/.opencode/command/ac-lite.md +192 -0
- package/framework/.opencode/command/ac.md +40 -0
- package/framework/.opencode/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.qoder/commands/opsx/ac-lite.md +192 -0
- package/framework/.qoder/commands/opsx/ac.md +40 -0
- package/framework/.qoder/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.qwen/commands/ac-lite.md +192 -0
- package/framework/.qwen/commands/ac.md +40 -0
- package/framework/.qwen/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.roo/commands/ac-lite.md +192 -0
- package/framework/.roo/commands/ac.md +40 -0
- package/framework/.roo/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.trae/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.windsurf/skills/acfm-memory/SKILL.md +312 -0
- package/framework/.windsurf/workflows/ac-lite.md +192 -0
- package/framework/.windsurf/workflows/ac.md +40 -0
- package/framework/AGENTS.md +39 -0
- package/framework/CLAUDE.md +39 -0
- package/framework/GEMINI.md +39 -0
- package/framework/copilot-instructions.md +39 -0
- package/package.json +5 -2
- package/src/cli.js +2 -0
- package/src/commands/init.js +98 -0
- package/src/commands/memory.js +833 -0
- package/src/index.js +46 -0
- package/src/mcp/server.js +345 -0
- package/src/mcp/server.js.bak +727 -0
- package/src/memory/autosave.js +382 -0
- package/src/memory/database.js +178 -0
- package/src/memory/engine.js +727 -0
- package/src/memory/index.js +62 -0
- package/src/memory/utils.js +128 -0
- package/src/services/mcp-installer.js +194 -0
- package/src/services/spec-engine.js +69 -1
package/README.md
CHANGED
|
@@ -118,6 +118,32 @@ acfm spec new my-feature
|
|
|
118
118
|
| `acfm spec validate <name>` | Validate change structure | `--json` |
|
|
119
119
|
| `acfm spec schemas` | List available workflow schemas | `--json` |
|
|
120
120
|
|
|
121
|
+
### Memory System Commands (Persistent Learning)
|
|
122
|
+
|
|
123
|
+
AC Framework includes an **autonomous memory system** that learns from your development work.
|
|
124
|
+
|
|
125
|
+
| Command | Description | Flags |
|
|
126
|
+
|---------|-------------|-------|
|
|
127
|
+
| `acfm memory init` | Initialize memory database | `--json` |
|
|
128
|
+
| `acfm memory recall [task]` | Recall relevant context | `--project`, `--change`, `--json` |
|
|
129
|
+
| `acfm memory search <query>` | Search saved memories | `--type`, `--limit`, `--json` |
|
|
130
|
+
| `acfm memory save <content>` | Save memory manually | `--type`, `--tags`, `--importance` |
|
|
131
|
+
| `acfm memory get <id>` | View memory details | `--json` |
|
|
132
|
+
| `acfm memory timeline <id>` | Timeline around memory | `--window`, `--json` |
|
|
133
|
+
| `acfm memory patterns` | Analyze patterns | `--type`, `--json` |
|
|
134
|
+
| `acfm memory stats` | Memory statistics | `--project`, `--json` |
|
|
135
|
+
| `acfm memory export [file]` | Export memories | `--shareable-only` |
|
|
136
|
+
| `acfm memory import <file>` | Import memories | `--merge` |
|
|
137
|
+
|
|
138
|
+
**What gets saved automatically:**
|
|
139
|
+
- Architectural decisions from proposals/designs
|
|
140
|
+
- Bugfix patterns and solutions
|
|
141
|
+
- Performance optimizations
|
|
142
|
+
- Refactoring techniques
|
|
143
|
+
- Security fixes
|
|
144
|
+
|
|
145
|
+
**Privacy:** Content between `<private>...</private>` tags is automatically redacted.
|
|
146
|
+
|
|
121
147
|
**Tip:** Add `--json` to any command for programmatic output.
|
|
122
148
|
|
|
123
149
|
---
|
package/bin/postinstall.js
CHANGED
|
@@ -22,7 +22,18 @@ console.log(' acfm spec validate Validate change structure');
|
|
|
22
22
|
console.log(' acfm spec archive Archive a completed change');
|
|
23
23
|
console.log(' acfm spec schemas List workflow schemas');
|
|
24
24
|
console.log();
|
|
25
|
-
console.log('
|
|
25
|
+
console.log(' Memory System (Persistent Learning)');
|
|
26
|
+
console.log(' acfm memory init Initialize memory database');
|
|
27
|
+
console.log(' acfm memory recall Recall relevant context');
|
|
28
|
+
console.log(' acfm memory search Search memories');
|
|
29
|
+
console.log(' acfm memory save Save memory manually');
|
|
30
|
+
console.log(' acfm memory stats View memory statistics');
|
|
31
|
+
console.log();
|
|
32
|
+
console.log(' MCP (Model Context Protocol) Servers');
|
|
33
|
+
console.log(' acfm memory install-mcps Install MCP servers for AI assistants');
|
|
34
|
+
console.log(' acfm memory uninstall-mcps Uninstall MCP servers from AI assistants');
|
|
35
|
+
console.log();
|
|
36
|
+
console.log(' Tip: Add --json to any command for machine-readable output.');
|
|
26
37
|
console.log();
|
|
27
38
|
|
|
28
39
|
if (isWin) {
|
|
@@ -37,3 +48,12 @@ if (isWin) {
|
|
|
37
48
|
console.log(' 4. Restart your terminal');
|
|
38
49
|
console.log();
|
|
39
50
|
}
|
|
51
|
+
|
|
52
|
+
// Auto-detect and install MCPs for supported assistants
|
|
53
|
+
try {
|
|
54
|
+
const { detectAndInstallMCPs } = require('../src/services/mcp-installer');
|
|
55
|
+
detectAndInstallMCPs();
|
|
56
|
+
} catch (error) {
|
|
57
|
+
// Silently fail if MCP installer is not available yet
|
|
58
|
+
// This allows the framework to work without MCP dependencies during early development
|
|
59
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: acfm-memory
|
|
3
|
+
description: Autonomous memory system for persistent learning across sessions. Automatically saves architectural decisions, bugfixes, patterns, and insights. Use to recall context from previous work and build institutional knowledge.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AC Framework Memory System
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The AC Framework Memory System provides **autonomous persistent memory** for AI agents. It automatically detects and saves valuable knowledge during development, then recalls relevant context when needed.
|
|
11
|
+
|
|
12
|
+
**Key Capabilities:**
|
|
13
|
+
- **Automatic saving**: Detects and stores important decisions, patterns, and solutions
|
|
14
|
+
- **Full-text search**: Find relevant memories instantly
|
|
15
|
+
- **Context recall**: Get relevant knowledge before starting tasks
|
|
16
|
+
- **Pattern analysis**: Detect recurring themes and errors
|
|
17
|
+
- **Timeline view**: See chronological context around any memory
|
|
18
|
+
|
|
19
|
+
## When to Use This Skill
|
|
20
|
+
|
|
21
|
+
### Before Starting Work
|
|
22
|
+
- **Recall relevant context**: `acfm memory recall "<task description>"`
|
|
23
|
+
- **Check for similar changes**: `acfm memory search "<topic>"`
|
|
24
|
+
- **Review patterns**: `acfm memory patterns`
|
|
25
|
+
|
|
26
|
+
### During Work (Automatic)
|
|
27
|
+
The agent automatically saves memories when:
|
|
28
|
+
- Completing architectural proposals
|
|
29
|
+
- Fixing bugs (especially after multiple attempts)
|
|
30
|
+
- Refactoring code successfully
|
|
31
|
+
- Optimizing performance
|
|
32
|
+
- Discovering important patterns
|
|
33
|
+
|
|
34
|
+
### After Work
|
|
35
|
+
- **Review learnings**: `acfm memory stats`
|
|
36
|
+
- **Export for sharing**: `acfm memory export team-memory.json`
|
|
37
|
+
- **Find gaps**: `acfm memory patterns --min-frequency 1`
|
|
38
|
+
|
|
39
|
+
## Memory Types
|
|
40
|
+
|
|
41
|
+
| Type | Description | Auto-Trigger |
|
|
42
|
+
|------|-------------|--------------|
|
|
43
|
+
| `architectural_decision` | Major design decisions | After proposal/design |
|
|
44
|
+
| `bugfix_pattern` | Solutions to bugs | After fixing error |
|
|
45
|
+
| `refactor_technique` | Successful refactoring patterns | After refactor |
|
|
46
|
+
| `performance_insight` | Optimization learnings | After performance work |
|
|
47
|
+
| `security_fix` | Security vulnerability fixes | After security patch |
|
|
48
|
+
| `api_pattern` | API design patterns | After API work |
|
|
49
|
+
| `convention` | Project conventions | After establishing pattern |
|
|
50
|
+
| `workaround` | Temporary solutions | After implementing hack |
|
|
51
|
+
| `context_boundary` | System limitations | After defining boundaries |
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
### Core Commands
|
|
56
|
+
|
|
57
|
+
#### Initialize Memory System
|
|
58
|
+
```bash
|
|
59
|
+
acfm memory init
|
|
60
|
+
```
|
|
61
|
+
Creates the SQLite database at `~/.acfm/memory.db`.
|
|
62
|
+
|
|
63
|
+
#### Save Memory (Manual)
|
|
64
|
+
```bash
|
|
65
|
+
acfm memory save "Descripción de la decisión o patrón" \
|
|
66
|
+
--type architectural_decision \
|
|
67
|
+
--importance high \
|
|
68
|
+
--tags "react,performance"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Recall Context
|
|
72
|
+
```bash
|
|
73
|
+
# For specific task
|
|
74
|
+
acfm memory recall "implementing authentication"
|
|
75
|
+
|
|
76
|
+
# For current project (general context)
|
|
77
|
+
acfm memory recall
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Search Memories
|
|
81
|
+
```bash
|
|
82
|
+
# Basic search
|
|
83
|
+
acfm memory search "JWT"
|
|
84
|
+
|
|
85
|
+
# Filtered search
|
|
86
|
+
acfm memory search "database" --type architectural_decision --importance high
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Advanced Commands
|
|
90
|
+
|
|
91
|
+
#### Timeline View
|
|
92
|
+
```bash
|
|
93
|
+
acfm memory timeline <memory-id>
|
|
94
|
+
```
|
|
95
|
+
Shows what happened before and after a specific memory.
|
|
96
|
+
|
|
97
|
+
#### Connections
|
|
98
|
+
```bash
|
|
99
|
+
acfm memory connections <memory-id> --depth 2
|
|
100
|
+
```
|
|
101
|
+
Shows related memories as a graph.
|
|
102
|
+
|
|
103
|
+
#### Pattern Detection
|
|
104
|
+
```bash
|
|
105
|
+
acfm memory patterns
|
|
106
|
+
acfm memory patterns --type bugfix_pattern
|
|
107
|
+
```
|
|
108
|
+
Finds recurring topics and frequent error types.
|
|
109
|
+
|
|
110
|
+
#### Predictive Recall
|
|
111
|
+
```bash
|
|
112
|
+
acfm memory anticipate "caching strategy"
|
|
113
|
+
```
|
|
114
|
+
Predicts which memories will be relevant for a future task.
|
|
115
|
+
|
|
116
|
+
#### Statistics
|
|
117
|
+
```bash
|
|
118
|
+
acfm memory stats
|
|
119
|
+
acfm memory stats --project /path/to/project
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Export/Import
|
|
123
|
+
```bash
|
|
124
|
+
# Export for sharing
|
|
125
|
+
acfm memory export team-memory.json
|
|
126
|
+
|
|
127
|
+
# Import shared knowledge
|
|
128
|
+
acfm memory import team-memory.json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Auto-Save Behavior
|
|
132
|
+
|
|
133
|
+
### What Triggers Auto-Save
|
|
134
|
+
|
|
135
|
+
The agent evaluates content using a confidence score (0-1):
|
|
136
|
+
|
|
137
|
+
**High confidence triggers (auto-save):**
|
|
138
|
+
- Contains decision keywords: "decidimos", "optamos", "mejor usar"
|
|
139
|
+
- Describes solution to problem
|
|
140
|
+
- Contains architectural guidance
|
|
141
|
+
- Has error + solution pair
|
|
142
|
+
- Takes >10 minutes to resolve
|
|
143
|
+
|
|
144
|
+
**Low confidence (skip):**
|
|
145
|
+
- Very short content (<50 chars)
|
|
146
|
+
- Contains specific IDs/UUIDs
|
|
147
|
+
- Temporary TODOs
|
|
148
|
+
- Obvious/common knowledge
|
|
149
|
+
|
|
150
|
+
### Confidence Scoring
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
Base: 0.5
|
|
154
|
+
+ Decision keywords: +0.25
|
|
155
|
+
+ Contains solution: +0.20
|
|
156
|
+
+ Bug fix: +0.15
|
|
157
|
+
+ Architecture: +0.20
|
|
158
|
+
+ Optimization: +0.15
|
|
159
|
+
+ Security: +0.25
|
|
160
|
+
- Too short: -0.20
|
|
161
|
+
- Specific IDs: -0.15
|
|
162
|
+
- TODO/FIXME: -0.20
|
|
163
|
+
|
|
164
|
+
Threshold for auto-save: 0.60
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Notification
|
|
168
|
+
|
|
169
|
+
When auto-saving, the agent will display:
|
|
170
|
+
```
|
|
171
|
+
💾 Memory saved: [Brief description of what was learned]
|
|
172
|
+
Type: bugfix_pattern | Confidence: 85%
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Privacy
|
|
176
|
+
|
|
177
|
+
Content between `<private>` tags is automatically redacted:
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
Decidimos usar AWS para hosting. <private>Usaremos la cuenta
|
|
181
|
+
producción-env-123</private> para el deployment.
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Saved as:
|
|
185
|
+
```
|
|
186
|
+
Decidimos usar AWS para hosting. [REDACTED PRIVATE CONTENT]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Integration with Spec Workflow
|
|
190
|
+
|
|
191
|
+
### Before Creating Artifacts
|
|
192
|
+
|
|
193
|
+
When you request `acfm spec instructions`, the system automatically:
|
|
194
|
+
|
|
195
|
+
1. Queries memories related to the change topic
|
|
196
|
+
2. Includes relevant memories in the response
|
|
197
|
+
3. Displays them as context for the agent
|
|
198
|
+
|
|
199
|
+
Example output:
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"instruction": "...",
|
|
203
|
+
"relevantMemories": [
|
|
204
|
+
{
|
|
205
|
+
"id": 42,
|
|
206
|
+
"type": "architectural_decision",
|
|
207
|
+
"content": "Previous auth system used JWT...",
|
|
208
|
+
"importance": "high"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### During Apply Phase
|
|
215
|
+
|
|
216
|
+
When implementing tasks, the system recalls:
|
|
217
|
+
- Patterns from similar previous tasks
|
|
218
|
+
- Bugfixes related to current work
|
|
219
|
+
- Performance insights for optimization tasks
|
|
220
|
+
|
|
221
|
+
## Best Practices
|
|
222
|
+
|
|
223
|
+
### For Agents
|
|
224
|
+
|
|
225
|
+
1. **Always recall before starting**: Check `acfm memory recall` for relevant context
|
|
226
|
+
2. **Let auto-save work**: Don't manually save everything - trust the confidence scoring
|
|
227
|
+
3. **Use topic keys**: When manually saving, use consistent topic keys for deduplication
|
|
228
|
+
4. **Mark importance**: Critical decisions should be marked `critical` or `high`
|
|
229
|
+
5. **Add tags**: Tags improve searchability
|
|
230
|
+
|
|
231
|
+
### For Users
|
|
232
|
+
|
|
233
|
+
1. **Initialize once**: Run `acfm memory init` per machine
|
|
234
|
+
2. **Review periodically**: Check `acfm memory stats` to see what's been learned
|
|
235
|
+
3. **Export regularly**: Share knowledge with team via `acfm memory export`
|
|
236
|
+
4. **Prune old data**: Use `acfm memory prune` to archive obsolete memories
|
|
237
|
+
5. **Use private tags**: Mark sensitive content with `<private>` tags
|
|
238
|
+
|
|
239
|
+
## Examples
|
|
240
|
+
|
|
241
|
+
### Example 1: Bug Fix
|
|
242
|
+
|
|
243
|
+
**Agent fixes an authentication bug:**
|
|
244
|
+
```
|
|
245
|
+
💾 Memory saved: JWT refresh token fails when expired during request
|
|
246
|
+
Type: bugfix_pattern | Confidence: 87%
|
|
247
|
+
Solution: Implement token refresh interceptor
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Later, similar task:**
|
|
251
|
+
```bash
|
|
252
|
+
$ acfm memory recall "authentication token"
|
|
253
|
+
→ [Memory #42] JWT refresh token fails when expired...
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Example 2: Architectural Decision
|
|
257
|
+
|
|
258
|
+
**Agent completes proposal:**
|
|
259
|
+
```
|
|
260
|
+
💾 Memory saved: Microservices architecture chosen for scalability
|
|
261
|
+
Type: architectural_decision | Confidence: 92%
|
|
262
|
+
Tags: ["architecture", "microservices", "scalability"]
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Weeks later, new service:**
|
|
266
|
+
```bash
|
|
267
|
+
$ acfm memory search "microservices" --type architectural_decision
|
|
268
|
+
→ [Memory #15] Microservices architecture chosen for scalability
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Example 3: Pattern Detection
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
$ acfm memory patterns --type bugfix_pattern
|
|
275
|
+
|
|
276
|
+
Detected patterns:
|
|
277
|
+
- null-check-react (3×) - Null checks in React components
|
|
278
|
+
- async-race-condition (2×) - Race conditions in async code
|
|
279
|
+
- cors-preflight (2×) - CORS preflight issues
|
|
280
|
+
|
|
281
|
+
Recommendation: Consider adding ESLint rules for null checks
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Troubleshooting
|
|
285
|
+
|
|
286
|
+
### Memory not saving
|
|
287
|
+
- Check initialization: `acfm memory init`
|
|
288
|
+
- Content may be below confidence threshold
|
|
289
|
+
- May contain too many specific IDs
|
|
290
|
+
|
|
291
|
+
### Search not finding results
|
|
292
|
+
- Try broader keywords
|
|
293
|
+
- Use `acfm memory recall` without query for general context
|
|
294
|
+
- Check if memories exist: `acfm memory stats`
|
|
295
|
+
|
|
296
|
+
### Database locked
|
|
297
|
+
- Close other instances of `acfm`
|
|
298
|
+
- SQLite is single-writer; wait a moment and retry
|
|
299
|
+
|
|
300
|
+
## Related Skills
|
|
301
|
+
|
|
302
|
+
- `acfm-spec-workflow` - Foundation for spec-driven development
|
|
303
|
+
- `context-synthesizer` - For managing context in long conversations
|
|
304
|
+
- `systematic-debugging` - For complex problem resolution
|
|
305
|
+
|
|
306
|
+
## CLI Reference
|
|
307
|
+
|
|
308
|
+
See `acfm memory --help` for all commands and options.
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
**Remember**: The memory system learns from every interaction. The more you use it, the more valuable it becomes.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
**Fundamental Principle**: *"Quality with focused context. Load only what is necessary, when it is necessary."*
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
`ac-lite` keeps the same spec-driven quality bar as `ac.md`, but reduces token usage by:
|
|
8
|
+
|
|
9
|
+
1. Loading only the core workflow skills by default.
|
|
10
|
+
2. Activating extra skills only when objective risk gates require them.
|
|
11
|
+
3. Enforcing mandatory quality checkpoints before implementation and archive.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Default Skill Set (Always Load)
|
|
16
|
+
|
|
17
|
+
These are the only mandatory skills for every change:
|
|
18
|
+
|
|
19
|
+
1. `acfm-spec-workflow`
|
|
20
|
+
2. `openspec-new-change` OR `openspec-ff-change`
|
|
21
|
+
3. `openspec-continue-change`
|
|
22
|
+
4. `openspec-apply-change`
|
|
23
|
+
5. `openspec-verify-change`
|
|
24
|
+
6. `openspec-archive-change`
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Conditional Skills (Load Only If Gate Triggers)
|
|
29
|
+
|
|
30
|
+
### Security Gate
|
|
31
|
+
|
|
32
|
+
Load `secure-coding-cybersecurity` if the change touches any of:
|
|
33
|
+
|
|
34
|
+
- Auth/session/permissions
|
|
35
|
+
- User input handling or validation
|
|
36
|
+
- SQL/ORM queries or dynamic filters
|
|
37
|
+
- File paths/uploads
|
|
38
|
+
- Secrets/tokens/credentials
|
|
39
|
+
- Shell/command execution
|
|
40
|
+
|
|
41
|
+
### Testing Gate
|
|
42
|
+
|
|
43
|
+
Load `test-generator` if:
|
|
44
|
+
|
|
45
|
+
- There are no tests for the changed behavior, or
|
|
46
|
+
- Existing tests do not cover acceptance criteria, or
|
|
47
|
+
- Regression risk is medium/high.
|
|
48
|
+
|
|
49
|
+
### Consistency Gate
|
|
50
|
+
|
|
51
|
+
Load `spec-analysis` and `requirement-checklist` if:
|
|
52
|
+
|
|
53
|
+
- Requirements are ambiguous, or
|
|
54
|
+
- Change spans multiple modules, or
|
|
55
|
+
- Change modifies core domain behavior.
|
|
56
|
+
|
|
57
|
+
### API Gate
|
|
58
|
+
|
|
59
|
+
Load `api-design-principles` if API contracts/endpoints/schemas are added or modified.
|
|
60
|
+
|
|
61
|
+
### UI Gate
|
|
62
|
+
|
|
63
|
+
Load `interface-design` if dashboard/app UI behavior is introduced or changed.
|
|
64
|
+
|
|
65
|
+
### Performance Gate
|
|
66
|
+
|
|
67
|
+
Load `performance-optimizer` if:
|
|
68
|
+
|
|
69
|
+
- The change affects hot paths, or
|
|
70
|
+
- Latency/throughput targets exist, or
|
|
71
|
+
- A performance regression is detected/suspected.
|
|
72
|
+
|
|
73
|
+
### Context Scale Gate
|
|
74
|
+
|
|
75
|
+
Load `project-index` and/or `context-synthesizer` if:
|
|
76
|
+
|
|
77
|
+
- Codebase is large and discovery cost is high, or
|
|
78
|
+
- Session is long and context drift appears.
|
|
79
|
+
|
|
80
|
+
### Debug Gate
|
|
81
|
+
|
|
82
|
+
Load `systematic-debugging` when blocked by non-trivial bugs or unstable behavior.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Mandatory Quality Gates
|
|
87
|
+
|
|
88
|
+
These gates are non-optional in `ac-lite`.
|
|
89
|
+
|
|
90
|
+
### Gate A: Ready to Implement
|
|
91
|
+
|
|
92
|
+
Before `openspec-apply-change`, all must be true:
|
|
93
|
+
|
|
94
|
+
- Change exists and status is valid (`acfm spec status --change <name> --json`)
|
|
95
|
+
- `tasks.md` exists with actionable checkboxes
|
|
96
|
+
- Acceptance criteria are clear in artifacts
|
|
97
|
+
- Required conditional skills (if triggered) were executed
|
|
98
|
+
|
|
99
|
+
If any item fails: stop, resolve, then continue.
|
|
100
|
+
|
|
101
|
+
### Gate B: Ready to Archive
|
|
102
|
+
|
|
103
|
+
Before `openspec-archive-change`, all must be true:
|
|
104
|
+
|
|
105
|
+
- `openspec-verify-change` completed
|
|
106
|
+
- No CRITICAL findings remain
|
|
107
|
+
- Relevant tests pass for changed behavior
|
|
108
|
+
- Tasks are complete or explicitly accepted by user with warning
|
|
109
|
+
|
|
110
|
+
If any item fails: stop, fix, re-verify.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Lite Workflows
|
|
115
|
+
|
|
116
|
+
### New Change (Default Path)
|
|
117
|
+
|
|
118
|
+
1. Run `acfm-spec-workflow` checks (`acfm spec status --json`, init if needed).
|
|
119
|
+
2. Create change with `openspec-new-change` (or `openspec-ff-change` if user requests speed).
|
|
120
|
+
3. Build artifacts with `openspec-continue-change` until apply-ready.
|
|
121
|
+
4. Evaluate conditional gates and load only triggered skills.
|
|
122
|
+
5. Pass Gate A.
|
|
123
|
+
6. Implement with `openspec-apply-change`.
|
|
124
|
+
7. Verify with `openspec-verify-change`.
|
|
125
|
+
8. Pass Gate B.
|
|
126
|
+
9. Archive with `openspec-archive-change`.
|
|
127
|
+
|
|
128
|
+
### Existing Change (Default Path)
|
|
129
|
+
|
|
130
|
+
1. Confirm initialization and active changes.
|
|
131
|
+
2. Select target change.
|
|
132
|
+
3. Refresh artifact status.
|
|
133
|
+
4. Evaluate conditional gates (only load what triggers).
|
|
134
|
+
5. Pass Gate A.
|
|
135
|
+
6. Implement.
|
|
136
|
+
7. Verify.
|
|
137
|
+
8. Pass Gate B.
|
|
138
|
+
9. Archive.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Operational Rules
|
|
143
|
+
|
|
144
|
+
1. Do not load broad quality/documentation skills by default.
|
|
145
|
+
2. Do not run optional skills "just in case".
|
|
146
|
+
3. If risk increases during implementation, activate the matching conditional skill immediately.
|
|
147
|
+
4. Prefer deterministic CLI checks over narrative assumptions.
|
|
148
|
+
5. Keep outputs concise but auditable (show which gates passed/failed and why).
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Suggested Minimal Execution Template
|
|
153
|
+
|
|
154
|
+
Use this structure in each run:
|
|
155
|
+
|
|
156
|
+
1. **Change Context**
|
|
157
|
+
- Change name
|
|
158
|
+
- Current artifact progress
|
|
159
|
+
|
|
160
|
+
2. **Triggered Gates**
|
|
161
|
+
- Security: pass/fail + reason
|
|
162
|
+
- Testing: pass/fail + reason
|
|
163
|
+
- Consistency/API/UI/Performance/Context/Debug: pass/fail + reason
|
|
164
|
+
|
|
165
|
+
3. **Skills Loaded**
|
|
166
|
+
- Core: always list
|
|
167
|
+
- Conditional: list only triggered ones
|
|
168
|
+
|
|
169
|
+
4. **Gate A Status**
|
|
170
|
+
- Ready to implement: yes/no
|
|
171
|
+
|
|
172
|
+
5. **Implementation + Verify**
|
|
173
|
+
- What was implemented
|
|
174
|
+
- Verify findings summary
|
|
175
|
+
|
|
176
|
+
6. **Gate B Status**
|
|
177
|
+
- Ready to archive: yes/no
|
|
178
|
+
|
|
179
|
+
7. **Archive Result**
|
|
180
|
+
- Archive path and timestamp
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Token Strategy Summary
|
|
185
|
+
|
|
186
|
+
`ac-lite` reduces cost by replacing "load everything first" with:
|
|
187
|
+
|
|
188
|
+
- Mandatory core workflow only
|
|
189
|
+
- Risk-gated skill expansion
|
|
190
|
+
- Hard quality checkpoints at implementation and archive boundaries
|
|
191
|
+
|
|
192
|
+
This preserves software quality while avoiding unnecessary instruction/context overhead.
|
|
@@ -42,6 +42,46 @@ If you attempt to proceed without completing a required step, you MUST STOP and
|
|
|
42
42
|
| Skill | Description | Primary Use | Required Before |
|
|
43
43
|
|-------|-------------|-------------|-----------------|
|
|
44
44
|
| `acfm-spec-workflow` | **START HERE - MANDATORY** - Understand the spec-driven workflow, directory structure (.acfm/ vs openspec/), and CLI commands. Essential before using any OpenSpec skills. | Foundation | **ANYTHING ELSE** |
|
|
45
|
+
| `acfm-memory` | **AUTONOMOUS MEMORY SYSTEM** - Persistent learning system that automatically saves important decisions, patterns, bugfixes. Use to recall context from previous changes and maintain knowledge across sessions. | Knowledge persistence | **AFTER ANY SIGNIFICANT WORK** |
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Memory System (Automatic)
|
|
49
|
+
|
|
50
|
+
The AC Framework includes an **autonomous memory system** that learns from your work:
|
|
51
|
+
|
|
52
|
+
**What gets saved automatically:**
|
|
53
|
+
- Architectural decisions from proposals/designs
|
|
54
|
+
- Bugfix patterns and solutions
|
|
55
|
+
- Performance optimizations
|
|
56
|
+
- Refactoring techniques
|
|
57
|
+
- Security fixes
|
|
58
|
+
- API patterns and conventions
|
|
59
|
+
|
|
60
|
+
**How to use memory:**
|
|
61
|
+
```bash
|
|
62
|
+
# Recall relevant context before starting work
|
|
63
|
+
acfm memory recall "implementing authentication"
|
|
64
|
+
|
|
65
|
+
# Search for specific patterns
|
|
66
|
+
acfm memory search "JWT token refresh"
|
|
67
|
+
|
|
68
|
+
# Get full context for current project
|
|
69
|
+
acfm memory recall
|
|
70
|
+
|
|
71
|
+
# View statistics
|
|
72
|
+
acfm memory stats
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**When the agent saves memory (automatic):**
|
|
76
|
+
1. After completing proposal.md (saves architectural decisions)
|
|
77
|
+
2. After fixing bugs (solutions are stored)
|
|
78
|
+
3. After refactoring (techniques are recorded)
|
|
79
|
+
4. After optimizations (performance insights)
|
|
80
|
+
5. After any significant decision with confidence > 0.7
|
|
81
|
+
|
|
82
|
+
**The agent will inform you:** "💾 Memory saved: [brief description]" when auto-saving occurs.
|
|
83
|
+
|
|
84
|
+
**Privacy:** Content between `<private>...</private>` tags is automatically redacted before saving.
|
|
45
85
|
|
|
46
86
|
### OpenSpec Skills (The heart of the framework)
|
|
47
87
|
|