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
91 changes: 58 additions & 33 deletions skills/apollo-new-project/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: apollo-new-project
description: Set up a new Apollo V4 software project (game, demo, tool, application, library, driver) as its own git repository in which every AI agent uses ApolloKnowledgeBase as its central source of Apollo V4 knowledge, then check, install or update ApolloCrossDev, and create the Makefile and a starting program for os-friendly or os-takeover mode that builds without warnings. Use when the user wants to start, create, scaffold or set up a new program or project for the Apollo V4, Vampire V4, 68080 or SAGA, pastes the "Start Apollo V4 Project" prompt from apolloknowledgebase.com, or wants an existing folder of Apollo code prepared for AI-assisted work.
description: Set up a new Apollo V4 software project (game, demo, tool, application, library, device, datatype) as its own git repository in which every AI agent uses ApolloKnowledgeBase as its central source of Apollo V4 knowledge, then check, install or update ApolloCrossDev, and create the Makefile and a starting program for os-friendly or os-takeover mode that builds without warnings (guided setup), or only the AKB setup for the agent (basic setup). Use when the user wants to start, create, scaffold or set up a new program or project for the Apollo V4, Vampire V4, 68080 or SAGA, pastes the "Start Apollo V4 Project" prompt from apolloknowledgebase.com, or wants an existing folder of Apollo code prepared for AI-assisted work.
---

# apollo-new-project
Expand All @@ -18,52 +18,78 @@ check is `ApolloKnowledgeBase/skills/apollo-build/scripts/find-acd.sh`. In step
1, before the submodule exists, read KB files on GitHub if you need them:
`https://raw.githubusercontent.com/ApolloTeam-dev/ApolloKnowledgeBase/main/<path>`.

## 1. Ask what the project is
## 0. Guided or basic setup

Ask in one go, and suggest the defaults in brackets. Don't continue without
answers to the first five.
The project is the folder this session was started in: don't ask where.
First ask which setup the developer wants:

1. **Name** (becomes the folder, the program and `PROJECT_NAME`): letters,
digits, `-` or `_`, no spaces.
- **Guided setup:** the full procedure, steps 1 to 8: a few questions, AKB,
ApolloCrossDev checked, installed or updated, Makefile, a starting
program, and a build without warnings.
- **Basic setup:** only what an agent needs to use AKB correctly: steps 2
and 3, without questions. The developer does the rest (toolchain,
Makefile, code).

For a basic setup, skip step 1. In `AGENTS.md` (step 3), fill in the project
name (the folder's name) and the defaults from the table in step 1, and
write `not set yet` for what it is, kind, execution mode and languages,
with this line under the list: "Fields marked `not set yet`: ask the
developer before relying on them, and fill them in." Leave out the build
commands and write "Not set up yet: use the apollo-build skill when the
project gets a Makefile." Then go to step 8: show the files, offer a first
commit, and mention that the guided setup can still check ApolloCrossDev
and add a Makefile and a starting program later.

## 1. Ask what the project is (guided setup)

Ask these four in one go, and suggest the defaults in brackets:

1. **Project name** [the current folder's name]: becomes `PROJECT_NAME` and
the program's name. Letters, digits, `-` or `_`, no spaces.
2. **What it is**, in one sentence, and its **kind**: game, demo, tool,
application, library or OS component.
3. **Target OS**, one or more: ApolloOS R10, AmigaOS 3.9, AmigaOS 3.2.
4. **Execution mode**: `os-takeover` (games and demos: multitasking off,
application, library, device or datatype.
3. **Execution mode**: `os-takeover` (games and demos: multitasking off,
direct 68080 and SAGA access, OS restored on exit) or `os-friendly`
(applications and tools: OS calls). Explain the difference if asked; it
is in `KB AGENTS.md` section 1 and `KB os/os-takeover.md`.
5. **Where**: the parent folder for the project [the current folder].
6. **Target core** [`Core 12500+`, the core with the current SAGA features
such as the pointer sprite] and **V4 model** [any V4 model].
7. **Languages**: C, C++, 68080 assembly [C, with assembly where needed].
8. **ApolloLib** for SAGA sound, pictures, PIP, pointer and input [yes]. See
`KB core/best-practices/prefer-library-calls-for-saga-chips.md`.
4. **Which language(s)**: C, C++ and/or assembler [C].

Don't ask about the rest; every new project gets these, and the developer
can change them later in `AGENTS.md`:

| Setting | Value |
|---|---|
| Target OS | ApolloOS R10, AmigaOS 3.9 and AmigaOS 3.2 |
| Target core | the latest core release. When code uses something that a knowledge base file limits to a minimum core (its `applies_to.core`), tell the developer. |
| V4 model | any V4 model |
| ApolloLib | yes, for SAGA sound, pictures, PIP, pointer and input (`KB core/best-practices/prefer-library-calls-for-saga-chips.md`) |

## 2. Create the repository with AKB

In `<where>/<name>`, which must not exist yet or be empty:
In the current folder:

```sh
git init
git submodule add https://github.com/ApolloTeam-dev/ApolloKnowledgeBase ApolloKnowledgeBase
```

If the folder already holds code, don't overwrite anything: add only what is
missing and show the user what you would change.
missing and show the user what you would change. If it is already a git
repository, skip `git init`.

## 3. Make AKB the agents' central source

These files make every agent that opens the project read AKB first.

- **`AGENTS.md`** (read by most agents): from `KB templates/repo/AGENTS.md`.
Fill in every `<placeholder>` from step 1, remove the template's HTML
comments.
Fill in every `<placeholder>` from step 1 and its defaults, remove the
template's HTML comments.
- **Build and test:** `make compile` to build, `make` to build and upload
to the V4 at `$AMIGAHOST`.
- **Relevant knowledge base areas:** pick from the table in
`KB AGENTS.md` section 3. Always `toolchain/`; `os/os-takeover.md` and
`core/` for os-takeover; the SAGA folders that the program will use;
`toolchain/apollolib/` with ApolloLib.
`toolchain/apollolib/`.
- **Repository-specific rules:** the user's rules, or remove the section's
placeholder line.
- **`CLAUDE.md`** (Claude Code): copy `KB templates/repo/CLAUDE.md` as it is.
Expand All @@ -88,7 +114,7 @@ These files make every agent that opens the project read AKB first.
Other agents reach the AKB skills through `KB AGENTS.md` section 9, which
the project's AGENTS.md sends them to.

## 4. ApolloCrossDev: check, install or update
## 4. ApolloCrossDev: check, install or update (guided setup)

Run the check from the submodule:

Expand Down Expand Up @@ -118,45 +144,44 @@ for it if that is missing too). Change the file only with the user's
consent. For this session, pass it on the command line:
`APOLLOCROSSDEV=<ACD_ROOT> make compile`.

## 5. Makefile
## 5. Makefile (guided setup)

Copy `<ACD_ROOT>/Projects/_makefiles/Makefile` and change only:

| Line | Set to |
|---|---|
| `PROJECT_NAME` | the name |
| `C_INCL_NDK` | NDK 3.2 (default), or the `ndk39-include` line when AmigaOS 3.9 is a target (`KB toolchain/target-os-headers.md`) |
| `APOLLOLIB` | keep it, or put `#` before it without ApolloLib |
| `C_INCL_NDK` | the `ndk39-include` line: AmigaOS 3.9 is a target, so a function that 3.9 lacks gives a compile error instead of a crash on 3.9 (`KB toolchain/target-os-headers.md`) |
| `C_COMPILER` | the `m68k-amigaos-g++` line for C++; the template does not collect `.cpp` files, so add them as `KB toolchain/project-makefile.md` says |

Keep `C_OPTIONS` and `S_FLAGS` as they are.
Keep `APOLLOLIB`, `C_OPTIONS` and `S_FLAGS` as they are.

## 6. The starting program
## 6. The starting program (guided setup)

Copy one file from this skill's `assets/` to `main.c` and replace
`@PROJECT@`, `@WHAT@` and `@TARGETS@` (core, model, target OS):

| Mode | ApolloLib | File |
|---|---|---|
| os-friendly | either | `assets/main-os-friendly.c` |
| os-takeover | yes | `assets/main-os-takeover.c` |
| os-takeover | no | `assets/main-os-takeover-nolib.c` |
| Mode | File |
|---|---|
| os-friendly | `assets/main-os-friendly.c` |
| os-takeover | `assets/main-os-takeover.c` |

The takeover programs leave the display takeover open on purpose: the KB
doesn't document it yet (`KB os/os-takeover.md`). Tell the user, and don't
fill it in from general Amiga knowledge.

Copy `assets/gitignore` to `.gitignore`.

## 7. Build it
## 7. Build it (guided setup)

Build as the apollo-build skill describes (`KB skills/apollo-build/SKILL.md`):
`make compile`. It must end with no errors and no warnings before you
continue.

## 8. Hand over

- Show the user the files you made and the build result.
- Show the user the files you made and, for a guided setup, the build
result.
- Offer a first commit; commit only when they agree.
- Tell them how to work from here: open the project folder in their agent,
which now reads AKB first; `git submodule update --remote ApolloKnowledgeBase`
Expand Down
36 changes: 0 additions & 36 deletions skills/apollo-new-project/assets/main-os-takeover-nolib.c

This file was deleted.

2 changes: 1 addition & 1 deletion templates/repo/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ without it.

- **What it is:** <one or two sentences, e.g. "the ApolloOS kernel and core
libraries" or "a 2D platform game">
- **Kind:** <OS component | application | tool | game | library>
- **Kind:** <game | demo | tool | application | library | device | datatype>
- **Target core:** <e.g. Core 12841+>
- **Target model:** <any V4 model | one or more: V4 Standalone (SA), V4 UniCorn (UNI, A6000), V4 IceDrake (ICE), V4 Manticore (MC), V4 Firebird (FB)>
- **Target OS:** <one or more: ApolloOS R10, AmigaOS 3.9, AmigaOS 3.2>
Expand Down
Loading