Skip to content

g1t's plugin marketplace for Claude Code: the g1t plugin, which records sessions, claims and hands off issues, and adds g1t's MCP server. Published from flagon-io/g1t, where changes and issues go.

Commit

g1t 0.2.11, from flagon-io/g1t@d770dfb32599

Published by scripts/plugins-release.mjs from https://g1t.sh/flagon-io/g1t/commit/d770dfb. Change the plugin there; this repository is overwritten.

g1tbotcommitted Parentedcca9eBrowse files
4 files+24−50/4 viewed
+1−1
1010 "name": "g1t",
1111 "source": "./plugins/g1t",
1212 "description": "Work on g1t issues from Claude Code: records your sessions on g1t, loads an issue's work context, claims and hands off work, and connects g1t's MCP server.",
13− "version": "0.2.10",
13+ "version": "0.2.11",
1414 "category": "development"
1515 }
1616 ]
+1−1
11 # g1t plugins
22
3−g1t's plugin marketplace for Claude Code. Its one plugin, `g1t` (0.2.10),
3+g1t's plugin marketplace for Claude Code. Its one plugin, `g1t` (0.2.11),
44 records your Claude Code sessions on g1t, gives Claude the issue it is
55 working on, claims and hands off work, and adds g1t's MCP server, skills
66 and commands.
+1−1
11 {
22 "name": "g1t",
3− "version": "0.2.10",
3+ "version": "0.2.11",
44 "description": "Work on g1t issues from Claude Code: records your sessions on g1t, loads an issue's work context, claims and hands off work, and connects g1t's MCP server.",
55 "author": { "name": "Flagon, Inc.", "url": "https://g1t.sh" },
66 "homepage": "https://docs.g1t.sh/guides/claude-code-plugin/",
+21−2
10231023 const TRAILER = "Add the trailer `G1t-Session: $G1T_SESSION` to the commits you make (git commit --trailer), so g1t ties them to this session. A commit pushed straight to the default branch that finishes an issue says `Closes #N` in its message: a bare `(#N)` only links it, and the issue stays open.";
10241024
10251025 /**
1026+ * How the agent keeps its session's title true: it starts as the first
1027+ * prompt's intent, which often stops being what the session is about.
1028+ */
1029+export const RETITLE = 'Its title starts as your first prompt; once what you are actually doing is clear, and whenever it changes, retitle it in a few words with `g1t session attach --title "…"`.';
1030+
1031+/**
1032+ * At which prompts the agent is reminded to retitle: the second (what the
1033+ * work is has usually shown by then) and every fifth after.
1034+ */
1035+export function retitleNudge(turn) {
1036+ return turn === 2 || (turn > 2 && turn % 5 === 0) ? `g1t: if this session's title no longer says what it is doing, retitle it: \`g1t session attach --title "…"\`.` : null;
1037+}
1038+
1039+/**
10261040 * SessionStart: marks the session as one in a g1t working copy, and
10271041 * returns what to print: context for Claude, and a notice for you, once.
10281042 * Null outside a g1t working copy, where nothing is recorded.
10631077 context = `g1t: ${where} points at issue #${issue}. Load what is known about it with \`g1t work context ${issue}\`, and claim it with \`g1t work claim ${issue}\` before you start. ${TRAILER}`;
10641078 }
10651079 } else {
1066− context = `g1t: this session is recorded on g1t and shows to the team, titled with what you are asked to do. Just work. If it turns into a change others should know about (a branch to push, a pull request), first look for its issue (\`g1t work list\`, \`g1t issue list\`) and claim it with \`g1t work claim N\`; if there is none, open and claim one with \`g1t work claim --title "…"\`. Never open issues for questions, exploration or trivial fixes. ${TRAILER}`;
1080+ context = `g1t: this session is recorded on g1t and shows to the team, titled with what you are asked to do. Just work. If it turns into a change others should know about (a branch to push, a pull request), first look for its issue (\`g1t work list\`, \`g1t issue list\`) and claim it with \`g1t work claim N\`; if there is none, open and claim one with \`g1t work claim --title "…"\`. Never open issues for questions, exploration or trivial fixes. ${RETITLE} ${TRAILER}`;
10671081 }
10681082 if (context) output.hookSpecificOutput = { hookEventName: "SessionStart", additionalContext: context };
10691083 return output;
12361250 return { output: { hookSpecificOutput: { hookEventName: "SubagentStart", additionalContext: subagentContext(issue) } }, job };
12371251 }
12381252 const notice = late?.output.systemMessage ?? (name === "UserPromptSubmit" ? takeNotice(env) : null);
1239− const context = [late?.output.hookSpecificOutput?.additionalContext, name === "UserPromptSubmit" ? updateContext(event, env) : null]
1253+ const context = [
1254+ late?.output.hookSpecificOutput?.additionalContext,
1255+ name === "UserPromptSubmit" ? updateContext(event, env) : null,
1256+ // Only while it is being recorded: not with the CLI signed out or too old.
1257+ name === "UserPromptSubmit" && !readJson(join(dataDir(env), "notice.json"), {}).problem ? retitleNudge(turn) : null,
1258+ ]
12401259 .filter(Boolean)
12411260 .join("\n\n");
12421261 return { output: context || notice ? {

Comments

Sign in to comment.