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
45 changes: 40 additions & 5 deletions .claude/skills/audit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Full codebase audit covering code quality, structure,
algorithm parity, documentation freshness, and
documentation structure.

## Resume

Before starting the audit, check whether `.audit/findings.md`
already exists. If it does, skip the audit steps entirely
and proceed to the **Resolve** section below.

## Steps

1. Read every source file across the workspace:
Expand Down Expand Up @@ -145,9 +151,12 @@ documentation structure.

### Output

1. Do NOT make any changes. Compile all findings
into a checklist using the TodoWrite tool.
Each item should include:
1. Enter plan mode. Do NOT make any changes.

1. Compile all findings into `.audit/findings.md`
(create the directory if needed). Use a checklist
format with one item per finding. Each item
should include:

- The file path and line number.
- Which category it falls under (DRY,
Expand All @@ -156,6 +165,32 @@ documentation structure.
or CLAUDE.md).
- A brief description of the issue.

Mark every item with `- [ ]` (unchecked).

1. If nothing needed fixing, confirm the audit
passed. Otherwise, present the checklist and
wait for the user to decide what to work on.
passed and exit plan mode.

1. If there are findings, present the checklist
to the user and ask for approval to proceed
with fixes. Do NOT exit plan mode or make any
changes until the user approves.

### Resolve

Only proceed here after the user approves.

1. Exit plan mode.

1. Read `.audit/findings.md`. Identify the first
unchecked (`- [ ]`) item.

1. Fix the issue described in that item.

1. Mark it as checked (`- [x]`) in the file.

1. Repeat until all items are checked or the user
asks to stop.

1. Once all items are checked, delete the
`.audit/` directory and confirm the audit
is complete.
2 changes: 2 additions & 0 deletions .claude/skills/pr-title-description/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ for the pull request on the current branch.

1. If a PR already exists for the branch, update
it with `gh pr edit <number> --body "..."`.
If the PR is in draft mode, also mark it ready
for review with `gh pr ready <number>`.
Otherwise, report the description so the user
can create the PR.

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
deploy
target
.audit/
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ progress. This site serves as an official reference for the underlying
technology, namely SBPF assembly programming techniques that combine [CU]
optimizations with [formal verification] techniques.

If you want to more background information about programming in SBPF assembly,
If you want more background information about programming in SBPF assembly,
check out the [Solana Opcode Guide].

## About this site
Expand Down
16 changes: 8 additions & 8 deletions interface/src/market.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct RegisterMarketData {
// endregion: register_market_data

#[svm_data]
pub struct InputBufferHeader {
pub struct RegisterMarketInputBuffer {
pub n_accounts: u64,
pub user: EmptyAccount,
pub market: EmptyAccount,
Expand All @@ -49,19 +49,19 @@ constant_group! {
/// Miscellaneous market registration constants.
register_misc {
/// From input buffer to base mint duplicate flag.
BASE_DUPLICATE = offset!(InputBufferHeader.base_mint.header.borrow_state),
BASE_DUPLICATE = offset!(RegisterMarketInputBuffer.base_mint.header.borrow_state),
/// From input buffer to base mint data length.
BASE_DATA_LEN = offset!(InputBufferHeader.base_mint.header.data_len),
BASE_DATA_LEN = offset!(RegisterMarketInputBuffer.base_mint.header.data_len),
/// From input buffer to base mint address.
BASE_ADDR = offset!(InputBufferHeader.base_mint.header.address),
BASE_ADDR = offset!(RegisterMarketInputBuffer.base_mint.header.address),
/// From input buffer to quote mint.
QUOTE = offset!(InputBufferHeader.quote_mint),
QUOTE = offset!(RegisterMarketInputBuffer.quote_mint),
/// From input buffer to quote mint duplicate flag.
QUOTE_DUPLICATE = offset!(InputBufferHeader.quote_mint.header.borrow_state),
QUOTE_DUPLICATE = offset!(RegisterMarketInputBuffer.quote_mint.header.borrow_state),
/// From input buffer to quote mint address.
QUOTE_ADDR = offset!(InputBufferHeader.quote_mint.header.address),
QUOTE_ADDR = offset!(RegisterMarketInputBuffer.quote_mint.header.address),
/// From input buffer to quote mint data length.
QUOTE_DATA_LEN = offset!(InputBufferHeader.quote_mint.header.data_len),
QUOTE_DATA_LEN = offset!(RegisterMarketInputBuffer.quote_mint.header.data_len),
/// Number of seeds for market PDA derivation (base, quote).
TRY_FIND_PDA_SEEDS_LEN = immediate!(2),
}
Expand Down
Loading