Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
90b9b35
Initial plan
Copilot Jun 23, 2026
804b486
feat: add @goodwidget/ai-credits-widget package
Copilot Jun 23, 2026
d2ab65f
fix: icon color tokens + test selectors; add Playwright screenshots f…
Copilot Jun 24, 2026
d2c2801
fix: correct adapter per review — real buyer key, backend auth consen…
Copilot Jun 24, 2026
bad7032
test: re-capture Playwright screenshots after adapter corrections
Copilot Jun 24, 2026
9f8ba55
Refine buyer key panel UX interactions
Copilot Jun 24, 2026
55f4897
Update ai-credits widget smoke screenshots
Copilot Jun 24, 2026
3763558
Adjust Buyer Key action layout/colors and refresh widget screenshots
Copilot Jun 24, 2026
8e4e4f7
feat: improve Stepper visual hierarchy — active accent bar, completed…
Copilot Jun 24, 2026
c5c29e6
refactor: enhance BuyerKeyPanel messaging and button layout for clari…
blueogin Jun 24, 2026
0888118
feat: implement operator consent flow with EIP-712 signing and backen…
blueogin Jun 24, 2026
3f1e1f5
fix: update G$ token address and use constant for deposits address in…
blueogin Jun 24, 2026
8827a2c
fix: remove unused isVerified variable and handle goodId verification…
blueogin Jun 24, 2026
b8f1de4
feat: batch Celo payment via Multicall3 — stream (Superfluid CFA) + d…
Copilot Jun 24, 2026
d21f679
feat: refactor Celo payment logic into separate module for improved c…
blueogin Jun 24, 2026
3887a3c
test: refresh ai-credits-widget Playwright screenshots (13/13 pass)
Copilot Jun 24, 2026
7542d76
feat: enhance ai-credits-widget with improved credit handling and usa…
blueogin Jun 24, 2026
b2f3d0d
feat: implement account status loading and operator consent improveme…
blueogin Jun 25, 2026
3e7b9bf
feat: enhance mock backend client with improved account state managem…
blueogin Jun 25, 2026
8d60330
feat: update buyer key generation to derive from wallet signature and…
blueogin Jun 25, 2026
5437f8a
refactor: remove paste buyer key functionality from ai-credits-widget…
blueogin Jun 25, 2026
ae98eba
feat: implement buyer validation and refactor account status loading …
blueogin Jun 25, 2026
29e9e6a
feat: enhance ai-credits-widget with bought credits tracking and impr…
blueogin Jun 25, 2026
e8cd1d9
fix: correct has_credits test assertion + refresh Playwright screensh…
Copilot Jun 25, 2026
846bb5b
Initial plan
Copilot Jun 26, 2026
b94acd5
chore: initialize draft-plan triage for issue #68
Copilot Jun 26, 2026
2b79ffa
chore: remove temporary skill and test artifacts
Copilot Jun 26, 2026
c3da900
chore: start ai-credits management widget implementation
Copilot Jun 26, 2026
55964a6
Merge remote-tracking branch 'origin/copilot/buy-ai-coding-credits' i…
Copilot Jun 26, 2026
0ea1e17
feat: add ai-credits management dashboard sections
Copilot Jun 26, 2026
134fabe
feat: add ai-credits management history filtering and UI assertions
Copilot Jun 26, 2026
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
121 changes: 121 additions & 0 deletions .agents/skills/gooddollar/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Contributing to GoodSkills

This repository is an AI skill pack. The goal of each update is to make agent behavior more reliable, more explicit, and easier to audit.

## Update workflow

1. Define the user-facing problem first.
2. For contract-related updates, add or update Rich ABI first (`references/contracts/*.abi.yaml`), then refresh selectors.
3. Decide the remaining artifact types:
- `references/guides/` for "what to do"
- `references/deep-researches/` for "why it works this way"
- `scripts/` for deterministic and repeatable execution
4. Update `SKILL.md` routing so the new artifact is discoverable.
5. Validate consistency (paths, naming, links, selectors, assumptions).

If a change touches contract behavior, treat Rich ABI update/add as mandatory first step before guides, deep-research, or scripts.

## Add or update a guide

Use guides for execution playbooks and operator workflows.

Required structure:

- title and one-line usage trigger
- `## Goal`
- `## Required inputs`
- `## Execution flow` as numbered steps
- deterministic snippet when execution is non-trivial
- failure handling and output contract

Guide rules:

- prefer explicit pre-checks before state-changing actions
- include only one primary workflow per file
- use [GoodProtocol `releases/deployment.json`](https://github.com/GoodDollar/GoodProtocol/blob/master/releases/deployment.json) as the **only** source for contract addresses (rich ABI `meta.deployments` mirrors those rows); use GoodDocs for behavior and UX, not for resolving addresses; use on-chain `NameService.getAddress` only when the deployment documents the string key
- avoid implementation-deep theory; keep that in deep-research files

After adding a guide:

- add it to `SKILL.md` in `Guides`
- add an entry in `Use-case to guide map`

## Add or update a deep-research note

Use deep-research files for architecture, rationale, tradeoffs, and root-cause logic.

Deep-research rules:

- explain causality, not only API surfaces
- distinguish current behavior from legacy behavior
- link source contracts/docs for traceability
- keep language natural and decision-oriented

Do not turn deep-research files into step-by-step runbooks; move operational steps into guides.

## Add or update Rich ABI YAML

Location: `references/contracts/`.

For each contract:

- create or update `Foo.abi.yaml`
- generate or refresh `Foo.selectors.yaml`
- include function-level notes for non-obvious behavior
- when `meta.deployments` lists concrete addresses, add **`creationBlock`** next to each **`address`** (placement: `references/contracts/_rich-abi-yaml-format.md`; using it as **`fromBlock`** for log or HyperSync fetches: `references/guides/hypersync-hyperrpc.md`)

Minimum ABI documentation quality:

- correct mutability, inputs, outputs
- access pattern (`owner`, `avatar`, `anyone`, etc.) where relevant
- emitted events and practical errors
- notes for routing/edge-case semantics

Source-of-truth policy:

- prefer canonical contract repos (GoodProtocol, GoodBridge, mento-core)
- avoid inferred behavior when source is unclear
- update notes when protocol behavior changed

Selector generation:

```bash
node scripts/selectors.mjs generate Foo.abi.yaml
```

## Add or update scripts

Location: `scripts/`.

Use scripts when:

- a workflow is repeated
- deterministic output is needed
- manual querying is error-prone

Script standards:

- require inputs through env vars or explicit args
- fail loudly with actionable messages
- print structured output for easy reuse
- keep script intent narrow

When a script supports a guide:

- reference it from that guide
- document expected inputs and outputs in the guide

## Naming and organization

- use lowercase kebab-case for guides and deep-research files
- keep one topic per file
- avoid duplicate guidance across files
- prefer updating existing files over creating near-duplicates

## Update checklist before merge

- `SKILL.md` routing updated
- links resolve and point to public sources
- guides and deep-research files respect "what" vs "why" separation
- ABI + selectors pairs are in sync
- new behavior is reflected in notes where needed
215 changes: 215 additions & 0 deletions .agents/skills/gooddollar/SKILL.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
meta:
name: BuyGDCloneFactory
version: "1"
source:
- https://raw.githubusercontent.com/GoodDollar/GoodProtocol/master/contracts/utils/BuyGDClone.sol
note: >
Deterministic clone factory for BuyGDCloneV2 and DonateGDClone. Used to create per-owner
executors and optional create+swap flows for ramp services.
deployments:
mainnet:
production-celo:
BuyGDFactoryV2:
networkId: 42220
address: "0x1F60C4C7037C6766924A43666B781ED1479587a2"
creationBlock: 22909812
BuyGDFactory:
networkId: 42220
address: "0x00e533B7d6255D05b7f15034B1c989c21F51b91C"
creationBlock: 21006324
related:
- references/deep-researches/on-off-ramp-service.md
- references/guides/on-off-ramp.md

create:
notes:
- "Deploys deterministic BuyGDCloneV2 clone for owner and initializes it."
- "Difference vs createAndSwap: this only deploys; no swap is executed."
mutability: nonpayable
access: anyone
inputs:
- owner: address
outputs:
- clone: address

createDonation:
notes:
- "Deploys deterministic DonateGDClone with donation target and call payload."
- "Difference vs create: deploys donation-capable implementation instead of plain swap clone."
mutability: nonpayable
access: anyone
inputs:
- owner: address
- donateOrExecTo: address
- callData: bytes
outputs:
- clone: address

createAndSwap:
notes:
- "One-transaction helper: create BuyGDCloneV2 then immediately call clone.swap(minAmount, msg.sender)."
- "Difference vs create: bundles deployment and first swap for faster ramp UX."
mutability: nonpayable
access: anyone
inputs:
- owner: address
- minAmount: uint256
outputs:
- clone: address

createDonationAndSwap:
notes:
- "One-transaction helper for DonateGDClone: deploy, then execute donation flow with optional pre-swap."
- "Difference vs createDonation: can execute immediate swap and/or target call instead of deployment only."
mutability: nonpayable
access: anyone
inputs:
- owner: address
- donateOrExecTo: address
- withSwap: bool
- minAmount: uint256
- callData: bytes
outputs:
- clone: address

predict:
notes:
- "Computes deterministic address for create(owner) salt."
mutability: view
inputs:
- owner: address
outputs:
- clone: address

predictDonation:
notes:
- "Computes deterministic address for createDonation(owner, donateOrExecTo, callData) salt."
mutability: view
inputs:
- owner: address
- donateOrExecTo: address
- callData: bytes
outputs:
- clone: address

getBaseFee:
mutability: view
inputs: []
outputs:
- baseFee: uint256

quoter:
mutability: pure
inputs: []
outputs:
- addr: address

CUSD:
mutability: pure
inputs: []
outputs:
- token: address

celo:
mutability: pure
inputs: []
outputs:
- token: address

USDC:
mutability: pure
inputs: []
outputs:
- token: address

GLOUSD:
mutability: pure
inputs: []
outputs:
- token: address

PERIOD:
mutability: pure
inputs: []
outputs:
- seconds: uint24

impl:
mutability: view
inputs: []
outputs:
- addr: address

donateImpl:
mutability: view
inputs: []
outputs:
- addr: address

gd:
mutability: view
inputs: []
outputs:
- token: address

stable:
mutability: view
inputs: []
outputs:
- token: address

oracle:
mutability: view
inputs: []
outputs:
- addr: address

router:
mutability: view
inputs: []
outputs:
- addr: address

mentoBroker:
mutability: view
inputs: []
outputs:
- addr: address

mentoExchangeProvider:
mutability: view
inputs: []
outputs:
- addr: address

mentoExchangeId:
mutability: view
inputs: []
outputs:
- id: bytes32

events:
GDSwapToCusd:
indexed: []
data:
- from: address
- to: address
- amountIn: uint256
- amountOut: uint256
- note: bytes

errors:
NOT_GD_TOKEN: "onTokenTransfer caller is not G$ token."
INVALID_TWAP: "TWAP validation failed."
RECIPIENT_ZERO: "Recipient cannot be zero address."
ZERO_MINAMOUNT: "Minimum amount cannot be zero."
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by scripts/selectors.mjs
functions:
create(address): 0x9ed93318
createDonation(address,address,bytes): 0x48199e6b
createAndSwap(address,uint256): 0x89643a29
createDonationAndSwap(address,address,bool,uint256,bytes): 0xeb5621b8
predict(address): 0x901b96e7
predictDonation(address,address,bytes): 0x3895de30
getBaseFee(): 0x15e812ad
quoter(): 0xc6bbd5a7
CUSD(): 0x758316c9
celo(): 0x051ed8ef
USDC(): 0x89a30271
GLOUSD(): 0x4b5b02d6
PERIOD(): 0xb4d1d795
impl(): 0x8abf6077
donateImpl(): 0x21fc2eef
gd(): 0xa5e598fc
stable(): 0x22be3de1
oracle(): 0x7dc0d1d0
router(): 0xf887ea40
mentoBroker(): 0x7b89f117
mentoExchangeProvider(): 0x4f62feec
mentoExchangeId(): 0xd373b333
events:
GDSwapToCusd(address,address,uint256,uint256,bytes): 0x252bc23e3fb01f9986fa157af621236fb8a706ea12622da296e7f2f30d4f1a56
errors: {}
Loading