diff --git a/AGENTS.md b/AGENTS.md index 0f6ff52..e88357f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -303,9 +303,9 @@ agent for it. ## 8. What not to do -- Do not copy component files from `trycompai/crm`. Most are shadcn/ui - originals — take them from upstream where they are canonical. Borrow the - compositions as ideas; the debt is credited in `NOTICE`. +- Do not copy component files out of other people's repositories. Where a + primitive is a shadcn/ui original, take it from upstream, where it is + canonical and current. Compositions we write ourselves. - Do not open self-registration on the identity provider. It is shared with another application. PIG mints accounts itself, gated on an invite. - Do not put a production SSH key on the CI runner. Deployment is manual on diff --git a/NOTICE b/NOTICE index 324ac5f..d3e74aa 100644 --- a/NOTICE +++ b/NOTICE @@ -19,14 +19,9 @@ limitations under the License. ACKNOWLEDGEMENTS -Several architectural ideas in this project were studied from, and are -gratefully credited to, the following open-source projects. No source code -was copied from them; the debt is one of design. - - Comp AI CRM (https://github.com/trycompai/crm) — MIT License. - The evidence-banded fact model, the leased database-backed agent task - queue, the agent-brief pattern on user-defined fields, and the - "intelligence never lives in the API" separation. +One architectural idea in this project was studied from, and is gratefully +credited to, the following open-source project. No source code was copied +from it; the debt is one of design. Buzz (https://github.com/block/buzz) — Apache License 2.0. The agent-as-workspace-member model that informed PIG's treatment of diff --git a/README.md b/README.md index 0684540..2305fa9 100644 --- a/README.md +++ b/README.md @@ -586,6 +586,5 @@ will be removed. ## Licence Apache License 2.0 — see [LICENSE](./LICENSE) and [NOTICE](./NOTICE). The -architectural debts to [Comp AI CRM](https://github.com/trycompai/crm) (MIT) -and [Buzz](https://github.com/block/buzz) (Apache-2.0) are credited in NOTICE. -No source code was copied from either. +architectural debt to [Buzz](https://github.com/block/buzz) (Apache-2.0) is +credited in NOTICE. No source code was copied from it. diff --git a/docs/build-plan.md b/docs/build-plan.md index b7fcae5..f2f7936 100644 --- a/docs/build-plan.md +++ b/docs/build-plan.md @@ -152,31 +152,29 @@ any native mobile application. --- -## On borrowing from Comp AI CRM +## On the component library -Their repo (MIT) was cloned and inventoried early on, and three findings shaped -the plan. All three have since been acted on. +Three gaps were identified in an early review of the front end. All three have +since been acted on. -**Their component library was far deeper — 68 primitives to our 9 at the time.** -PIG now has 22, including the ones that mattered: `data-table`, `command`, -`sheet`, `drawer`, `sidebar`, `form`. The agent-chat compositions -(`message`, `reasoning`, `thinking-indicator`) were rebuilt rather than copied, -inside `PiggyChat.tsx`. +**The primitive set was too thin — 9 at the time.** PIG now has 22, including +the ones that mattered: `data-table`, `command`, `sheet`, `drawer`, `sidebar`, +`form`. The agent-chat compositions (`message`, `reasoning`, +`thinking-indicator`) are ours, written inside `PiggyChat.tsx`. -**`SourcedValue` / `Provenance` was worth adopting outright** — a dotted -underline on any agent-derived value, with a tooltip carrying the claim, the -reasons, when it was observed and the source URL. PIG already held that data in -`facts` and surfaced none of it. It does now. +**`SourcedValue` / `Provenance` had to exist** — a dotted underline on any +agent-derived value, with a tooltip carrying the claim, the reasons, when it was +observed and the source URL. PIG already held that data in `facts` and surfaced +none of it. It does now. -**We were ahead of them on mobile, not behind**, and the ratio has held: PIG is -63 `.tsx` files with safe-area handling, a bottom tab bar, a sidebar Sheet and a -hard rule that no route may scroll sideways at 393px. Their app is effectively +**Mobile is a lead, and the ratio has held:** PIG is 63 `.tsx` files with +safe-area handling, a bottom tab bar, a sidebar Sheet and a hard rule that no +route may scroll sideways at 393px. Most tools in this category are effectively desktop-only. -**Do not copy their component files.** Most are shadcn/ui originals, which are -MIT and designed to be installed from upstream — take them from source, where -they are canonical and current. Borrow the compositions as ideas, and credit in -`NOTICE` as already done. +**Where a primitive is a shadcn/ui original, install it from upstream**, where +it is canonical and current — not lifted out of somebody else's repository. +Compositions we write ourselves. --- diff --git a/packages/db/src/schema/agent.ts b/packages/db/src/schema/agent.ts index 75a7fcc..5711647 100644 --- a/packages/db/src/schema/agent.ts +++ b/packages/db/src/schema/agent.ts @@ -17,8 +17,6 @@ * * 3. **Every outward action is idempotent.** `agentActions` carries a unique * idempotency key, so a retried task cannot send the same message twice. - * - * The pattern is adapted from Comp AI CRM (MIT); see NOTICE. */ import { index, diff --git a/packages/db/src/schema/fields.ts b/packages/db/src/schema/fields.ts index c30833e..e82aa73 100644 --- a/packages/db/src/schema/fields.ts +++ b/packages/db/src/schema/fields.ts @@ -3,9 +3,9 @@ * * Every CRM grows fields its designers did not anticipate, and a schema that * refuses them is a schema that gets worked around in a spreadsheet. The - * variant here carries one idea worth borrowing from Comp AI CRM (MIT, see - * NOTICE): `agentBrief` — a prose instruction telling the agent *how* to fill - * this particular field. A custom field is otherwise opaque to an agent, which + * variant here carries one idea the usual designs miss: `agentBrief` — a prose + * instruction telling the agent *how* to fill this particular field. A custom + * field is otherwise opaque to an agent, which * knows the column exists but nothing about what would constitute a good value. */ import {