Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,46 @@ on:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: contract-cli
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: paperfoot/finance-core
ref: d822761a58b1651add2b9eb4036cae87ffe5d5e7
path: finance-core
token: ${{ secrets.FINANCE_CORE_TOKEN || github.token }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: contract-cli
- name: Format and lint
working-directory: contract-cli
run: |
cargo fmt --check
cargo clippy --locked --all-targets -- -D warnings
- name: Tests
working-directory: contract-cli
run: cargo test --release
run: cargo test --release --locked
- name: PDF content matrix
working-directory: contract-cli
run: |
brew install typst poppler
cargo build --release --locked
python3 scripts/smoke-pdfs.py --binary target/release/contract
- name: Conformance (agent-cli-framework)
working-directory: contract-cli
run: |
curl -fsSL https://raw.githubusercontent.com/paperfoot/agent-cli-framework/main/conformance/conformance.sh -o /tmp/conformance.sh
chmod +x /tmp/conformance.sh
/tmp/conformance.sh ./target/release/contract
curl -fsSL https://raw.githubusercontent.com/paperfoot/agent-cli-framework/a7797eb3d1013d52830143e0f03e13d99b812bed/conformance/conformance.sh -o "$RUNNER_TEMP/conformance.sh"
chmod +x "$RUNNER_TEMP/conformance.sh"
"$RUNNER_TEMP/conformance.sh" ./target/release/contract
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
target/
Cargo.lock
.DS_Store
*.pdf
.ritalin/
.task-incomplete
.claude/tsc-cache/
work/
*.db
*.db-*
.env*
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

## 0.3.0

- Rebuild all ten PDF templates around a shared reading grid, optically sized bundled fonts, hanging clause numbers, deliberate paragraph/list spacing, readable running furniture and consistent signature fields. Keep list introductions with their first item and short list items intact across page breaks.
- Add explicit UK, US, Singapore and global legal profiles; validate state, governing law and venue choices.
- Add folio, counsel and atelier PDF designs, selectable A4/US Letter, embedded font fallbacks and semantic headings in the new designs.
- Add technology, design and startup clause packs. Refresh standard packs for liability, IP, confidentiality, notices, data processing and execution; retain the preceding pack versions in an archive.
- Snapshot selected clause templates and resolve historical contracts using their saved pack version. Reject clean output with unresolved variables.
- Fix the shared database's legacy contract-kind constraint so NCNDA and loan records can be created; preserve populated records, schema objects, sequences and foreign keys. Use distinct number prefixes for every kind.
- Reject invalid terms, contradictory disclosure settings, invalid dates, duration overflow and unsafe template/issuer names. Prevent metadata/clause edits after the first recorded signature and signatures after termination/expiry.
- Preserve wrapped clause/list paragraphs. Compile to a temporary destination and replace the output only on success. Share cached fonts with Typst instead of copying them into every render directory. Keep internal notes out of render data.
- Honour valid configured contract templates, sanitise default output filenames, and refresh automatic titles when duplicating for another party.
- Move to Rust 2024, declare Rust 1.88 minimum, refresh dependencies and track the lockfile. Add storage/lifecycle/profile regression tests, strict linting and a complete PDF content smoke matrix.
- Replace personal example references with fictional data and document legal-profile and signature-record limitations.

Existing installed binaries are not updated by checking out this source. Build and install the desired revision explicitly. Keep your database backup and original signed PDFs when upgrading.
Loading