Skip to content

Commit 0e3d808

Browse files
committed
docs: keep downstream APCP context private
1 parent e5e5fe3 commit 0e3d808

10 files changed

Lines changed: 142 additions & 76 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
# -----------------------------------------------------------------------------
1111
# APCP / AI-generated context artifacts
1212
# -----------------------------------------------------------------------------
13+
# This Nexus-APCP source repo intentionally tracks sanitized protocol templates.
14+
# Downstream product repos can keep installed APCP operating files out of public
15+
# GitHub with .git/info/exclude or a private global excludes file.
1316
PROMPT_READY.txt
1417
PROMPT_READY.tmp
1518
.checkpoint

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ This is a public repository. When working on security-related docs or fixes:
7070
- Use neutral functional wording, such as `improve input validation`, instead of naming the vulnerability class.
7171
- Keep vulnerability details in private reporting channels.
7272
- Never commit `PROMPT_READY.txt` generated from a private project.
73+
- When documenting downstream product-repo setup, keep installed APCP operating files local/private by default and prefer local Git excludes over committed `.gitignore` rules if public GitHub should not reveal AI workflow filenames.
7374
- Do not weaken `.gitignore`, security guidance, or private-context warnings without a clear replacement.
7475

7576
## Documentation Style

AI_PROJECT_CONTEXT_PROTOCOL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,15 @@ Filled project-context files are treated like sensitive material when they revea
295295
Type: Internal project structure and architecture context
296296
Examples:
297297
- AI_PROJECT_CONTEXT.md filled for a real private project
298+
- Installed Nexus-APCP operating files copied into a downstream product repository
299+
- AI_MAIN.md, TASK_PROGRESS.yaml, DECISION_LOG_PROTOCOL.md, and local protocol files when they expose the AI workflow or private delivery state
298300
- Backend route maps and service topology
299301
- Database schema internals and production migration notes
300302
- Infrastructure/deployment maps and internal hostnames
301303
- Admin workflows, runbooks, threat models, pentest reports
302304
- Private AI system prompts, tool policies, vector-store layout
303305
Storage: local workspace, private docs, or approved internal knowledge base
304-
Rule: Do not commit to public GitHub or customer packages. Create a sanitized public summary instead.
306+
Rule: Do not commit to public GitHub or customer packages by default. AI agents may read these files locally, from private/cloud knowledge bases, or from generated context bundles. Create a sanitized public summary or template only when explicitly approved.
305307
```
306308
307309
### 4.5 Website Backend Public/Private Boundary

DOMAIN_SPECIFIC_GITIGNORE_PROTOCOLS.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ Universal rule:
210210

211211
Treat filled project context files like secrets when they reveal how the system is built. Backend topology, route maps, service names, database internals, private infrastructure, internal admin flows, security controls, deployment topology, private prompts, tool policies, vector-store layout, threat models, penetration-test reports, and runbooks should not be pushed to a public repository or included in a customer package by default.
212212

213+
For downstream product repositories that should not reveal local AI workflow files on GitHub, use local Git excludes instead of committed ignore rules. `.git/info/exclude` and private global excludes files let AI agents read APCP files locally while keeping the public repository free of the protocol filenames and generated context artifacts.
214+
213215
If public documentation is needed, create a sanitized public version that removes internal hostnames, admin routes, service topology, database details, security controls, credentials, private prompts, and exploit-relevant implementation details.
214216

215217
AI prompt:
@@ -227,7 +229,7 @@ State whether the repository is safe for public GitHub.
227229

228230
## 3. AI-Assisted Project and APCP Gitignore Block
229231

230-
Use for APCP/MACP projects, AI coding sessions, prompt packs, context gatherers, and multi-agent workflows.
232+
Use for APCP/MACP projects, AI coding sessions, prompt packs, context gatherers, and multi-agent workflows. Apply this block to `.git/info/exclude` when public GitHub should not show the local AI workflow filenames. Apply it to committed `.gitignore` only when the repository intentionally makes those ignore rules public.
231233

232234
```gitignore
233235
# APCP / MACP / AI-generated context
@@ -245,6 +247,34 @@ PROMPT_READY.tmp
245247
*.context.local
246248
*.scratch.md
247249
250+
# Installed Nexus-APCP operating files in downstream product repos
251+
AI_PROJECT_CONTEXT_PROTOCOL.md
252+
AI_MAIN.md
253+
TASK_PROGRESS.yaml
254+
DECISION_LOG_PROTOCOL.md
255+
CONTEXT_OPTIMIZATION.md
256+
CAVEMAN_RULES.md
257+
EMOJI_POLICY.md
258+
VISUAL_CONTEXT_MERMAID.md
259+
AI_AGENT_SKILLS_PROTOCOL.md
260+
AI_TOOL_ADAPTER_COMPATIBILITY_PROTOCOL.md
261+
FILE_STRUCTURE_REFACTOR_PROTOCOL.md
262+
WORKSPACE_SPECIFIC_DELIVERY_PROTOCOLS.md
263+
WEBSITE_BACKEND_SECURITY_OPTIMIZATION_PROTOCOL.md
264+
DOMAIN_SPECIFIC_GITIGNORE_PROTOCOLS.md
265+
UPDATE_SYSTEM_RECOMMENDATION_PROTOCOL.md
266+
DEBLOAT_APPLICATION_GUIDE.md
267+
DISCOVER_ALGORITHM_DESIGN_GUIDE.md
268+
FRONTEND_APPLICATION_DESIGN_PROTOCOL.md
269+
MACP_IMPLEMENTATION_GUIDE.md
270+
UNIVERSAL_APPLICATION_SECURITY_PROTOCOL.md
271+
WATERFALL_DEVELOPMENT_PROTOCOL.md
272+
README_APCP_KIT.md
273+
MASTER_PROMPT.md
274+
AI_ASSISTANT_PROMPT_TEMPLATES.md
275+
docs/AI_ASSISTANT_PROMPT_TEMPLATES.md
276+
scripts/apcp-gather.py
277+
248278
# Filled APCP project context is private by default
249279
AI_PROJECT_CONTEXT.md
250280
PROJECT_CONTEXT.md
@@ -262,8 +292,9 @@ Rules:
262292

263293
- Do not commit raw AI logs containing secrets, private prompts, customer data, local file paths, or credentials.
264294
- Do not commit temporary prompt bundles generated from private repositories.
295+
- Do not commit installed Nexus-APCP operating files to downstream public product repositories by default; keep them local or in an approved private/cloud knowledge base for AI agents.
265296
- Do not commit filled `AI_PROJECT_CONTEXT.md` files for real projects when they expose backend structure, database layout, infrastructure, internal services, route maps, private prompts, or security assumptions.
266-
- Do commit sanitized protocol templates.
297+
- Do commit sanitized protocol templates only when the repository intentionally publishes its AI workflow templates.
267298
- Do commit decision logs if they contain no secrets or customer data.
268299
- Do not paste local secret files into AI context.
269300

@@ -272,7 +303,9 @@ AI prompt:
272303
```text
273304
You are preparing an APCP/MACP repository for safe GitHub use.
274305
Review the project for AI-generated context artifacts, local prompt bundles, heartbeats, temporary scratch files, and private session logs.
275-
Create or update `.gitignore` so generated AI artifacts are ignored, but protocol templates, sanitized handoffs, sanitized state files, and documentation remain trackable.
306+
If public GitHub should not reveal local AI workflow files, add installed APCP operating files and generated AI artifacts to `.git/info/exclude` or a private global excludes file instead of committed `.gitignore`.
307+
Use committed `.gitignore` only when the public ignore rule itself is acceptable.
308+
Keep protocol templates, sanitized handoffs, sanitized state files, and documentation trackable only when the repository intentionally publishes them.
276309
Also list any file currently tracked that should be removed from Git with `git rm --cached`.
277310
```
278311

@@ -1201,6 +1234,8 @@ Checklist:
12011234
- `git check-ignore -v path/to/suspicious/file` for any file that should be ignored.
12021235
- Confirm no `.env`, local database, dump, build, package, credential, customer export, private dataset, vector store, or model checkpoint is staged.
12031236
- Confirm no filled project context, backend map, internal architecture, private threat model, deployment topology, database internals, penetration-test report, or security runbook is staged for a public repository.
1237+
- Confirm no downstream installed APCP operating file or generated context bundle is staged unless sanitized publication was explicitly approved.
1238+
- If public GitHub should not reveal AI workflow filenames, confirm APCP rules live in `.git/info/exclude` or a private global excludes file instead of committed `.gitignore`.
12041239
- Confirm `.env.example` is staged/tracked when config changed.
12051240
- Confirm migrations are tracked when schema changed.
12061241
- Confirm lockfiles are tracked when dependencies changed.
@@ -1212,13 +1247,14 @@ AI prompt:
12121247

12131248
```text
12141249
Perform a pre-push gitignore audit.
1215-
1. Read `.gitignore`.
1250+
1. Read `.gitignore` and, when relevant, `.git/info/exclude`.
12161251
2. Read `git status --short`.
12171252
3. Inspect staged and unstaged file names.
1218-
4. Identify any secrets, environment files, local DBs, dumps, generated builds, customer exports, AI vector stores, model checkpoints, logs, crash dumps, private project context, backend maps, internal architecture docs, private threat models, deployment topology maps, or domain-sensitive data that should not be committed.
1253+
4. Identify any secrets, environment files, local DBs, dumps, generated builds, customer exports, AI vector stores, model checkpoints, logs, crash dumps, downstream installed APCP operating files, generated context bundles, private project context, backend maps, internal architecture docs, private threat models, deployment topology maps, or domain-sensitive data that should not be committed.
12191254
5. Identify any important source/config files that are accidentally ignored.
1220-
6. Provide exact remediation commands, but do not run destructive commands without approval.
1221-
7. State whether the repository is safe to push.
1255+
6. If public GitHub should not reveal AI workflow filenames, prefer local exclude remediation over committed `.gitignore` changes.
1256+
7. Provide exact remediation commands, but do not run destructive commands without approval.
1257+
8. State whether the repository is safe to push.
12221258
```
12231259

12241260
---
@@ -1334,6 +1370,7 @@ Every delivery report should include a `.gitignore` section:
13341370
Gitignore and public exposure:
13351371
- Workspace/domain:
13361372
- .gitignore updated: yes/no
1373+
- Local exclude used for APCP/AI workflow files: yes/no
13371374
- Domain-specific blocks applied:
13381375
- Files intentionally ignored:
13391376
- Files intentionally kept tracked:
@@ -1371,6 +1408,7 @@ Before suggesting "push to GitHub", "package this", "send to the customer", or "
13711408
- Does it block internal project context, backend maps, architecture maps, deployment maps, and private threat models?
13721409
- Does it block secrets and private keys?
13731410
- Does it block AI private context and vector stores?
1411+
- If public GitHub should not reveal AI workflow files, are installed APCP files handled through local/private excludes instead of committed public ignore rules?
13741412
- Does it avoid hiding files that must be tracked?
13751413
- Were already tracked sensitive files checked?
13761414
- Was a secret scan run?

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
Use Nexus-APCP with **Claude Code, Cursor, ChatGPT, Gemini, GitHub Copilot, local LLMs, and multi-agent development workflows** to reduce context loss, repeated explanations, inconsistent code suggestions, and prompt bloat. It also gives teams a safe way to document AI tool and adapter differences without copying vendor system prompts into public repos.
1313

14-
> Security note: protocol templates may be public, but filled project-context files, backend maps, internal architecture diagrams, deployment maps, database internals, private threat models, and security runbooks should stay local/private unless sanitized and explicitly approved.
14+
> Security note: protocol templates may be public in this Nexus-APCP source repository, but downstream product repositories should keep installed Nexus-APCP operating files local or in an approved private/cloud knowledge base by default. Filled project-context files, backend maps, internal architecture diagrams, deployment maps, database internals, private threat models, and security runbooks should stay local/private unless sanitized and explicitly approved.
1515
1616
## What Nexus-APCP Solves
1717

@@ -31,7 +31,7 @@ AI-assisted software development gets slower when every new model, chat, IDE age
3131
- **Website backend security**: static-first backend rules help teams avoid unnecessary SQL/auth/API surface for portfolio, landing, and brochure sites while still supporting secure growth into dynamic features.
3232
- **User-requested update systems**: update-system fit checks help agents recommend a GitHub SemVer + zip-sync updater only when the project and user request make it appropriate.
3333
- **Emoji-free output**: `EMOJI_POLICY.md` bans emoji in repository files and AI-generated output, with a user-approved temporary exception only for missing button icons.
34-
- **Safer publishing**: domain-specific `.gitignore` guidance helps prevent secrets, internal maps, customer data, and generated context from leaking.
34+
- **Safer publishing**: domain-specific ignore and local-exclude guidance helps prevent secrets, internal maps, customer data, generated context, and downstream APCP operating files from leaking.
3535

3636
## Core Features
3737

@@ -52,7 +52,7 @@ AI-assisted software development gets slower when every new model, chat, IDE age
5252
| Update System Recommendation Protocol | Guides AI agents to suggest a lightweight GitHub SemVer + zip-sync updater only when the user requests updates and the project profile fits. |
5353
| Debloat Application Guide | Guides ad-free, consent-aware, dependency-light application design with optional features and measurable performance checks. |
5454
| Emoji Policy | Bans emoji in repository content and AI output except user-approved temporary button icon placeholders. |
55-
| GitHub Safety Rules | Includes broad `.gitignore` patterns for AI artifacts, secrets, generated files, domain data, and private docs. |
55+
| GitHub Safety Rules | Includes broad ignore and local-exclude patterns for AI artifacts, protocol operating files, secrets, generated files, domain data, and private docs. |
5656

5757
## Quick Start
5858

@@ -86,6 +86,8 @@ mkdir -p /your/project/scripts
8686
cp scripts/apcp-gather.py /your/project/scripts/
8787
```
8888

89+
For a downstream product repository, treat these copied files as local agent operating context by default. AI agents can read them from local paths, private cloud docs, or generated context bundles, but the public GitHub repository does not need to expose the AI workflow files unless you intentionally publish sanitized templates. If the public repo should not show these files, put the APCP paths in `.git/info/exclude` or a private global excludes file before any push; use a committed `.gitignore` block only when the public ignore rule itself is acceptable.
90+
8991
Generate an AI-ready context package:
9092

9193
```bash
@@ -115,6 +117,11 @@ Git command rule:
115117
- Inspect files and folders directly first.
116118
- If Git state is truly needed, explain why and ask before running the command.
117119

120+
Public repository rule:
121+
- Install Nexus-APCP files for local or approved private/cloud agent context by default.
122+
- Before any GitHub push, keep installed APCP files, generated context bundles, private task state, and internal maps out of the public repository unless I explicitly approve sanitized public templates.
123+
- Prefer `.git/info/exclude` or a private global excludes file when the public GitHub repo should not reveal local AI workflow files.
124+
118125
Install these core files when available:
119126
- AI_PROJECT_CONTEXT_PROTOCOL.md
120127
- AI_MAIN.md
@@ -238,7 +245,7 @@ Yes. Nexus-APCP is model-agnostic and works with hosted assistants, IDE agents,
238245

239246
### Is filled project context safe to publish?
240247

241-
Usually no. Filled project context can expose internal architecture, deployment topology, database internals, secrets, private prompts, or security assumptions. Publish sanitized templates, not private implementation maps.
248+
Usually no. Filled project context can expose internal architecture, deployment topology, database internals, secrets, private prompts, security assumptions, and local AI workflow details. In downstream product repositories, keep installed APCP operating files local or in approved private/cloud knowledge bases by default. Publish sanitized templates, not private implementation maps.
242249

243250
### Why use YAML for task tracking?
244251

README_APCP_KIT.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## KIT CONTENTS (4 Files)
88

9-
This kit consists of 4 core files. You should use them all together:
9+
This kit consists of 4 core files. You should use them all together as agent operating context. In downstream product repositories, keep installed Nexus-APCP files local or in an approved private/cloud knowledge base by default unless you intentionally publish sanitized templates.
1010

1111
### 1 **AI_PROJECT_CONTEXT_PROTOCOL.md** (Main Documentation)
1212
- **Size**: ~20 KB
@@ -104,6 +104,8 @@ nano TASK_PROGRESS.yaml
104104

105105
Security rule: the filled `AI_PROJECT_CONTEXT_PROTOCOL.md` for a real project is private by default. It can expose backend structure, internal architecture, database internals, deployment topology, admin flows, private prompts, and security assumptions. Keep it local or in an approved private knowledge base unless you create a sanitized public version.
106106

107+
Public repository rule: AI agents may read APCP files from local paths, private cloud docs, or generated context bundles, but public GitHub does not need to show the local AI workflow files. Use `.git/info/exclude` or a private global excludes file when those filenames should not appear in the public repository.
108+
107109
### Step 3: Create Helper Scripts (5 min)
108110

109111
```bash
@@ -114,20 +116,16 @@ Security rule: the filled `AI_PROJECT_CONTEXT_PROTOCOL.md` for a real project is
114116
# - scripts/apcp-gather.py (context automation)
115117

116118
chmod +x scripts/*.sh
117-
git add scripts/
118-
git commit -m "chore: add APCP helper scripts"
119119
```
120120

121-
### Step 4: Commit to Git (2 min)
121+
### Step 4: Public Git Decision (2 min)
122122

123123
```bash
124-
# Commit sanitized templates/docs only. Keep filled AI_PROJECT_CONTEXT_PROTOCOL.md local/private by default.
125-
git add .gitignore
126-
git add docs/AI_ASSISTANT_PROMPT_TEMPLATES.md
127-
git add docs/SETUP_GUIDE.md
128-
git add docs/AI_PROJECT_CONTEXT_TEMPLATE.md # optional sanitized template, not the filled private context
129-
git commit -m "docs: initialize APCP system for AI-assisted development"
130-
git push
124+
# Default for downstream product repos:
125+
# keep installed APCP operating files local/private and do not push them to public GitHub.
126+
127+
# If public sanitized templates are intentionally approved, commit only those sanitized templates.
128+
# Do not commit filled project context, generated prompt bundles, private task state, or local AI logs.
131129
```
132130

133131
### Step 5: First AI Session (10 min)

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Security Policy
22

3-
Nexus-APCP is a public protocol kit, but real project context can be sensitive. Treat filled context files and generated AI context packages as private by default.
3+
Nexus-APCP is a public protocol kit, but real project context can be sensitive. Treat filled context files, generated AI context packages, and downstream installed APCP operating files as private by default unless sanitized publication is explicitly approved.
44

55
## Do Not Publish
66

77
- Filled `AI_PROJECT_CONTEXT.md` files from real projects.
8+
- Installed Nexus-APCP operating files copied into downstream public product repositories, unless they are intentionally approved sanitized templates.
89
- Backend maps, deployment maps, database internals, architecture-private docs, threat models, and security runbooks.
910
- API keys, tokens, credentials, certificates, service-account files, `.env` files, and local config.
1011
- Customer data, logs, production exports, model weights, private prompts, or vector databases.

0 commit comments

Comments
 (0)