Automate TODO
Complete all items listed under the level 2 header Current in the
TODO.md file at the root of the workspace or repository.
- If level 2 header Current does not exist:
- Create level 2 header in
TODO.md - Resolve to
Else if no TODOcondition ofCHANGELOG.md Updatingsection of this skill
- Create level 2 header in
Once completed, update:
- Relevant documentation files
- The repository or workspace
CHANGELOG.mdaccording to the nested From list item of a currentTODOitem - If manifest file exists (e.g.,
package.json,tsconfig.json, etc.), then:- Update manifest file according to:
- Version update applied
- Any newly introduced items from the update
- Update manifest file according to:
- Testing: Write and test the updates, and:
- If pass, then:
- Resolve to
Closingsection of this skill as applied
- Resolve to
- Else:
- While update and test attempts are less than 3, then:
- Debug failing items from test, and resolve back to Testing parent list item (recurse)
- Else if update and test attempts are 3 or more, then:
- Undo failing updates, and add the corresponding
TODOitems back to the CurrentTODO.mdsection as incomplete, then:- Note completed
TODOitems and resolve toCHANGELOG.md Updatingsection of this skill - Resolve to
Closingsection of this skill as either:- Updates partially applied, and:
- Revert relevant files according to failing and passing updates
- Updates not applied, and:
- Restore all relevant files, so essentially:
- In the terminal run:
git restore .
- In the terminal run:
- Restore all relevant files, so essentially:
- Updates partially applied, and:
- Note completed
- Undo failing updates, and add the corresponding
- While update and test attempts are less than 3, then:
- If pass, then:
Nested From List Items or Property
A current TODO item should have a nested From list item, which will
be followed by text that either fully or partially matches another level 2
header in the TODO.md file. In regards to the matching level 2 header:
Applying Next Version Update
- The text of the level 2 header that matches the nested From list item
of a
TODOin the Current section will include instructions or specific text specifying the next version update to apply - If the
TODOitem in the Current section does not have a corresponding nested list item starting with From, then apply the next version update accordingly
CHANGELOG.md Updating
Resolve to the Applying Next Version Update section of this skill, then:
- If 1 list item is in the Current section of the
TODO, then:- Resolve to
Constant CHANGELOG Conditionssection of this skill
- Resolve to
- Else if multiple
TODOitems are in the Current section, then:- If nested From exists in all Current
TODOitems:- Resolve to the Priority Version Updates section of this skill
- Resolve to
Constant CHANGELOG Conditionssection of this skill
- Else if nested From does not exist in any Current
TODOitems:- Indicate the next version update accordingly for each
- Resolve to the Priority Version Updates section of this skill
- Resolve to
Constant CHANGELOG Conditionssection of this skill
- Else if nested From exists in some of the Current
TODOitems:- Indicate the next version update accordingly for each list item missing the nested From property
- Resolve to the Priority Version Updates section of this skill
- Resolve to
Constant CHANGELOG Conditionssection of this skill
- If nested From exists in all Current
- Else if no
TODOitems are in the Current section, then:- Do not update the current workspace or repository
- Instead:
- Resolve to
Current Road Map Documentsection of this skill with no updates applied
- Resolve to
Priority Version Updates
- Highest: Major version update indicated
- Example:
1.0.0to2.0.0
- Example:
- Moderate: Minor version update indicated
- Example:
1.1.0to1.2.0
- Example:
- Lowest: Patch version update indicated
- Example:
1.0.0to1.0.1
- Example:
Constant CHANGELOG Conditions
- If
CHANGELOG.mdcurrent version is using append text likealpha,beta, etc., then:- Continue to use the appended version text
- For each
TODOlist item in the Current section:- Resolve next version priority
- Next version remains the same
- Once all Current
TODOitems have been completed, then:- Resolve to
Current Road Map Documentsection of this skill with updates applied
- Resolve to
Current Road Map Document
- Read the
CHANGELOG.mdat the latest version, then read the workspace or repository source code - Add a set of existing
TODOitems to the Current section of theTODOin regards to:- Relative to the current source code state, determine the best order of
TODOitems to apply in sequential order- If the file
current.roadmap.mddoes not exist in the workspace or repository.github(create if not exist) folder, then:- Create
current.roadmap.mdin the workspace or repository.githubfolder (create if not exist) - Write the determined sequence of updates to
current.roadmap.md
- Create
- Else:
- Update and write the determined sequence of updates to
current.roadmap.md
- Update and write the determined sequence of updates to
- If the file
- If updates applied, then:
- Resolve to top-level Testing list item
- Add a sequence of
TODOitems to the Current section- Max Items: 5 (initial last item value)
- Evaluate compatibility: use the next sequence of
TODOitems compatibility to each other, then:- If next 5 determined
TODOitems are not compatible, then:- From sequentially 1st item to sequentially last item, remove the sequentially last item
- Re-evaluate compatibility: resolve back to Evaluate compatibility parent list item (recurse)
- If next 5 determined
- Relative to the current source code state, determine the best order of
Move Completed TODO items
Run the bundled maintenance script scripts/todo.mjs from the workspace or repository root:
node <path-to-this-skill>/scripts/todo.mjs
The script:
- Defaults to
TODO.mdin the current working directory; an explicit path may be passed as the first argument (node scripts/todo.mjs path/to/TODO.md) - Moves every checked top-level item (
- [x] ..., with its wrapped continuation lines and nested sub-items) out of its roadmap section and into a## Completesection, created on first use and always kept at the bottom of the file - Stamps each archived item with a nested
- From: <section>line recording the roadmap section it came from, unless the item already carries its own- From:note, which is preserved - Is idempotent: items already under
## Completestay where they are, so running the script repeatedly is a no-op - Leaves nested checked items under an unchecked parent in place; the parent keeps its context until it is checked off as a whole
Closing
Before finishing, ensure that:
- Changes have been tested and applied correctly
- Based on the status of applied changes, ensure that:
- Relevant Files:
- Relevant documentation files have been updated
-
CHANGELOG.mdhas been updated - Manifest file has been updated
- Relevant Files:
- If closing was called after testing as:
- applied: then resolve to
Move Completed TODO itemssection of this skill - partially applied: then ensure:
- Failing Current
TODOitems have been moved back, and are unchecked - Resolve to
Move Completed TODO itemssection of this skill
- Failing Current
- not applied: then restore all changes, reverting workspace or repository back to its prior state
- applied: then resolve to
