@prmichaelsen/remember-mcp 2.0.0 → 2.0.2
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/AGENT.md +216 -2
- package/CHANGELOG.md +28 -0
- package/agent/design/design.template.md +136 -0
- package/agent/design/requirements.template.md +387 -0
- package/agent/milestones/milestone-1-{title}.template.md +206 -0
- package/agent/patterns/bootstrap.template.md +1237 -0
- package/agent/patterns/pattern.template.md +364 -0
- package/agent/progress.template.yaml +158 -0
- package/agent/progress.yaml +43 -7
- package/agent/scripts/check-for-updates.sh +88 -0
- package/agent/scripts/uninstall.sh +75 -0
- package/agent/scripts/update.sh +75 -0
- package/agent/tasks/task-1-{title}.template.md +225 -0
- package/dist/server-factory.js +78 -12
- package/dist/server.js +78 -12
- package/dist/utils/error-handler.d.ts +40 -0
- package/package.json +1 -1
- package/src/tools/create-memory.ts +8 -2
- package/src/tools/update-memory.ts +50 -10
- package/src/utils/error-handler.ts +79 -0
package/AGENT.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Context Protocol (ACP)
|
|
2
2
|
|
|
3
3
|
**Also Known As**: The Agent Directory Pattern
|
|
4
|
-
**Version**: 1.0.
|
|
4
|
+
**Version**: 1.0.3
|
|
5
5
|
**Created**: 2026-02-11
|
|
6
6
|
**Status**: Production Pattern
|
|
7
7
|
|
|
@@ -555,10 +555,14 @@ The Agent Pattern represents a **paradigm shift** in how we approach AI-assisted
|
|
|
555
555
|
|
|
556
556
|
### Initialize Prompt
|
|
557
557
|
|
|
558
|
+
**Trigger**: `AGENT.md: Initialize`
|
|
559
|
+
|
|
558
560
|
Use this prompt when starting work on an ACP-structured project:
|
|
559
561
|
|
|
560
562
|
```markdown
|
|
561
|
-
|
|
563
|
+
First, check for ACP updates by running ./agent/scripts/check-for-updates.sh (if it exists). If updates are available, report what changed and ask if I want to update.
|
|
564
|
+
|
|
565
|
+
Then read ALL files in @agent. We are going to understand this project then work on a generic task.
|
|
562
566
|
|
|
563
567
|
Then read KEY src files per your understanding.
|
|
564
568
|
|
|
@@ -566,6 +570,7 @@ Then read @agent again, update stale @agent/tasks, stale documentation, and upda
|
|
|
566
570
|
```
|
|
567
571
|
|
|
568
572
|
**Purpose**:
|
|
573
|
+
- Checks for updates to ACP methodology and documentation
|
|
569
574
|
- Loads complete project context from agent directory
|
|
570
575
|
- Reviews source code to understand current implementation
|
|
571
576
|
- Updates documentation to reflect current state
|
|
@@ -573,6 +578,8 @@ Then read @agent again, update stale @agent/tasks, stale documentation, and upda
|
|
|
573
578
|
|
|
574
579
|
### Proceed Prompt
|
|
575
580
|
|
|
581
|
+
**Trigger**: `AGENT.md: Proceed`
|
|
582
|
+
|
|
576
583
|
Use this prompt to continue with the next task:
|
|
577
584
|
|
|
578
585
|
```markdown
|
|
@@ -584,6 +591,57 @@ Let's proceed with implementing the current or next task. Remember to update @ag
|
|
|
584
591
|
- Reminds agent to maintain progress tracking
|
|
585
592
|
- Keeps workflow focused and documented
|
|
586
593
|
|
|
594
|
+
### Update Prompt
|
|
595
|
+
|
|
596
|
+
**Trigger**: `AGENT.md: Update`
|
|
597
|
+
|
|
598
|
+
Updates all ACP files to the latest version:
|
|
599
|
+
|
|
600
|
+
```markdown
|
|
601
|
+
Run ./agent/scripts/update.sh to update all ACP files (AGENT.md, templates, and scripts) to the latest version.
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
**Purpose**:
|
|
605
|
+
- Updates AGENT.md methodology
|
|
606
|
+
- Updates all template files
|
|
607
|
+
- Updates utility scripts
|
|
608
|
+
- Keeps ACP current with latest improvements
|
|
609
|
+
|
|
610
|
+
### Check for Updates Prompt
|
|
611
|
+
|
|
612
|
+
**Trigger**: `AGENT.md: Check for updates`
|
|
613
|
+
|
|
614
|
+
Checks if updates are available without applying them:
|
|
615
|
+
|
|
616
|
+
```markdown
|
|
617
|
+
Run ./agent/scripts/check-for-updates.sh to see if ACP updates are available.
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
**Purpose**:
|
|
621
|
+
- Non-destructive check for updates
|
|
622
|
+
- Shows what changed via CHANGELOG
|
|
623
|
+
- Informs user of available improvements
|
|
624
|
+
|
|
625
|
+
### Uninstall Prompt
|
|
626
|
+
|
|
627
|
+
**Trigger**: `AGENT.md: Uninstall`
|
|
628
|
+
|
|
629
|
+
Removes all ACP files from the project:
|
|
630
|
+
|
|
631
|
+
```markdown
|
|
632
|
+
Run ./agent/scripts/uninstall.sh to remove all ACP files (agent/ directory and AGENT.md) from this project.
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
**Note**: This script requires user confirmation. If the user confirms they want to uninstall, run:
|
|
636
|
+
```bash
|
|
637
|
+
./agent/scripts/uninstall.sh -y
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
**Purpose**:
|
|
641
|
+
- Complete removal of ACP
|
|
642
|
+
- Clean project state
|
|
643
|
+
- Reversible via git
|
|
644
|
+
|
|
587
645
|
---
|
|
588
646
|
|
|
589
647
|
## Instructions for Future Agents
|
|
@@ -724,6 +782,17 @@ Let's proceed with implementing the current or next task. Remember to update @ag
|
|
|
724
782
|
- Update percentages
|
|
725
783
|
- Add recent work notes
|
|
726
784
|
|
|
785
|
+
7. **NEVER handle secrets or sensitive data**
|
|
786
|
+
- ❌ **DO NOT** read `.env` files, `.env.local`, or any environment files
|
|
787
|
+
- ❌ **DO NOT** read files containing API keys, tokens, passwords, or credentials
|
|
788
|
+
- ❌ **DO NOT** include secrets in messages, documentation, or code examples
|
|
789
|
+
- ❌ **DO NOT** read files like `secrets.yaml`, `credentials.json`, or similar
|
|
790
|
+
- ✅ **DO** use placeholder values like `YOUR_API_KEY_HERE` in examples
|
|
791
|
+
- ✅ **DO** document that users need to configure secrets separately
|
|
792
|
+
- ✅ **DO** reference environment variable names without reading their values
|
|
793
|
+
- ✅ **DO** create `.env.example` files with placeholder values only
|
|
794
|
+
- **Rationale**: Secrets must never be exposed in chat logs, documentation, or version control. Agents should treat all credential files as off-limits to prevent accidental exposure.
|
|
795
|
+
|
|
727
796
|
---
|
|
728
797
|
|
|
729
798
|
## Best Practices
|
|
@@ -804,6 +873,28 @@ Let's proceed with implementing the current or next task. Remember to update @ag
|
|
|
804
873
|
|
|
805
874
|
---
|
|
806
875
|
|
|
876
|
+
## Keeping ACP Updated
|
|
877
|
+
|
|
878
|
+
This repository is actively maintained with improvements to the ACP methodology and documentation. To keep your project's AGENT.md current:
|
|
879
|
+
|
|
880
|
+
```bash
|
|
881
|
+
# Run from your project root (if you have the update script installed)
|
|
882
|
+
./agent/scripts/update.sh
|
|
883
|
+
|
|
884
|
+
# Or download and run directly
|
|
885
|
+
curl -fsSL https://raw.githubusercontent.com/prmichaelsen/agent-context-protocol/mainlin./agent/scripts/update.sh | bash
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
The update script will:
|
|
889
|
+
1. Create a backup of your current AGENT.md
|
|
890
|
+
2. Download the latest version
|
|
891
|
+
3. Show you the changes
|
|
892
|
+
4. Ask for confirmation before applying
|
|
893
|
+
|
|
894
|
+
See [CHANGELOG.md](https://github.com/prmichaelsen/agent-context-protocol/blob/main/CHANGELOG.md) for version history and changes.
|
|
895
|
+
|
|
896
|
+
---
|
|
897
|
+
|
|
807
898
|
## Conclusion
|
|
808
899
|
|
|
809
900
|
The Agent Directory Pattern transforms software development from an implicit, memory-dependent process into an explicit, documented system that enables AI agents to work effectively on complex projects.
|
|
@@ -833,6 +924,129 @@ The Agent Directory Pattern transforms software development from an implicit, me
|
|
|
833
924
|
|
|
834
925
|
---
|
|
835
926
|
|
|
927
|
+
## What NOT to Do
|
|
928
|
+
|
|
929
|
+
### ❌ CRITICAL: Don't Create Summary Documents
|
|
930
|
+
|
|
931
|
+
**NEVER create these files under ANY circumstances:**
|
|
932
|
+
- `TASK_SUMMARY.md`
|
|
933
|
+
- `PROJECT_SUMMARY.md`
|
|
934
|
+
- `MILESTONE_SUMMARY.md`
|
|
935
|
+
- `PROGRESS_SUMMARY.md`
|
|
936
|
+
- Any file with `SUMMARY` in the name
|
|
937
|
+
|
|
938
|
+
**Why**: All summary information belongs in [`progress.yaml`](agent/progress.yaml). Creating separate summary documents:
|
|
939
|
+
- Duplicates information
|
|
940
|
+
- Creates inconsistency
|
|
941
|
+
- Requires maintaining multiple files
|
|
942
|
+
- Defeats the purpose of structured progress tracking
|
|
943
|
+
|
|
944
|
+
**Instead**: Update [`progress.yaml`](agent/progress.yaml):
|
|
945
|
+
```yaml
|
|
946
|
+
recent_work:
|
|
947
|
+
- date: 2026-02-13
|
|
948
|
+
description: Summary of work completed
|
|
949
|
+
items:
|
|
950
|
+
- ✅ Completed task 1
|
|
951
|
+
- ✅ Completed task 2
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
### ❌ CRITICAL: Don't Create Variant Task Documents
|
|
955
|
+
|
|
956
|
+
**NEVER create these files under ANY circumstances:**
|
|
957
|
+
- `task-1-simplified.md`
|
|
958
|
+
- `task-1-revised.md`
|
|
959
|
+
- `task-1-v2.md`
|
|
960
|
+
- `task-1-updated.md`
|
|
961
|
+
- `task-1-alternative.md`
|
|
962
|
+
|
|
963
|
+
**Why**: Task documents are living documents that should be updated in place. Creating variants:
|
|
964
|
+
- Creates confusion about which is current
|
|
965
|
+
- Scatters information across multiple files
|
|
966
|
+
- Makes progress tracking impossible
|
|
967
|
+
- Violates single source of truth principle
|
|
968
|
+
|
|
969
|
+
**Instead**: Modify the existing task document directly:
|
|
970
|
+
```markdown
|
|
971
|
+
# Task 1: Setup Project
|
|
972
|
+
|
|
973
|
+
**Status**: In Progress (Updated 2026-02-13)
|
|
974
|
+
|
|
975
|
+
## Steps
|
|
976
|
+
1. Create directory ✅ (Completed)
|
|
977
|
+
2. Install dependencies ✅ (Completed)
|
|
978
|
+
3. Configure build (Updated: Changed from webpack to esbuild)
|
|
979
|
+
|
|
980
|
+
## Notes
|
|
981
|
+
- Originally planned to use webpack
|
|
982
|
+
- Switched to esbuild for better performance
|
|
983
|
+
- Updated configuration accordingly
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
### ✅ Correct Approach
|
|
987
|
+
|
|
988
|
+
1. **For summaries**: Update [`progress.yaml`](agent/progress.yaml)
|
|
989
|
+
2. **For task changes**: Modify existing task documents in place
|
|
990
|
+
3. **For major changes**: Update the task and note the changes in [`progress.yaml`](agent/progress.yaml)
|
|
991
|
+
4. **For new work**: Create new task documents with new numbers
|
|
992
|
+
|
|
993
|
+
---
|
|
994
|
+
|
|
995
|
+
## IMPORTANT: CHANGELOG.md Guidelines
|
|
996
|
+
|
|
997
|
+
### ❌ CRITICAL: Keep CHANGELOG.md Pure
|
|
998
|
+
|
|
999
|
+
**CHANGELOG.md must ONLY contain:**
|
|
1000
|
+
- Version numbers and dates
|
|
1001
|
+
- Added features
|
|
1002
|
+
- Changed functionality
|
|
1003
|
+
- Removed features
|
|
1004
|
+
- Fixed bugs
|
|
1005
|
+
|
|
1006
|
+
**NEVER include in CHANGELOG.md:**
|
|
1007
|
+
- ❌ Future enhancements or roadmap
|
|
1008
|
+
- ❌ How-to instructions or usage guides
|
|
1009
|
+
- ❌ Installation instructions
|
|
1010
|
+
- ❌ Configuration examples
|
|
1011
|
+
- ❌ Detailed documentation
|
|
1012
|
+
|
|
1013
|
+
**Why**: CHANGELOG.md is a historical record of what changed, not a documentation file. Mixing concerns makes it harder to:
|
|
1014
|
+
- Understand version history
|
|
1015
|
+
- Track actual changes
|
|
1016
|
+
- Maintain the changelog
|
|
1017
|
+
- Find relevant information
|
|
1018
|
+
|
|
1019
|
+
**Correct CHANGELOG.md format:**
|
|
1020
|
+
```markdown
|
|
1021
|
+
## [1.0.4] - 2026-02-13
|
|
1022
|
+
|
|
1023
|
+
### Added
|
|
1024
|
+
- New feature X
|
|
1025
|
+
- New feature Y
|
|
1026
|
+
|
|
1027
|
+
### Changed
|
|
1028
|
+
- Modified behavior of Z
|
|
1029
|
+
|
|
1030
|
+
### Removed
|
|
1031
|
+
- Deprecated feature A
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
**Wrong CHANGELOG.md format:**
|
|
1035
|
+
```markdown
|
|
1036
|
+
## [1.0.4] - 2026-02-13
|
|
1037
|
+
|
|
1038
|
+
### Added
|
|
1039
|
+
- New feature X
|
|
1040
|
+
|
|
1041
|
+
### How to Use Feature X
|
|
1042
|
+
[Installation instructions...] # ❌ WRONG - belongs in README
|
|
1043
|
+
|
|
1044
|
+
### Future Enhancements
|
|
1045
|
+
- Plan to add Y # ❌ WRONG - belongs in design docs or issues
|
|
1046
|
+
```
|
|
1047
|
+
|
|
1048
|
+
---
|
|
1049
|
+
|
|
836
1050
|
**The Agent Pattern is not just documentation—it's a development methodology that makes complex software projects tractable for AI agents.**
|
|
837
1051
|
|
|
838
1052
|
---
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.1] - 2026-02-14
|
|
9
|
+
|
|
10
|
+
### 🐛 Fixed
|
|
11
|
+
|
|
12
|
+
- **Error Reporting**: Improved error logging in `remember_update_memory` for better debugging
|
|
13
|
+
- Added detailed error context including userId, memoryId, and provided fields
|
|
14
|
+
- Added stack traces to error messages for easier troubleshooting
|
|
15
|
+
- Added specific error handling for fetch and update operations
|
|
16
|
+
- Errors now include collection name and operation details
|
|
17
|
+
- Helps diagnose production issues in Cloud Run logs
|
|
18
|
+
|
|
19
|
+
### 📝 Changes
|
|
20
|
+
|
|
21
|
+
- Error messages now include full context for debugging
|
|
22
|
+
- Separate try-catch blocks for fetch and update operations
|
|
23
|
+
- Better structured logging with error details
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## [2.0.0] - 2026-02-12
|
|
28
|
+
|
|
29
|
+
### 🚨 BREAKING CHANGES
|
|
30
|
+
|
|
31
|
+
- **`createServer` is now async**: The factory function now returns `Promise<Server>` instead of `Server`
|
|
32
|
+
- Same breaking change as v1.0.0, but bumped to v2.0.0 for clarity
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
8
36
|
## [1.0.2] - 2026-02-12
|
|
9
37
|
|
|
10
38
|
### 🐛 Fixed
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# {Feature/Pattern Name}
|
|
2
|
+
|
|
3
|
+
**Concept**: [One-line description of what this design addresses]
|
|
4
|
+
**Created**: YYYY-MM-DD
|
|
5
|
+
**Status**: Proposal | Design Specification | Implemented
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
[High-level description of what this design document covers and why it exists. Provide context about the problem space and the importance of this design decision.]
|
|
12
|
+
|
|
13
|
+
**Example**: "This document describes the authentication flow for multi-tenant access, enabling secure per-user data isolation across the system."
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Problem Statement
|
|
18
|
+
|
|
19
|
+
[Clearly articulate the problem this design solves. Include:]
|
|
20
|
+
- What challenge or limitation exists?
|
|
21
|
+
- Why is this a problem worth solving?
|
|
22
|
+
- What are the consequences of not solving it?
|
|
23
|
+
|
|
24
|
+
**Example**: "Without proper multi-tenant isolation, users could potentially access each other's data, creating security vulnerabilities and privacy concerns."
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Solution
|
|
29
|
+
|
|
30
|
+
[Describe the proposed solution at a conceptual level. Include:]
|
|
31
|
+
- High-level approach
|
|
32
|
+
- Key components involved
|
|
33
|
+
- How the solution addresses the problem
|
|
34
|
+
- Alternative approaches considered (and why they were rejected)
|
|
35
|
+
|
|
36
|
+
**Example**: "Implement row-level security using user_id as a tenant identifier, enforced at both the database and application layers."
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Implementation
|
|
41
|
+
|
|
42
|
+
[Provide technical details needed to implement this design. Include:]
|
|
43
|
+
- Architecture diagrams (as ASCII art or references)
|
|
44
|
+
- Data structures and schemas
|
|
45
|
+
- API interfaces
|
|
46
|
+
- Code examples (use placeholder names)
|
|
47
|
+
- Configuration requirements
|
|
48
|
+
- Dependencies
|
|
49
|
+
|
|
50
|
+
**Example**:
|
|
51
|
+
```typescript
|
|
52
|
+
interface TenantContext {
|
|
53
|
+
userId: string;
|
|
54
|
+
permissions: string[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class DataService {
|
|
58
|
+
constructor(private context: TenantContext) {}
|
|
59
|
+
|
|
60
|
+
async getData(id: string): Promise<Data> {
|
|
61
|
+
// Implementation with tenant filtering
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Benefits
|
|
69
|
+
|
|
70
|
+
[List the advantages of this approach:]
|
|
71
|
+
- Benefit 1: [Description]
|
|
72
|
+
- Benefit 2: [Description]
|
|
73
|
+
- Benefit 3: [Description]
|
|
74
|
+
|
|
75
|
+
**Example**:
|
|
76
|
+
- **Security**: Complete data isolation between tenants
|
|
77
|
+
- **Scalability**: Horizontal scaling without data mixing concerns
|
|
78
|
+
- **Compliance**: Meets data privacy regulations (GDPR, etc.)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Trade-offs
|
|
83
|
+
|
|
84
|
+
[Honestly assess the downsides and limitations:]
|
|
85
|
+
- Trade-off 1: [Description and mitigation strategy]
|
|
86
|
+
- Trade-off 2: [Description and mitigation strategy]
|
|
87
|
+
- Trade-off 3: [Description and mitigation strategy]
|
|
88
|
+
|
|
89
|
+
**Example**:
|
|
90
|
+
- **Performance**: Additional filtering adds query overhead (mitigated by proper indexing)
|
|
91
|
+
- **Complexity**: More complex queries and testing requirements
|
|
92
|
+
- **Migration**: Existing data requires backfill with tenant identifiers
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Dependencies
|
|
97
|
+
|
|
98
|
+
[List any dependencies this design has:]
|
|
99
|
+
- External services or APIs
|
|
100
|
+
- Other design documents
|
|
101
|
+
- Infrastructure requirements
|
|
102
|
+
- Third-party libraries
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Testing Strategy
|
|
107
|
+
|
|
108
|
+
[Describe how to verify this design works correctly:]
|
|
109
|
+
- Unit test requirements
|
|
110
|
+
- Integration test scenarios
|
|
111
|
+
- Security test cases
|
|
112
|
+
- Performance benchmarks
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Migration Path
|
|
117
|
+
|
|
118
|
+
[If this changes existing functionality, describe the migration strategy:]
|
|
119
|
+
1. Step 1: [Description]
|
|
120
|
+
2. Step 2: [Description]
|
|
121
|
+
3. Step 3: [Description]
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Future Considerations
|
|
126
|
+
|
|
127
|
+
[Note any future enhancements or related work:]
|
|
128
|
+
- Future enhancement 1
|
|
129
|
+
- Future enhancement 2
|
|
130
|
+
- Related design documents to create
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
**Status**: [Current implementation status]
|
|
135
|
+
**Recommendation**: [What should be done next - implement, review, revise, etc.]
|
|
136
|
+
**Related Documents**: [Links to related design docs, milestones, or tasks]
|