cldpm 0.1.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.
- cldpm-0.1.0/.gitignore +35 -0
- cldpm-0.1.0/CLI.md +301 -0
- cldpm-0.1.0/CODE_OF_CONDUCT.md +65 -0
- cldpm-0.1.0/CONTRIBUTING.md +223 -0
- cldpm-0.1.0/LICENSE +21 -0
- cldpm-0.1.0/PKG-INFO +15 -0
- cldpm-0.1.0/README.md +184 -0
- cldpm-0.1.0/SDK.md +500 -0
- cldpm-0.1.0/SECURITY.md +119 -0
- cldpm-0.1.0/cldpm/__init__.py +12 -0
- cldpm-0.1.0/cldpm/__main__.py +6 -0
- cldpm-0.1.0/cldpm/_banner.py +99 -0
- cldpm-0.1.0/cldpm/cli.py +81 -0
- cldpm-0.1.0/cldpm/commands/__init__.py +12 -0
- cldpm-0.1.0/cldpm/commands/add.py +206 -0
- cldpm-0.1.0/cldpm/commands/clone.py +184 -0
- cldpm-0.1.0/cldpm/commands/create.py +418 -0
- cldpm-0.1.0/cldpm/commands/get.py +375 -0
- cldpm-0.1.0/cldpm/commands/init.py +331 -0
- cldpm-0.1.0/cldpm/commands/link.py +320 -0
- cldpm-0.1.0/cldpm/commands/remove.py +289 -0
- cldpm-0.1.0/cldpm/commands/sync.py +91 -0
- cldpm-0.1.0/cldpm/core/__init__.py +26 -0
- cldpm-0.1.0/cldpm/core/config.py +182 -0
- cldpm-0.1.0/cldpm/core/linker.py +265 -0
- cldpm-0.1.0/cldpm/core/resolver.py +291 -0
- cldpm-0.1.0/cldpm/schemas/__init__.py +13 -0
- cldpm-0.1.0/cldpm/schemas/cldpm.py +32 -0
- cldpm-0.1.0/cldpm/schemas/component.py +24 -0
- cldpm-0.1.0/cldpm/schemas/project.py +42 -0
- cldpm-0.1.0/cldpm/templates/CLAUDE.md.j2 +22 -0
- cldpm-0.1.0/cldpm/templates/ROOT_CLAUDE.md.j2 +34 -0
- cldpm-0.1.0/cldpm/templates/agent.md.j2 +22 -0
- cldpm-0.1.0/cldpm/templates/gitignore.j2 +43 -0
- cldpm-0.1.0/cldpm/templates/hook.md.j2 +20 -0
- cldpm-0.1.0/cldpm/templates/rule.md.j2 +33 -0
- cldpm-0.1.0/cldpm/templates/skill.md.j2 +15 -0
- cldpm-0.1.0/cldpm/utils/__init__.py +27 -0
- cldpm-0.1.0/cldpm/utils/fs.py +97 -0
- cldpm-0.1.0/cldpm/utils/git.py +169 -0
- cldpm-0.1.0/cldpm/utils/output.py +133 -0
- cldpm-0.1.0/pyproject.toml +33 -0
- cldpm-0.1.0/tests/__init__.py +1 -0
- cldpm-0.1.0/tests/test_add.py +96 -0
- cldpm-0.1.0/tests/test_clone.py +95 -0
- cldpm-0.1.0/tests/test_create.py +98 -0
- cldpm-0.1.0/tests/test_create_component.py +190 -0
- cldpm-0.1.0/tests/test_dependencies.py +167 -0
- cldpm-0.1.0/tests/test_get.py +257 -0
- cldpm-0.1.0/tests/test_git.py +89 -0
- cldpm-0.1.0/tests/test_init.py +215 -0
- cldpm-0.1.0/tests/test_link.py +208 -0
- cldpm-0.1.0/tests/test_remove.py +97 -0
- cldpm-0.1.0/tests/test_sdk_config.py +262 -0
- cldpm-0.1.0/tests/test_sdk_linker.py +353 -0
- cldpm-0.1.0/tests/test_sdk_resolver.py +297 -0
- cldpm-0.1.0/tests/test_sdk_schemas.py +257 -0
- cldpm-0.1.0/tests/test_sync.py +110 -0
cldpm-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Virtual environment
|
|
2
|
+
.venv/
|
|
3
|
+
venv/
|
|
4
|
+
ENV/
|
|
5
|
+
|
|
6
|
+
# Python bytecode
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*$py.class
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
dist/
|
|
13
|
+
build/
|
|
14
|
+
*.egg-info/
|
|
15
|
+
*.egg
|
|
16
|
+
.eggs/
|
|
17
|
+
|
|
18
|
+
# Testing
|
|
19
|
+
.pytest_cache/
|
|
20
|
+
.coverage
|
|
21
|
+
htmlcov/
|
|
22
|
+
.tox/
|
|
23
|
+
|
|
24
|
+
# Type checking / linting
|
|
25
|
+
.mypy_cache/
|
|
26
|
+
.ruff_cache/
|
|
27
|
+
|
|
28
|
+
# IDE
|
|
29
|
+
.idea/
|
|
30
|
+
.vscode/
|
|
31
|
+
*.swp
|
|
32
|
+
*.swo
|
|
33
|
+
|
|
34
|
+
# OS
|
|
35
|
+
.DS_Store
|
cldpm-0.1.0/CLI.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# CLDPM CLI Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for CLDPM command-line interface.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install cldpm
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Commands Overview
|
|
12
|
+
|
|
13
|
+
```mermaid
|
|
14
|
+
graph LR
|
|
15
|
+
CLDPM[cldpm] --> INIT[init]
|
|
16
|
+
CLDPM --> CREATE[create]
|
|
17
|
+
CLDPM --> ADD[add]
|
|
18
|
+
CLDPM --> REMOVE[remove]
|
|
19
|
+
CLDPM --> LINK[link]
|
|
20
|
+
CLDPM --> UNLINK[unlink]
|
|
21
|
+
CLDPM --> GET[get]
|
|
22
|
+
CLDPM --> CLONE[clone]
|
|
23
|
+
CLDPM --> SYNC[sync]
|
|
24
|
+
|
|
25
|
+
CREATE --> PROJECT[project]
|
|
26
|
+
CREATE --> SKILL[skill]
|
|
27
|
+
CREATE --> AGENT[agent]
|
|
28
|
+
CREATE --> HOOK[hook]
|
|
29
|
+
CREATE --> RULE[rule]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
### `cldpm init`
|
|
35
|
+
|
|
36
|
+
Initialize a new CLDPM mono repo.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
cldpm init [DIRECTORY] [OPTIONS]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Arguments:**
|
|
43
|
+
- `DIRECTORY` - Directory name (default: current directory)
|
|
44
|
+
|
|
45
|
+
**Options:**
|
|
46
|
+
- `-n, --name TEXT` - Repository name
|
|
47
|
+
|
|
48
|
+
**Example:**
|
|
49
|
+
```bash
|
|
50
|
+
cldpm init my-monorepo
|
|
51
|
+
cldpm init . --name "My Project Hub"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### `cldpm create`
|
|
57
|
+
|
|
58
|
+
Create new projects or shared components.
|
|
59
|
+
|
|
60
|
+
#### `cldpm create project`
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cldpm create project NAME [OPTIONS]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Options:**
|
|
67
|
+
- `-d, --description TEXT` - Project description
|
|
68
|
+
- `-s, --skills TEXT` - Comma-separated skills to add
|
|
69
|
+
|
|
70
|
+
**Example:**
|
|
71
|
+
```bash
|
|
72
|
+
cldpm create project web-app -d "Web application"
|
|
73
|
+
cldpm create project api --skills logging,auth
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### `cldpm create skill`
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cldpm create skill NAME [OPTIONS]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Options:**
|
|
83
|
+
- `-d, --description TEXT` - Skill description
|
|
84
|
+
- `-s, --skills TEXT` - Dependent skills
|
|
85
|
+
- `-a, --agents TEXT` - Dependent agents
|
|
86
|
+
- `-h, --hooks TEXT` - Dependent hooks
|
|
87
|
+
- `-r, --rules TEXT` - Dependent rules
|
|
88
|
+
|
|
89
|
+
**Example:**
|
|
90
|
+
```bash
|
|
91
|
+
cldpm create skill code-review -d "Code review assistant"
|
|
92
|
+
cldpm create skill advanced-review --skills code-review,security
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### `cldpm create agent`
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cldpm create agent NAME [OPTIONS]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Options:** Same as `cldpm create skill`
|
|
102
|
+
|
|
103
|
+
#### `cldpm create hook`
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cldpm create hook NAME [OPTIONS]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Options:** Same as `cldpm create skill`
|
|
110
|
+
|
|
111
|
+
#### `cldpm create rule`
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
cldpm create rule NAME [OPTIONS]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Options:** Same as `cldpm create skill`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### `cldpm add`
|
|
122
|
+
|
|
123
|
+
Add a shared component to a project.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
cldpm add COMPONENT --to PROJECT [OPTIONS]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Arguments:**
|
|
130
|
+
- `COMPONENT` - Component in format `type:name` (e.g., `skill:logging`)
|
|
131
|
+
|
|
132
|
+
**Options:**
|
|
133
|
+
- `-t, --to TEXT` - Target project name (required)
|
|
134
|
+
- `--no-deps` - Don't install component dependencies
|
|
135
|
+
|
|
136
|
+
**Example:**
|
|
137
|
+
```bash
|
|
138
|
+
cldpm add skill:logging --to web-app
|
|
139
|
+
cldpm add agent:debugger --to api-server --no-deps
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### `cldpm remove`
|
|
145
|
+
|
|
146
|
+
Remove a shared component from a project.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cldpm remove COMPONENT --from PROJECT [OPTIONS]
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Arguments:**
|
|
153
|
+
- `COMPONENT` - Component in format `type:name`
|
|
154
|
+
|
|
155
|
+
**Options:**
|
|
156
|
+
- `-f, --from TEXT` - Source project name (required)
|
|
157
|
+
- `--keep-deps` - Keep orphaned dependencies
|
|
158
|
+
- `--force` - Remove without confirmation
|
|
159
|
+
|
|
160
|
+
**Example:**
|
|
161
|
+
```bash
|
|
162
|
+
cldpm remove skill:logging --from web-app
|
|
163
|
+
cldpm remove agent:debugger --from api --force
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### `cldpm link`
|
|
169
|
+
|
|
170
|
+
Link dependencies to an existing shared component.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
cldpm link DEPENDENCIES --to TARGET
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Arguments:**
|
|
177
|
+
- `DEPENDENCIES` - Comma-separated list (e.g., `skill:a,agent:b`)
|
|
178
|
+
|
|
179
|
+
**Options:**
|
|
180
|
+
- `-t, --to TEXT` - Target component (required)
|
|
181
|
+
|
|
182
|
+
**Example:**
|
|
183
|
+
```bash
|
|
184
|
+
cldpm link skill:base-utils --to skill:code-review
|
|
185
|
+
cldpm link skill:logging,hook:validator --to agent:debugger
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
### `cldpm unlink`
|
|
191
|
+
|
|
192
|
+
Remove dependencies from an existing shared component.
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
cldpm unlink DEPENDENCIES --from TARGET
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Arguments:**
|
|
199
|
+
- `DEPENDENCIES` - Comma-separated list
|
|
200
|
+
|
|
201
|
+
**Options:**
|
|
202
|
+
- `-f, --from TEXT` - Source component (required)
|
|
203
|
+
|
|
204
|
+
**Example:**
|
|
205
|
+
```bash
|
|
206
|
+
cldpm unlink skill:base-utils --from skill:code-review
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### `cldpm get`
|
|
212
|
+
|
|
213
|
+
Get project info with all resolved components.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
cldpm get PROJECT [OPTIONS]
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Arguments:**
|
|
220
|
+
- `PROJECT` - Project name or path
|
|
221
|
+
|
|
222
|
+
**Options:**
|
|
223
|
+
- `-f, --format [tree|json]` - Output format (default: tree)
|
|
224
|
+
- `-r, --remote TEXT` - Remote GitHub repo (owner/repo)
|
|
225
|
+
- `-d, --download` - Download remote project
|
|
226
|
+
- `-o, --output PATH` - Output directory for download
|
|
227
|
+
|
|
228
|
+
**Example:**
|
|
229
|
+
```bash
|
|
230
|
+
cldpm get web-app
|
|
231
|
+
cldpm get web-app --format json
|
|
232
|
+
cldpm get my-project -r owner/repo --download
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### `cldpm clone`
|
|
238
|
+
|
|
239
|
+
Clone a project to a standalone directory with all dependencies.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
cldpm clone PROJECT DIRECTORY [OPTIONS]
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Arguments:**
|
|
246
|
+
- `PROJECT` - Project name or path
|
|
247
|
+
- `DIRECTORY` - Target directory
|
|
248
|
+
|
|
249
|
+
**Options:**
|
|
250
|
+
- `--include-shared` - Include full shared/ directory
|
|
251
|
+
|
|
252
|
+
**Example:**
|
|
253
|
+
```bash
|
|
254
|
+
cldpm clone web-app ./standalone
|
|
255
|
+
cldpm clone api-server /tmp/export --include-shared
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### `cldpm sync`
|
|
261
|
+
|
|
262
|
+
Regenerate symlinks for shared components.
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
cldpm sync [PROJECT] [OPTIONS]
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Arguments:**
|
|
269
|
+
- `PROJECT` - Project name (optional)
|
|
270
|
+
|
|
271
|
+
**Options:**
|
|
272
|
+
- `-a, --all` - Sync all projects
|
|
273
|
+
|
|
274
|
+
**Example:**
|
|
275
|
+
```bash
|
|
276
|
+
cldpm sync web-app
|
|
277
|
+
cldpm sync --all
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Global Options
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
cldpm --help # Show help
|
|
286
|
+
cldpm --version # Show version
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Exit Codes
|
|
290
|
+
|
|
291
|
+
| Code | Description |
|
|
292
|
+
|------|-------------|
|
|
293
|
+
| 0 | Success |
|
|
294
|
+
| 1 | Error |
|
|
295
|
+
|
|
296
|
+
## Environment Variables
|
|
297
|
+
|
|
298
|
+
| Variable | Description |
|
|
299
|
+
|----------|-------------|
|
|
300
|
+
| `GITHUB_TOKEN` | GitHub token for private repos |
|
|
301
|
+
| `GH_TOKEN` | Alternative GitHub token |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment:
|
|
18
|
+
|
|
19
|
+
* Using welcoming and inclusive language
|
|
20
|
+
* Being respectful of differing viewpoints and experiences
|
|
21
|
+
* Gracefully accepting constructive criticism
|
|
22
|
+
* Focusing on what is best for the community
|
|
23
|
+
* Showing empathy towards other community members
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior:
|
|
26
|
+
|
|
27
|
+
* The use of sexualized language or imagery, and sexual attention or advances
|
|
28
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
* Public or private harassment
|
|
30
|
+
* Publishing others' private information without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate
|
|
32
|
+
|
|
33
|
+
## Enforcement Responsibilities
|
|
34
|
+
|
|
35
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
36
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
37
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
38
|
+
or harmful.
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
43
|
+
an individual is officially representing the community in public spaces.
|
|
44
|
+
|
|
45
|
+
## Enforcement
|
|
46
|
+
|
|
47
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
48
|
+
reported to the community leaders responsible for enforcement at
|
|
49
|
+
**conduct@transilience.ai**.
|
|
50
|
+
|
|
51
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
52
|
+
|
|
53
|
+
## Attribution
|
|
54
|
+
|
|
55
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
56
|
+
version 2.0, available at
|
|
57
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
58
|
+
|
|
59
|
+
[homepage]: https://www.contributor-covenant.org
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
<p align="center">
|
|
64
|
+
Maintained by <a href="https://transilience.ai">Transilience.ai</a>
|
|
65
|
+
</p>
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Contributing to CLDPM
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to CLDPM! This document provides guidelines and instructions for contributing.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python 3.10+
|
|
10
|
+
- Git
|
|
11
|
+
|
|
12
|
+
### Development Setup
|
|
13
|
+
|
|
14
|
+
1. Clone the repository:
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/transilienceai/cldpm.git
|
|
17
|
+
cd cldpm/python
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Create a virtual environment:
|
|
21
|
+
```bash
|
|
22
|
+
python -m venv .venv
|
|
23
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Install dependencies:
|
|
27
|
+
```bash
|
|
28
|
+
pip install -e ".[dev]"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. Run tests:
|
|
32
|
+
```bash
|
|
33
|
+
pytest
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Development Workflow
|
|
37
|
+
|
|
38
|
+
### Code Structure
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
cldpm/
|
|
42
|
+
├── __init__.py # Package init, version
|
|
43
|
+
├── __main__.py # Entry point
|
|
44
|
+
├── cli.py # CLI commands setup
|
|
45
|
+
├── commands/ # CLI command implementations
|
|
46
|
+
│ ├── init.py
|
|
47
|
+
│ ├── create.py
|
|
48
|
+
│ ├── add.py
|
|
49
|
+
│ ├── remove.py
|
|
50
|
+
│ ├── link.py
|
|
51
|
+
│ ├── get.py
|
|
52
|
+
│ ├── clone.py
|
|
53
|
+
│ └── sync.py
|
|
54
|
+
├── core/ # Core SDK modules
|
|
55
|
+
│ ├── config.py # Config loading/saving
|
|
56
|
+
│ ├── resolver.py # Dependency resolution
|
|
57
|
+
│ └── linker.py # Symlink management
|
|
58
|
+
├── schemas/ # Pydantic models
|
|
59
|
+
│ ├── cldpm.py
|
|
60
|
+
│ ├── project.py
|
|
61
|
+
│ └── component.py
|
|
62
|
+
├── templates/ # Jinja2 templates
|
|
63
|
+
└── utils/ # Utilities
|
|
64
|
+
├── fs.py
|
|
65
|
+
└── output.py
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Making Changes
|
|
69
|
+
|
|
70
|
+
1. Create a feature branch:
|
|
71
|
+
```bash
|
|
72
|
+
git checkout -b feature/your-feature-name
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
2. Make your changes following the coding standards
|
|
76
|
+
|
|
77
|
+
3. Add tests for new functionality
|
|
78
|
+
|
|
79
|
+
4. Run tests and linting:
|
|
80
|
+
```bash
|
|
81
|
+
pytest
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
5. Commit your changes:
|
|
85
|
+
```bash
|
|
86
|
+
git commit -m "Add feature: description"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
6. Push and create a pull request
|
|
90
|
+
|
|
91
|
+
### Coding Standards
|
|
92
|
+
|
|
93
|
+
#### Python Style
|
|
94
|
+
|
|
95
|
+
- Follow PEP 8
|
|
96
|
+
- Use type hints for function signatures
|
|
97
|
+
- Maximum line length: 100 characters
|
|
98
|
+
- Use descriptive variable names
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
# Good
|
|
102
|
+
def resolve_component(
|
|
103
|
+
comp_type: str,
|
|
104
|
+
comp_name: str,
|
|
105
|
+
shared_dir: Path,
|
|
106
|
+
) -> Optional[dict]:
|
|
107
|
+
"""Resolve a shared component by type and name."""
|
|
108
|
+
...
|
|
109
|
+
|
|
110
|
+
# Bad
|
|
111
|
+
def resolve(t, n, d):
|
|
112
|
+
...
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### Documentation
|
|
116
|
+
|
|
117
|
+
- All public functions must have docstrings
|
|
118
|
+
- Use Google-style docstrings
|
|
119
|
+
- Include type information in docstrings
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
def sync_project_links(
|
|
123
|
+
project_path: Path,
|
|
124
|
+
repo_root: Path,
|
|
125
|
+
) -> dict:
|
|
126
|
+
"""Synchronize symlinks for a project.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
project_path: Path to the project directory.
|
|
130
|
+
repo_root: Path to the repository root.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
Dictionary with 'created' and 'missing' lists.
|
|
134
|
+
"""
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Testing
|
|
138
|
+
|
|
139
|
+
- Write tests for all new functionality
|
|
140
|
+
- Use pytest fixtures for common setups
|
|
141
|
+
- Test both success and error cases
|
|
142
|
+
- Aim for high coverage
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
class TestMyFeature:
|
|
146
|
+
"""Tests for my feature."""
|
|
147
|
+
|
|
148
|
+
def test_success_case(self, setup_repo):
|
|
149
|
+
"""Test that feature works correctly."""
|
|
150
|
+
result = my_feature(setup_repo)
|
|
151
|
+
assert result is not None
|
|
152
|
+
|
|
153
|
+
def test_error_case(self, setup_repo):
|
|
154
|
+
"""Test that feature handles errors."""
|
|
155
|
+
with pytest.raises(ValueError):
|
|
156
|
+
my_feature(invalid_input)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Pull Request Guidelines
|
|
160
|
+
|
|
161
|
+
### Before Submitting
|
|
162
|
+
|
|
163
|
+
- [ ] Tests pass locally (`pytest`)
|
|
164
|
+
- [ ] Code follows style guidelines
|
|
165
|
+
- [ ] Documentation updated if needed
|
|
166
|
+
- [ ] Commit messages are clear and descriptive
|
|
167
|
+
|
|
168
|
+
### PR Title Format
|
|
169
|
+
|
|
170
|
+
Use conventional commit format:
|
|
171
|
+
|
|
172
|
+
- `feat: Add new feature`
|
|
173
|
+
- `fix: Fix bug in X`
|
|
174
|
+
- `docs: Update documentation`
|
|
175
|
+
- `refactor: Refactor X module`
|
|
176
|
+
- `test: Add tests for Y`
|
|
177
|
+
|
|
178
|
+
### PR Description
|
|
179
|
+
|
|
180
|
+
Include:
|
|
181
|
+
|
|
182
|
+
1. **Summary**: What does this PR do?
|
|
183
|
+
2. **Motivation**: Why is this change needed?
|
|
184
|
+
3. **Testing**: How was it tested?
|
|
185
|
+
4. **Breaking Changes**: Any breaking changes?
|
|
186
|
+
|
|
187
|
+
## Reporting Issues
|
|
188
|
+
|
|
189
|
+
### Bug Reports
|
|
190
|
+
|
|
191
|
+
Include:
|
|
192
|
+
|
|
193
|
+
- CLDPM version (`cldpm --version`)
|
|
194
|
+
- Python version (`python --version`)
|
|
195
|
+
- Operating system
|
|
196
|
+
- Steps to reproduce
|
|
197
|
+
- Expected behavior
|
|
198
|
+
- Actual behavior
|
|
199
|
+
- Error messages/logs
|
|
200
|
+
|
|
201
|
+
### Feature Requests
|
|
202
|
+
|
|
203
|
+
Include:
|
|
204
|
+
|
|
205
|
+
- Use case description
|
|
206
|
+
- Proposed solution
|
|
207
|
+
- Alternatives considered
|
|
208
|
+
|
|
209
|
+
## Community
|
|
210
|
+
|
|
211
|
+
- Be respectful and inclusive
|
|
212
|
+
- Follow our [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
213
|
+
- Help others in discussions
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
<p align="center">
|
|
222
|
+
Thank you for contributing to CLDPM!
|
|
223
|
+
</p>
|
cldpm-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Transilience.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
cldpm-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cldpm
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Claude Project Manager - SDK and CLI for mono repo management with Claude Code projects
|
|
5
|
+
Author-email: Aman Agarwal <agarwal.aman041@gmail.com>
|
|
6
|
+
Maintainer: Transilience.ai
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: click>=8.1.0
|
|
10
|
+
Requires-Dist: jinja2>=3.1.0
|
|
11
|
+
Requires-Dist: pydantic>=2.0.0
|
|
12
|
+
Requires-Dist: rich>=13.0.0
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
15
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|