Skip to content

Commit a8eb109

Browse files
authored
Merge pull request #19 from atlassian/tkallady/app-builder-rework
Update app-builder-skill
2 parents ea409cc + 0b75722 commit a8eb109

23 files changed

Lines changed: 585 additions & 270 deletions

‎skills/forge-app-builder/SKILL.md‎

Lines changed: 53 additions & 210 deletions
Large diffs are not rendered by default.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
interface:
2+
display_name: "Forge App Builder"
3+
short_description: "Plan, build, and extend Forge apps safely"
4+
default_prompt: "Use $forge-app-builder to route, plan, and implement this Forge app request using only the relevant current documentation."
5+
dependencies:
6+
tools:
7+
- type: "mcp"
8+
value: "forge"
9+
description: "Current Atlassian Forge guides, modules, manifests, and documentation search"
10+
transport: "streamable_http"
11+
url: "https://mcp.atlassian.com/v1/forge/mcp"

‎skills/forge-app-builder/evals/evals.json‎

Lines changed: 177 additions & 56 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
modules:
2+
jira:issuePanel:
3+
- key: customer-summary-panel
4+
resource: main
5+
resolver:
6+
function: resolver
7+
render: native
8+
title: Customer summary
9+
function:
10+
- key: resolver
11+
handler: index.handler
12+
resources:
13+
- key: main
14+
path: src/frontend.jsx
15+
permissions:
16+
scopes:
17+
- read:jira-work
18+
app:
19+
runtime:
20+
name: nodejs22.x
21+
id: ari:cloud:ecosystem::app/example-fixture
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "existing-ui-kit-fixture",
3+
"private": true,
4+
"scripts": {
5+
"test": "jest"
6+
},
7+
"dependencies": {
8+
"@forge/api": "^5.0.0",
9+
"@forge/bridge": "^5.0.0",
10+
"@forge/react": "^11.0.0",
11+
"@forge/resolver": "^1.6.0",
12+
"react": "^18.2.0"
13+
}
14+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React, { useEffect, useState } from 'react';
2+
import ForgeReconciler, { Text } from '@forge/react';
3+
import { invoke } from '@forge/bridge';
4+
5+
const App = () => {
6+
const [summary, setSummary] = useState('Loading');
7+
useEffect(() => {
8+
invoke('get-summary').then(setSummary);
9+
}, []);
10+
return <Text>{summary}</Text>;
11+
};
12+
13+
ForgeReconciler.render(<App />);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Resolver from '@forge/resolver';
2+
3+
const resolver = new Resolver();
4+
resolver.define('get-summary', async () => 'Existing summary');
5+
6+
export const handler = resolver.getDefinitions();
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# APIs, permissions, and egress
2+
3+
Read this reference when calling or exposing Atlassian, Forge app, or external APIs, changing authorization context, scopes, providers, remotes, endpoints, content permissions, or egress.
4+
5+
Retrieve the exact current endpoint and permission documentation needed by the implementation. Choose user or app context according to whose authority the operation should use; protect app-context operations with appropriate backend authorization.
6+
7+
For external systems, select a supported integration pattern from current documentation. Distinguish outbound fetch or OAuth, Forge Remote, web triggers, and Forge app REST APIs; check lifecycle status and caller authentication rather than treating them as interchangeable. Account for credentials, egress, data residency, eligibility, and installation or version effects when they apply.
8+
9+
Use least-privilege scopes and narrowly necessary egress. Treat display conditions as presentation only. Keep tokens and runtime secrets out of manifests, frontend code, repositories, and chat.
10+
11+
Official entries:
12+
13+
- Permissions: <https://developer.atlassian.com/platform/forge/manifest-reference/permissions/>
14+
- Atlassian app APIs: <https://developer.atlassian.com/platform/forge/apis-reference/product-rest-api-reference/>
15+
- Forge app REST APIs: <https://developer.atlassian.com/platform/forge/app-rest-apis/>
16+
- External authentication: <https://developer.atlassian.com/platform/forge/use-an-external-oauth-2.0-api-with-fetch/>
17+
- Remotes: <https://developer.atlassian.com/platform/forge/manifest-reference/remotes/>
18+
- App context security: <https://developer.atlassian.com/platform/forge/app-context-security/>
19+
- Security: <https://developer.atlassian.com/platform/forge/security/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Backend and events
2+
3+
Read this reference for resolvers, functions, lifecycle events, product events, scheduled triggers, queues, async work, web triggers, Forge app REST APIs, realtime, or runtime services.
4+
5+
Choose the execution model that fits the requested behavior and selected module. Retrieve the exact current function, event, runtime, and limit documentation that can affect the design, such as invocation context, delivery semantics, retries, timeouts, or concurrency.
6+
7+
Account for authorization, tenant isolation, idempotency, and observability where the execution model makes them relevant. Treat every externally reachable entry point as an explicit authentication and lifecycle decision. Add useful failure telemetry without logging secrets or unnecessary end-user data.
8+
9+
Official entries:
10+
11+
- Functions: <https://developer.atlassian.com/platform/forge/function-reference/>
12+
- Resolver: <https://developer.atlassian.com/platform/forge/runtime-reference/forge-resolver/>
13+
- Events: <https://developer.atlassian.com/platform/forge/events/>
14+
- Forge app REST APIs: <https://developer.atlassian.com/platform/forge/app-rest-apis/>
15+
- Realtime: <https://developer.atlassian.com/platform/forge/realtime/>
16+
- Runtime: <https://developer.atlassian.com/platform/forge/runtime-reference/>
17+
- Limits: <https://developer.atlassian.com/platform/forge/platform-quotas-and-limits/>
18+
- Observability: <https://developer.atlassian.com/platform/forge/observability/>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Create a new app
2+
3+
Read this reference only for a new deployable Forge app.
4+
5+
## Decide before scaffolding
6+
7+
Resolve enough of the architecture to choose an appropriate current scaffold. Retrieve the exact module and scaffolding documentation before selecting a template.
8+
9+
Check prerequisites only when creation is imminent. Retrieve current requirements, then inspect Node.js, Forge CLI, and authentication state. If login is required, direct the user to run `forge login` interactively without sharing credentials.
10+
11+
Confirm the destination, app name, and Developer Space. If multiple spaces are available, require the user to choose. If one is available, inform the user before using it. Explain that `forge create` registers an external app identity in the selected Developer Space.
12+
13+
Immediately before non-interactive creation, show that the helper passes the current CLI option for accepting Forge terms and any applicable billing consent, then obtain explicit authorization. Do not invoke the helper without that authorization. If authorization is absent, let the user complete the current interactive `forge create` flow; never accept terms on the user's behalf.
14+
15+
## Choose one scaffold branch
16+
17+
### Stable template-first branch
18+
19+
Prefer a current module-specific `forge create` template when it cleanly matches the architecture. Use `scripts.create_forge_app` with the current documented template name. Do not use an undocumented registry as an independent source of truth.
20+
21+
Run the helper from the skill directory:
22+
23+
```bash
24+
python3 -m scripts.list_templates --validate <current-documented-template>
25+
26+
python3 -m scripts.create_forge_app \
27+
--template <current-documented-template> \
28+
--name <app-name> \
29+
--dev-space-id <selected-id> \
30+
--directory <parent-directory>
31+
```
32+
33+
### Compositional branch
34+
35+
Consider a blank `forge create` app when the app needs several modules, no suitable stable template exists, or deliberate module composition is clearer.
36+
37+
```bash
38+
python3 -m scripts.create_forge_app \
39+
--template blank \
40+
--name <app-name> \
41+
--dev-space-id <selected-id> \
42+
--directory <parent-directory>
43+
```
44+
45+
Before using `forge module add`, retrieve its current lifecycle and CLI documentation. If it is non-GA, obtain agreement to that exposure. Inspect `forge module add --dry-run` before applying changes, and never use `--force` without explicit approval for the specific overwrites or dependency upgrades.
46+
47+
Official entries:
48+
49+
- `forge create`: <https://developer.atlassian.com/platform/forge/cli-reference/create/>
50+
- Developer Spaces: <https://developer.atlassian.com/platform/forge/developer-space/create-developer-space/>
51+
- Module command tutorial: <https://developer.atlassian.com/platform/forge/build-a-jira-app-with-the-module-command/>
52+
- `forge module add`: <https://developer.atlassian.com/platform/forge/cli-reference/module-add/>
53+
54+
## Handle creation failure
55+
56+
Show the complete failure and triage it by cause:
57+
58+
- If the CLI requires interaction, provide the exact current interactive `forge create` command for the user to run in their terminal.
59+
- If no Developer Space exists, direct the user to create one in the Atlassian developer console, then retry after they confirm the target.
60+
- If the destination already exists, use a different confirmed name or destination. Never delete or overwrite the existing directory without explicit authorization.
61+
- If authentication is missing or expired, direct the user to run `forge login` interactively without sharing credentials, then retry.
62+
- For any other failure, preserve the command output, retrieve the relevant current documentation, and explain what blocks creation before asking for the input or external change needed to continue.
63+
64+
Never construct a replacement app ID or manual scaffold. Route to `forge-debugger` if diagnosis of a persistent failure becomes the primary task.

0 commit comments

Comments
 (0)