@aefree/pi-plastic 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +9 -7
- package/extensions/bash-cm-diff-guard.ts +2 -1
- package/extensions/file-discovery-filter.ts +67 -0
- package/index.ts +18 -2
- package/package.json +7 -8
- package/skills/_shared/references/conventional-commits.md +198 -198
- package/skills/using-plastic/SKILL.md +3 -3
- package/skills/using-plastic/references/changeset-operations.md +5 -5
- package/skills/using-plastic/references/code-review-creation.md +30 -30
- package/skills/using-plastic/references/integration.md +5 -3
- package/skills/using-plastic/references/quick-reference.md +2 -1
- package/skills/using-plastic/references/resources.md +7 -7
- package/skills/using-plastic/references/reviewing-changes.md +9 -7
- package/skills/using-plastic/references/shelving.md +25 -25
- package/skills/using-plastic/references/troubleshooting.md +5 -3
- package/skills/using-plastic/references/workspaces.md +33 -33
- package/src/file-discovery-filter-rendezvous.ts +104 -0
- package/src/{repository-search-provider.ts → file-discovery-filter.ts} +21 -17
- package/src/plastic-core.ts +579 -170
- package/src/plastic-tool-loading.ts +3 -3
- package/evals/tool-loading/README.md +0 -38
- package/evals/tool-loading/RESULTS.md +0 -57
- package/evals/tool-loading/baseline.json +0 -34
- package/evals/tool-loading/cases.json +0 -70
- package/evals/tool-loading/config.json +0 -19
- package/evals/tool-loading/mutation-guard.ts +0 -30
- package/evals/tool-loading/provider-capture.ts +0 -22
- package/evals/tool-loading/results/.gitignore +0 -3
- package/evals/tool-loading/run-eval.ts +0 -372
- package/extensions/repository-search-provider.ts +0 -66
- package/tests/bash-cm-diff-guard-validation.ts +0 -55
- package/tests/fixtures/plastic.selector +0 -3
- package/tests/fixtures/status-compact.txt +0 -1
- package/tests/fixtures/status-normal.txt +0 -1
- package/tests/packed-copy-owner-conflict.test.ts +0 -28
- package/tests/pi-tool-harness.ts +0 -116
- package/tests/plastic-branch-create-live.test.ts +0 -78
- package/tests/plastic-branch-query.test.ts +0 -26
- package/tests/plastic-branch-status.test.ts +0 -241
- package/tests/plastic-checkin-path-resolution.ts +0 -219
- package/tests/plastic-constrained-sampling.test.ts +0 -77
- package/tests/plastic-diff-workflow.test.ts +0 -86
- package/tests/plastic-dynamic-tool-loading.test.ts +0 -224
- package/tests/plastic-extension-registration.test.ts +0 -34
- package/tests/plastic-live-smoke.test.ts +0 -37
- package/tests/plastic-mutation-execution.test.ts +0 -61
- package/tests/plastic-patch-command.test.ts +0 -118
- package/tests/plastic-process-lifecycle.test.ts +0 -148
- package/tests/plastic-tool-rendering.test.ts +0 -16
- package/tests/plastic-tool-validation.ts +0 -153
- package/tests/plastic-workspace.test.ts +0 -62
- package/tests/repository-search-provider-registration.test.ts +0 -37
- package/tests/repository-search-provider.test.ts +0 -27
|
@@ -1,198 +1,198 @@
|
|
|
1
|
-
# Conventional Commits
|
|
2
|
-
|
|
3
|
-
This reference file documents the conventional commit format used across the project.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Format
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
<type>(<scope>): <subject>
|
|
11
|
-
|
|
12
|
-
[optional body]
|
|
13
|
-
|
|
14
|
-
[optional footer]
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Types
|
|
20
|
-
|
|
21
|
-
| Type | Description | Example |
|
|
22
|
-
|------|-------------|---------|
|
|
23
|
-
| **feat** | New feature | `feat(auth): add OAuth login` |
|
|
24
|
-
| **fix** | Bug fix | `fix(cart): calculate tax correctly` |
|
|
25
|
-
| **refactor** | Code restructuring (no behavior change) | `refactor(api): extract service layer` |
|
|
26
|
-
| **perf** | Performance improvement | `perf(query): optimize user lookup` |
|
|
27
|
-
| **test** | Adding or updating tests | `test(auth): add login edge cases` |
|
|
28
|
-
| **docs** | Documentation changes | `docs(readme): update installation steps` |
|
|
29
|
-
| **style** | Code style changes (formatting, etc.) | `style(lint): fix indentation` |
|
|
30
|
-
| **chore** | Build process or auxiliary tool changes | `chore(deps): update to Rails 7.1` |
|
|
31
|
-
| **ci** | CI/CD configuration changes | `ci(github): add test workflow` |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Scope
|
|
36
|
-
|
|
37
|
-
The scope is optional but recommended. It specifies which part of the codebase was affected:
|
|
38
|
-
|
|
39
|
-
**Examples:**
|
|
40
|
-
- `feat(player): add dash mechanic`
|
|
41
|
-
- `fix(inventory): prevent negative quantities`
|
|
42
|
-
- `refactor(ui): simplify menu navigation`
|
|
43
|
-
- `perf(rendering): batch sprite draws`
|
|
44
|
-
|
|
45
|
-
**Guidelines:**
|
|
46
|
-
- Use lowercase
|
|
47
|
-
- Be specific but concise
|
|
48
|
-
- Match your module/component names
|
|
49
|
-
- Omit if change is global
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## Subject
|
|
54
|
-
|
|
55
|
-
The subject contains a succinct description of the change:
|
|
56
|
-
|
|
57
|
-
- **Use imperative mood:** "add" not "added" or "adds"
|
|
58
|
-
- **Don't capitalize first letter:** "add feature" not "Add feature"
|
|
59
|
-
- **No period at the end:** "fix bug" not "fix bug."
|
|
60
|
-
- **Limit to 50 characters**
|
|
61
|
-
|
|
62
|
-
**Good examples:**
|
|
63
|
-
- `feat(auth): add password reset flow`
|
|
64
|
-
- `fix(api): handle null responses`
|
|
65
|
-
- `refactor(utils): extract string helpers`
|
|
66
|
-
|
|
67
|
-
**Bad examples:**
|
|
68
|
-
- `feat(auth): Added password reset flow` (not imperative)
|
|
69
|
-
- `feat(auth): Add Password Reset Flow` (capitalized)
|
|
70
|
-
- `feat(auth): add password reset flow.` (period at end)
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Body (Optional)
|
|
75
|
-
|
|
76
|
-
Use the body to explain **what** and **why**, not **how**:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
feat(player): add dash mechanic
|
|
80
|
-
|
|
81
|
-
Adds a dash ability to the player character for enhanced mobility.
|
|
82
|
-
Dash has 1-second cooldown and consumes 10 stamina.
|
|
83
|
-
|
|
84
|
-
Closes #42
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Guidelines:**
|
|
88
|
-
- Wrap at 72 characters
|
|
89
|
-
- Separate from subject with blank line
|
|
90
|
-
- Focus on context and reasoning
|
|
91
|
-
- Link to issues if applicable
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Footer (Optional)
|
|
96
|
-
|
|
97
|
-
Use footer for metadata:
|
|
98
|
-
|
|
99
|
-
**Breaking changes:**
|
|
100
|
-
```
|
|
101
|
-
feat(api)!: change authentication endpoint
|
|
102
|
-
|
|
103
|
-
BREAKING CHANGE: /api/login now requires email instead of username
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Issue references:**
|
|
107
|
-
```
|
|
108
|
-
fix(cart): calculate tax correctly
|
|
109
|
-
|
|
110
|
-
Fixes #123
|
|
111
|
-
Closes #124
|
|
112
|
-
Related to #125
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Attribution:**
|
|
116
|
-
```
|
|
117
|
-
feat(dashboard): add analytics widget
|
|
118
|
-
|
|
119
|
-
Co-Authored-By: <AI Assistant Name (e.g., Codex, Claude, Pi Coding Agent)>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Attribution Footer
|
|
125
|
-
|
|
126
|
-
Add a simple attribution line in the footer when needed:
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
feat(feature): implement new capability
|
|
130
|
-
|
|
131
|
-
[Body explaining the change]
|
|
132
|
-
|
|
133
|
-
Co-Authored-By: <AI Assistant Name (e.g., Codex, Claude, Pi Coding Agent)>
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Examples
|
|
139
|
-
|
|
140
|
-
### Simple Feature
|
|
141
|
-
```
|
|
142
|
-
feat(player): add jump mechanic
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Bug Fix with Context
|
|
146
|
-
```
|
|
147
|
-
fix(inventory): prevent item duplication
|
|
148
|
-
|
|
149
|
-
Items were duplicating when rapidly clicking the pickup button.
|
|
150
|
-
Added debounce logic to prevent double-processing.
|
|
151
|
-
|
|
152
|
-
Fixes #156
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Refactor with Explanation
|
|
156
|
-
```
|
|
157
|
-
refactor(rendering): extract camera controller
|
|
158
|
-
|
|
159
|
-
Moved camera logic from PlayerController to dedicated CameraController
|
|
160
|
-
for better separation of concerns and reusability.
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Performance Improvement
|
|
164
|
-
```
|
|
165
|
-
perf(physics): optimize collision detection
|
|
166
|
-
|
|
167
|
-
Changed from O(n²) all-pairs check to spatial hashing.
|
|
168
|
-
Reduces frame time by ~15ms with 100+ objects.
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Attribution Example
|
|
172
|
-
```
|
|
173
|
-
feat(multiplayer): add lobby system
|
|
174
|
-
|
|
175
|
-
Implements matchmaking lobby with room creation, joining, and ready-up.
|
|
176
|
-
Uses WebSocket for real-time updates.
|
|
177
|
-
|
|
178
|
-
Closes #89
|
|
179
|
-
|
|
180
|
-
Co-Authored-By: <AI Assistant Name (e.g., Codex, Claude, Pi Coding Agent)>
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Usage in Skills
|
|
186
|
-
|
|
187
|
-
**Reference this file when:**
|
|
188
|
-
- Creating commits (Git or Plastic)
|
|
189
|
-
- Generating commit messages
|
|
190
|
-
- Validating commit format
|
|
191
|
-
- Writing PR/code review descriptions
|
|
192
|
-
|
|
193
|
-
**Load this file:**
|
|
194
|
-
```markdown
|
|
195
|
-
Load conventional commit format from ../../_shared/references/conventional-commits.md
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Then format all commits according to this standard.
|
|
1
|
+
# Conventional Commits
|
|
2
|
+
|
|
3
|
+
This reference file documents the conventional commit format used across the project.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Format
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
<type>(<scope>): <subject>
|
|
11
|
+
|
|
12
|
+
[optional body]
|
|
13
|
+
|
|
14
|
+
[optional footer]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Types
|
|
20
|
+
|
|
21
|
+
| Type | Description | Example |
|
|
22
|
+
|------|-------------|---------|
|
|
23
|
+
| **feat** | New feature | `feat(auth): add OAuth login` |
|
|
24
|
+
| **fix** | Bug fix | `fix(cart): calculate tax correctly` |
|
|
25
|
+
| **refactor** | Code restructuring (no behavior change) | `refactor(api): extract service layer` |
|
|
26
|
+
| **perf** | Performance improvement | `perf(query): optimize user lookup` |
|
|
27
|
+
| **test** | Adding or updating tests | `test(auth): add login edge cases` |
|
|
28
|
+
| **docs** | Documentation changes | `docs(readme): update installation steps` |
|
|
29
|
+
| **style** | Code style changes (formatting, etc.) | `style(lint): fix indentation` |
|
|
30
|
+
| **chore** | Build process or auxiliary tool changes | `chore(deps): update to Rails 7.1` |
|
|
31
|
+
| **ci** | CI/CD configuration changes | `ci(github): add test workflow` |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Scope
|
|
36
|
+
|
|
37
|
+
The scope is optional but recommended. It specifies which part of the codebase was affected:
|
|
38
|
+
|
|
39
|
+
**Examples:**
|
|
40
|
+
- `feat(player): add dash mechanic`
|
|
41
|
+
- `fix(inventory): prevent negative quantities`
|
|
42
|
+
- `refactor(ui): simplify menu navigation`
|
|
43
|
+
- `perf(rendering): batch sprite draws`
|
|
44
|
+
|
|
45
|
+
**Guidelines:**
|
|
46
|
+
- Use lowercase
|
|
47
|
+
- Be specific but concise
|
|
48
|
+
- Match your module/component names
|
|
49
|
+
- Omit if change is global
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Subject
|
|
54
|
+
|
|
55
|
+
The subject contains a succinct description of the change:
|
|
56
|
+
|
|
57
|
+
- **Use imperative mood:** "add" not "added" or "adds"
|
|
58
|
+
- **Don't capitalize first letter:** "add feature" not "Add feature"
|
|
59
|
+
- **No period at the end:** "fix bug" not "fix bug."
|
|
60
|
+
- **Limit to 50 characters**
|
|
61
|
+
|
|
62
|
+
**Good examples:**
|
|
63
|
+
- `feat(auth): add password reset flow`
|
|
64
|
+
- `fix(api): handle null responses`
|
|
65
|
+
- `refactor(utils): extract string helpers`
|
|
66
|
+
|
|
67
|
+
**Bad examples:**
|
|
68
|
+
- `feat(auth): Added password reset flow` (not imperative)
|
|
69
|
+
- `feat(auth): Add Password Reset Flow` (capitalized)
|
|
70
|
+
- `feat(auth): add password reset flow.` (period at end)
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Body (Optional)
|
|
75
|
+
|
|
76
|
+
Use the body to explain **what** and **why**, not **how**:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
feat(player): add dash mechanic
|
|
80
|
+
|
|
81
|
+
Adds a dash ability to the player character for enhanced mobility.
|
|
82
|
+
Dash has 1-second cooldown and consumes 10 stamina.
|
|
83
|
+
|
|
84
|
+
Closes #42
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Guidelines:**
|
|
88
|
+
- Wrap at 72 characters
|
|
89
|
+
- Separate from subject with blank line
|
|
90
|
+
- Focus on context and reasoning
|
|
91
|
+
- Link to issues if applicable
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Footer (Optional)
|
|
96
|
+
|
|
97
|
+
Use footer for metadata:
|
|
98
|
+
|
|
99
|
+
**Breaking changes:**
|
|
100
|
+
```
|
|
101
|
+
feat(api)!: change authentication endpoint
|
|
102
|
+
|
|
103
|
+
BREAKING CHANGE: /api/login now requires email instead of username
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Issue references:**
|
|
107
|
+
```
|
|
108
|
+
fix(cart): calculate tax correctly
|
|
109
|
+
|
|
110
|
+
Fixes #123
|
|
111
|
+
Closes #124
|
|
112
|
+
Related to #125
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Attribution:**
|
|
116
|
+
```
|
|
117
|
+
feat(dashboard): add analytics widget
|
|
118
|
+
|
|
119
|
+
Co-Authored-By: <AI Assistant Name (e.g., Codex, Claude, Pi Coding Agent)>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Attribution Footer
|
|
125
|
+
|
|
126
|
+
Add a simple attribution line in the footer when needed:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
feat(feature): implement new capability
|
|
130
|
+
|
|
131
|
+
[Body explaining the change]
|
|
132
|
+
|
|
133
|
+
Co-Authored-By: <AI Assistant Name (e.g., Codex, Claude, Pi Coding Agent)>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Examples
|
|
139
|
+
|
|
140
|
+
### Simple Feature
|
|
141
|
+
```
|
|
142
|
+
feat(player): add jump mechanic
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Bug Fix with Context
|
|
146
|
+
```
|
|
147
|
+
fix(inventory): prevent item duplication
|
|
148
|
+
|
|
149
|
+
Items were duplicating when rapidly clicking the pickup button.
|
|
150
|
+
Added debounce logic to prevent double-processing.
|
|
151
|
+
|
|
152
|
+
Fixes #156
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Refactor with Explanation
|
|
156
|
+
```
|
|
157
|
+
refactor(rendering): extract camera controller
|
|
158
|
+
|
|
159
|
+
Moved camera logic from PlayerController to dedicated CameraController
|
|
160
|
+
for better separation of concerns and reusability.
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Performance Improvement
|
|
164
|
+
```
|
|
165
|
+
perf(physics): optimize collision detection
|
|
166
|
+
|
|
167
|
+
Changed from O(n²) all-pairs check to spatial hashing.
|
|
168
|
+
Reduces frame time by ~15ms with 100+ objects.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Attribution Example
|
|
172
|
+
```
|
|
173
|
+
feat(multiplayer): add lobby system
|
|
174
|
+
|
|
175
|
+
Implements matchmaking lobby with room creation, joining, and ready-up.
|
|
176
|
+
Uses WebSocket for real-time updates.
|
|
177
|
+
|
|
178
|
+
Closes #89
|
|
179
|
+
|
|
180
|
+
Co-Authored-By: <AI Assistant Name (e.g., Codex, Claude, Pi Coding Agent)>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Usage in Skills
|
|
186
|
+
|
|
187
|
+
**Reference this file when:**
|
|
188
|
+
- Creating commits (Git or Plastic)
|
|
189
|
+
- Generating commit messages
|
|
190
|
+
- Validating commit format
|
|
191
|
+
- Writing PR/code review descriptions
|
|
192
|
+
|
|
193
|
+
**Load this file:**
|
|
194
|
+
```markdown
|
|
195
|
+
Load conventional commit format from ../../_shared/references/conventional-commits.md
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Then format all commits according to this standard.
|
|
@@ -16,13 +16,13 @@ Treat `plastic_merge` success as provisional until `plastic_status` confirms the
|
|
|
16
16
|
|
|
17
17
|
For the common closeout flow of merging a finished source branch into its parent branch, prefer `plastic_mergeToBranch` when available. When `target` is omitted, it resolves the source branch's Plastic parent branch instead of assuming `/dev`. It switches to the target, optionally updates, runs the safe merge, checks merge state, and checks in the merge result. Pass `target` only when the user explicitly wants a different integration branch.
|
|
18
18
|
|
|
19
|
-
`plastic_diff` is intentionally disabled.
|
|
19
|
+
`plastic_diff` is intentionally disabled. Route changed-path listing to `plastic_status()`, one intentional workspace-file comparison to `plastic_diffFile(path="<workspace-path>")`, an explicitly scoped pending review to `plastic_workspaceDiff(paths=[...])`, and an explicit historical pair to `plastic_diffRevisions`. Do not use diffs as routine post-edit validation or checkin preflight. Prefer focused tests, `plastic_status` for pending scope, and direct reads for current file content; diff only when change-boundary evidence is needed. `plastic_diffFile` uses machine-readable status: added and explicitly selected private/new files compare against an empty base; changed, moved, and deleted items use their reported base revision when available. A `--nodata` base failure means Plastic cannot provide historical bytes; refresh/update the workspace or use two known file-qualified revisions. Explicit `revision` behavior remains a separate historical request. Binary content is reported rather than decoded as text.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`plastic_workspaceDiff` requires selected paths or explicit `allPending=true`, runs status once, has small default file/per-file/combined-output bounds, and returns per-file outcomes without aborting when one file is unavailable. Selected private paths are included; whole-workspace private review additionally requires `includePrivate=true`. Keep `maxChars` small unless more output is intentional. Use `plastic_patch` for review patch generation with `clean` and `integration` filters; it is generation-only and does not apply patches. It uses `PI_PLASTIC_DIFF_EXECUTABLE` when set, otherwise GNU/POSIX `diff` on PATH; paths containing spaces are supported, but Pi does not discover Git Bash paths automatically. Pass `toolPath` only for an intentional one-call override. For a large patch, pass an intentional new `output` path because Plastic will not overwrite it.
|
|
22
22
|
|
|
23
23
|
Prefer runtime `plastic_*` tools first. Keep `cm` shell commands as manual fallback.
|
|
24
24
|
|
|
25
|
-
Directly invoked mutating `plastic_*` tools run without package-owned approval tokens or UI confirmation. Inspect exact targets
|
|
25
|
+
Directly invoked mutating `plastic_*` tools run without package-owned approval tokens or UI confirmation. Inspect exact targets and rely on the tools' command, workspace, path-containment, and non-interactive process guards. Do not call preflight and then the same operation as routine ceremony. Use preflight when mutation scope is ambiguous or broad, moved/deleted paths may need rewriting, a compound operation needs preview, or the user explicitly asks for one. A command process is attempted once without implicit retry; after an ambiguous failure, inspect Plastic status before deciding whether to retry manually.
|
|
26
26
|
|
|
27
27
|
Create normal work branches beneath an intended parent: use `<parent-branch>/<new-branch>`, not `/<new-branch>`. The parent does not need to be the branch loaded in the workspace. Prefer `plastic_branchCreate(branch="<new-branch>", parent="<parent-branch>")`; omitting `parent` uses the current branch only as a convenience. Rare top-level branch creation requires the explicit `allowRootBranch=true` override.
|
|
28
28
|
|
|
@@ -53,7 +53,7 @@ cm status --all
|
|
|
53
53
|
|
|
54
54
|
Safe checklist:
|
|
55
55
|
- Confirm deleted items appear in status output before checkin.
|
|
56
|
-
-
|
|
56
|
+
- For path-scoped checkins containing moved/deleted items, use `plastic_checkin(preflight=true, paths=[...])` so the tool can preview rewriting unstable file scopes to stable parent scopes. Do not preflight ordinary exact-scope checkins routinely.
|
|
57
57
|
- `plastic_checkin` now inspects `cm status --machinereadable` and auto-enables `--applychanged` when moved/deleted items are in scope.
|
|
58
58
|
- Re-run `cm status --all` after add/scope changes, then checkin.
|
|
59
59
|
|
|
@@ -71,13 +71,13 @@ cm checkin -c="<commit-message>"
|
|
|
71
71
|
|
|
72
72
|
## Safe Diff Usage
|
|
73
73
|
|
|
74
|
-
Never run `cm diff` in Pi.
|
|
75
|
-
|
|
76
|
-
Use one of these safe alternatives:
|
|
74
|
+
Never run `cm diff` in Pi. Do not replace it with a routine safe-diff call: use `plastic_status` for pending scope, focused tests for behavior, and direct reads for current content. Request diff output only when change-boundary evidence is needed.
|
|
77
75
|
|
|
78
76
|
```text
|
|
79
77
|
plastic_status(machineReadable=true) # list pending paths/statuses
|
|
80
|
-
plastic_diffFile(path="<workspace-path>") #
|
|
78
|
+
plastic_diffFile(path="<workspace-path>", maxChars=4000) # one intentional file comparison
|
|
79
|
+
plastic_workspaceDiff(paths=["<workspace-path>"], maxChars=3000) # explicitly scoped review
|
|
80
|
+
plastic_workspaceDiff(allPending=true) # explicit small whole-workspace review
|
|
81
81
|
plastic_diffFile(path="<workspace-path>", revision="cs:<number>")
|
|
82
82
|
plastic_diffRevisions(leftRevision="<left-file-qualified-revspec>", rightRevision="<right-file-qualified-revspec>")
|
|
83
83
|
```
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# Code Review Creation
|
|
2
|
-
|
|
3
|
-
## CLI (Preferred)
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
branch=$(cm status | head -1 | cut -d@ -f1 | xargs)
|
|
7
|
-
review_id=$(cm codereview "br:${branch}" "Feature: Brief description" --format="{id}")
|
|
8
|
-
|
|
9
|
-
# Assign reviewer immediately after creating the review
|
|
10
|
-
cm codereview -e "$review_id" --reviewer="reviewer-name"
|
|
11
|
-
|
|
12
|
-
# List reviews for this branch
|
|
13
|
-
cm find review "where target='br:${branch}'" --format="{id} {status} {title}"
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Agent preference: use runtime `plastic_*` methods first for status/branch lookup; keep shell commands as manual fallback.
|
|
17
|
-
|
|
18
|
-
Reviewer assignment is required in the workflow. If your server uses different reviewer flags, run `cm codereview --help` and use the server-specific reviewer option right after review creation.
|
|
19
|
-
|
|
20
|
-
Tool-first flow (preferred):
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
plastic_status()
|
|
24
|
-
# Then use cm codereview ... as fallback for review create/assign
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## CLI Not Available
|
|
28
|
-
|
|
29
|
-
- Document branch and changeset in plan/issue tracker.
|
|
30
|
-
- Or create review via Plastic GUI and assign a reviewer before sharing the review link.
|
|
1
|
+
# Code Review Creation
|
|
2
|
+
|
|
3
|
+
## CLI (Preferred)
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
branch=$(cm status | head -1 | cut -d@ -f1 | xargs)
|
|
7
|
+
review_id=$(cm codereview "br:${branch}" "Feature: Brief description" --format="{id}")
|
|
8
|
+
|
|
9
|
+
# Assign reviewer immediately after creating the review
|
|
10
|
+
cm codereview -e "$review_id" --reviewer="reviewer-name"
|
|
11
|
+
|
|
12
|
+
# List reviews for this branch
|
|
13
|
+
cm find review "where target='br:${branch}'" --format="{id} {status} {title}"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Agent preference: use runtime `plastic_*` methods first for status/branch lookup; keep shell commands as manual fallback.
|
|
17
|
+
|
|
18
|
+
Reviewer assignment is required in the workflow. If your server uses different reviewer flags, run `cm codereview --help` and use the server-specific reviewer option right after review creation.
|
|
19
|
+
|
|
20
|
+
Tool-first flow (preferred):
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
plastic_status()
|
|
24
|
+
# Then use cm codereview ... as fallback for review create/assign
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CLI Not Available
|
|
28
|
+
|
|
29
|
+
- Document branch and changeset in plan/issue tracker.
|
|
30
|
+
- Or create review via Plastic GUI and assign a reviewer before sharing the review link.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- Create feature branch following detected conventions.
|
|
6
6
|
- Use incremental checkins.
|
|
7
|
-
- Never use `cm diff
|
|
7
|
+
- Never use `cm diff`. Do not diff routinely; use a text-only diff tool only when review needs change-boundary evidence.
|
|
8
8
|
- Use `plastic_merge` (or `cm merge ... --nointeractiveresolution --mergetype=try`) for autonomous merges.
|
|
9
9
|
|
|
10
10
|
## Autonomous Merge Workflow
|
|
@@ -34,10 +34,12 @@ plastic_patch(source="<branch-spec>", integration=true)
|
|
|
34
34
|
plastic_patch(source="<branch-spec>", clean=true, integration=true, output="<patch-file>")
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
-
|
|
37
|
+
- When change-boundary evidence is needed, inspect specific files first and opt into multi-file output explicitly:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
plastic_diffFile(path="<workspace-path>")
|
|
40
|
+
plastic_diffFile(path="<workspace-path>", maxChars=4000) # one intentional file comparison
|
|
41
|
+
plastic_workspaceDiff(paths=["<workspace-path>"], maxChars=3000) # explicitly scoped pending review
|
|
42
|
+
plastic_workspaceDiff(allPending=true) # explicit small whole-workspace review
|
|
41
43
|
plastic_diffFile(path="<workspace-path>", revision="cs:<number>")
|
|
42
44
|
plastic_diffRevisions(leftRevision="<left-file-qualified-revspec>", rightRevision="<right-file-qualified-revspec>")
|
|
43
45
|
```
|
|
@@ -18,7 +18,8 @@ Note: command examples target current `cm` 11.x CLI syntax; legacy aliases may d
|
|
|
18
18
|
| Shelve | `plastic_shelvesetCreate(comment="description")` | `cm shelveset create -c="description"` | Save work temporarily |
|
|
19
19
|
| Patch for review | `plastic_patch(source="<branch-spec>", clean=true, integration=true, output="<patch-file>")` | `cm patch <branch-spec> --clean --integration --output=<patch-file>` | Focused branch-review patch; inspect before sharing |
|
|
20
20
|
| Changed-file listing | `plastic_status(machineReadable=true)` | `cm status --all` | Lists changed, added, moved, deleted, and private items without GUI diff |
|
|
21
|
-
| Diff (workspace
|
|
21
|
+
| Diff (one workspace file) | `plastic_diffFile(path="<workspace-path>", maxChars=4000)` | None recommended | Intentional focused comparison only; not routine validation |
|
|
22
|
+
| Diff (pending review) | `plastic_workspaceDiff(paths=["<workspace-path>"], maxChars=3000)` | None recommended | Requires selected paths or explicit `allPending=true`; use status for changed-path listing |
|
|
22
23
|
| Diff (workspace vs supported revision) | `plastic_diffFile(path="<workspace-path>", revision="cs:<number>")` | None recommended | Also accepts a branch, label, file-qualified, or global revision spec |
|
|
23
24
|
| Diff (revision vs revision) | `plastic_diffRevisions(leftRevision="<left-revspec>", rightRevision="<right-revspec>")` | None recommended | Requires two file-qualified revisions; avoids GUI and package temp-file recipes |
|
|
24
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Resources
|
|
2
|
-
|
|
3
|
-
- CLI Reference: https://docs.unity.com/en-us/unity-version-control/uvcs-cli
|
|
4
|
-
- Branch Management: https://docs.unity.com/en-us/unity-version-control/branches
|
|
5
|
-
- Code Reviews: https://docs.unity.com/en-us/unity-version-control/code-reviews
|
|
6
|
-
|
|
7
|
-
Minimum version: PlasticSCM 11.0+
|
|
1
|
+
# Resources
|
|
2
|
+
|
|
3
|
+
- CLI Reference: https://docs.unity.com/en-us/unity-version-control/uvcs-cli
|
|
4
|
+
- Branch Management: https://docs.unity.com/en-us/unity-version-control/branches
|
|
5
|
+
- Code Reviews: https://docs.unity.com/en-us/unity-version-control/code-reviews
|
|
6
|
+
|
|
7
|
+
Minimum version: PlasticSCM 11.0+
|
|
@@ -21,16 +21,18 @@ plastic_patch(source="<branch-spec>", toolPath="<path-to-diff-tool>")
|
|
|
21
21
|
|
|
22
22
|
## Text-Only Diff Options
|
|
23
23
|
|
|
24
|
-
Prefer
|
|
24
|
+
Do not use diffs as routine post-edit validation or checkin preflight. Prefer focused tests, `plastic_status` for pending scope, and direct reads for current content. Use a diff only when change-boundary evidence is needed, such as reviewing unfamiliar changes or confirming a specific risky hunk.
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
27
|
plastic_status(machineReadable=true) # “what changed?” / changed-path listing
|
|
28
|
-
plastic_diffFile(path="<workspace-path>") #
|
|
29
|
-
|
|
28
|
+
plastic_diffFile(path="<workspace-path>", maxChars=4000) # one intentional file comparison
|
|
29
|
+
plastic_workspaceDiff(paths=["<workspace-path>"], maxChars=3000) # explicitly scoped pending review
|
|
30
|
+
plastic_workspaceDiff(allPending=true) # explicit small whole-workspace review
|
|
31
|
+
plastic_diffFile(path="<workspace-path>", revision="cs:<number>") # explicit historical comparison
|
|
30
32
|
plastic_diffRevisions(leftRevision="<left-file-qualified-revspec>", rightRevision="<right-file-qualified-revspec>")
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
The diff tools materialize historical bytes and remove their temporary files internally.
|
|
35
|
+
The diff tools materialize historical bytes and remove their temporary files internally. Added and explicitly selected private/new files use an empty base; changed, moved, and deleted records use their status revision ID when available. A `--nodata` item cannot supply historical/base bytes: refresh the workspace or use two known file-qualified revisions. `plastic_workspaceDiff` requires selected paths or `allPending=true` and returns per-file unavailable outcomes instead of aborting the batch. All tools use bounded GNU/POSIX text diff, treat valid Unity YAML as text, and report genuine binary content explicitly. Do not construct `cm cat` temporary-file recipes for ordinary review.
|
|
34
36
|
|
|
35
37
|
## Metadata Listing (No GUI Diff)
|
|
36
38
|
|
|
@@ -49,9 +51,9 @@ Use the Read tool for full context instead of GUI diffs.
|
|
|
49
51
|
Use the common no-revision path first; `base`, `head`, and `cs:head` are rejected rather than guessed:
|
|
50
52
|
|
|
51
53
|
```text
|
|
52
|
-
plastic_diffFile(path="<workspace-path>")
|
|
53
|
-
plastic_diffFile(path="<workspace-path>", revision="br:/<branch>")
|
|
54
|
-
plastic_diffRevisions(leftRevision="<left-file-qualified-revspec>", rightRevision="<right-file-qualified-revspec>")
|
|
54
|
+
plastic_diffFile(path="<workspace-path>", maxChars=4000)
|
|
55
|
+
plastic_diffFile(path="<workspace-path>", revision="br:/<branch>", maxChars=4000)
|
|
56
|
+
plastic_diffRevisions(leftRevision="<left-file-qualified-revspec>", rightRevision="<right-file-qualified-revspec>", maxChars=4000)
|
|
55
57
|
```
|
|
56
58
|
|
|
57
59
|
## Pending Changes
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# Shelving
|
|
2
|
-
|
|
3
|
-
## Save Work
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
cm shelveset create -c="Working on feature X"
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## List Shelves
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
cm find shelve "where owner='me'" --format="{shelveid} {date} {comment}"
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Restore Work
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
cm shelveset apply sh:5
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Delete Shelve
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
cm shelveset delete sh:5
|
|
25
|
-
```
|
|
1
|
+
# Shelving
|
|
2
|
+
|
|
3
|
+
## Save Work
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
cm shelveset create -c="Working on feature X"
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## List Shelves
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
cm find shelve "where owner='me'" --format="{shelveid} {date} {comment}"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Restore Work
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cm shelveset apply sh:5
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Delete Shelve
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cm shelveset delete sh:5
|
|
25
|
+
```
|