Skip to content

Commit 4e08bf8

Browse files
hyperpolymathclaude
andcommitted
feat: adopt contractile system
Scaffolded via contractile init with Physical State checks, integrity verifications, source rollback, and roadmap tracking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e5f9457 commit 4e08bf8

5 files changed

Lines changed: 180 additions & 0 deletions

File tree

contractile.just

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Auto-generated by: contractile gen-just
2+
# Source directory: contractiles
3+
# Re-generate with: contractile gen-just --dir contractiles
4+
#
5+
# SPDX-License-Identifier: PMPL-1.0-or-later
6+
7+
# === DUST (Recovery & Rollback) ===
8+
# Source: Dustfile.a2ml
9+
10+
# List available dust recovery actions
11+
dust-status:
12+
@echo ' dust-source-rollback: Revert all source changes to last commit [rollback]'
13+
14+
# Revert all source changes to last commit
15+
dust-source-rollback:
16+
@echo 'Executing rollback for source-rollback'
17+
git checkout HEAD -- .
18+
19+
20+
# === INTEND (Declared Future Intent) ===
21+
# Source: Intentfile.a2ml
22+
23+
# Display declared future intents
24+
intend-list:
25+
@echo '=== Declared Intent ==='
26+
@echo ''
27+
@echo 'Features:'
28+
@echo ''
29+
@echo 'Quality:'
30+
31+
32+
# === MUST (Physical State Checks) ===
33+
# Source: Mustfile.a2ml
34+
35+
# Run all must checks
36+
must-check: must-license-present must-readme-present must-spdx-headers must-no-banned-files
37+
@echo 'All must checks passed'
38+
39+
# LICENSE file must exist
40+
must-license-present:
41+
test -f LICENSE
42+
43+
# README must exist
44+
must-readme-present:
45+
test -f README.adoc || test -f README.md
46+
47+
# Source files should have SPDX license headers
48+
must-spdx-headers:
49+
find . -name '*.rs' -o -name '*.res' -o -name '*.gleam' | head -20 | xargs -r grep -L 'SPDX-License-Identifier' | wc -l | grep -q '^0$'
50+
51+
# No Dockerfiles or Makefiles
52+
must-no-banned-files:
53+
test ! -f Dockerfile && test ! -f Makefile
54+
55+
56+
# === TRUST (Integrity & Provenance Verification) ===
57+
# Source: Trustfile.a2ml
58+
59+
# Run all trust verifications
60+
trust-verify: trust-license-content trust-no-secrets-committed trust-container-images-pinned
61+
@echo 'All trust verifications passed'
62+
63+
# LICENSE contains expected SPDX identifier
64+
trust-license-content:
65+
grep -q 'SPDX\|License\|MIT\|Apache\|PMPL\|MPL' LICENSE
66+
67+
# No .env or credential files in repo
68+
trust-no-secrets-committed:
69+
test ! -f .env && test ! -f credentials.json && test ! -f .env.local
70+
71+
# Containerfile base images use pinned digests
72+
trust-container-images-pinned:
73+
test ! -f Containerfile || grep -q '@sha256:' Containerfile
74+
75+

contractiles/dust/Dustfile.a2ml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile (A2ML Canonical)
3+
4+
@abstract:
5+
Recovery and rollback paths for php-aegis.
6+
Declares how to undo significant state changes.
7+
@end
8+
9+
@requires:
10+
- section: Source
11+
@end
12+
13+
## Source
14+
15+
### source-rollback
16+
- description: Revert all source changes to last commit
17+
- rollback: git checkout HEAD -- .
18+
- blast_radius: file
19+
- precondition: git stash
20+
- notes: Stashes uncommitted work before reverting

contractiles/lust/Intentfile.a2ml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Intentfile (A2ML Canonical)
3+
4+
@abstract:
5+
Declared future intent for php-aegis.
6+
@end
7+
8+
@requires:
9+
- section: Features
10+
- section: Quality
11+
@end
12+
13+
## Features
14+
15+
### initial-release
16+
- description: Ship v1.0.0
17+
- status: in-progress
18+
- priority: critical
19+
20+
## Quality
21+
22+
### test-coverage
23+
- description: Achieve meaningful test coverage
24+
- status: declared
25+
- priority: medium

contractiles/must/Mustfile.a2ml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Mustfile (A2ML Canonical)
3+
4+
@abstract:
5+
Physical State contract for php-aegis.
6+
Declares what must be true about this project's files and configuration.
7+
@end
8+
9+
@requires:
10+
- section: Checks
11+
@end
12+
13+
## Checks
14+
15+
### license-present
16+
- description: LICENSE file must exist
17+
- run: test -f LICENSE
18+
- severity: critical
19+
20+
### readme-present
21+
- description: README must exist
22+
- run: test -f README.adoc || test -f README.md
23+
- severity: critical
24+
25+
### spdx-headers
26+
- description: Source files should have SPDX license headers
27+
- run: find . -name '*.rs' -o -name '*.res' -o -name '*.gleam' | head -20 | xargs -r grep -L 'SPDX-License-Identifier' | wc -l | grep -q '^0$'
28+
- severity: warning
29+
30+
### no-banned-files
31+
- description: No Dockerfiles or Makefiles
32+
- run: test ! -f Dockerfile && test ! -f Makefile
33+
- severity: critical

contractiles/trust/Trustfile.a2ml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Trustfile (A2ML Canonical)
3+
4+
@abstract:
5+
Integrity and provenance verification for php-aegis.
6+
@end
7+
8+
@requires:
9+
- section: Verifications
10+
@end
11+
12+
## Verifications
13+
14+
### license-content
15+
- description: LICENSE contains expected SPDX identifier
16+
- command: grep -q 'SPDX\|License\|MIT\|Apache\|PMPL\|MPL' LICENSE
17+
- severity: warning
18+
19+
### no-secrets-committed
20+
- description: No .env or credential files in repo
21+
- command: test ! -f .env && test ! -f credentials.json && test ! -f .env.local
22+
- severity: critical
23+
24+
### container-images-pinned
25+
- description: Containerfile base images use pinned digests
26+
- command: test ! -f Containerfile || grep -q '@sha256:' Containerfile
27+
- severity: warning

0 commit comments

Comments
 (0)