Skip to content

docs: AGENTS.md + schema specification#52

Merged
KalebCole merged 3 commits intomainfrom
sasha/agents-md
Mar 30, 2026
Merged

docs: AGENTS.md + schema specification#52
KalebCole merged 3 commits intomainfrom
sasha/agents-md

Conversation

@KalebCole
Copy link
Copy Markdown
Owner

@KalebCole KalebCole commented Mar 27, 2026

What

  • AGENTS.md — agent guide for the Partiful CLI. Commands, non-obvious gotchas, three-tier boundaries.
  • docs/agents-md-schema.md — systematic schema for writing AGENTS.md files for any CLI tool.

Why

Agents were defaulting to Google Calendar for social events because they didn't know how to use the Partiful CLI effectively. This gives them everything they need — focused on non-inferable knowledge only.

Research basis

  • GitHub Blog analysis of 2,500+ AGENTS.md files
  • agents.md open spec (60k+ repos, Linux Foundation)
  • ETH Zurich (Mar 2026): LLM-generated context files hurt performance; only human-written, non-inferable details help.

Related

Summary by CodeRabbit

Release Notes

  • Documentation
    • Added comprehensive CLI documentation covering usage discovery, operational constraints for contact and guest workflows, authentication behavior, safety controls requiring confirmation for destructive operations with dry-run support, timezone configuration, image upload guidance, and testing plus code convention standards.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b699a22-d4cc-4a08-9eda-f3295955eade

📥 Commits

Reviewing files that changed from the base of the PR and between 9fbad47 and c2c2286.

📒 Files selected for processing (1)
  • AGENTS.md
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md

📝 Walkthrough

Walkthrough

Introduces AGENTS.md, a comprehensive guide for AI agents using the Partiful CLI. Documents JSON-first event workflows, operational constraints (contact privacy, guest-list scope, image upload fallbacks), authentication behavior, confirmation requirements for destructive commands, timezone defaults, and code conventions for safe integration.

Changes

Cohort / File(s) Summary
Agent Integration Documentation
AGENTS.md
New file providing AI agents with discovery guidance (--help, schema introspection), operational constraints (contacts lack email/phone, guest lists limited to self-hosted events, image upload fallbacks), authentication clarifications, safety controls (confirmation prompts for events cancel/blasts send, --dry-run support), timezone defaults, and testing/code conventions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 A guide for our friends in the cloud so bright,
Now agents can navigate Partiful's night,
With schemas and workflows and gotchas galore,
Those clever AI minds won't get lost anymore! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes docs/agents-md-schema.md (schema specification) alongside AGENTS.md. The PR description notes this should be removed and committed separately per author's comment requesting commit split. Remove docs/agents-md-schema.md from this commit and submit as a separate PR to keep AGENTS.md documentation scope focused as per issue #48 requirements.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: adding AGENTS.md documentation plus schema specification to guide AI agents in using the Partiful CLI.
Linked Issues check ✅ Passed The AGENTS.md addresses all core requirements from #48: capability summary, common workflows, decision tree, schema reference, auth checks, error recovery guidance, and documented gotchas (contact privacy, guest list limits, image upload fallback).
Docstring Coverage ✅ Passed Docstring coverage is 81.25% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sasha/agents-md

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Around line 5-49: Add the missing "workflow" and "intent-routing" sections
from issue `#48` into AGENTS.md: create a concrete intent→command routing table
mapping user intents (create event, invite guests, check attendees, send blast,
clone recurring event, export/share/watch) to the exact CLI commands shown
(e.g., partiful events create, partiful guests invite, partiful guests list,
partiful blasts send, partiful +clone, partiful +export/+share/+watch), then add
step-by-step example flows for "create + invite", "check attendees", "send a
blast", and "clone recurring events" that show required flags and order of
commands; finally add short recovery steps for common failures: HTTP 403 (reauth
via partiful auth login/status), missing userId (resolve via partiful contacts
list/search or use --phone), and upload failures (retry, validate poster with
partiful posters search/list and re-run events create with --poster-search or
reupload), referencing these command names and flows so an agent can map intents
to exact commands.
- Around line 110-111: Update the documentation line listing commands that
require confirmation to remove the `create` entry: the `events create` command
does not call the `confirm()` helper (see src/commands/events.js) and is
executed directly after validation, so the AGENTS.md "Confirmation prompts"
section should not claim `create` prompts for confirmation; revise the sentence
to list only commands that actually call `confirm()` (e.g., `cancel`, `invite`,
`blasts send`) or rephrase to clarify which specific commands invoke
confirmation.
- Around line 62-84: Update the fenced project-structure block in AGENTS.md to
include a language tag "text" (i.e., change the opening ``` to ```text) for the
tree listing that begins with "src/" so the code fence is marked as plain text
and avoids the markdownlint MD040 warning; ensure you only modify the fence
marker and not the contents of the directory tree.

In `@src/lib/events.js`:
- Around line 42-47: The function validateImageExtension currently calls a
non-existent await_extname_sync and references undefined ext; import extname
from 'path', replace the await_extname_sync call with const ext =
extname(filePath) and throw a ValidationError (not Error) when ext is not in
ALLOWED_IMAGE_EXTENSIONS; apply the same fix to the other occurrence that
references ext (the similar check later in the file) so both use extname(...)
and ValidationError for consistency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9a6785be-a97d-4016-8d9e-3628ecea6063

📥 Commits

Reviewing files that changed from the base of the PR and between efce329 and c782293.

📒 Files selected for processing (6)
  • AGENTS.md
  • docs/agents-md-schema.md
  • src/commands/blasts.js
  • src/commands/bulk.js
  • src/commands/events.js
  • src/lib/events.js

AGENTS.md Outdated
Comment on lines +5 to +49
## Commands

```bash
# Health check (run first to verify auth)
partiful doctor

# Auth
partiful auth status
partiful auth login <phone> # SMS verification flow

# Events
partiful events list # upcoming events
partiful events list --past # past events
partiful events get <eventId>
partiful events create --title "..." --date "Mar 28 7pm" --poster-search "game night" --private -y
partiful events update <eventId> --title "New Title"
partiful events cancel <eventId>

# Guests
partiful guests list <eventId> # only works for events you HOST
partiful guests invite <eventId> --user-id <id1> <id2> # invite by Partiful user ID
partiful guests invite <eventId> --phone +1234567890 # invite by phone number

# Contacts (your Partiful network)
partiful contacts list "kevin" # search by name
partiful contacts list --limit 50 # browse all

# Co-hosts
partiful cohosts add <eventId> --name "Kevin Granados" # resolved from contacts
partiful cohosts add <eventId> --user-id <userId>

# Text blasts (message all guests)
partiful blasts send <eventId> --message "Running 10 min late!" -y

# Posters
partiful posters search "game night"
partiful posters list

# Utilities
partiful +clone <eventId> # clone event with new date
partiful +export <eventId> # export event + guest list
partiful +share <eventId> # generate shareable link
partiful +watch <eventId> # poll for RSVP changes (NDJSON stream)
partiful schema [command.path] # introspect any command's parameters
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add the workflow and intent-routing sections from issue #48.

This is still mostly a command catalog plus gotchas. The linked issue also asked for intent→command routing, concrete flows for create+invite / check attendees / send a blast / clone recurring events, and recovery steps for 403, missing userId, and upload failures, so an agent still has to infer the highest-value paths.

If you want, I can draft those missing subsections.

Also applies to: 86-115

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 47-47: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 5 - 49, Add the missing "workflow" and
"intent-routing" sections from issue `#48` into AGENTS.md: create a concrete
intent→command routing table mapping user intents (create event, invite guests,
check attendees, send blast, clone recurring event, export/share/watch) to the
exact CLI commands shown (e.g., partiful events create, partiful guests invite,
partiful guests list, partiful blasts send, partiful +clone, partiful
+export/+share/+watch), then add step-by-step example flows for "create +
invite", "check attendees", "send a blast", and "clone recurring events" that
show required flags and order of commands; finally add short recovery steps for
common failures: HTTP 403 (reauth via partiful auth login/status), missing
userId (resolve via partiful contacts list/search or use --phone), and upload
failures (retry, validate poster with partiful posters search/list and re-run
events create with --poster-search or reupload), referencing these command names
and flows so an agent can map intents to exact commands.

AGENTS.md Outdated
Comment on lines +62 to +84
```
src/
├── cli.js # Entry point, Commander setup
├── commands/ # One file per command group
│ ├── events.js
│ ├── guests.js
│ ├── contacts.js
│ ├── blasts.js
│ ├── cohosts.js
│ ├── posters.js
│ ├── auth.js
│ ├── schema.js
│ ├── templates.js
│ ├── bulk.js
│ ├── setup.js
│ └── doctor.js
├── helpers/ # Shared utilities
└── lib/ # Core library (API client, auth, Firebase)
tests/
├── *.test.js # Unit tests
├── *.integration.test.js
└── fixtures/
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language tag to the project-structure fence.

text is enough here and avoids the markdownlint MD040 warning.

📝 Suggested doc fix
-```
+```text
 src/
 ├── cli.js              # Entry point, Commander setup
 ├── commands/           # One file per command group
 │   ├── events.js
 │   ├── guests.js
 │   ├── contacts.js
 │   ├── blasts.js
 │   ├── cohosts.js
 │   ├── posters.js
 │   ├── auth.js
 │   ├── schema.js
 │   ├── templates.js
 │   ├── bulk.js
 │   ├── setup.js
 │   └── doctor.js
 ├── helpers/            # Shared utilities
 └── lib/                # Core library (API client, auth, Firebase)
 tests/
 ├── *.test.js           # Unit tests
 ├── *.integration.test.js
 └── fixtures/
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 62 - 84, Update the fenced project-structure block in
AGENTS.md to include a language tag "text" (i.e., change the opening ``` to
```text) for the tree listing that begins with "src/" so the code fence is
marked as plain text and avoids the markdownlint MD040 warning; ensure you only
modify the fence marker and not the contents of the directory tree.

Comment on lines +42 to +47
export function validateImageExtension(filePath) {
const { extname } = await_extname_sync(filePath);
if (!ALLOWED_IMAGE_EXTENSIONS.includes(ext)) {
throw new Error(`Unsupported image type "${ext}". Allowed types: ${ALLOWED_IMAGE_EXTENSIONS.join(', ')}`);
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
sed -n '39,47p' src/lib/events.js
rg -nP '\bvalidateImageExtension\s*\(' --glob '!src/lib/events.js'

Repository: KalebCole/partiful-cli

Length of output: 400


🏁 Script executed:

#!/bin/bash
# Check imports at the top of src/lib/events.js
head -30 src/lib/events.js

# Check if ALLOWED_IMAGE_EXTENSIONS is defined
rg -n 'ALLOWED_IMAGE_EXTENSIONS' src/lib/events.js

# Check if ValidationError is imported
rg -n 'ValidationError' src/lib/events.js

Repository: KalebCole/partiful-cli

Length of output: 1683


validateImageExtension() is broken and will fail immediately.

The code references undefined await_extname_sync() function and undefined ext variable. Additionally, it should use ValidationError (already imported) instead of plain Error for consistency.

Add this import at the top:

import { extname } from 'path';

Fix the function:

 export function validateImageExtension(filePath) {
-  const { extname } = await_extname_sync(filePath);
+  const ext = extname(filePath).toLowerCase();
   if (!ALLOWED_IMAGE_EXTENSIONS.includes(ext)) {
-    throw new Error(`Unsupported image type "${ext}". Allowed types: ${ALLOWED_IMAGE_EXTENSIONS.join(', ')}`);
+    throw new ValidationError(`Unsupported image type "${ext}". Allowed types: ${ALLOWED_IMAGE_EXTENSIONS.join(', ')}`);
   }
 }

Note: Lines 144-145 have the same ext reference bug and need the same fix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/lib/events.js` around lines 42 - 47, The function validateImageExtension
currently calls a non-existent await_extname_sync and references undefined ext;
import extname from 'path', replace the await_extname_sync call with const ext =
extname(filePath) and throw a ValidationError (not Error) when ext is not in
ALLOWED_IMAGE_EXTENSIONS; apply the same fix to the other occurrence that
references ext (the similar check later in the file) so both use extname(...)
and ValidationError for consistency.

@KalebCole
Copy link
Copy Markdown
Owner Author

remove the spec from this commit and delete it locally.

this commit has more changes than just the agents.md, break this into different commits

- AGENTS.md: agent guide for Partiful CLI with commands, gotchas, boundaries
- docs/agents-md-schema.md: systematic schema for writing AGENTS.md files
- Based on GitHub Blog analysis (2,500+ repos) and ETH Zurich research
- Focus on non-inferable knowledge that actually helps agents
…nferable gotchas

Based on analysis of OpenAI Codex and Google Workspace CLI AGENTS.md files
plus ETH Zurich research (2602.11988): command listings are noise that agents
discover via --help. Real value is in permission gotchas, multi-step flows,
silent failures, and 'do not' rules.

File reduced from 5.3KB to 3KB — higher signal density.
@KalebCole KalebCole merged commit 1ac863a into main Mar 30, 2026
1 check passed
@KalebCole KalebCole deleted the sasha/agents-md branch March 30, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: AGENTS.md — AI agent integration guide

1 participant