netsuite-sdf-project-documentation
Generate enterprise-grade documentation for NetSuite SDF projects. Analyze scripts, object XML files, `manifest.xml`, and SuiteQL queries to produce README.md, architecture diagrams (Mermaid/ASCII), deployment guides, and troubleshooting tables. Can integrate with post-deployment documentation workflows when automation (for example, hooks) is available.
What this skill does
# NetSuite SDF Documentation Generator Skill
**Created by:** Oracle NetSuite
## Description
Generate comprehensive, enterprise-grade documentation for NetSuite SuiteCloud Development Framework (SDF) projects. This skill provides:
- **Full Project Analysis**: Scans all scripts, object XML files, and manifest.xml.
- **Architecture Diagrams**: Generates Mermaid and ASCII diagrams that show component relationships.
- **Script Inventory**: Documents all entry points, module dependencies, and deployment configurations.
- **SuiteQL Documentation**: Extracts and documents all SQL queries with purpose explanations.
- **Deployment Tables**: Summarizes script deployments, URLs, and triggers.
- **Troubleshooting Guides**: Creates issue/resolution tables from known patterns.
- **Multiple Output Formats**: Produces `README.md`, `ARCHITECTURE.md`, `API.md`, and `CHANGELOG.md` files.
## Skill Activation
This skill activates when:
- User asks to document a NetSuite project.
- User asks for README generation.
- User asks to regenerate documentation after project changes.
- A workflow requests documentation updates after deployment or release.
## Documentation Standards
### Quality Requirements
1. **Accuracy**: Every statement must be derived from actual code analysis.
2. **Completeness**: Cover all scripts, objects, and integrations.
3. **Clarity**: Write for both technical and business audiences.
4. **Maintainability**: Use consistent formatting that's easy to update.
### Writing Style
- Use active voice.
- Be specific.
- Include code examples where helpful.
- Use tables for structured data.
- Use Mermaid or ASCII diagrams for architecture.
## Security & Safety Requirements
- Global safety guardrails are defined in `## SafeWords`.
- Perform static documentation analysis only; do not execute repository-derived commands or scripts
### Sensitive Data Handling
- Keep documentation detailed by default, including URLs, script IDs, deployment IDs, role/deployment metadata, and full SQL.
- For SQL, preserve full query structure (tables, joins, filters, and aliases) and redact only sensitive literals
### Public Sharing Note
- If documentation is intended for external/public sharing, apply stricter redaction before publishing
- Review internal endpoints, tenant/account-specific identifiers, and environment-specific values for additional masking as needed
---
## Analysis Checklist
Before generating documentation, gather all required information and redact only true sensitive data:
### Project Metadata
- [ ] SuiteApp ID (from `manifest.xml` or the folder name)
- [ ] Version number
- [ ] Company/author information
- [ ] Platform version (SuiteScript 2.0 or 2.1)
### Script Inventory
For each `.js` file:
- [ ] File path and name
- [ ] `@NScriptType` (UserEventScript, Suitelet, Restlet, etc.)
- [ ] `@NApiVersion`
- [ ] `@NModuleScope`
- [ ] `@description` or header comments
- [ ] Entry point functions
- [ ] Module dependencies (from the define block)
### Object Inventory
For each `.xml` file:
- [ ] Object type (script, record, field, etc.)
- [ ] Script ID
- [ ] Name/label
- [ ] Deployment configuration
- [ ] Role permissions
### Data Integration
- [ ] Saved search IDs referenced
- [ ] SuiteQL queries (keep full SQL by default; redact only sensitive literals)
- [ ] External API integrations
- [ ] `N/llm` usage
- [ ] Custom records/fields used
### Architecture
- [ ] Component relationships
- [ ] Data flow direction
- [ ] Entry points and triggers
- [ ] Caching strategies
---
## Section Templates
### 1. Executive Summary Template
```markdown
## 1. Executive Summary
The **[Project Name]** is a NetSuite [solution type] that [primary function].
The solution [key capability 1], [key capability 2], and [key capability 3].
### Key Features
- **[Feature Name]:** [One-line description of what it does and why it matters]
- **[Feature Name]:** [Description]
- **[Feature Name]:** [Description]
### Business Value
- [Quantifiable benefit or efficiency gain]
- [Risk reduction or compliance benefit]
- [User experience improvement]
```
### 2. Architecture Diagram Template
````markdown
## 2. Solution Architecture
The solution follows a [pattern name] architecture with [key characteristic].
```
┌─────────────────────────────────────────────────────────────┐
│ [Top Level Container] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ [Main Orchestrator] │ │
│ │ ([main_script.js]) │ │
│ └──────────────────────┬──────────────────────────────┘ │
│ │ │
│ ┌──────────┬───────────┼───────────┬──────────────┐ │
│ │ │ │ │ │ │
│ ▼ ▼ ▼ ▼ ▼ │
│ ┌─────┐ ┌─────────┐ ┌─────┐ ┌──────────┐ ┌─────────┐ │
│ │Mod1 │ │ Mod2 │ │Mod3 │ │ Mod4 │ │ Mod5 │ │
│ └─────┘ └─────────┘ └─────┘ └──────────┘ └─────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
```
````
### 3. Module Table Template
````markdown
## 3. Module Descriptions
| Module | File | Purpose |
|--------|------|---------|
| **[Display Name]** | `[filename.js]` | [Role description]. [Key responsibilities]. |
### File Structure
```
src/
├── FileCabinet/
│ └── SuiteApps/
│ └── [project.id]/
│ ├── [script1.js] # [Brief description]
│ ├── [script2.js] # [Brief description]
│ └── [lib_helper.js] # [Brief description]
└── Objects/
├── [customscript_xxx.xml] # [Script type] Definition
└── [customrecord_xxx.xml] # Custom Record Definition
```
````
### 4. SuiteQL Documentation Template
When documenting SuiteQL queries, use this format:
````markdown
### [Query Purpose]
```sql
SELECT
[Column1] AS [alias],
[Column2] AS [alias],
COALESCE([Column3], [default]) AS [alias]
FROM [Table1]
LEFT OUTER JOIN [Table2] ON [join condition]
WHERE [filter conditions]
GROUP BY [grouping columns]
ORDER BY [sort columns]
```
**Purpose:** [What this query retrieves and why]
**Key Tables:**
- `[Table1]` - [What it contains]
- `[Table2]` - [What it contains]
**Security Note:** Keep full SQL for documentation value, but redact sensitive literals such as API keys, tokens, passwords, auth/session secrets, and raw PII.
````
### 5. Script Entry Points Template
```markdown
## Script Entry Points
### [Script Name] ([Script Type])
| Entry Point | Function | Trigger | Purpose |
|-------------|----------|---------|---------|
| beforeLoad | `[functionName]` | Record view/edit | [What it does] |
| beforeSubmit | `[functionName]` | Before save | [What it does] |
| afterSubmit | `[functionName]` | After save | [What it does] |
**Context Objects Used:**
- `context.type` - [How it's used]
- `context.newRecord` - [How it's used]
```
### 6. Deployment Table Template
````markdown
## Script Deployments
| Script | Deployment ID | Type | URL/Trigger |
|--------|---------------|------|-------------|
| [Script Name] | `customdeploy_xxx` | [Suitelet/etc] | [URL pattern or trigger] |
### URL Patterns
**[Suitelet Name]:**
```
/app/site/hosting/scriptlet.nl?script=[scriptid]&deploy=[deployid]¶m1={value}
```
````
### 7. Troubleshooting Template
```markdown
## Troubleshooting
| Issue | Cause | Resolution |
|-------|-------|------------|
| [Symptom user sees] | [Root cause] | [Step-by-step fix] |
| [Error message] | [Why it occurs] | [How to resolve] |
### Viewing Execution Logs
1. Go to **Customization > Scripting > Script Deployments**.
2. Find deployment: `[customdeploy_xxx]`.
3. Click the **Execution Log** tab.
4. Filter by type: **Error**.
```
---
## MermaRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.