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
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"version": false,
"version": true,
"tag": false
}
}
5 changes: 5 additions & 0 deletions .changeset/pi-edit-checks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@antisprawl/pi": minor
---

Add a Pi extension that checks successful edits for Probable duplicates.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
push:
branches:
- main

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.4.2"

- uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"

- name: Install
run: bun install --frozen-lockfile --ignore-scripts

- uses: changesets/action@v1
with:
version: bun run version
publish: bun scripts/release.ts --publish --github-release
title: Version packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: verify

on:
pull_request:
push:
branches:
- main

concurrency:
group: verify-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.4.2"

- name: Install
run: bun install --frozen-lockfile --ignore-scripts

- name: Patch TypeScript language tools
run: bunx effect-tsgo patch --typescript --oxlint

- name: Verify
run: bun run verify

- name: Cross-compile release targets
run: |
set -euo pipefail
mkdir -p dist
entry=packages/cli/src/main.ts
for target in bun-linux-x64 bun-linux-arm64 bun-darwin-x64 bun-darwin-arm64 bun-windows-x64; do
bun build --compile --target="$target" --outfile="dist/antisprawl-$target" "$entry"
done
3 changes: 2 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
".pi/**",
".roo/**",
".windsurf/**",
"tools/oxlint/anti-slop/**"
"tools/oxlint/anti-slop/**",
"scripts/**"
],
"jsPlugins": [
{ "name": "anti-slop", "specifier": "./tools/oxlint/anti-slop/index.ts" },
Expand Down
3 changes: 3 additions & 0 deletions .pi/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages": ["../packages/pi"]
}
2 changes: 2 additions & 0 deletions CONTEXT-MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

- [Antisprawl](./docs/CONTEXT.md): shared product language for duplicate-evidence analysis
- [CLI](./packages/cli/CONTEXT.md): executable delivery of Antisprawl analysis
- [Pi](./packages/pi/CONTEXT.md): Pi harness mapping onto Antisprawl

## Relationships

- **CLI → Antisprawl**: the CLI implements Antisprawl analysis and adds no terms of its own.
- **Pi → Antisprawl**: maps a Pi session to Agent session and a successful edit or write to one Edit batch; does not own Project or Index.
330 changes: 330 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint:staged": "lint-staged",
"prepare": "husky && effect-tsgo patch --typescript --oxlint && ./scripts/sync-reference-repos.sh",
"test": "bun test",
"typecheck": "tsc --noEmit",
"typecheck": "tsc --noEmit && tsc --noEmit -p packages/pi",
"verify": "bun run format:check && bun run lint && bun run typecheck && bun run test",
"version": "changeset version"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"name": "antisprawl",
"version": "0.0.0",
"private": true,
"description": "Keep your agent from writing spaghetti code.",
"type": "module",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "bun build --compile src/main.ts --outfile dist/antisprawl"
},
Expand Down
13 changes: 13 additions & 0 deletions packages/pi/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Pi

Maps the Pi coding-agent harness onto Antisprawl. Does not own Project or Index.

## Language

**Successful edit or write**:
One Edit batch.
_Avoid_: Turn, tool call, commit

**Pi session**:
One Agent session.
_Avoid_: Process, command invocation
9 changes: 9 additions & 0 deletions packages/pi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @antisprawl/pi

After a successful Pi `edit` or `write`, run `antisprawl check` on that path and append bounded Findings to the same tool result.

## Manual smoke

This repo loads the extension from `.pi/settings.json`. Trust the project if Pi asks, run `antisprawl index` if there is no Index, then `pi` and edit a TypeScript source file.

Or: `pi -e ./packages/pi/src/extension.ts`
35 changes: 35 additions & 0 deletions packages/pi/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "@antisprawl/pi",
"version": "0.0.0",
"description": "Pi extension that checks successful edits for Probable duplicates.",
"keywords": [
"pi-package"
],
"files": [
"src",
"README.md",
"CONTEXT.md"
],
"type": "module",
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@earendil-works/pi-coding-agent": "0.85.1"
},
"peerDependencies": {
"@earendil-works/pi-coding-agent": "*"
},
"devEngines": {
"packageManager": {
"name": "bun",
"version": "1.4.2",
"onFail": "error"
}
},
"pi": {
"extensions": [
"./src/extension.ts"
]
}
}
Loading
Loading