@henols/c64-re-tools 2.2.0-rc.4 → 2.2.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/skills/c64-docs/SKILL.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: c64-docs
|
|
3
|
-
description: Use this skill to write the documentation of a C64 program. The documentation explains
|
|
3
|
+
description: Use this skill to write the documentation of a C64 program. The documentation explains how the program works, with links to the main parts of the source. It also tells the findings, the development of the program, and its releases and cracks for preservation. The script generates the reference pages from the knowledge and the source. You write the other pages by the method of this skill. A second command of the script makes the links and checks every link. Use it after the source is identical, or to keep the documentation correct after a change to the knowledge.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# c64-docs
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
Write documentation that explains how a program works,
|
|
10
|
+
Write documentation that explains how a program works, and that points to the main parts of the code. The documentation is Markdown in the project. The entry page is `README.md` in the project folder. The other pages and the reference are in `docs/`. The documentation has two parts:
|
|
11
11
|
|
|
12
12
|
- **The pages that you write.** They explain how the program works. They give the flows, the state machines, the data formats and the task of each part. They tell the findings, the development of the program, and its releases and cracks. They link only the main parts of the code. Use the page types in `references/page-types.md` and the rules in `references/style.md`.
|
|
13
13
|
- **The reference.** `docs.ts generate` generates it from the knowledge, the source map of c64-source and the image. It is the lookup for each routine, table and variable. It has a page for each module, with the routines, their callers and callees, the data and a call graph. It also has pages for the tables, the memory map with the variables, and the graphics. Do not edit these pages. The next run writes over them.
|
|
@@ -71,7 +71,7 @@ node <skill>/scripts/docs.ts link README.md docs --source src --check
|
|
|
71
71
|
3. Run `docs.ts generate`. Read `index.md` of the reference. A module with no routines, or a routine with no comment, shows what the knowledge does not have yet.
|
|
72
72
|
4. Make the plan of the pages. Start from the modules and the call graphs. Find the main loop, the interrupt chain, the dispatch tables, the state machines and the data formats. Each subsystem gets one page in `docs/`. The entry page `README.md` in the project folder lists the pages. Use the page types in `references/page-types.md`.
|
|
73
73
|
5. Collect the facts about the development and the releases. Read the leftover spaces and their comments in the knowledge. If the knowledge has none, run `provenance.ts leftovers` of c64-provenance. For two or more releases, run `provenance.ts compare` of c64-provenance. Get the crack stages from c64-unpacker. These facts go into the development section, the releases section and their pages.
|
|
74
|
-
6. Write each page. Read the code and the knowledge for each fact. Run the program with c64-testing or c64-emulator when a fact needs a run. Explain each part
|
|
74
|
+
6. Write each page. Read the code and the knowledge for each fact. Run the program with c64-testing or c64-emulator when a fact needs a run. Explain each part before you name the code. Link only the main parts: write `` `draw_room` `$09BC` `` for a link, and `` `draw_room` `` for each other mention. Mark each fact with its evidence. Several subagents can write the pages at the same time, one page each. Give each subagent `references/page-types.md` and `references/style.md`.
|
|
75
75
|
7. Record each new fact in the knowledge first: a name, a comment, a region or a module. Then the source and the reference show it too. A fact only in a page is lost at the next change of the knowledge.
|
|
76
76
|
8. Run `docs.ts link`. Read `problems` and correct each one. Then run `docs.ts link --check`. Make sure that `result` is `PASS`.
|
|
77
77
|
9. When the project folder is in a workspace with other projects, find `README.md` at the root of the workspace. This page lists each program of the workspace. Add one row for the program, with a link to `<project>/README.md` and one sentence. If the page does not exist, make it. Use the workspace index in `references/page-types.md`. `docs.ts link` does not read this page, because the page is not in the project folder.
|
|
@@ -7,7 +7,7 @@ Each page that you write is one of these types. Use the parts of a type that the
|
|
|
7
7
|
One entry page for the program: `README.md` in the project folder. A large subsystem can have an entry page of its own in `docs/`, for example `docs/rooms.md`. The entry page of the program has these parts, in this order:
|
|
8
8
|
|
|
9
9
|
1. **One paragraph.** What the program is, who made it and when, and which release the documentation is for. Under it, one line defines the evidence marks: **Observed**, **Code** and **Conclusion**.
|
|
10
|
-
2. **How the program works.** A short walk through the program
|
|
10
|
+
2. **How the program works.** A short walk through the program, from the start to the main loop. Tell what the program does at each stage and why. Use one mermaid diagram of the layers and one of the flow of the player. Under the diagrams, a numbered list tells how the layers work together. Link only the entry of each layer, for example the cold start, the main loop and the interrupt. Use about 5 to 8 links in the full section.
|
|
11
11
|
3. **The pages.** A table with one row for each page: the link and one sentence about its content. The sentences have no links to the code.
|
|
12
12
|
4. **Findings.** The bugs and the facts that a reader does not expect. Write a bulleted list, not a table. Each item has a title in bold, one to three sentences, the evidence and a link to the page with the details.
|
|
13
13
|
5. **The development.** How the authors made the program, as the code and the leftovers tell it. Give a summary here. When the facts fill more than a screen, put them on a development page (section 6) and link it.
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
These rules apply to each page that you write. `docs.ts link` checks the rules that a script can check.
|
|
4
4
|
|
|
5
|
-
The rules in this file are in Simplified Technical English. The pages that you write are not. Write the pages in plain English for a human reader.
|
|
6
|
-
|
|
7
5
|
## Explain first
|
|
8
6
|
|
|
9
7
|
- Start each section with what the part does and why. Use the words of the program: the rooms, the player, the lanterns, the score. Then name the code.
|
|
@@ -49,7 +47,7 @@ The rules in this file are in Simplified Technical English. The pages that you w
|
|
|
49
47
|
|
|
50
48
|
## Text
|
|
51
49
|
|
|
52
|
-
- Write
|
|
50
|
+
- Write the pages in the language and the style that the user or the project asks for.
|
|
53
51
|
- Use a numbered list for steps in an order. Use a bulleted list for items without an order. Use a table for items with the same fields.
|
|
54
52
|
- Use the same word for the same thing on each page. Define each term of the program one time, in the conventions block.
|
|
55
53
|
- Write the entry page up to the findings for any reader who knows the C64 as a user. Write the other pages for a person who knows the 6502 and the C64, but not the program.
|