create-chat-gpt-repo-memory 0.1.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/LICENSE +21 -0
- package/README.md +275 -0
- package/bin/cli.js +84 -0
- package/package.json +35 -0
- package/src/gitignore.js +81 -0
- package/src/init.js +205 -0
- package/src/paths.js +21 -0
- package/src/projectName.js +5 -0
- package/src/templateResolver.js +27 -0
- package/templates/dotnet/AGENTS.md +129 -0
- package/templates/dotnet/architecture.md +47 -0
- package/templates/dotnet/conventions.md +69 -0
- package/templates/dotnet/project-map.md +104 -0
- package/templates/dotnet/prompts/fill-project-map.md +50 -0
- package/templates/dotnet/prompts/start-session.md +30 -0
- package/templates/dotnet/update-project-map.md +61 -0
- package/templates/dotnet/workflows.md +67 -0
- package/templates/generic/AGENTS.md +119 -0
- package/templates/generic/architecture.md +47 -0
- package/templates/generic/conventions.md +49 -0
- package/templates/generic/project-map.md +84 -0
- package/templates/generic/prompts/fill-project-map.md +39 -0
- package/templates/generic/prompts/start-session.md +22 -0
- package/templates/generic/update-project-map.md +61 -0
- package/templates/generic/workflows.md +43 -0
package/src/paths.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { stat } from "node:fs/promises";
|
|
4
|
+
|
|
5
|
+
export async function resolveTargetDirectory(cwd) {
|
|
6
|
+
const resolved = resolve(cwd);
|
|
7
|
+
let stats;
|
|
8
|
+
try {
|
|
9
|
+
stats = await stat(resolved);
|
|
10
|
+
} catch {
|
|
11
|
+
throw new Error(`Target directory does not exist: ${resolved}`);
|
|
12
|
+
}
|
|
13
|
+
if (!stats.isDirectory()) {
|
|
14
|
+
throw new Error(`Target path is not a directory: ${resolved}`);
|
|
15
|
+
}
|
|
16
|
+
return resolved;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function getPackageRoot() {
|
|
20
|
+
return dirname(dirname(fileURLToPath(import.meta.url)));
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const SUPPORTED_TEMPLATES = ["generic", "dotnet"];
|
|
2
|
+
|
|
3
|
+
export function validateTemplateName(templateName) {
|
|
4
|
+
if (!SUPPORTED_TEMPLATES.includes(templateName)) {
|
|
5
|
+
throw new Error(
|
|
6
|
+
`Unsupported template "${templateName}". Supported templates: ${SUPPORTED_TEMPLATES.join(", ")}.`
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function applyTemplateVariables(content, variables) {
|
|
12
|
+
let rendered = content;
|
|
13
|
+
|
|
14
|
+
for (const [key, value] of Object.entries(variables)) {
|
|
15
|
+
const pattern = new RegExp(`\\{\\{${key}\\}\\}`, "g");
|
|
16
|
+
rendered = rendered.replace(pattern, value);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const unreplaced = rendered.match(/\{\{[^}]+\}\}/g);
|
|
20
|
+
if (unreplaced) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
`Template contains unreplaced placeholders: ${Array.from(new Set(unreplaced)).join(", ")}.`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return rendered;
|
|
27
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Agent Instructions for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Before answering project-specific questions:
|
|
4
|
+
|
|
5
|
+
1. Read `.agent-memory/project-map.md`.
|
|
6
|
+
2. Use the project map to identify the relevant domain, files, and conventions.
|
|
7
|
+
3. Read only the specific files needed for the task.
|
|
8
|
+
4. Do not scan generated, build, cache, vendor, or dependency folders unless explicitly asked.
|
|
9
|
+
5. Prefer existing project patterns over introducing new architecture.
|
|
10
|
+
6. When changing code, identify tests or validation steps that should be added or updated.
|
|
11
|
+
7. When discovering important durable project facts, update the most specific relevant file under `.agent-memory/`.
|
|
12
|
+
|
|
13
|
+
## Project Memory Workflow
|
|
14
|
+
|
|
15
|
+
Use this order for project-specific work:
|
|
16
|
+
|
|
17
|
+
1. Read `.agent-memory/project-map.md`.
|
|
18
|
+
2. Read `.agent-memory/architecture.md` if the task involves architecture, layering, dependency flow, integrations, or background processing.
|
|
19
|
+
3. Read `.agent-memory/conventions.md` before making code-style, testing, logging, naming, or pattern decisions.
|
|
20
|
+
4. Read `.agent-memory/workflows.md` before changing build, test, deployment, database, release, or operational workflows.
|
|
21
|
+
5. Read source files only after narrowing the task to the relevant area.
|
|
22
|
+
|
|
23
|
+
## Project Memory Update Rule
|
|
24
|
+
|
|
25
|
+
After making changes, decide whether the change affects durable project knowledge.
|
|
26
|
+
|
|
27
|
+
Update `.agent-memory/` files only when the change affects:
|
|
28
|
+
|
|
29
|
+
- repository structure
|
|
30
|
+
- architecture
|
|
31
|
+
- major domains
|
|
32
|
+
- entry points
|
|
33
|
+
- dependency flow
|
|
34
|
+
- data access
|
|
35
|
+
- external integrations
|
|
36
|
+
- build, test, deployment, or release workflow
|
|
37
|
+
- coding conventions
|
|
38
|
+
- operational concerns
|
|
39
|
+
- known gotchas
|
|
40
|
+
|
|
41
|
+
Do not update project memory for small local implementation changes.
|
|
42
|
+
|
|
43
|
+
When updating memory:
|
|
44
|
+
|
|
45
|
+
1. Update the most specific file possible.
|
|
46
|
+
2. Keep `.agent-memory/project-map.md` concise.
|
|
47
|
+
3. Do not duplicate source code.
|
|
48
|
+
4. Do not include secrets.
|
|
49
|
+
5. If memory files conflict with current code, trust the current code and update memory.
|
|
50
|
+
6. Mark uncertain items as `Needs verification`.
|
|
51
|
+
|
|
52
|
+
## Multi-Agent / Multi-Session Rule
|
|
53
|
+
|
|
54
|
+
Treat `.agent-memory/` as shared project documentation.
|
|
55
|
+
|
|
56
|
+
If multiple agents or sessions are working on the same project:
|
|
57
|
+
|
|
58
|
+
- Keep memory changes in the same branch as the related code change.
|
|
59
|
+
- Do not update `.agent-memory/project-map.md` unless the high-level project index changed.
|
|
60
|
+
- Prefer updating detailed supporting files instead of the top-level project map.
|
|
61
|
+
- Resolve memory conflicts like documentation:
|
|
62
|
+
- keep facts that match current code
|
|
63
|
+
- remove stale facts
|
|
64
|
+
- keep shorter wording when both versions are correct
|
|
65
|
+
- mark uncertain items as `Needs verification`
|
|
66
|
+
|
|
67
|
+
## .NET-Specific Guidance
|
|
68
|
+
|
|
69
|
+
- Prefer existing dependency injection patterns.
|
|
70
|
+
- Check project files (`*.csproj`) before adding packages.
|
|
71
|
+
- Look for solution files (`*.sln`) to understand project boundaries.
|
|
72
|
+
- Identify test framework before writing tests.
|
|
73
|
+
- Do not assume EF Core, EF6, Dapper, or raw ADO.NET without checking the code.
|
|
74
|
+
- Be careful with generated database-first files.
|
|
75
|
+
- Do not scan `bin/`, `obj/`, `.vs/`, or generated EF files unless directly relevant.
|
|
76
|
+
|
|
77
|
+
## Do Not Scan By Default
|
|
78
|
+
|
|
79
|
+
Do not scan these unless directly relevant:
|
|
80
|
+
|
|
81
|
+
- `.git/`
|
|
82
|
+
- `bin/`
|
|
83
|
+
- `obj/`
|
|
84
|
+
- `node_modules/`
|
|
85
|
+
- `vendor/`
|
|
86
|
+
- `dist/`
|
|
87
|
+
- `build/`
|
|
88
|
+
- `target/`
|
|
89
|
+
- `out/`
|
|
90
|
+
- `.next/`
|
|
91
|
+
- `.nuxt/`
|
|
92
|
+
- `.turbo/`
|
|
93
|
+
- `.cache/`
|
|
94
|
+
- `.pytest_cache/`
|
|
95
|
+
- `__pycache__/`
|
|
96
|
+
- `.venv/`
|
|
97
|
+
- `venv/`
|
|
98
|
+
- `.gradle/`
|
|
99
|
+
- `.vs/`
|
|
100
|
+
- `.idea/`
|
|
101
|
+
- `.vscode/`
|
|
102
|
+
- `coverage/`
|
|
103
|
+
- generated files
|
|
104
|
+
- package/cache folders
|
|
105
|
+
- local environment folders
|
|
106
|
+
|
|
107
|
+
## Project Memory Files
|
|
108
|
+
|
|
109
|
+
Project context is stored in:
|
|
110
|
+
|
|
111
|
+
- `.agent-memory/project-map.md`
|
|
112
|
+
- `.agent-memory/architecture.md`
|
|
113
|
+
- `.agent-memory/conventions.md`
|
|
114
|
+
- `.agent-memory/workflows.md`
|
|
115
|
+
- `.agent-memory/update-project-map.md`
|
|
116
|
+
|
|
117
|
+
## Kickoff Prompts
|
|
118
|
+
|
|
119
|
+
Initial map fill:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
Use AGENTS.md as your operating instructions for this repository. Then read .agent-memory/prompts/fill-project-map.md and execute it. Fill or update the .agent-memory files using only verified repository facts. Do not include secrets.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Future session start:
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
Use AGENTS.md as your operating instructions, then read .agent-memory/prompts/start-session.md and follow it for this task.
|
|
129
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Architecture: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## High-Level Architecture
|
|
4
|
+
|
|
5
|
+
Needs verification.
|
|
6
|
+
|
|
7
|
+
## Major Layers or Components
|
|
8
|
+
|
|
9
|
+
Needs verification.
|
|
10
|
+
|
|
11
|
+
## Dependency Flow
|
|
12
|
+
|
|
13
|
+
Needs verification.
|
|
14
|
+
|
|
15
|
+
## Data Flow
|
|
16
|
+
|
|
17
|
+
Needs verification.
|
|
18
|
+
|
|
19
|
+
## External Integrations
|
|
20
|
+
|
|
21
|
+
Needs verification.
|
|
22
|
+
|
|
23
|
+
## Background, Scheduled, or Async Work
|
|
24
|
+
|
|
25
|
+
Needs verification.
|
|
26
|
+
|
|
27
|
+
## Data Storage and State Management
|
|
28
|
+
|
|
29
|
+
Needs verification.
|
|
30
|
+
|
|
31
|
+
## Error Handling and Logging
|
|
32
|
+
|
|
33
|
+
Needs verification.
|
|
34
|
+
|
|
35
|
+
## Security and Secrets Handling
|
|
36
|
+
|
|
37
|
+
Needs verification.
|
|
38
|
+
|
|
39
|
+
Do not include secrets, credentials, tokens, private keys, connection strings, or sensitive values.
|
|
40
|
+
|
|
41
|
+
## Performance or Scalability Notes
|
|
42
|
+
|
|
43
|
+
Needs verification.
|
|
44
|
+
|
|
45
|
+
## Architectural Risks or Unclear Areas
|
|
46
|
+
|
|
47
|
+
Needs verification.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Conventions: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## Naming Conventions
|
|
4
|
+
|
|
5
|
+
Needs verification.
|
|
6
|
+
|
|
7
|
+
## Project Organization
|
|
8
|
+
|
|
9
|
+
Needs verification.
|
|
10
|
+
|
|
11
|
+
## Dependency Management
|
|
12
|
+
|
|
13
|
+
Needs verification.
|
|
14
|
+
|
|
15
|
+
## Application Structure
|
|
16
|
+
|
|
17
|
+
Needs verification.
|
|
18
|
+
|
|
19
|
+
## Testing Conventions
|
|
20
|
+
|
|
21
|
+
Needs verification.
|
|
22
|
+
|
|
23
|
+
## Logging Conventions
|
|
24
|
+
|
|
25
|
+
Needs verification.
|
|
26
|
+
|
|
27
|
+
## Error Handling Conventions
|
|
28
|
+
|
|
29
|
+
Needs verification.
|
|
30
|
+
|
|
31
|
+
## Data Access Conventions
|
|
32
|
+
|
|
33
|
+
Needs verification.
|
|
34
|
+
|
|
35
|
+
## API or Interface Conventions
|
|
36
|
+
|
|
37
|
+
Needs verification.
|
|
38
|
+
|
|
39
|
+
## Frontend or UI Conventions
|
|
40
|
+
|
|
41
|
+
Needs verification.
|
|
42
|
+
|
|
43
|
+
## Infrastructure Conventions
|
|
44
|
+
|
|
45
|
+
Needs verification.
|
|
46
|
+
|
|
47
|
+
## Documentation Conventions
|
|
48
|
+
|
|
49
|
+
Needs verification.
|
|
50
|
+
|
|
51
|
+
## C# Conventions
|
|
52
|
+
|
|
53
|
+
Needs verification.
|
|
54
|
+
|
|
55
|
+
## Dependency Injection Conventions
|
|
56
|
+
|
|
57
|
+
Needs verification.
|
|
58
|
+
|
|
59
|
+
## Async and CancellationToken Conventions
|
|
60
|
+
|
|
61
|
+
Needs verification.
|
|
62
|
+
|
|
63
|
+
## Entity Framework / Data Access Conventions
|
|
64
|
+
|
|
65
|
+
Needs verification.
|
|
66
|
+
|
|
67
|
+
## MSTest / xUnit / NUnit Conventions
|
|
68
|
+
|
|
69
|
+
Needs verification.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Project Map: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Generated by: {{GENERATED_BY}}
|
|
4
|
+
Template: {{TEMPLATE_NAME}}
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Needs verification.
|
|
9
|
+
|
|
10
|
+
## Tech Stack
|
|
11
|
+
|
|
12
|
+
Needs verification.
|
|
13
|
+
|
|
14
|
+
Include languages, frameworks, runtimes, package managers, databases, infrastructure, and major tools only after verifying from repository files.
|
|
15
|
+
|
|
16
|
+
## Repository Layout
|
|
17
|
+
|
|
18
|
+
Needs verification.
|
|
19
|
+
|
|
20
|
+
Summarize important folders and what they contain.
|
|
21
|
+
|
|
22
|
+
## Entry Points
|
|
23
|
+
|
|
24
|
+
Needs verification.
|
|
25
|
+
|
|
26
|
+
Include application startup files, command-line entry points, background jobs, scheduled jobs, services, scripts, frontend entry points, test entry points, or infrastructure entry points as applicable.
|
|
27
|
+
|
|
28
|
+
## Major Domains
|
|
29
|
+
|
|
30
|
+
Needs verification.
|
|
31
|
+
|
|
32
|
+
For each major business or technical domain, capture:
|
|
33
|
+
|
|
34
|
+
- Purpose
|
|
35
|
+
- Important files, classes, modules, packages, or services
|
|
36
|
+
- Related data stores, schemas, queues, APIs, jobs, or external systems if obvious
|
|
37
|
+
- Known gotchas
|
|
38
|
+
|
|
39
|
+
## Dependency Injection
|
|
40
|
+
|
|
41
|
+
Needs verification.
|
|
42
|
+
|
|
43
|
+
## Database and Entity Mapping
|
|
44
|
+
|
|
45
|
+
Needs verification.
|
|
46
|
+
|
|
47
|
+
## Critical Files
|
|
48
|
+
|
|
49
|
+
Needs verification.
|
|
50
|
+
|
|
51
|
+
List only files that future agent sessions should know about early.
|
|
52
|
+
|
|
53
|
+
## Configuration and Secrets
|
|
54
|
+
|
|
55
|
+
Needs verification.
|
|
56
|
+
|
|
57
|
+
Describe where configuration appears to come from.
|
|
58
|
+
|
|
59
|
+
Do not include secrets, credentials, tokens, private keys, connection strings, or sensitive values.
|
|
60
|
+
|
|
61
|
+
## Data and State
|
|
62
|
+
|
|
63
|
+
Needs verification.
|
|
64
|
+
|
|
65
|
+
Describe databases, file storage, queues, caches, state machines, migrations, schemas, APIs, or other stateful systems if discoverable.
|
|
66
|
+
|
|
67
|
+
## Testing and Validation
|
|
68
|
+
|
|
69
|
+
Needs verification.
|
|
70
|
+
|
|
71
|
+
Describe test frameworks, test locations, validation commands, linting, formatting, type checking, QA workflows, or manual validation steps if discoverable.
|
|
72
|
+
|
|
73
|
+
## Build, Run, and Deployment
|
|
74
|
+
|
|
75
|
+
Needs verification.
|
|
76
|
+
|
|
77
|
+
Describe package managers, build commands, runtime commands, deployment files, CI/CD, release workflow, environment behavior, or operational concerns if discoverable.
|
|
78
|
+
|
|
79
|
+
## .NET Projects
|
|
80
|
+
|
|
81
|
+
Needs verification.
|
|
82
|
+
|
|
83
|
+
For each project, capture:
|
|
84
|
+
|
|
85
|
+
- Project path
|
|
86
|
+
- Project type
|
|
87
|
+
- Target framework
|
|
88
|
+
- Main responsibility
|
|
89
|
+
- Important package references
|
|
90
|
+
|
|
91
|
+
## Do Not Scan By Default
|
|
92
|
+
|
|
93
|
+
- `.git/`
|
|
94
|
+
- dependency folders
|
|
95
|
+
- build output folders
|
|
96
|
+
- generated files
|
|
97
|
+
- package/cache folders
|
|
98
|
+
- IDE/editor folders
|
|
99
|
+
- coverage/report folders
|
|
100
|
+
- local environment folders
|
|
101
|
+
|
|
102
|
+
## Known Gotchas
|
|
103
|
+
|
|
104
|
+
Needs verification.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Fill Project Map Prompt
|
|
2
|
+
|
|
3
|
+
Inspect this repository and fill in the repo memory files.
|
|
4
|
+
|
|
5
|
+
Start with:
|
|
6
|
+
|
|
7
|
+
- `AGENTS.md`
|
|
8
|
+
- `.agent-memory/project-map.md`
|
|
9
|
+
- `.agent-memory/architecture.md`
|
|
10
|
+
- `.agent-memory/conventions.md`
|
|
11
|
+
- `.agent-memory/workflows.md`
|
|
12
|
+
- `.agent-memory/update-project-map.md`
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
Create a concise, durable project memory that helps future ChatGPT/Codex-style coding sessions understand this repository without repeatedly scanning the entire codebase.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Start with `.agent-memory/project-map.md`.
|
|
21
|
+
- Keep `.agent-memory/project-map.md` concise enough to be useful at the beginning of a future coding session.
|
|
22
|
+
- Move detailed explanations into `.agent-memory/architecture.md`, `.agent-memory/conventions.md`, and `.agent-memory/workflows.md`.
|
|
23
|
+
- Do not scan generated, build, cache, vendor, dependency, IDE, coverage, or local environment folders unless directly relevant.
|
|
24
|
+
- Do not include secrets, credentials, tokens, private keys, connection strings, or sensitive values.
|
|
25
|
+
- Mark uncertain items as `Needs verification`.
|
|
26
|
+
- Do not invent facts.
|
|
27
|
+
- Prefer facts grounded in repository files over guesses.
|
|
28
|
+
- When finished, summarize files updated, domains discovered, unclear areas, and suggested next improvements.
|
|
29
|
+
|
|
30
|
+
## Suggested Scan Order
|
|
31
|
+
|
|
32
|
+
1. Top-level README and documentation
|
|
33
|
+
2. Workspace, solution, package, manifest, or project files
|
|
34
|
+
3. Application startup, command, service, or entry-point files
|
|
35
|
+
4. Configuration files, without exposing secret values
|
|
36
|
+
5. Main source folders
|
|
37
|
+
6. Test or validation folders
|
|
38
|
+
7. Build, CI/CD, deployment, infrastructure, or release files
|
|
39
|
+
8. Scripts and operational tooling
|
|
40
|
+
|
|
41
|
+
## .NET-Specific Scan Order
|
|
42
|
+
|
|
43
|
+
1. `*.sln`
|
|
44
|
+
2. `*.csproj`
|
|
45
|
+
3. `Program.cs`, `Startup.cs`, hosted services, worker services
|
|
46
|
+
4. Dependency injection registration files
|
|
47
|
+
5. Configuration files, without exposing secret values
|
|
48
|
+
6. DbContext, repositories, database-first generated models, SQL scripts
|
|
49
|
+
7. Test projects
|
|
50
|
+
8. CI/CD and deployment scripts
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Start Session Prompt
|
|
2
|
+
|
|
3
|
+
Use `AGENTS.md` as your operating instructions for this repository.
|
|
4
|
+
|
|
5
|
+
Then read:
|
|
6
|
+
|
|
7
|
+
- `.agent-memory/project-map.md`
|
|
8
|
+
- `.agent-memory/architecture.md` if the task involves architecture, layering, dependency flow, integrations, or background processing
|
|
9
|
+
- `.agent-memory/conventions.md` if the task involves coding patterns, tests, naming, logging, or style
|
|
10
|
+
- `.agent-memory/workflows.md` if the task involves build, test, deployment, release, data, or operational workflows
|
|
11
|
+
|
|
12
|
+
Use the project map to narrow the task before reading source files.
|
|
13
|
+
|
|
14
|
+
Do not scan the entire repository unless necessary.
|
|
15
|
+
|
|
16
|
+
Do not scan generated, build, cache, vendor, dependency, IDE, coverage, or local environment folders unless directly relevant.
|
|
17
|
+
|
|
18
|
+
Do not include secrets, credentials, tokens, private keys, connection strings, or sensitive values in responses or memory files.
|
|
19
|
+
|
|
20
|
+
If you discover durable project knowledge, update the most specific relevant file under `.agent-memory/`.
|
|
21
|
+
|
|
22
|
+
If project memory conflicts with current code, trust the current code and update the memory.
|
|
23
|
+
|
|
24
|
+
## .NET Session Notes
|
|
25
|
+
|
|
26
|
+
For .NET repositories, check solution and project boundaries before making changes.
|
|
27
|
+
|
|
28
|
+
Prefer existing dependency injection, logging, configuration, test, and data-access patterns.
|
|
29
|
+
|
|
30
|
+
Do not assume a specific data access technology until verified from repository files.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Updating the Project Map
|
|
2
|
+
|
|
3
|
+
Use this file as maintenance guidance for repo memory.
|
|
4
|
+
|
|
5
|
+
## When to Update
|
|
6
|
+
|
|
7
|
+
Update `.agent-memory/` memory files when discovering or changing durable project facts such as:
|
|
8
|
+
|
|
9
|
+
- New major domains
|
|
10
|
+
- Important entry points
|
|
11
|
+
- Critical files
|
|
12
|
+
- Non-obvious configuration behavior
|
|
13
|
+
- Data access or state management patterns
|
|
14
|
+
- External integrations
|
|
15
|
+
- Testing or validation conventions
|
|
16
|
+
- Build, deployment, release, or operational behavior
|
|
17
|
+
- Known gotchas
|
|
18
|
+
- Significant architecture or dependency-flow changes
|
|
19
|
+
|
|
20
|
+
Do not update project memory for every code change.
|
|
21
|
+
|
|
22
|
+
## Where to Update
|
|
23
|
+
|
|
24
|
+
Use the most specific file possible:
|
|
25
|
+
|
|
26
|
+
- `.agent-memory/project-map.md` for concise high-level index changes
|
|
27
|
+
- `.agent-memory/architecture.md` for architecture, dependency flow, data flow, and integration design
|
|
28
|
+
- `.agent-memory/conventions.md` for coding, naming, testing, logging, and organization patterns
|
|
29
|
+
- `.agent-memory/workflows.md` for build, test, validation, deployment, release, debugging, and operational steps
|
|
30
|
+
|
|
31
|
+
## Multi-Agent Memory Updates
|
|
32
|
+
|
|
33
|
+
When multiple agents are working concurrently:
|
|
34
|
+
|
|
35
|
+
- Do not update `.agent-memory/project-map.md` unless the high-level project index changed.
|
|
36
|
+
- Keep memory changes in the same branch as the code change that caused them.
|
|
37
|
+
- If a memory file conflicts during merge, resolve it like documentation:
|
|
38
|
+
- keep facts that match current code
|
|
39
|
+
- remove stale facts
|
|
40
|
+
- keep the shorter wording when both are correct
|
|
41
|
+
- mark uncertain items as `Needs verification`
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- Keep summaries short and useful.
|
|
46
|
+
- Do not duplicate entire source files.
|
|
47
|
+
- Do not include secrets, credentials, tokens, private keys, connection strings, or sensitive values.
|
|
48
|
+
- Mark uncertain items as `Needs verification`.
|
|
49
|
+
- Do not invent facts.
|
|
50
|
+
- Prefer facts grounded in repository files over guesses.
|
|
51
|
+
- Remove stale statements when contradicted by code.
|
|
52
|
+
- Move detailed explanations out of `.agent-memory/project-map.md` and into supporting memory files.
|
|
53
|
+
|
|
54
|
+
## Maintenance Workflow
|
|
55
|
+
|
|
56
|
+
1. Read `.agent-memory/project-map.md`.
|
|
57
|
+
2. Inspect only the relevant project files.
|
|
58
|
+
3. Decide whether durable project knowledge changed.
|
|
59
|
+
4. If yes, update the smallest relevant memory section.
|
|
60
|
+
5. Keep the top-level project map concise.
|
|
61
|
+
6. Add detailed notes to supporting memory files when needed.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Workflows: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## Add a New Feature
|
|
4
|
+
|
|
5
|
+
Needs verification.
|
|
6
|
+
|
|
7
|
+
## Add or Update a Test
|
|
8
|
+
|
|
9
|
+
Needs verification.
|
|
10
|
+
|
|
11
|
+
## Trace a Bug
|
|
12
|
+
|
|
13
|
+
Needs verification.
|
|
14
|
+
|
|
15
|
+
## Modify Data or State-Related Code
|
|
16
|
+
|
|
17
|
+
Needs verification.
|
|
18
|
+
|
|
19
|
+
## Work With Configuration and Secrets
|
|
20
|
+
|
|
21
|
+
Needs verification.
|
|
22
|
+
|
|
23
|
+
Do not include secrets, credentials, tokens, private keys, connection strings, or sensitive values.
|
|
24
|
+
|
|
25
|
+
## Update External Integrations
|
|
26
|
+
|
|
27
|
+
Needs verification.
|
|
28
|
+
|
|
29
|
+
## Build and Run Locally
|
|
30
|
+
|
|
31
|
+
Needs verification.
|
|
32
|
+
|
|
33
|
+
## Validate Before Commit
|
|
34
|
+
|
|
35
|
+
Needs verification.
|
|
36
|
+
|
|
37
|
+
## Deployment or Release
|
|
38
|
+
|
|
39
|
+
Needs verification.
|
|
40
|
+
|
|
41
|
+
## Rollback or Recovery
|
|
42
|
+
|
|
43
|
+
Needs verification.
|
|
44
|
+
|
|
45
|
+
## Add a .NET Service
|
|
46
|
+
|
|
47
|
+
Needs verification.
|
|
48
|
+
|
|
49
|
+
## Add or Update a Unit Test
|
|
50
|
+
|
|
51
|
+
Needs verification.
|
|
52
|
+
|
|
53
|
+
## Add or Update Database Access
|
|
54
|
+
|
|
55
|
+
Needs verification.
|
|
56
|
+
|
|
57
|
+
## Check Build
|
|
58
|
+
|
|
59
|
+
Needs verification.
|
|
60
|
+
|
|
61
|
+
Potential commands, verify before use:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
dotnet restore
|
|
65
|
+
dotnet build
|
|
66
|
+
dotnet test
|
|
67
|
+
```
|