Skip to content

Docs/agent templates - #165

Merged
dodeja merged 1 commit into
mainfrom
docs/agent-templates
Dec 18, 2025
Merged

Docs/agent templates#165
dodeja merged 1 commit into
mainfrom
docs/agent-templates

Conversation

@dodeja

@dodeja dodeja commented Dec 17, 2025

Copy link
Copy Markdown
Member

Greptile Summary

This PR adds comprehensive documentation for the new Infer Tracking Number API (beta) and establishes agent/writing guidelines for future documentation work.

Major additions:

  • Agent guidelines (AGENTS.md, WRITING_GUIDE.md) defining repository structure, coding style, documentation standards, and voice/terminology conventions
  • Auto-Detect Carrier guide (docs/api-docs/in-depth-guides/auto-detect-carrier.mdx) - 459-line comprehensive tutorial with code examples for JavaScript, Python, and cURL
  • API reference (docs/api-docs/api-reference/tracking-requests/auto-detect-carrier.mdx) for the Infer Number endpoint
  • OpenAPI spec for /tracking_requests/infer_number endpoint with full schema definitions
  • Updates/changelog page (docs/updates/home.mdx) documenting the new feature
  • Cross-references added to existing docs (home.mdx, tracking-shipments-and-containers.mdx, quickstart.mdx) linking to the new Auto-Detect Carrier feature
  • Navigation updates in mint.json adding Updates tab and new guide links

Issues found:

  • JavaScript code examples in auto-detect-carrier.mdx have missing indentation (lines 344-351, 355-362)
  • Code fences use 4 backticks instead of 3 (lines 364, 401)
  • Multiple duplicate agent template files (agent.md, claud.md, docs/AGENTS.md, docs/claud.md) - all identical

Confidence Score: 4/5

  • This PR is safe to merge after fixing the syntax errors in code examples
  • The PR adds valuable documentation for a new API feature with comprehensive guides and proper navigation structure. However, the JavaScript code examples contain formatting errors (missing indentation and incorrect backtick count) that need correction before merge. The duplicate agent template files are not problematic but could be consolidated for cleaner repo structure.
  • Pay close attention to docs/api-docs/in-depth-guides/auto-detect-carrier.mdx - fix the indentation and backtick issues in code examples before merging

Important Files Changed

Filename Overview
AGENTS.md Added repository guidelines document for agent instructions covering project structure, coding style, and commit conventions
WRITING_GUIDE.md Added comprehensive writing guide defining documentation standards, voice, terminology, and formatting conventions
docs/api-docs/in-depth-guides/auto-detect-carrier.mdx Added comprehensive guide for Auto-Detect Carrier API with code examples; contains indentation errors in JavaScript code and incorrect backtick count
docs/api-docs/api-reference/tracking-requests/auto-detect-carrier.mdx Added API reference page for Infer Tracking Number endpoint
docs/updates/home.mdx Added updates/changelog page documenting the new Infer Tracking Number feature
docs/mint.json Updated navigation to include new Updates tab, auto-detect-carrier guide, and added URL redirects
docs/openapi.json Added OpenAPI specification for /tracking_requests/infer_number endpoint with request/response schemas

Sequence Diagram

sequenceDiagram
    participant User as User/Developer
    participant API as Terminal49 API
    participant Infer as Infer Number Endpoint
    participant Tracking as Tracking Request Endpoint
    
    Note over User,Tracking: New Auto-Detect Carrier Flow (Documented in this PR)
    
    User->>Infer: POST /tracking_requests/infer_number<br/>{number: "MSCU1234567"}
    activate Infer
    Infer->>Infer: Analyze number pattern<br/>Check ML predictions<br/>Validate format
    Infer-->>User: Return prediction<br/>{scac: "MSCU", confidence: 1.0,<br/>decision: "auto_select"}
    deactivate Infer
    
    alt Decision: auto_select (confidence ≥ 95%)
        User->>User: Auto-fill SCAC in form
    else Decision: needs_confirmation (70-95%)
        User->>User: Show suggestion, ask user
    else Decision: no_prediction (< 70%)
        User->>User: Manual SCAC selection
    end
    
    User->>Tracking: POST /tracking_requests<br/>{request_number, scac, request_type}
    activate Tracking
    Tracking->>Tracking: Create tracking request<br/>Query carrier systems
    Tracking-->>User: Return tracking request<br/>{status: "pending"}
    deactivate Tracking
    
    Note over User,Tracking: Documentation additions:<br/>- Agent guidelines (AGENTS.md, WRITING_GUIDE.md)<br/>- API guide (auto-detect-carrier.mdx)<br/>- API reference (OpenAPI spec)<br/>- Cross-links in existing docs
Loading

@vercel

vercel Bot commented Dec 17, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
api Ready Ready Preview, Comment Dec 17, 2025 6:05pm

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

18 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Comment thread docs/api-docs/in-depth-guides/auto-detect-carrier.mdx Outdated
Comment on lines +355 to +362
const result = await getCarrierForNumber("MSCU1234567", "YOUR_API_KEY");
if (result.autoSelect) {
// Auto-fill carrier dropdown
carrierDropdown.value = result.scac;
} else if (result.needsConfirmation) {
// Show suggestion with confirmation prompt
showCarrierSuggestion(result.carrier, result.candidates);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

syntax: Missing indentation for code inside if blocks.

Suggested change
const result = await getCarrierForNumber("MSCU1234567", "YOUR_API_KEY");
if (result.autoSelect) {
// Auto-fill carrier dropdown
carrierDropdown.value = result.scac;
} else if (result.needsConfirmation) {
// Show suggestion with confirmation prompt
showCarrierSuggestion(result.carrier, result.candidates);
}
// Usage
const result = await getCarrierForNumber("MSCU1234567", "YOUR_API_KEY");
if (result.autoSelect) {
// Auto-fill carrier dropdown
carrierDropdown.value = result.scac;
} else if (result.needsConfirmation) {
// Show suggestion with confirmation prompt
showCarrierSuggestion(result.carrier, result.candidates);
}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/api-docs/in-depth-guides/auto-detect-carrier.mdx
Line: 355:362

Comment:
**syntax:** Missing indentation for code inside `if` blocks.

```suggestion
// Usage
const result = await getCarrierForNumber("MSCU1234567", "YOUR_API_KEY");
if (result.autoSelect) {
  // Auto-fill carrier dropdown
  carrierDropdown.value = result.scac;
} else if (result.needsConfirmation) {
  // Show suggestion with confirmation prompt
  showCarrierSuggestion(result.carrier, result.candidates);
}
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Comment thread docs/api-docs/in-depth-guides/auto-detect-carrier.mdx Outdated
Comment thread docs/api-docs/in-depth-guides/auto-detect-carrier.mdx Outdated
@dodeja
dodeja force-pushed the docs/agent-templates branch from f85814c to bc9b2a4 Compare December 17, 2025 18:05
@dodeja
dodeja merged commit e35e4d7 into main Dec 18, 2025
5 checks passed
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.

1 participant