Replace paraphrased constitution with the 1224-line master.
Copy CODING_CONSTITUTION.md from the AgentStore docs/development path and split the seven always-on .mdc files from that exact text.
This commit is contained in:
@@ -2,25 +2,120 @@
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Periscope Cursor Engineering Rules
|
||||
# 25. PHASE GATES
|
||||
|
||||
Mandatory for every Cursor agent working on Periscope. This section is copied from `docs/development/CODING_CONSTITUTION.md` and must not contradict that master.
|
||||
Development is divided into macro-phases.
|
||||
|
||||
## 6. Git workflow
|
||||
A macro-phase is not complete until:
|
||||
|
||||
Worktree for this product line: `~/Development/pinscope-tree-split` unless Michele names another. Do not start a second clone to dodge the worktree.
|
||||
1. implementation is complete;
|
||||
2. all required tests exist;
|
||||
3. all required tests pass;
|
||||
4. full regression passes;
|
||||
5. relevant integration tests pass;
|
||||
6. static/type/lint checks pass where applicable;
|
||||
7. no known blocker remains;
|
||||
8. documentation is updated;
|
||||
9. results have been reviewed;
|
||||
10. the phase acceptance criteria are satisfied.
|
||||
|
||||
### Phase vs macro-phase
|
||||
Only then is the macro-phase considered complete.
|
||||
|
||||
- **Phase** (one verified slice: e.g. rules install, one rewritten module with tests): when tests (or the docs check) pass → **commit and push**. That is the end of the phase.
|
||||
- **Macro-phase** (a named batch of phases Michele treats as one shippable increment): **deploy only after a macro-phase**, not after every phase, and not at a mere phase boundary.
|
||||
- **No commit, push, or deploy on every small edit.** Edit, keep working, commit when the phase is actually done.
|
||||
- **No deploy at a mere phase boundary.** Passing tests + push is not a deploy order.
|
||||
---
|
||||
|
||||
### Other git rules
|
||||
# 27. PHASE COMMIT AND PUSH POLICY
|
||||
|
||||
Do not commit after every small implementation step merely for convenience.
|
||||
|
||||
During a **phase**:
|
||||
|
||||
```text
|
||||
implement
|
||||
→ test
|
||||
→ fix
|
||||
→ test
|
||||
```
|
||||
|
||||
The repository may contain intermediate working-tree changes.
|
||||
|
||||
At the **end of each phase**, after tests pass:
|
||||
|
||||
```text
|
||||
PHASE TESTS
|
||||
↓
|
||||
COMMIT
|
||||
↓
|
||||
PUSH
|
||||
```
|
||||
|
||||
Commit and push belong to the **phase** boundary, not to every edit.
|
||||
|
||||
Do not push broken or half-completed phase work merely to synchronize the repository.
|
||||
|
||||
---
|
||||
|
||||
# 28. MACRO-PHASE DEPLOY POLICY
|
||||
|
||||
**Deploy** happens only after a **macro-phase**, not after every phase.
|
||||
|
||||
A macro-phase may contain several phases (each already committed and pushed after its tests).
|
||||
|
||||
Never deploy an incomplete macro-phase.
|
||||
|
||||
Required sequence for a macro-phase:
|
||||
|
||||
```text
|
||||
PHASES (each: implement → test → commit → push)
|
||||
↓
|
||||
FULL REGRESSION
|
||||
↓
|
||||
MACRO-PHASE ACCEPTANCE
|
||||
↓
|
||||
DEPLOY
|
||||
↓
|
||||
POST-DEPLOY VERIFICATION
|
||||
```
|
||||
|
||||
If deployment verification fails, stop and investigate.
|
||||
|
||||
---
|
||||
|
||||
# 29. NO DEPLOY AT PHASE BOUNDARY
|
||||
|
||||
Commit + push after phase tests: **yes**.
|
||||
|
||||
Deploy after a phase that is not a completed macro-phase: **no**.
|
||||
|
||||
---
|
||||
|
||||
# 30. NO AUTOMATIC COMMIT/PUSH/DEPLOY DURING DEVELOPMENT
|
||||
|
||||
Cursor must not create commits, push, or deploy merely because a small task has finished.
|
||||
|
||||
Commit and push are **phase-boundary** operations (after tests).
|
||||
|
||||
Deploy is a **macro-phase-boundary** operation.
|
||||
|
||||
If explicitly instructed to deploy before a macro-phase is complete, Cursor must identify the conflict with this policy rather than silently proceeding.
|
||||
|
||||
---
|
||||
|
||||
# 31. GIT HISTORY IS ENGINEERING EVIDENCE
|
||||
|
||||
Do not rewrite Git history casually.
|
||||
|
||||
Do not:
|
||||
|
||||
* force-push;
|
||||
* squash history;
|
||||
* rewrite commits;
|
||||
* detach repository history;
|
||||
|
||||
unless explicitly required by the project phase and explicitly authorized.
|
||||
|
||||
Git history may be relevant to provenance and licensing analysis.
|
||||
|
||||
Preserve it.
|
||||
|
||||
---
|
||||
|
||||
- Feature branches `cursor/<descriptive-name>-0d9d` (lowercase). Do not force-push unless Michele explicitly orders it.
|
||||
- Do not create pull requests unless Michele asks.
|
||||
- Push `origin` and `github` when this worktree has both remotes.
|
||||
- Do not commit secrets, `data/auth/users`, or `.env` password material.
|
||||
- Changelog version is the latest `## x.y.z` in `frontend/content/changelog.md` (dependency copy is the Docker source of truth today). Bump only when the phase is a product change, not for docs-only rules unless Michele wants a version bump.
|
||||
|
||||
Reference in New Issue
Block a user