auto-context-cli 1.0.3__tar.gz → 1.0.4__tar.gz
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.
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/PKG-INFO +2 -2
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/README.md +1 -1
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/pyproject.toml +1 -1
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/__init__.py +1 -1
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/scan_cmd.py +1 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/main.py +1 -1
- auto_context_cli-1.0.4/src/auto_context/templates/AGENTS.template.md +47 -0
- auto_context_cli-1.0.4/src/auto_context/templates/GEMINI.template.md +47 -0
- auto_context_cli-1.0.4/src/auto_context/templates/maintain_context.template.md +48 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rules/hub-satellite-architecture.md +1 -0
- auto_context_cli-1.0.3/src/auto_context/templates/AGENTS.template.md +0 -53
- auto_context_cli-1.0.3/src/auto_context/templates/GEMINI.template.md +0 -53
- auto_context_cli-1.0.3/src/auto_context/templates/maintain_context.template.md +0 -37
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/.gitignore +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/LICENSE +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/__init__.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/import_cmd.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/init_cmd.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/mcp.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/memory.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/share.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/commands/update_cmd.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/config.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/scanner.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/security.py +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/context.local.template.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/context.template.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/mcp_config.template.json +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/profile.template.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rule.template.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rules/code-standards.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rules/readme-docs-sync.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rules/security-boundaries.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/skill.template.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/skills/browser-testing/SKILL.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/skills/docker-ops/SKILL.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/skills/git-workflow/SKILL.md +0 -0
- {auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/skills/server-diagnostics/SKILL.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: auto-context-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Autonomous context & instruction manager for AI coding assistants
|
|
5
5
|
Author: Arghya Biswas
|
|
6
6
|
License: MIT
|
|
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
|
|
|
20
20
|
|
|
21
21
|
[](https://pypi.org/project/auto-context-cli/)
|
|
22
22
|
[](https://pypi.org/project/auto-context-cli/)
|
|
23
|
-
[](https://github.com/Cyber-arghya/auto-context/releases/tag/v1.0.
|
|
23
|
+
[](https://github.com/Cyber-arghya/auto-context/releases/tag/v1.0.4)
|
|
24
24
|
[](https://opensource.org/licenses/MIT)
|
|
25
25
|
[](#-quick-one-line-install)
|
|
26
26
|
[](#-supported-ai-assistants)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://pypi.org/project/auto-context-cli/)
|
|
8
8
|
[](https://pypi.org/project/auto-context-cli/)
|
|
9
|
-
[](https://github.com/Cyber-arghya/auto-context/releases/tag/v1.0.
|
|
9
|
+
[](https://github.com/Cyber-arghya/auto-context/releases/tag/v1.0.4)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
[](#-quick-one-line-install)
|
|
12
12
|
[](#-supported-ai-assistants)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Standing Agent Rules for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## Critical Mandate: Autonomous Context Synchronization & Precision Architecture
|
|
4
|
+
As an AI coding assistant working in this repository (`{{PROJECT_DIR}}`), you are **strictly mandated** to maintain the Hub & Satellite context architecture, navigate codebases with laser precision, and autonomously crystallize new rules and skills. The user must **never** need to remind or instruct you.
|
|
5
|
+
|
|
6
|
+
### 1. Precision Context Navigation Protocol
|
|
7
|
+
Whenever exploring code or resolving tasks during an active session, follow the precision formula:
|
|
8
|
+
$$\text{Precision Context} = \text{Route Map (Macro)} + \text{Grep/Symbol (Micro)} + \text{Targeted Range Read}$$
|
|
9
|
+
- **Never bulk-read entire directories or loop through 50+ source files.**
|
|
10
|
+
- First inspect `.agents/context/routes.md` or Section 2 of `context.md` for high-level file locations.
|
|
11
|
+
- Use `grep` or symbol search to pinpoint exact files and line numbers.
|
|
12
|
+
- Read only the specific target line range (e.g. `#L30-L70`) rather than loading entire large files.
|
|
13
|
+
|
|
14
|
+
### 2. Mandatory Post-Action Protocol & Satellite Sync (Phase 3)
|
|
15
|
+
Before concluding any turn or session, the agent MUST inspect and update context:
|
|
16
|
+
- **Routes & Pages:** If any API endpoint or UI view is created, modified, or removed, immediately update `.agents/context/routes.md` (or run `init-context scan`).
|
|
17
|
+
- **Database Models:** If any schema, migration, or entity is changed, immediately update `.agents/context/schema.md`.
|
|
18
|
+
- **Architecture Gotchas:** If a non-obvious trap, port collision, or bug invariant is discovered, immediately record it in `.agents/context/gotchas.md`.
|
|
19
|
+
- **Core Hub:** Keep `context.md` compact (< 400 tokens / 60 lines) as an executive routing hub.
|
|
20
|
+
|
|
21
|
+
### 3. Domain Consolidation & Anti-Fragmentation (Single Responsibility)
|
|
22
|
+
When codifying new guidelines or workflows, DO NOT create fragmented micro-files if a domain file already exists:
|
|
23
|
+
- **Docker & Containerization:** Update/append to `.agents/skills/docker-ops/SKILL.md`.
|
|
24
|
+
- **Git & Release Workflows:** Update/append to `.agents/skills/git-workflow/SKILL.md`.
|
|
25
|
+
- **Coding Standards & Patterns:** Update/append to `.agents/rules/code-standards.md`.
|
|
26
|
+
- **Security Boundaries:** Update/append to `.agents/rules/security-boundaries.md`.
|
|
27
|
+
- Only create a new rule or skill file (`init-context -r` / `-s`) if it represents a distinctly new, independent domain.
|
|
28
|
+
|
|
29
|
+
### 4. Context Distillation over Blind Deletion
|
|
30
|
+
Never blindly delete or truncate context:
|
|
31
|
+
- When problem logs or debugging notes grow beyond 50 lines, distill and synthesize the technical root causes into high-density invariants inside `.agents/context/gotchas.md`.
|
|
32
|
+
- Preserve 100% of the architectural wisdom with 90% fewer tokens.
|
|
33
|
+
|
|
34
|
+
### 5. Local Sandbox Test Credentials (`context.local.md`)
|
|
35
|
+
- **Chat Continuity:** When starting a new session or switching chats, always read `context.local.md` to identify local dev ports, seed users, and mock passwords (`admin@test.local`) before running browser automation or curl tests.
|
|
36
|
+
- **Strict Boundary:** Real production secrets, payment keys, and cloud tokens belong strictly in `.env`.
|
|
37
|
+
- Ensure `context.local.md` is protected with `.gitignore` and `chmod 600`.
|
|
38
|
+
|
|
39
|
+
### 6. Autonomous Learning & Tool Access
|
|
40
|
+
- **Zero Token Waste:** DO NOT burn tokens manually searching directories to check for duplicates. Directly run `init-context -r <name> [-g]` — the CLI has instant built-in duplicate detection and collision guards.
|
|
41
|
+
- **Mandatory Global Scope:** When the user mentions "for future", "always", or defines a reusable standard, **MANDATORY: Always pass `--global` (`-g`)** and immediately follow with `init-context memory push`.
|
|
42
|
+
- Available CLI commands:
|
|
43
|
+
- `init-context scan`: Refresh stack-adaptive satellites (`routes.md`, `schema.md`, `gotchas.md`).
|
|
44
|
+
- `init-context -r <name> [-g]`: Create rule.
|
|
45
|
+
- `init-context -s <name> [-g]`: Create skill.
|
|
46
|
+
- `init-context update`: Safely sync public rules and upstream capabilities (non-breaking).
|
|
47
|
+
- `init-context memory push`: Push updates to central memory.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Standing Agent Rules for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## Critical Mandate: Autonomous Context Synchronization & Precision Architecture
|
|
4
|
+
As an AI coding assistant working in this repository (`{{PROJECT_DIR}}`), you are **strictly mandated** to maintain the Hub & Satellite context architecture, navigate codebases with laser precision, and autonomously crystallize new rules and skills. The user must **never** need to remind or instruct you.
|
|
5
|
+
|
|
6
|
+
### 1. Precision Context Navigation Protocol
|
|
7
|
+
Whenever exploring code or resolving tasks during an active session, follow the precision formula:
|
|
8
|
+
$$\text{Precision Context} = \text{Route Map (Macro)} + \text{Grep/Symbol (Micro)} + \text{Targeted Range Read}$$
|
|
9
|
+
- **Never bulk-read entire directories or loop through 50+ source files.**
|
|
10
|
+
- First inspect `.agents/context/routes.md` or Section 2 of `context.md` for high-level file locations.
|
|
11
|
+
- Use `grep` or symbol search to pinpoint exact files and line numbers.
|
|
12
|
+
- Read only the specific target line range (e.g. `#L30-L70`) rather than loading entire large files.
|
|
13
|
+
|
|
14
|
+
### 2. Mandatory Post-Action Protocol & Satellite Sync (Phase 3)
|
|
15
|
+
Before concluding any turn or session, the agent MUST inspect and update context:
|
|
16
|
+
- **Routes & Pages:** If any API endpoint or UI view is created, modified, or removed, immediately update `.agents/context/routes.md` (or run `init-context scan`).
|
|
17
|
+
- **Database Models:** If any schema, migration, or entity is changed, immediately update `.agents/context/schema.md`.
|
|
18
|
+
- **Architecture Gotchas:** If a non-obvious trap, port collision, or bug invariant is discovered, immediately record it in `.agents/context/gotchas.md`.
|
|
19
|
+
- **Core Hub:** Keep `context.md` compact (< 400 tokens / 60 lines) as an executive routing hub.
|
|
20
|
+
|
|
21
|
+
### 3. Domain Consolidation & Anti-Fragmentation (Single Responsibility)
|
|
22
|
+
When codifying new guidelines or workflows, DO NOT create fragmented micro-files if a domain file already exists:
|
|
23
|
+
- **Docker & Containerization:** Update/append to `.agents/skills/docker-ops/SKILL.md`.
|
|
24
|
+
- **Git & Release Workflows:** Update/append to `.agents/skills/git-workflow/SKILL.md`.
|
|
25
|
+
- **Coding Standards & Patterns:** Update/append to `.agents/rules/code-standards.md`.
|
|
26
|
+
- **Security Boundaries:** Update/append to `.agents/rules/security-boundaries.md`.
|
|
27
|
+
- Only create a new rule or skill file (`init-context -r` / `-s`) if it represents a distinctly new, independent domain.
|
|
28
|
+
|
|
29
|
+
### 4. Context Distillation over Blind Deletion
|
|
30
|
+
Never blindly delete or truncate context:
|
|
31
|
+
- When problem logs or debugging notes grow beyond 50 lines, distill and synthesize the technical root causes into high-density invariants inside `.agents/context/gotchas.md`.
|
|
32
|
+
- Preserve 100% of the architectural wisdom with 90% fewer tokens.
|
|
33
|
+
|
|
34
|
+
### 5. Local Sandbox Test Credentials (`context.local.md`)
|
|
35
|
+
- **Chat Continuity:** When starting a new session or switching chats, always read `context.local.md` to identify local dev ports, seed users, and mock passwords (`admin@test.local`) before running browser automation or curl tests.
|
|
36
|
+
- **Strict Boundary:** Real production secrets, payment keys, and cloud tokens belong strictly in `.env`.
|
|
37
|
+
- Ensure `context.local.md` is protected with `.gitignore` and `chmod 600`.
|
|
38
|
+
|
|
39
|
+
### 6. Autonomous Learning & Tool Access
|
|
40
|
+
- **Zero Token Waste:** DO NOT burn tokens manually searching directories to check for duplicates. Directly run `init-context -r <name> [-g]` — the CLI has instant built-in duplicate detection and collision guards.
|
|
41
|
+
- **Mandatory Global Scope:** When the user mentions "for future", "always", or defines a reusable standard, **MANDATORY: Always pass `--global` (`-g`)** and immediately follow with `init-context memory push`.
|
|
42
|
+
- Available CLI commands:
|
|
43
|
+
- `init-context scan`: Refresh stack-adaptive satellites (`routes.md`, `schema.md`, `gotchas.md`).
|
|
44
|
+
- `init-context -r <name> [-g]`: Create rule.
|
|
45
|
+
- `init-context -s <name> [-g]`: Create skill.
|
|
46
|
+
- `init-context update`: Safely sync public rules and upstream capabilities (non-breaking).
|
|
47
|
+
- `init-context memory push`: Push updates to central memory.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maintain_context
|
|
3
|
+
description: Mandates autonomous, continuous synchronization of context.md and proactive rule/skill learning on any repository or server configuration change without requiring user prompting.
|
|
4
|
+
trigger: always_on
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Autonomous Context Maintenance & Self-Evolution Rule
|
|
8
|
+
|
|
9
|
+
## 1. Precision Context Navigation Protocol
|
|
10
|
+
Whenever exploring code or resolving tasks during an active session, follow the precision formula:
|
|
11
|
+
$$\text{Precision Context} = \text{Route Map (Macro)} + \text{Grep/Symbol (Micro)} + \text{Targeted Range Read}$$
|
|
12
|
+
- **Never bulk-read entire directories or loop through 50+ source files.**
|
|
13
|
+
- First inspect `.agents/context/routes.md` or Section 2 of `context.md` for high-level file locations.
|
|
14
|
+
- Use `grep` or symbol search to pinpoint exact files and line numbers.
|
|
15
|
+
- Read only the specific target line range (e.g. `#L30-L70`) rather than loading entire large files.
|
|
16
|
+
|
|
17
|
+
## 2. Mandatory Post-Action Protocol & Satellite Sync (Phase 3)
|
|
18
|
+
Before concluding any turn or session, the agent MUST inspect and update context:
|
|
19
|
+
- **Routes & Pages:** If any API endpoint or UI view is created, modified, or removed, immediately update `.agents/context/routes.md` (or run `init-context scan`).
|
|
20
|
+
- **Database Models:** If any schema, migration, or entity is changed, immediately update `.agents/context/schema.md`.
|
|
21
|
+
- **Architecture Gotchas:** If a non-obvious trap, port collision, or bug invariant is discovered, immediately record it in `.agents/context/gotchas.md`.
|
|
22
|
+
- **Core Hub:** Keep `context.md` compact (< 400 tokens / 60 lines) as an executive routing hub.
|
|
23
|
+
|
|
24
|
+
## 3. Domain Consolidation & Anti-Fragmentation (Single Responsibility)
|
|
25
|
+
When codifying new guidelines or workflows, DO NOT create fragmented micro-files if a domain file already exists:
|
|
26
|
+
- **Docker & Containerization:** Update/append to `.agents/skills/docker-ops/SKILL.md`.
|
|
27
|
+
- **Git & Release Workflows:** Update/append to `.agents/skills/git-workflow/SKILL.md`.
|
|
28
|
+
- **Coding Standards & Patterns:** Update/append to `.agents/rules/code-standards.md`.
|
|
29
|
+
- **Security Boundaries:** Update/append to `.agents/rules/security-boundaries.md`.
|
|
30
|
+
- Only create a new rule or skill file (`init-context -r` / `-s`) if it represents a distinctly new, independent domain.
|
|
31
|
+
|
|
32
|
+
## 4. Context Distillation over Blind Deletion
|
|
33
|
+
Never blindly delete or truncate context:
|
|
34
|
+
- When problem logs or debugging notes grow beyond 50 lines, distill and synthesize the technical root causes into high-density invariants inside `.agents/context/gotchas.md`.
|
|
35
|
+
- Preserve 100% of the architectural wisdom with 90% fewer tokens.
|
|
36
|
+
|
|
37
|
+
## 5. Local Sandbox Test Credentials (`context.local.md`)
|
|
38
|
+
- **Chat Continuity:** When starting a new session or switching chats, always read `context.local.md` to identify local dev ports, seed users, and mock passwords (`admin@test.local`) before running browser automation or curl tests.
|
|
39
|
+
- **Strict Boundary:** Real production secrets, payment keys, and cloud tokens belong strictly in `.env`.
|
|
40
|
+
- Ensure `context.local.md` is protected with `.gitignore` and `chmod 600`.
|
|
41
|
+
|
|
42
|
+
## 6. Autonomous Learning & Tooling
|
|
43
|
+
- **Zero Token Waste:** DO NOT burn tokens manually searching directories to check for duplicates. Directly run `init-context -r <name> [-g]` — the CLI has instant built-in duplicate detection and collision guards.
|
|
44
|
+
- **Mandatory Global Scope:** When the user mentions "for future", "always", or defines a reusable standard, **MANDATORY: Always pass `--global` (`-g`)** and immediately follow with `init-context memory push`.
|
|
45
|
+
- The agent has full access to run `init-context`:
|
|
46
|
+
- `init-context scan`: Refresh stack-adaptive satellites (`routes.md`, `schema.md`, `gotchas.md`).
|
|
47
|
+
- `init-context update`: Safely sync public rules and upstream capabilities (non-breaking).
|
|
48
|
+
- `init-context memory push`: Push updates to central memory.
|
|
@@ -31,3 +31,4 @@ Prevent monolithic context file bloat, eliminate token waste, ensure 100% idempo
|
|
|
31
31
|
4. **KISS & DRY Heuristics:**
|
|
32
32
|
- Prefer language-agnostic filesystem convention heuristics (directories, manifests) over heavy language AST parsers that crash on in-flight syntax errors.
|
|
33
33
|
- All scanners must degrade gracefully with zero unhandled exceptions.
|
|
34
|
+
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Standing Agent Rules for {{PROJECT_NAME}}
|
|
2
|
-
|
|
3
|
-
## Critical Mandate: Autonomous `context.md` Synchronization & Self-Evolution
|
|
4
|
-
As an AI coding assistant working in this repository (`{{PROJECT_DIR}}`), you are **strictly mandated** to keep `{{PROJECT_DIR}}/context.md` continuously up to date and autonomously learn, persist, and crystallize new rules and skills. The user must **never** need to remind or instruct you.
|
|
5
|
-
|
|
6
|
-
### 1. Mandatory Post-Action Protocol
|
|
7
|
-
Whenever ANY of the following events occur in any session or conversation turn:
|
|
8
|
-
- A configuration file or script is created, edited, moved, or deleted.
|
|
9
|
-
- A problem, bug, or error is encountered and diagnosed.
|
|
10
|
-
- Credentials, tokens, user accounts, or security keys are generated or updated.
|
|
11
|
-
- Architectural decisions or operational steps are modified.
|
|
12
|
-
|
|
13
|
-
**You MUST immediately update `{{PROJECT_DIR}}/context.md` before finalizing your response.**
|
|
14
|
-
|
|
15
|
-
### 2. Autonomous Learning & Self-Evolution Protocol
|
|
16
|
-
Whenever you learn a new pattern, receive a correction, observe a coding preference, or resolve a complex repeatable problem:
|
|
17
|
-
1. **Identify the Type:**
|
|
18
|
-
- **Rule:** If it is a constraint, coding standard, safety boundary, or architectural preference -> Create a Rule (`init-context -r <name>`).
|
|
19
|
-
- **Skill:** If it is a multi-step procedure, deployment workflow, diagnosis runbook, or CLI sequence -> Create a Skill (`init-context -s <name>`).
|
|
20
|
-
2. **Zero Token Waste:**
|
|
21
|
-
- **DO NOT burn tokens manually searching directories or reading files to check for existing rules.** Directly run `init-context -r <name> [-g]` — the CLI has instant built-in duplicate detection and collision guards.
|
|
22
|
-
3. **Mandatory Global Scope:**
|
|
23
|
-
- When the user mentions "for future", "always", or defines a reusable standard, **MANDATORY: Always pass `--global` (`-g`)** and immediately follow with `init-context memory push`.
|
|
24
|
-
- **Project-Specific:** Only omit `-g` if strictly confined to this specific project repository.
|
|
25
|
-
4. **Execution:**
|
|
26
|
-
- Use the `init-context` CLI tool to scaffold the file.
|
|
27
|
-
- Populate it with clear objectives, constraints, or step-by-step instructions.
|
|
28
|
-
- Inform the user of the new rule or skill codified.
|
|
29
|
-
|
|
30
|
-
### 3. Tool Access: `init-context`
|
|
31
|
-
You have native access to run `init-context` via terminal commands:
|
|
32
|
-
- `init-context`: Scaffolds or repairs project context.
|
|
33
|
-
- `init-context -r <rule-name> [-g]`: Creates a new rule with frontmatter.
|
|
34
|
-
- `init-context -s <skill-name> [-g]`: Creates a new skill with frontmatter.
|
|
35
|
-
- `init-context update`: Safely syncs public rules and upstream capabilities (non-breaking).
|
|
36
|
-
- `init-context memory push`: Synchronizes central brain memory to private Git repository.
|
|
37
|
-
|
|
38
|
-
### 4. Required Content & Structure in `context.md`
|
|
39
|
-
1. **Master Credentials & Configuration Vault (Section 1):** Keep all ports, IPs, secrets, tokens, and endpoints synchronized.
|
|
40
|
-
2. **Chronological Problem Log & Technical Solutions (Section 2):** Document symptom, root cause, exact commands/code used, and update Mermaid diagram.
|
|
41
|
-
3. **Architecture & Component Layout (Section 3):** Keep stack overview and directory maps accurate.
|
|
42
|
-
4. **Operations Runbook (Section 4):** Ensure 1-step reproduction instructions remain functional.
|
|
43
|
-
|
|
44
|
-
### 5. Local Sandbox Credentials & Dummy Test Fixtures (`context.local.md`)
|
|
45
|
-
- **Inspection Mandate:** When testing local dev servers, performing browser automation (Playwright/Puppeteer), or authenticating API endpoints, ALWAYS read `context.local.md` first before prompting the user for credentials.
|
|
46
|
-
- **Strict Mock Boundary:** ONLY store dummy test credentials, mock accounts (`admin@test.local`), seed users, and local dev ports in `context.local.md`.
|
|
47
|
-
- **Zero Real Secrets:** Real production secrets, payment keys, or personal tokens MUST NEVER be stored in `context.local.md` or `context.md`; reference them via `.env` or system environment variables.
|
|
48
|
-
- **Git Protection:** Ensure `context.local.md` remains strictly ignored by Git (`.gitignore`) and protected with `chmod 600`.
|
|
49
|
-
|
|
50
|
-
### 6. Two-Tier Progressive Disclosure Protocol (Token Optimization)
|
|
51
|
-
- **Initial Boot Budget:** NEVER read full `SKILL.md` files into the initial context. Use Section 5 of `context.md` for lightweight routing (< 800 tokens).
|
|
52
|
-
- **Dynamic On-Demand Loading:** Only when a user prompt matches a skill's triggers (e.g. "docker", "rebase", "diagnostics", "browser"), dynamically inspect the file using `read_file`.
|
|
53
|
-
- **Zero Session Bloat:** Once the task concludes, do not keep the full skill body in persistent memory.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Standing Agent Rules for {{PROJECT_NAME}}
|
|
2
|
-
|
|
3
|
-
## Critical Mandate: Autonomous `context.md` Synchronization & Self-Evolution
|
|
4
|
-
As an AI coding assistant working in this repository (`{{PROJECT_DIR}}`), you are **strictly mandated** to keep `{{PROJECT_DIR}}/context.md` continuously up to date and autonomously learn, persist, and crystallize new rules and skills. The user must **never** need to remind or instruct you.
|
|
5
|
-
|
|
6
|
-
### 1. Mandatory Post-Action Protocol
|
|
7
|
-
Whenever ANY of the following events occur in any session or conversation turn:
|
|
8
|
-
- A configuration file or script is created, edited, moved, or deleted.
|
|
9
|
-
- A problem, bug, or error is encountered and diagnosed.
|
|
10
|
-
- Credentials, tokens, user accounts, or security keys are generated or updated.
|
|
11
|
-
- Architectural decisions or operational steps are modified.
|
|
12
|
-
|
|
13
|
-
**You MUST immediately update `{{PROJECT_DIR}}/context.md` before finalizing your response.**
|
|
14
|
-
|
|
15
|
-
### 2. Autonomous Learning & Self-Evolution Protocol
|
|
16
|
-
Whenever you learn a new pattern, receive a correction, observe a coding preference, or resolve a complex repeatable problem:
|
|
17
|
-
1. **Identify the Type:**
|
|
18
|
-
- **Rule:** If it is a constraint, coding standard, safety boundary, or architectural preference -> Create a Rule (`init-context -r <name>`).
|
|
19
|
-
- **Skill:** If it is a multi-step procedure, deployment workflow, diagnosis runbook, or CLI sequence -> Create a Skill (`init-context -s <name>`).
|
|
20
|
-
2. **Zero Token Waste:**
|
|
21
|
-
- **DO NOT burn tokens manually searching directories or reading files to check for existing rules.** Directly run `init-context -r <name> [-g]` — the CLI has instant built-in duplicate detection and collision guards.
|
|
22
|
-
3. **Mandatory Global Scope:**
|
|
23
|
-
- When the user mentions "for future", "always", or defines a reusable standard, **MANDATORY: Always pass `--global` (`-g`)** and immediately follow with `init-context memory push`.
|
|
24
|
-
- **Project-Specific:** Only omit `-g` if strictly confined to this specific project repository.
|
|
25
|
-
4. **Execution:**
|
|
26
|
-
- Use the `init-context` CLI tool to scaffold the file.
|
|
27
|
-
- Populate it with clear objectives, constraints, or step-by-step instructions.
|
|
28
|
-
- Inform the user of the new rule or skill codified.
|
|
29
|
-
|
|
30
|
-
### 3. Tool Access: `init-context`
|
|
31
|
-
You have native access to run `init-context` via terminal commands:
|
|
32
|
-
- `init-context`: Scaffolds or repairs project context.
|
|
33
|
-
- `init-context -r <rule-name> [-g]`: Creates a new rule with frontmatter.
|
|
34
|
-
- `init-context -s <skill-name> [-g]`: Creates a new skill with frontmatter.
|
|
35
|
-
- `init-context update`: Safely syncs public rules and upstream capabilities (non-breaking).
|
|
36
|
-
- `init-context memory push`: Synchronizes central brain memory to private Git repository.
|
|
37
|
-
|
|
38
|
-
### 4. Required Content & Structure in `context.md`
|
|
39
|
-
1. **Master Credentials & Configuration Vault (Section 1):** Keep all ports, IPs, secrets, tokens, and endpoints synchronized.
|
|
40
|
-
2. **Chronological Problem Log & Technical Solutions (Section 2):** Document symptom, root cause, exact commands/code used, and update Mermaid diagram.
|
|
41
|
-
3. **Architecture & Component Layout (Section 3):** Keep stack overview and directory maps accurate.
|
|
42
|
-
4. **Operations Runbook (Section 4):** Ensure 1-step reproduction instructions remain functional.
|
|
43
|
-
|
|
44
|
-
### 5. Local Sandbox Credentials & Dummy Test Fixtures (`context.local.md`)
|
|
45
|
-
- **Inspection Mandate:** When testing local dev servers, performing browser automation (Playwright/Puppeteer), or authenticating API endpoints, ALWAYS read `context.local.md` first before prompting the user for credentials.
|
|
46
|
-
- **Strict Mock Boundary:** ONLY store dummy test credentials, mock accounts (`admin@test.local`), seed users, and local dev ports in `context.local.md`.
|
|
47
|
-
- **Zero Real Secrets:** Real production secrets, payment keys, or personal tokens MUST NEVER be stored in `context.local.md` or `context.md`; reference them via `.env` or system environment variables.
|
|
48
|
-
- **Git Protection:** Ensure `context.local.md` remains strictly ignored by Git (`.gitignore`) and protected with `chmod 600`.
|
|
49
|
-
|
|
50
|
-
### 6. Two-Tier Progressive Disclosure Protocol (Token Optimization)
|
|
51
|
-
- **Initial Boot Budget:** NEVER read full `SKILL.md` files into the initial context. Use Section 5 of `context.md` for lightweight routing (< 800 tokens).
|
|
52
|
-
- **Dynamic On-Demand Loading:** Only when a user prompt matches a skill's triggers (e.g. "docker", "rebase", "diagnostics", "browser"), dynamically inspect the file using `read_file`.
|
|
53
|
-
- **Zero Session Bloat:** Once the task concludes, do not keep the full skill body in persistent memory.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: maintain_context
|
|
3
|
-
description: Mandates autonomous, continuous synchronization of context.md and proactive rule/skill learning on any repository or server configuration change without requiring user prompting.
|
|
4
|
-
trigger: always_on
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Autonomous Context Maintenance & Self-Evolution Rule
|
|
8
|
-
|
|
9
|
-
1. **Mandatory Synchronization**: Every agent working in this workspace MUST inspect and update `context.md` before finishing their turn whenever any of the following occur:
|
|
10
|
-
- Script or configuration edits (environment variables, docker-compose, configs, network parameters).
|
|
11
|
-
- Problem diagnosis, debugging steps, and technical solutions.
|
|
12
|
-
- User credentials, tokens, secrets, or permissions changes.
|
|
13
|
-
- Architectural decisions or operational runbooks.
|
|
14
|
-
|
|
15
|
-
2. **Autonomous Learning & Skill Crystallization**:
|
|
16
|
-
- **Zero Token Waste:** DO NOT burn tokens manually searching directories or reading files to check for existing rules. Directly run `init-context -r <name> [-g]` — the CLI has instant built-in duplicate detection and collision guards.
|
|
17
|
-
- **Mandatory Global Scope:** When the user mentions "for future", "always", or defines a reusable standard, **MANDATORY: Always pass `--global` (`-g`)** and immediately follow with `init-context memory push`.
|
|
18
|
-
- Populates the file with clear instructions and notifies the user.
|
|
19
|
-
|
|
20
|
-
3. **CLI Tool Availability**:
|
|
21
|
-
- The agent has full access to run `init-context` directly via terminal:
|
|
22
|
-
- `init-context`: Initialize/repair context.
|
|
23
|
-
- `init-context -r <name> [-g]`: Create rule.
|
|
24
|
-
- `init-context -s <name> [-g]`: Create skill.
|
|
25
|
-
- `init-context update`: Safely sync public rules and upstream capabilities (non-breaking).
|
|
26
|
-
- `init-context memory push`: Push updates to central memory.
|
|
27
|
-
|
|
28
|
-
4. **No User Reminder Needed**: The user must never need to ask the agent to update `context.md` or learn rules. This is a strict automated post-condition for all actions.
|
|
29
|
-
|
|
30
|
-
5. **Local Sandbox Test Credentials (`context.local.md`)**:
|
|
31
|
-
- For local dev logins, automated browser testing, and mock fixtures, inspect and update `context.local.md`.
|
|
32
|
-
- Never store real production secrets or payment tokens in markdown files. Real secrets belong in `.env`.
|
|
33
|
-
- Ensure `context.local.md` is strictly git-ignored and protected with `chmod 600`.
|
|
34
|
-
|
|
35
|
-
6. **Two-Tier Progressive Disclosure**:
|
|
36
|
-
- Never load full `SKILL.md` bodies into the initial context. Use Section 5 of `context.md` for routing.
|
|
37
|
-
- Dynamically load specific skills via `read_file` only when a user prompt matches their triggers.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/context.template.md
RENAMED
|
File without changes
|
|
File without changes
|
{auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/profile.template.md
RENAMED
|
File without changes
|
{auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rule.template.md
RENAMED
|
File without changes
|
{auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/rules/code-standards.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auto_context_cli-1.0.3 → auto_context_cli-1.0.4}/src/auto_context/templates/skill.template.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|