--- name: gogoportal description: Keeps the lessons a project taught on this computer, cleaned of secrets, personal data, full paths, IDs and the member's client names, and prints a stamped batch for GoGoPortal's submit_lessons and submit_correction tools. Use it when research or a fix taught something general (note a lesson), when you start work in a project (check whether a batch of lessons is due), before you call submit_lessons or submit_correction (clean and stamp what goes), and when the member names a file to go with lessons (check it). compatibility: Requires Node.js 18 or later. The script makes no network calls. --- # GoGoPortal lessons What a project teaches (a pitfall, a decision and why, a version change, a requirement, something that failed) can go to GoGoPortal's AI Agents, so the next member starts where this one finished. This skill keeps those lessons on this computer, cleaned, until a batch is due, and stamps each batch so GoGoPortal's tools take it. Nothing reaches GoGoPortal until you call submit_lessons or submit_correction. Each batch then waits for the member's sign-off on the site, unless they chose otherwise in their settings there. ## Running the script ``` node /scripts/gogoportal-lessons.mjs ``` `` is this skill's folder: `${CLAUDE_SKILL_DIR}` in Claude Code, and elsewhere the folder this file is in (such as `~/.agents/skills/gogoportal`, or the skill's folder in Claude's sandbox on claude.ai). Run it in the project: it finds the project's top folder (the nearest one up with `.git` or `.gogoportal-private`, or with lessons kept already). Or add `--project ` with the top folder. A command that refuses says why in one sentence and exits with 1. `note` and `clean` read JSON on standard input, or from a file with `--input `. On Windows, write the JSON to a file and use `--input`: PowerShell's pipe can change the text on its way, and a client name with an accent would then not be found. ## Commands - `note`: after research or a fix that taught something general. One lesson as JSON on standard input: `{"topic": "Hand tracking menus", "body": "...", "kind": "pitfall", "source": "https://...", "appliesTo": ["Meta XR SDK 72"]}` The topic says what it is about in 8 words or fewer, with no numbers, links or code. The body is at least 25 words in your own words: what happened, what to do and why. kind is one of requirement, research, decision, pitfall, failure, structure, template, checklist; source and appliesTo are optional. The script removes secrets, emails, phone numbers, full paths, IDs and the member's client names, keeps the lesson and prints counts only. Don't ask the member each time. - `status`: when you start work in a project. How many lessons are pending, and whether a batch is due. - `batch`: when a batch is due. Prints the batch as JSON, cleaned and stamped. Add `--finished` when the member says the project or its research is finished; lessons that batch leaves pending go in the next one, until a new lesson is noted. Add `--new-project` when submit_lessons answered that the batch's shared project doesn't exist. The first batch for a project also needs `--kind ""` (such as "building a Quest VR app", up to 5; the first is the new project's title on GoGoPortal, so write it to read as one), `--term ""` for each name that identifies the member's own project (its name, product, company or domain), and `--client ""` for each of the member's clients you know of. Decide them from what you know of the project; don't ask the member. Client names stay on this computer: they are taken out, never printed. - Then call submit_lessons with the printed JSON exactly as it is. Its answer gives the batch's fingerprint and the command that records it, which you run: `sent --fingerprint --draft --shared-project `, with `--check-again-from ` when its status is checks_failed with a checkAgainFrom date (the lessons stay pending until then, and are due again that day). sent finds the batch by its fingerprint, from any folder. - `clean`: lessons the member asked you to write, or a correction. JSON on standard input or with `--input `, printed back cleaned and stamped for submit_lessons or submit_correction: `{"kind": "lessons", "description": "what these lessons add", "kindsOfProject": ["building a Quest VR app"], "identifyingTerms": ["FitQuest"], "clientNames": ["Acme"], "items": [{"kind": "decision", "topic": "...", "body": "..."}], "files": ["docs/menus.md"]}` Items may also carry circumstances, buildsOn, learnedAt (YYYY-MM-DD), appliesTo and costToLearn. A correction has kind "correction", one item (what is true now) and correction: `{"target": {"agentId": "...", "topicId": "..."}, "kind": "changed_since", "since": {"version": "...", "date": null}, "source": {"url": "https://...", "kind": "official_docs"}}`. clientNames are used for the cleaning and never printed. kindsOfProject[0] is the new project's title, as with batch. files are paths inside the project, only ones the member named; lessons with files start a project of their own, so with files clean sets sharedProjectId to null. What clean prints needs no sent afterwards. - `check-file `: a file the member named, by its path inside the project. A refused file stays out: never edit a file to make it pass. - `allow` is for the member to run in their own terminal. Never run it yourself. Pass what batch or clean prints exactly as it is: a changed batch no longer matches its stamp, and GoGoPortal refuses it. If submit_lessons answers too_slow, GoGoPortal could not finish checking the batch in time: name fewer or smaller files, or fewer identifying terms, and run batch or clean again. ## When a batch goes - A batch waits until the research has gone quiet (at least 10 lessons pending, 7 days since the project's last batch, and no new lesson for 3 days) or the member says the project is finished (at least 3 pending). Never in the middle of research. - At 40 pending, the batch is due at the next natural stopping point: a finished task, or the member wrapping up. ## The member - Never paste lessons into the chat. After submit_lessons, tell the member in one line, with the sign-off link from its answer. - The member signs off on the site, not in this chat: never ask them to confirm here. - The script reads nothing of the project except the files named and two lists at its top: `.gogoportal-clients` (client names, one per line; one in a folder above the project counts too) and `.gogoportal-private` (paths to keep out of named files). The member can read every lesson in `~/.gogoportal/lessons/`. - In Claude's sandbox on claude.ai the lessons folder may not last from one conversation to the next: there, use clean for lessons the member asks you to write.