cokodo-agent 1.0.0__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.
- cokodo_agent-1.0.0/.gitignore +32 -0
- cokodo_agent-1.0.0/PKG-INFO +228 -0
- cokodo_agent-1.0.0/README.md +196 -0
- cokodo_agent-1.0.0/pyproject.toml +59 -0
- cokodo_agent-1.0.0/src/cokodo_agent/__init__.py +3 -0
- cokodo_agent-1.0.0/src/cokodo_agent/__main__.py +6 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/ci/github-actions.template.yml +28 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/ci/pre-commit-config.template.yaml +9 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/ci/readme.md +34 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/claude/adapt_for_claude.py +228 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/claude/instructions.template.md +56 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/cursor/rules.template.md +42 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/github-copilot/instructions.template.md +43 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/google-antigravity/adapt_for_antigravity.py +232 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/adapters/google-antigravity/instructions.template.md +51 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/conventions.md +338 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/core-rules.md +122 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/examples.md +93 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/instructions.md +64 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/security.md +197 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/stack-specs/git.md +155 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/stack-specs/python.md +165 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/stack-specs/qt.md +179 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/stack-specs/rust.md +165 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/ai-boundaries.md +47 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/bug-prevention.md +148 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/design-principles.md +186 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/documentation.md +154 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/pre-task-checklist.md +72 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/quality-assurance.md +125 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/review-process.md +111 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/core/workflows/testing.md +174 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/index.md +177 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/manifest.json +166 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/meta/adr-archive.md +22 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/meta/protocol-adr.md +97 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/project/adr/readme.md +45 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/project/context.md +61 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/project/known-issues.md +45 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/project/tech-stack.md +79 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/quick-reference.md +144 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/scripts/init_agent.py +200 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/scripts/lint-protocol.py +262 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/scripts/requirements.txt +13 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/scripts/token-counter.py +210 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/skills/agent-governance/SKILL.md +79 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/skills/ai-integration/domain-adaptation.md +75 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/skills/ai-integration/llm-client.md +98 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/skills/ai-integration/prompt-engineering.md +87 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/skills/guardian/SKILL.md +85 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/skills/skill-interface.md +131 -0
- cokodo_agent-1.0.0/src/cokodo_agent/bundled/agent/start-here.md +65 -0
- cokodo_agent-1.0.0/src/cokodo_agent/cli.py +144 -0
- cokodo_agent-1.0.0/src/cokodo_agent/config.py +56 -0
- cokodo_agent-1.0.0/src/cokodo_agent/fetcher/__init__.py +5 -0
- cokodo_agent-1.0.0/src/cokodo_agent/fetcher/base.py +44 -0
- cokodo_agent-1.0.0/src/cokodo_agent/fetcher/builtin.py +39 -0
- cokodo_agent-1.0.0/src/cokodo_agent/fetcher/github.py +118 -0
- cokodo_agent-1.0.0/src/cokodo_agent/fetcher/remote.py +46 -0
- cokodo_agent-1.0.0/src/cokodo_agent/fetcher/resolver.py +74 -0
- cokodo_agent-1.0.0/src/cokodo_agent/generator.py +268 -0
- cokodo_agent-1.0.0/src/cokodo_agent/prompts.py +98 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
env/
|
|
8
|
+
venv/
|
|
9
|
+
.venv/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
dist/
|
|
12
|
+
build/
|
|
13
|
+
|
|
14
|
+
# IDE
|
|
15
|
+
.idea/
|
|
16
|
+
.vscode/
|
|
17
|
+
*.swp
|
|
18
|
+
*.swo
|
|
19
|
+
*~
|
|
20
|
+
|
|
21
|
+
# OS
|
|
22
|
+
.DS_Store
|
|
23
|
+
Thumbs.db
|
|
24
|
+
|
|
25
|
+
# Temp files
|
|
26
|
+
*.tmp
|
|
27
|
+
*.temp
|
|
28
|
+
*.log
|
|
29
|
+
|
|
30
|
+
# Local config (if any)
|
|
31
|
+
.env
|
|
32
|
+
.env.local
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cokodo-agent
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: AI Agent Collaboration Protocol Generator - Create standardized .agent protocol for your projects
|
|
5
|
+
Project-URL: Homepage, https://github.com/dinwind/agent_protocol
|
|
6
|
+
Project-URL: Repository, https://github.com/dinwind/agent_protocol
|
|
7
|
+
Project-URL: Issues, https://github.com/dinwind/agent_protocol/issues
|
|
8
|
+
Author: dinwind
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: agent,ai,claude,cokodo,copilot,cursor,generator,protocol
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Requires-Dist: httpx>=0.25.0
|
|
24
|
+
Requires-Dist: jinja2>=3.1.0
|
|
25
|
+
Requires-Dist: questionary>=2.0.0
|
|
26
|
+
Requires-Dist: rich>=13.0.0
|
|
27
|
+
Requires-Dist: typer>=0.9.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# Cokodo Agent
|
|
34
|
+
|
|
35
|
+
A CLI tool to generate standardized AI collaboration protocol (`.agent`) for your projects.
|
|
36
|
+
|
|
37
|
+
Similar to `create-react-app`, this tool helps you quickly set up an `.agent` directory with best practices for AI-assisted development.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Install globally
|
|
45
|
+
pip install cokodo-agent
|
|
46
|
+
|
|
47
|
+
# Or use pipx (recommended)
|
|
48
|
+
pipx install cokodo-agent
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Navigate to your project
|
|
57
|
+
cd my-project
|
|
58
|
+
|
|
59
|
+
# Run the generator
|
|
60
|
+
cokodo init
|
|
61
|
+
|
|
62
|
+
# Or specify a path
|
|
63
|
+
cokodo init ./new-project
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Usage
|
|
69
|
+
|
|
70
|
+
### Interactive Mode (Default)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
$ cokodo init
|
|
74
|
+
|
|
75
|
+
Cokodo Agent v1.0.0
|
|
76
|
+
====================
|
|
77
|
+
|
|
78
|
+
Fetching protocol...
|
|
79
|
+
[1/2] GitHub Release... OK (v2.1.0)
|
|
80
|
+
|
|
81
|
+
? Project name: my-awesome-app
|
|
82
|
+
? Brief description: A task management web application
|
|
83
|
+
|
|
84
|
+
? Primary tech stack:
|
|
85
|
+
> Python
|
|
86
|
+
Rust
|
|
87
|
+
Qt/C++
|
|
88
|
+
Mixed
|
|
89
|
+
Other
|
|
90
|
+
|
|
91
|
+
? AI tools to configure: (space to select)
|
|
92
|
+
[x] Cursor
|
|
93
|
+
[x] GitHub Copilot
|
|
94
|
+
[ ] Claude Projects
|
|
95
|
+
|
|
96
|
+
Generating .agent/
|
|
97
|
+
[========================================] 100%
|
|
98
|
+
|
|
99
|
+
Success! Created .agent in /path/to/my-awesome-app
|
|
100
|
+
|
|
101
|
+
Next steps:
|
|
102
|
+
1. Review .agent/project/context.md
|
|
103
|
+
2. Start coding with AI assistance!
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Quick Mode
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Use defaults, skip prompts
|
|
110
|
+
cokodo init --yes
|
|
111
|
+
|
|
112
|
+
# Specify options directly
|
|
113
|
+
cokodo init --name "my-app" --stack python
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Commands
|
|
117
|
+
|
|
118
|
+
| Command | Description |
|
|
119
|
+
|---------|-------------|
|
|
120
|
+
| `cokodo init [path]` | Create .agent in target directory |
|
|
121
|
+
| `cokodo version` | Show version information |
|
|
122
|
+
|
|
123
|
+
### Options
|
|
124
|
+
|
|
125
|
+
| Option | Description |
|
|
126
|
+
|--------|-------------|
|
|
127
|
+
| `--yes, -y` | Skip prompts, use defaults |
|
|
128
|
+
| `--name` | Project name |
|
|
129
|
+
| `--stack` | Tech stack (python/rust/qt/mixed/other) |
|
|
130
|
+
| `--force` | Overwrite existing .agent directory |
|
|
131
|
+
| `--offline` | Use built-in protocol (no network) |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Protocol Sources
|
|
136
|
+
|
|
137
|
+
The tool fetches the latest protocol from multiple sources with fallback:
|
|
138
|
+
|
|
139
|
+
| Priority | Source | Description |
|
|
140
|
+
|----------|--------|-------------|
|
|
141
|
+
| 1 | GitHub Release | Latest version from repository |
|
|
142
|
+
| 2 | Remote Server | Backup server [reserved] |
|
|
143
|
+
| 3 | Built-in | Bundled version in package |
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
Priority 1: GitHub Release
|
|
147
|
+
|
|
|
148
|
+
| [unavailable]
|
|
149
|
+
v
|
|
150
|
+
Priority 2: Remote Server [reserved, not implemented]
|
|
151
|
+
|
|
|
152
|
+
| [unavailable]
|
|
153
|
+
v
|
|
154
|
+
Priority 3: Built-in (offline fallback)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Generated Structure
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
your-project/
|
|
163
|
+
+-- .agent/ # Protocol directory
|
|
164
|
+
| +-- start-here.md # * Entry point
|
|
165
|
+
| +-- quick-reference.md # Cheat sheet
|
|
166
|
+
| +-- index.md # Navigation
|
|
167
|
+
| +-- manifest.json # Config
|
|
168
|
+
| +-- core/ # Governance rules
|
|
169
|
+
| +-- project/ # Project-specific
|
|
170
|
+
| | +-- context.md # <- Customized
|
|
171
|
+
| | +-- tech-stack.md # <- Customized
|
|
172
|
+
| +-- skills/ # Skill modules
|
|
173
|
+
| +-- adapters/ # Tool adapters
|
|
174
|
+
| +-- meta/ # Protocol evolution
|
|
175
|
+
| +-- scripts/ # Helper scripts
|
|
176
|
+
|
|
|
177
|
+
+-- .cursorrules # [Optional] Cursor config
|
|
178
|
+
+-- .github/
|
|
179
|
+
+-- copilot-instructions.md # [Optional] Copilot config
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Configuration
|
|
185
|
+
|
|
186
|
+
### Environment Variables
|
|
187
|
+
|
|
188
|
+
| Variable | Description |
|
|
189
|
+
|----------|-------------|
|
|
190
|
+
| `COKODO_OFFLINE` | Force offline mode (`1` or `true`) |
|
|
191
|
+
| `COKODO_CACHE_DIR` | Custom cache directory |
|
|
192
|
+
|
|
193
|
+
### Cache Location
|
|
194
|
+
|
|
195
|
+
Downloaded protocols are cached at:
|
|
196
|
+
- Linux/macOS: `~/.cache/cokodo/`
|
|
197
|
+
- Windows: `%LOCALAPPDATA%\cokodo\cache\`
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Development
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Clone repository
|
|
205
|
+
git clone https://github.com/dinwind/agent_protocol.git
|
|
206
|
+
cd agent_protocol/cokodo-agent
|
|
207
|
+
|
|
208
|
+
# Install in development mode
|
|
209
|
+
pip install -e ".[dev]"
|
|
210
|
+
|
|
211
|
+
# Run tests
|
|
212
|
+
pytest
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Documentation
|
|
224
|
+
|
|
225
|
+
- [Complete Usage Guide](../docs/usage-guide.md) - Detailed usage instructions
|
|
226
|
+
- [使用指南 (中文)](../docs/usage-guide_cn.md) - Chinese documentation
|
|
227
|
+
- [Agent Protocol Documentation](https://github.com/dinwind/agent_protocol)
|
|
228
|
+
- [Report Issues](https://github.com/dinwind/agent_protocol/issues)
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Cokodo Agent
|
|
2
|
+
|
|
3
|
+
A CLI tool to generate standardized AI collaboration protocol (`.agent`) for your projects.
|
|
4
|
+
|
|
5
|
+
Similar to `create-react-app`, this tool helps you quickly set up an `.agent` directory with best practices for AI-assisted development.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install globally
|
|
13
|
+
pip install cokodo-agent
|
|
14
|
+
|
|
15
|
+
# Or use pipx (recommended)
|
|
16
|
+
pipx install cokodo-agent
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Navigate to your project
|
|
25
|
+
cd my-project
|
|
26
|
+
|
|
27
|
+
# Run the generator
|
|
28
|
+
cokodo init
|
|
29
|
+
|
|
30
|
+
# Or specify a path
|
|
31
|
+
cokodo init ./new-project
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
### Interactive Mode (Default)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
$ cokodo init
|
|
42
|
+
|
|
43
|
+
Cokodo Agent v1.0.0
|
|
44
|
+
====================
|
|
45
|
+
|
|
46
|
+
Fetching protocol...
|
|
47
|
+
[1/2] GitHub Release... OK (v2.1.0)
|
|
48
|
+
|
|
49
|
+
? Project name: my-awesome-app
|
|
50
|
+
? Brief description: A task management web application
|
|
51
|
+
|
|
52
|
+
? Primary tech stack:
|
|
53
|
+
> Python
|
|
54
|
+
Rust
|
|
55
|
+
Qt/C++
|
|
56
|
+
Mixed
|
|
57
|
+
Other
|
|
58
|
+
|
|
59
|
+
? AI tools to configure: (space to select)
|
|
60
|
+
[x] Cursor
|
|
61
|
+
[x] GitHub Copilot
|
|
62
|
+
[ ] Claude Projects
|
|
63
|
+
|
|
64
|
+
Generating .agent/
|
|
65
|
+
[========================================] 100%
|
|
66
|
+
|
|
67
|
+
Success! Created .agent in /path/to/my-awesome-app
|
|
68
|
+
|
|
69
|
+
Next steps:
|
|
70
|
+
1. Review .agent/project/context.md
|
|
71
|
+
2. Start coding with AI assistance!
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Quick Mode
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Use defaults, skip prompts
|
|
78
|
+
cokodo init --yes
|
|
79
|
+
|
|
80
|
+
# Specify options directly
|
|
81
|
+
cokodo init --name "my-app" --stack python
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Commands
|
|
85
|
+
|
|
86
|
+
| Command | Description |
|
|
87
|
+
|---------|-------------|
|
|
88
|
+
| `cokodo init [path]` | Create .agent in target directory |
|
|
89
|
+
| `cokodo version` | Show version information |
|
|
90
|
+
|
|
91
|
+
### Options
|
|
92
|
+
|
|
93
|
+
| Option | Description |
|
|
94
|
+
|--------|-------------|
|
|
95
|
+
| `--yes, -y` | Skip prompts, use defaults |
|
|
96
|
+
| `--name` | Project name |
|
|
97
|
+
| `--stack` | Tech stack (python/rust/qt/mixed/other) |
|
|
98
|
+
| `--force` | Overwrite existing .agent directory |
|
|
99
|
+
| `--offline` | Use built-in protocol (no network) |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Protocol Sources
|
|
104
|
+
|
|
105
|
+
The tool fetches the latest protocol from multiple sources with fallback:
|
|
106
|
+
|
|
107
|
+
| Priority | Source | Description |
|
|
108
|
+
|----------|--------|-------------|
|
|
109
|
+
| 1 | GitHub Release | Latest version from repository |
|
|
110
|
+
| 2 | Remote Server | Backup server [reserved] |
|
|
111
|
+
| 3 | Built-in | Bundled version in package |
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
Priority 1: GitHub Release
|
|
115
|
+
|
|
|
116
|
+
| [unavailable]
|
|
117
|
+
v
|
|
118
|
+
Priority 2: Remote Server [reserved, not implemented]
|
|
119
|
+
|
|
|
120
|
+
| [unavailable]
|
|
121
|
+
v
|
|
122
|
+
Priority 3: Built-in (offline fallback)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Generated Structure
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
your-project/
|
|
131
|
+
+-- .agent/ # Protocol directory
|
|
132
|
+
| +-- start-here.md # * Entry point
|
|
133
|
+
| +-- quick-reference.md # Cheat sheet
|
|
134
|
+
| +-- index.md # Navigation
|
|
135
|
+
| +-- manifest.json # Config
|
|
136
|
+
| +-- core/ # Governance rules
|
|
137
|
+
| +-- project/ # Project-specific
|
|
138
|
+
| | +-- context.md # <- Customized
|
|
139
|
+
| | +-- tech-stack.md # <- Customized
|
|
140
|
+
| +-- skills/ # Skill modules
|
|
141
|
+
| +-- adapters/ # Tool adapters
|
|
142
|
+
| +-- meta/ # Protocol evolution
|
|
143
|
+
| +-- scripts/ # Helper scripts
|
|
144
|
+
|
|
|
145
|
+
+-- .cursorrules # [Optional] Cursor config
|
|
146
|
+
+-- .github/
|
|
147
|
+
+-- copilot-instructions.md # [Optional] Copilot config
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Configuration
|
|
153
|
+
|
|
154
|
+
### Environment Variables
|
|
155
|
+
|
|
156
|
+
| Variable | Description |
|
|
157
|
+
|----------|-------------|
|
|
158
|
+
| `COKODO_OFFLINE` | Force offline mode (`1` or `true`) |
|
|
159
|
+
| `COKODO_CACHE_DIR` | Custom cache directory |
|
|
160
|
+
|
|
161
|
+
### Cache Location
|
|
162
|
+
|
|
163
|
+
Downloaded protocols are cached at:
|
|
164
|
+
- Linux/macOS: `~/.cache/cokodo/`
|
|
165
|
+
- Windows: `%LOCALAPPDATA%\cokodo\cache\`
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Development
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Clone repository
|
|
173
|
+
git clone https://github.com/dinwind/agent_protocol.git
|
|
174
|
+
cd agent_protocol/cokodo-agent
|
|
175
|
+
|
|
176
|
+
# Install in development mode
|
|
177
|
+
pip install -e ".[dev]"
|
|
178
|
+
|
|
179
|
+
# Run tests
|
|
180
|
+
pytest
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Documentation
|
|
192
|
+
|
|
193
|
+
- [Complete Usage Guide](../docs/usage-guide.md) - Detailed usage instructions
|
|
194
|
+
- [使用指南 (中文)](../docs/usage-guide_cn.md) - Chinese documentation
|
|
195
|
+
- [Agent Protocol Documentation](https://github.com/dinwind/agent_protocol)
|
|
196
|
+
- [Report Issues](https://github.com/dinwind/agent_protocol/issues)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cokodo-agent"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "AI Agent Collaboration Protocol Generator - Create standardized .agent protocol for your projects"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "dinwind" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["ai", "agent", "protocol", "generator", "copilot", "cursor", "claude", "cokodo"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Topic :: Software Development :: Code Generators",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"typer>=0.9.0",
|
|
31
|
+
"questionary>=2.0.0",
|
|
32
|
+
"httpx>=0.25.0",
|
|
33
|
+
"jinja2>=3.1.0",
|
|
34
|
+
"rich>=13.0.0",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = [
|
|
39
|
+
"pytest>=7.0.0",
|
|
40
|
+
"pytest-cov>=4.0.0",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[project.scripts]
|
|
44
|
+
cokodo = "cokodo_agent.cli:app"
|
|
45
|
+
cokodo-agent = "cokodo_agent.cli:app"
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Homepage = "https://github.com/dinwind/agent_protocol"
|
|
49
|
+
Repository = "https://github.com/dinwind/agent_protocol"
|
|
50
|
+
Issues = "https://github.com/dinwind/agent_protocol/issues"
|
|
51
|
+
|
|
52
|
+
[tool.hatch.build.targets.wheel]
|
|
53
|
+
packages = ["src/cokodo_agent"]
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.sdist]
|
|
56
|
+
include = [
|
|
57
|
+
"/src",
|
|
58
|
+
"/README.md",
|
|
59
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Protocol Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- '.agent/**'
|
|
7
|
+
pull_request:
|
|
8
|
+
paths:
|
|
9
|
+
- '.agent/**'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.11'
|
|
21
|
+
|
|
22
|
+
- name: Protocol Lint
|
|
23
|
+
run: |
|
|
24
|
+
python .agent/scripts/lint-protocol.py
|
|
25
|
+
|
|
26
|
+
- name: Token Count
|
|
27
|
+
run: |
|
|
28
|
+
python .agent/scripts/token-counter.py
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# CI/CD Integration Templates
|
|
2
|
+
|
|
3
|
+
> Templates for integrating protocol checks into CI pipelines.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Available Templates
|
|
8
|
+
|
|
9
|
+
| Template | Purpose |
|
|
10
|
+
|----------|---------|
|
|
11
|
+
| `github-actions.template.yml` | GitHub Actions workflow |
|
|
12
|
+
| `pre-commit-config.template.yaml` | Pre-commit hooks |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## GitHub Actions Setup
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cp $AGENT_DIR/adapters/ci/github-actions.template.yml .github/workflows/ci.yml
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Pre-commit Setup
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cp $AGENT_DIR/adapters/ci/pre-commit-config.template.yaml .pre-commit-config.yaml
|
|
28
|
+
pip install pre-commit
|
|
29
|
+
pre-commit install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
*Adapt $AGENT_DIR to your actual directory name*
|