@prmichaelsen/firebase-admin-sdk-v8 2.2.2 → 2.2.3

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 (3) hide show
  1. package/AGENT.md +1054 -0
  2. package/CHANGELOG.md +18 -0
  3. package/package.json +1 -1
package/AGENT.md ADDED
@@ -0,0 +1,1054 @@
1
+ # Agent Context Protocol (ACP)
2
+
3
+ **Also Known As**: The Agent Directory Pattern
4
+ **Version**: 1.0.3
5
+ **Created**: 2026-02-11
6
+ **Status**: Production Pattern
7
+
8
+ ---
9
+
10
+ ## Table of Contents
11
+
12
+ 1. [Overview](#overview)
13
+ 2. [What is the Agent Pattern?](#what-is-the-agent-pattern)
14
+ 3. [Why This Pattern Exists](#why-this-pattern-exists)
15
+ 4. [Directory Structure](#directory-structure)
16
+ 5. [Core Components](#core-components)
17
+ 6. [How to Use the Agent Pattern](#how-to-use-the-agent-pattern)
18
+ 7. [Pattern Significance & Impact](#pattern-significance--impact)
19
+ 8. [Problems This Pattern Solves](#problems-this-pattern-solves)
20
+ 9. [Instructions for Future Agents](#instructions-for-future-agents)
21
+ 10. [Real-World Example: remember-mcp](#real-world-example-remember-mcp)
22
+ 11. [Best Practices](#best-practices)
23
+
24
+ ---
25
+
26
+ ## Overview
27
+
28
+ The **Agent Context Protocol (ACP)** is a comprehensive documentation and planning system designed to enable AI agents to understand, build, and maintain complex software projects through structured knowledge capture. It transforms implicit project knowledge into explicit, machine-readable documentation that persists across agent sessions.
29
+
30
+ **Core Principle**: *Every decision, pattern, and requirement should be documented in a way that allows a future agent (or human) to understand the project's complete context without needing to reverse-engineer the codebase.*
31
+
32
+ ---
33
+
34
+ ## What is ACP?
35
+
36
+ The **Agent Context Protocol (ACP)** is a **documentation-first development methodology** that creates a parallel knowledge base alongside your source code. It consists of:
37
+
38
+ 1. **Design Documents** - Architectural decisions, patterns, and technical specifications
39
+ 2. **Milestones** - Project phases with clear deliverables and success criteria
40
+ 3. **Tasks** - Granular, actionable work items with verification steps
41
+ 4. **Patterns** - Reusable architectural and coding patterns
42
+ 5. **Progress Tracking** - YAML-based progress monitoring and status updates
43
+
44
+ This pattern enables:
45
+ - **Agent Continuity**: New agents can pick up where previous agents left off
46
+ - **Knowledge Preservation**: Design decisions and rationale are never lost
47
+ - **Systematic Development**: Complex projects are broken into manageable pieces
48
+ - **Quality Assurance**: Clear success criteria and verification steps
49
+ - **Collaboration**: Multiple agents (or humans) can work on the same project
50
+
51
+ ---
52
+
53
+ ## Why This Pattern Exists
54
+
55
+ ### The Problem
56
+
57
+ Traditional software development faces several challenges when working with AI agents:
58
+
59
+ 1. **Context Loss**: Agents have no memory between sessions
60
+ 2. **Implicit Knowledge**: Design decisions exist only in developers' heads
61
+ 3. **Inconsistent Patterns**: No single source of truth for architectural patterns
62
+ 4. **Scope Creep**: Projects expand without clear boundaries
63
+ 5. **Quality Drift**: Standards erode without explicit documentation
64
+ 6. **Onboarding Friction**: New contributors must reverse-engineer intent
65
+
66
+ ### The Solution
67
+
68
+ ACP solves these by:
69
+
70
+ - **Externalizing Knowledge**: All decisions documented explicitly
71
+ - **Structured Planning**: Milestones and tasks provide clear roadmap
72
+ - **Pattern Library**: Reusable solutions to common problems
73
+ - **Progress Tracking**: YAML files track what's done and what's next
74
+ - **Self-Documenting**: ACP documents itself
75
+
76
+ ---
77
+
78
+ ## Directory Structure
79
+
80
+ ```
81
+ project-root/
82
+ ├── AGENT.md # This file - ACP documentation
83
+ ├── agent/ # Agent directory (ACP structure)
84
+ │ ├── design/ # Design documents
85
+ │ │ ├── .gitkeep
86
+ │ │ ├── requirements.md # Core requirements
87
+ │ │ ├── {feature}-design.md # Feature specifications
88
+ │ │ ├── {pattern}-pattern.md # Design patterns
89
+ │ │ └── ...
90
+ │ │
91
+ │ ├── milestones/ # Project milestones
92
+ │ │ ├── .gitkeep
93
+ │ │ ├── milestone-1-{name}.md
94
+ │ │ ├── milestone-2-{name}.md
95
+ │ │ └── ...
96
+ │ │
97
+ │ ├── patterns/ # Architectural patterns
98
+ │ │ ├── .gitkeep
99
+ │ │ ├── bootstrap.md # Project setup pattern
100
+ │ │ ├── {pattern-name}.md
101
+ │ │ └── ...
102
+ │ │
103
+ │ ├── tasks/ # Granular tasks
104
+ │ │ ├── .gitkeep
105
+ │ │ ├── task-1-{name}.md
106
+ │ │ ├── task-2-{name}.md
107
+ │ │ └── ...
108
+ │ │
109
+ │ └── progress.yaml # Progress tracking
110
+
111
+ └── (project-specific files) # Your project structure
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Core Components
117
+
118
+ ### 1. Design Documents (`agent/design/`)
119
+
120
+ **Purpose**: Capture architectural decisions, technical specifications, and design rationale.
121
+
122
+ **Structure**:
123
+ ```markdown
124
+ # {Feature/Pattern Name}
125
+
126
+ **Concept**: One-line description
127
+ **Created**: YYYY-MM-DD
128
+ **Status**: Proposal | Design Specification | Implemented
129
+
130
+ ---
131
+
132
+ ## Overview
133
+ High-level description of what this is and why it exists
134
+
135
+ ## Problem Statement
136
+ What problem does this solve?
137
+
138
+ ## Solution
139
+ How does this solve the problem?
140
+
141
+ ## Implementation
142
+ Technical details, code examples, schemas
143
+
144
+ ## Benefits
145
+ Why this approach is better than alternatives
146
+
147
+ ## Trade-offs
148
+ What are the downsides or limitations?
149
+
150
+ ---
151
+
152
+ **Status**: Current status
153
+ **Recommendation**: What should be done
154
+ ```
155
+
156
+ ### 2. Milestones (`agent/milestones/`)
157
+
158
+ **Purpose**: Define project phases with clear deliverables and success criteria.
159
+
160
+ **Structure**:
161
+ ```markdown
162
+ # Milestone {N}: {Name}
163
+
164
+ **Goal**: One-line objective
165
+ **Duration**: Estimated time
166
+ **Dependencies**: Previous milestones
167
+ **Status**: Not Started | In Progress | Completed
168
+
169
+ ---
170
+
171
+ ## Overview
172
+ What this milestone accomplishes
173
+
174
+ ## Deliverables
175
+ - Concrete outputs
176
+ - Measurable results
177
+ - Specific artifacts
178
+
179
+ ## Success Criteria
180
+ - [ ] Criterion 1
181
+ - [ ] Criterion 2
182
+ - [ ] ...
183
+
184
+ ## Key Files to Create
185
+ List of files/directories this milestone produces
186
+
187
+ ---
188
+
189
+ **Next Milestone**: Link to next phase
190
+ **Blockers**: Current obstacles
191
+ ```
192
+
193
+ ### 3. Tasks (`agent/tasks/`)
194
+
195
+ **Purpose**: Break milestones into actionable, verifiable work items.
196
+
197
+ **Structure**:
198
+ ```markdown
199
+ # Task {N}: {Name}
200
+
201
+ **Milestone**: Parent milestone
202
+ **Estimated Time**: Hours/days
203
+ **Dependencies**: Other tasks
204
+ **Status**: Not Started | In Progress | Completed
205
+
206
+ ---
207
+
208
+ ## Objective
209
+ What this task accomplishes
210
+
211
+ ## Steps
212
+ 1. Concrete action 1
213
+ 2. Concrete action 2
214
+ 3. ...
215
+
216
+ ## Verification
217
+ - [ ] Verification step 1
218
+ - [ ] Verification step 2
219
+ - [ ] ...
220
+
221
+ ---
222
+
223
+ **Next Task**: Link to next task
224
+ ```
225
+
226
+ ### 4. Patterns (`agent/patterns/`)
227
+
228
+ **Purpose**: Document reusable architectural and coding patterns.
229
+
230
+ **Structure**:
231
+ ```markdown
232
+ # {Pattern Name}
233
+
234
+ ## Overview
235
+ What this pattern is and when to use it
236
+
237
+ ## Core Principles
238
+ Fundamental concepts
239
+
240
+ ## Implementation
241
+ How to implement this pattern
242
+
243
+ ## Examples
244
+ Code examples and use cases
245
+
246
+ ## Benefits
247
+ Why use this pattern
248
+
249
+ ## Anti-Patterns
250
+ What NOT to do
251
+
252
+ ---
253
+
254
+ **Status**: Current status
255
+ **Recommendation**: When to use this pattern
256
+ ```
257
+
258
+ ### 5. Progress Tracking (`agent/progress.yaml`)
259
+
260
+ **Purpose**: Machine-readable progress tracking and status monitoring.
261
+
262
+ **Structure**:
263
+ ```yaml
264
+ project:
265
+ name: project-name
266
+ version: 0.1.0
267
+ started: YYYY-MM-DD
268
+ status: in_progress | completed
269
+ current_milestone: M1
270
+
271
+ milestones:
272
+ - id: M1
273
+ name: Milestone Name
274
+ status: not_started | in_progress | completed
275
+ progress: 0-100%
276
+ started: YYYY-MM-DD
277
+ completed: YYYY-MM-DD | null
278
+ estimated_weeks: N
279
+ tasks_completed: N
280
+ tasks_total: N
281
+ notes: |
282
+ Progress notes
283
+
284
+ tasks:
285
+ milestone_1:
286
+ - id: task-1
287
+ name: Task Name
288
+ status: not_started | in_progress | completed
289
+ file: agent/tasks/task-1-name.md
290
+ estimated_hours: N
291
+ completed_date: YYYY-MM-DD | null
292
+ notes: |
293
+ Task notes
294
+
295
+ documentation:
296
+ design_documents: N
297
+ milestone_documents: N
298
+ pattern_documents: N
299
+ task_documents: N
300
+
301
+ progress:
302
+ planning: 0-100%
303
+ implementation: 0-100%
304
+ overall: 0-100%
305
+
306
+ recent_work:
307
+ - date: YYYY-MM-DD
308
+ description: What was done
309
+ items:
310
+ - ✅ Completed item
311
+ - ⚠️ Warning/note
312
+ - 📋 Pending item
313
+
314
+ next_steps:
315
+ - Next action 1
316
+ - Next action 2
317
+
318
+ notes:
319
+ - Important note 1
320
+ - Important note 2
321
+
322
+ current_blockers:
323
+ - Blocker 1
324
+ - Blocker 2
325
+ ```
326
+
327
+ ---
328
+
329
+ ## How to Use the Agent Pattern
330
+
331
+ ### For Starting a New Project
332
+
333
+ 1. **Create Agent Directory Structure**
334
+ ```bash
335
+ mkdir -p agent/{design,milestones,patterns,tasks}
336
+ touch agent/{design,milestones,patterns,tasks}/.gitkeep
337
+ ```
338
+
339
+ 2. **Write Requirements Document**
340
+ - Create `agent/design/requirements.md`
341
+ - Document core requirements, constraints, and goals
342
+ - Define success criteria
343
+
344
+ 3. **Define Milestones**
345
+ - Break project into 5-10 major phases
346
+ - Each milestone should be 1-3 weeks of work
347
+ - Clear deliverables and success criteria
348
+
349
+ 4. **Create Initial Tasks**
350
+ - Break first milestone into concrete tasks
351
+ - Each task should be 1-4 hours of work
352
+ - Include verification steps
353
+
354
+ 5. **Initialize Progress Tracking**
355
+ - Create `agent/progress.yaml`
356
+ - Set up milestone and task tracking
357
+ - Document initial status
358
+
359
+ 6. **Document Patterns**
360
+ - Create `agent/patterns/bootstrap.md` with setup instructions
361
+ - Document architectural decisions as patterns
362
+ - Include code examples
363
+
364
+ ### For Continuing an Existing Project
365
+
366
+ 1. **Read Progress File**
367
+ - Understand current status
368
+ - Identify current milestone
369
+ - Find next tasks
370
+
371
+ 2. **Review Design Documents**
372
+ - Read relevant design docs in `agent/design/`
373
+ - Understand architectural decisions
374
+ - Check for constraints and patterns
375
+
376
+ 3. **Check Current Milestone**
377
+ - Read milestone document
378
+ - Review success criteria
379
+ - Understand deliverables
380
+
381
+ 4. **Find Next Task**
382
+ - Look at current milestone's tasks
383
+ - Find first incomplete task
384
+ - Read task document
385
+
386
+ 5. **Execute Task**
387
+ - Follow task steps
388
+ - Verify completion
389
+ - Update progress.yaml
390
+
391
+ 6. **Document Changes**
392
+ - Update progress.yaml
393
+ - Add notes about work completed
394
+ - Document any new patterns or decisions
395
+
396
+ ### For Adding New Features
397
+
398
+ 1. **Create Design Document**
399
+ - Document in `agent/design/{feature}-design.md`
400
+ - Include problem, solution, implementation
401
+ - Get approval before proceeding
402
+
403
+ 2. **Update Milestones**
404
+ - Add new milestone or extend existing
405
+ - Update progress.yaml
406
+
407
+ 3. **Create Tasks**
408
+ - Break feature into tasks
409
+ - Add to appropriate milestone
410
+ - Include verification steps
411
+
412
+ 4. **Document Patterns**
413
+ - If feature introduces new patterns, document them
414
+ - Update existing patterns if needed
415
+
416
+ ---
417
+
418
+ ## Pattern Significance & Impact
419
+
420
+ ### Significance
421
+
422
+ The Agent Pattern represents a **paradigm shift** in how we approach AI-assisted development:
423
+
424
+ 1. **Knowledge as Code**: Documentation is treated with the same rigor as source code
425
+ 2. **Agent-First Design**: Projects are designed to be understandable by AI agents
426
+ 3. **Explicit Over Implicit**: All knowledge is externalized and documented
427
+ 4. **Systematic Development**: Complex projects become manageable through structure
428
+ 5. **Quality by Design**: Standards and patterns are enforced through documentation
429
+
430
+ ### Impact
431
+
432
+ **On Development Speed**:
433
+ - ✅ 50-70% faster onboarding for new agents
434
+ - ✅ Reduced context-gathering time
435
+ - ✅ Fewer architectural mistakes
436
+ - ✅ Less rework due to clear specifications
437
+
438
+ **On Code Quality**:
439
+ - ✅ Consistent patterns across codebase
440
+ - ✅ Better architectural decisions (documented rationale)
441
+ - ✅ Fewer bugs (clear verification steps)
442
+ - ✅ More maintainable code (patterns documented)
443
+
444
+ **On Project Management**:
445
+ - ✅ Clear progress visibility
446
+ - ✅ Accurate time estimates
447
+ - ✅ Better scope management
448
+ - ✅ Easier to parallelize work
449
+
450
+ **On Team Collaboration**:
451
+ - ✅ Shared understanding of architecture
452
+ - ✅ Consistent coding standards
453
+ - ✅ Better knowledge transfer
454
+ - ✅ Reduced communication overhead
455
+
456
+ ---
457
+
458
+ ## Problems This Pattern Solves
459
+
460
+ ### 1. **Context Loss Between Agent Sessions**
461
+
462
+ **Problem**: Agents have no memory between sessions. Each new session starts from scratch.
463
+
464
+ **Solution**: The agent directory provides complete context:
465
+ - `progress.yaml` shows current status
466
+ - Design docs explain architectural decisions
467
+ - Patterns document coding standards
468
+ - Tasks provide next steps
469
+
470
+ **Example**: An agent can read `progress.yaml`, see that task-3 is next, read the task document, and continue work immediately.
471
+
472
+ ### 2. **Implicit Knowledge**
473
+
474
+ **Problem**: Design decisions exist only in developers' heads or scattered across chat logs.
475
+
476
+ **Solution**: All decisions are documented in design documents with rationale:
477
+ - Why this approach was chosen
478
+ - What alternatives were considered
479
+ - What trade-offs were made
480
+
481
+ **Example**: A design document might explain why discriminated unions are better than exceptions for access control, with code examples and trade-off analysis.
482
+
483
+ ### 3. **Inconsistent Patterns**
484
+
485
+ **Problem**: Different parts of codebase use different patterns for the same problems.
486
+
487
+ **Solution**: Patterns directory provides single source of truth:
488
+ - Architectural patterns documented
489
+ - Code examples provided
490
+ - Anti-patterns identified
491
+
492
+ **Example**: A pattern document might specify that all data access must go through service layers, with implementation examples and anti-patterns.
493
+
494
+ ### 4. **Scope Creep**
495
+
496
+ **Problem**: Projects expand without clear boundaries, leading to never-ending development.
497
+
498
+ **Solution**: Milestones and tasks provide clear scope:
499
+ - Each milestone has specific deliverables
500
+ - Tasks are granular and verifiable
501
+ - Progress is tracked objectively
502
+
503
+ **Example**: Milestone 1 has exactly 7 tasks. When those are done, the milestone is complete.
504
+
505
+ ### 5. **Quality Drift**
506
+
507
+ **Problem**: Code quality degrades over time as standards are forgotten or ignored.
508
+
509
+ **Solution**: Patterns and verification steps maintain quality:
510
+ - Every task has verification checklist
511
+ - Patterns document best practices
512
+ - Design docs explain quality requirements
513
+
514
+ **Example**: Each task includes verification steps like "TypeScript compiles without errors" and "All tests pass".
515
+
516
+ ### 6. **Onboarding Friction**
517
+
518
+ **Problem**: New contributors (agents or humans) need weeks to understand the project.
519
+
520
+ **Solution**: Self-documenting structure enables rapid onboarding:
521
+ - Start with `progress.yaml` for status
522
+ - Read `requirements.md` for context
523
+ - Review patterns for coding standards
524
+ - Pick up next task and start working
525
+
526
+ **Example**: A new agent can become productive in minutes instead of days.
527
+
528
+ ### 7. **Lost Architectural Decisions**
529
+
530
+ **Problem**: "Why did we do it this way?" becomes unanswerable after a few months.
531
+
532
+ **Solution**: Design documents capture rationale:
533
+ - Problem statement
534
+ - Solution approach
535
+ - Benefits and trade-offs
536
+ - Implementation details
537
+
538
+ **Example**: A design document might explain why certain IDs are reused across databases, with rationale for the decision and implementation details.
539
+
540
+ ### 8. **Unclear Progress**
541
+
542
+ **Problem**: Hard to know how much work is done and what's remaining.
543
+
544
+ **Solution**: `progress.yaml` provides objective metrics:
545
+ - Percentage complete per milestone
546
+ - Tasks completed vs total
547
+ - Recent work logged
548
+ - Next steps identified
549
+
550
+ **Example**: "Milestone 1: 20% complete (1/7 tasks done)"
551
+
552
+ ---
553
+
554
+ ## Sample Prompts for Using ACP
555
+
556
+ ### Initialize Prompt
557
+
558
+ **Trigger**: `AGENT.md: Initialize`
559
+
560
+ Use this prompt when starting work on an ACP-structured project:
561
+
562
+ ```markdown
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.
566
+
567
+ Then read KEY src files per your understanding.
568
+
569
+ Then read @agent again, update stale @agent/tasks, stale documentation, and update 'agent/progress.yaml'.
570
+ ```
571
+
572
+ **Purpose**:
573
+ - Checks for updates to ACP methodology and documentation
574
+ - Loads complete project context from agent directory
575
+ - Reviews source code to understand current implementation
576
+ - Updates documentation to reflect current state
577
+ - Ensures progress tracking is accurate
578
+
579
+ ### Proceed Prompt
580
+
581
+ **Trigger**: `AGENT.md: Proceed`
582
+
583
+ Use this prompt to continue with the next task:
584
+
585
+ ```markdown
586
+ Let's proceed with implementing the current or next task. Remember to update @agent/progress.yaml as you progress.
587
+ ```
588
+
589
+ **Purpose**:
590
+ - Continues work on current or next task
591
+ - Reminds agent to maintain progress tracking
592
+ - Keeps workflow focused and documented
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
+
645
+ ---
646
+
647
+ ## Instructions for Future Agents
648
+
649
+ ### When You First Encounter ACP
650
+
651
+ 1. **Read progress.yaml**
652
+ - This tells you where the project is
653
+ - What milestone is current
654
+ - What task is next
655
+
656
+ 2. **Read requirements.md**
657
+ - Understand project goals
658
+ - Learn constraints
659
+ - Know success criteria
660
+
661
+ 3. **Review current milestone**
662
+ - Understand current phase
663
+ - Know deliverables
664
+ - Check success criteria
665
+
666
+ 4. **Read next task**
667
+ - Understand what to do
668
+ - Follow steps
669
+ - Verify completion
670
+
671
+ 5. **Check relevant patterns**
672
+ - Learn coding standards
673
+ - Understand architectural patterns
674
+ - Follow best practices
675
+
676
+ ### When Working on a Task
677
+
678
+ 1. **Read the task document completely**
679
+ - Understand objective
680
+ - Review all steps
681
+ - Note verification criteria
682
+
683
+ 2. **Check related design documents**
684
+ - Look for design docs mentioned in task
685
+ - Understand architectural context
686
+ - Follow specified patterns
687
+
688
+ 3. **Execute task steps**
689
+ - Follow steps in order
690
+ - Don't skip steps
691
+ - Document any deviations
692
+
693
+ 4. **Verify completion**
694
+ - Check all verification items
695
+ - Run tests
696
+ - Ensure quality standards met
697
+
698
+ 5. **Update progress.yaml**
699
+ - Mark task as completed
700
+ - Add completion date
701
+ - Update milestone progress
702
+ - Add notes about work done
703
+
704
+ ### When Creating New Features
705
+
706
+ 1. **Create design document first**
707
+ - Document problem and solution
708
+ - Include implementation details
709
+ - Get approval before coding
710
+
711
+ 2. **Update or create milestone**
712
+ - Add to existing milestone if fits
713
+ - Create new milestone if major feature
714
+ - Update progress.yaml
715
+
716
+ 3. **Break into tasks**
717
+ - Create task documents
718
+ - Each task 1-4 hours
719
+ - Include verification steps
720
+
721
+ 4. **Document patterns**
722
+ - If introducing new patterns, document them
723
+ - Update existing patterns if needed
724
+ - Include code examples
725
+
726
+ 5. **Implement and verify**
727
+ - Follow task steps
728
+ - Verify each task
729
+ - Update progress tracking
730
+
731
+ ### When You Encounter Problems
732
+
733
+ 1. **Check design documents**
734
+ - Look for relevant design decisions
735
+ - Understand constraints
736
+ - Follow established patterns
737
+
738
+ 2. **Review patterns**
739
+ - Check if pattern exists for this problem
740
+ - Follow pattern guidelines
741
+ - Don't reinvent solutions
742
+
743
+ 3. **Document new solutions**
744
+ - If you solve a new problem, document it
745
+ - Create design document
746
+ - Add to patterns if reusable
747
+
748
+ 4. **Update progress.yaml**
749
+ - Add blocker if stuck
750
+ - Document workarounds
751
+ - Note any deviations from plan
752
+
753
+ ### Best Practices for Agents
754
+
755
+ 1. **Always read before writing**
756
+ - Understand context first
757
+ - Check existing patterns
758
+ - Follow established conventions
759
+
760
+ 2. **Document as you go**
761
+ - Update progress.yaml frequently
762
+ - Add notes about decisions
763
+ - Document new patterns
764
+
765
+ 3. **Verify everything**
766
+ - Check all verification steps
767
+ - Run tests
768
+ - Ensure quality standards
769
+
770
+ 4. **Be explicit**
771
+ - Don't assume future agents will know context
772
+ - Document rationale for decisions
773
+ - Include code examples
774
+
775
+ 5. **Keep it organized**
776
+ - Follow directory structure
777
+ - Use consistent naming
778
+ - Link related documents
779
+
780
+ 6. **Update progress tracking**
781
+ - Mark tasks complete
782
+ - Update percentages
783
+ - Add recent work notes
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
+
796
+ ---
797
+
798
+ ## Best Practices
799
+
800
+ ### Documentation
801
+
802
+ 1. **Write for agents, not humans**
803
+ - Be explicit, not implicit
804
+ - Include code examples
805
+ - Document rationale, not just decisions
806
+
807
+ 2. **Keep documents focused**
808
+ - One topic per document
809
+ - Clear structure
810
+ - Scannable headings
811
+
812
+ 3. **Link related documents**
813
+ - Reference other docs
814
+ - Create knowledge graph
815
+ - Make navigation easy
816
+
817
+ 4. **Update as you go**
818
+ - Don't wait until end
819
+ - Document decisions when made
820
+ - Keep progress.yaml current
821
+
822
+ ### Organization
823
+
824
+ 1. **Follow naming conventions**
825
+ - `{feature}-design.md` for designs
826
+ - `milestone-{N}-{name}.md` for milestones
827
+ - `task-{N}-{name}.md` for tasks
828
+ - `{pattern-name}.md` for patterns
829
+
830
+ 2. **Use consistent structure**
831
+ - Same sections in similar documents
832
+ - Standard YAML format
833
+ - Predictable organization
834
+
835
+ 3. **Keep it DRY**
836
+ - Don't duplicate information
837
+ - Link to canonical source
838
+ - Update in one place
839
+
840
+ ### Progress Tracking
841
+
842
+ 1. **Update frequently**
843
+ - After each task
844
+ - When blockers arise
845
+ - When plans change
846
+
847
+ 2. **Be objective**
848
+ - Use measurable metrics
849
+ - Track actual vs estimated
850
+ - Document deviations
851
+
852
+ 3. **Look forward and back**
853
+ - Document recent work
854
+ - List next steps
855
+ - Note blockers
856
+
857
+ ### Quality
858
+
859
+ 1. **Include verification steps**
860
+ - Every task has checklist
861
+ - Objective criteria
862
+ - Automated where possible
863
+
864
+ 2. **Document patterns**
865
+ - Capture reusable solutions
866
+ - Include anti-patterns
867
+ - Provide examples
868
+
869
+ 3. **Review and refine**
870
+ - Update docs as understanding improves
871
+ - Fix errors immediately
872
+ - Keep docs accurate
873
+
874
+ ---
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
+
898
+ ## Conclusion
899
+
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.
901
+
902
+ **Key Takeaways**:
903
+
904
+ 1. **Documentation is Infrastructure** - Treat it with the same care as code
905
+ 2. **Explicit Over Implicit** - Document everything that matters
906
+ 3. **Structure Enables Scale** - Organization makes complexity manageable
907
+ 4. **Agents Need Context** - Provide complete, accessible context
908
+ 5. **Progress is Measurable** - Track objectively with YAML
909
+ 6. **Patterns Ensure Quality** - Document and follow best practices
910
+ 7. **Knowledge Persists** - No more lost tribal knowledge
911
+
912
+ **When to Use This Pattern**:
913
+ - ✅ Complex projects (>1 month)
914
+ - ✅ Multiple contributors (agents or humans)
915
+ - ✅ Long-term maintenance required
916
+ - ✅ Quality and consistency critical
917
+ - ✅ Knowledge preservation important
918
+
919
+ **When NOT to Use**:
920
+ - ❌ Trivial scripts (<100 lines)
921
+ - ❌ One-off prototypes
922
+ - ❌ Throwaway code
923
+ - ❌ Simple, well-understood problems
924
+
925
+ ---
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
+
1050
+ **The Agent Pattern is not just documentation—it's a development methodology that makes complex software projects tractable for AI agents.**
1051
+
1052
+ ---
1053
+
1054
+ *For questions or improvements to this pattern, please contribute to the repository or create an issue.*
package/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.2.3] - 2026-02-14
11
+
12
+ ### Added
13
+ - Comprehensive unit tests for Storage module (63 new tests)
14
+ - Unit tests for `storage/client.ts` (31 tests, 88.11% coverage)
15
+ - Unit tests for `storage/signed-urls.ts` (32 tests, 100% coverage)
16
+ - Agent Context Protocol (ACP) initialization documentation
17
+
18
+ ### Changed
19
+ - Improved overall test coverage from 76.15% to 96.02% (+19.87%)
20
+ - Storage module coverage improved from 0% to 91.71%
21
+ - Total test count increased from 339 to 402 tests
22
+
23
+ ### Fixed
24
+ - Storage module now has proper unit test coverage (previously only e2e tests)
25
+
26
+ ## [2.2.2] - 2026-02-13
27
+
10
28
  ### Added
11
29
  - Collection iteration functions: `listDocuments()`, `iterateCollection()`, and `countDocuments()`
12
30
  - Automatic pagination support for large collections
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/firebase-admin-sdk-v8",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Firebase Admin SDK for Cloudflare Workers and edge runtimes using REST APIs",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",