@handsupmin/gc-tree 0.7.11 → 0.7.13
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/dist/src/markdown.js
CHANGED
|
@@ -71,9 +71,22 @@ export function ensureSummary(summary) {
|
|
|
71
71
|
}
|
|
72
72
|
return trimmed;
|
|
73
73
|
}
|
|
74
|
+
function normalizeBody(raw, title) {
|
|
75
|
+
let s = raw.trim();
|
|
76
|
+
// Strip leading "# <title>" line (already rendered at top level)
|
|
77
|
+
const titleLine = `# ${title.trim()}`;
|
|
78
|
+
if (s.startsWith(titleLine))
|
|
79
|
+
s = s.slice(titleLine.length).trimStart();
|
|
80
|
+
// Strip leading "## Summary" block (already rendered at top level)
|
|
81
|
+
if (s.startsWith('## Summary')) {
|
|
82
|
+
const next = s.match(/\n(?=## )/);
|
|
83
|
+
s = next ? s.slice(next.index).trimStart() : '';
|
|
84
|
+
}
|
|
85
|
+
return s;
|
|
86
|
+
}
|
|
74
87
|
export function renderDocMarkdown(doc) {
|
|
75
88
|
const summary = ensureSummary(doc.summary);
|
|
76
|
-
const body = String(doc.body || '').
|
|
89
|
+
const body = normalizeBody(String(doc.body || ''), doc.title);
|
|
77
90
|
const normalizedIndexEntries = [...new Set([
|
|
78
91
|
...(doc.indexLabel?.trim() ? [doc.indexLabel.trim()] : []),
|
|
79
92
|
...(doc.indexEntries || []).map((entry) => String(entry || '').trim()).filter(Boolean),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export function onboardingProtocolLines() {
|
|
2
2
|
return [
|
|
3
3
|
'This is **global context onboarding**, not repo-local onboarding.',
|
|
4
|
-
'Ask **one question at a time
|
|
4
|
+
'Ask **one question at a time**.',
|
|
5
|
+
'**Language lock**: detect the language the user writes in from their very first response and use it for every subsequent message without exception — numbered confirmations (1/2/3), hypotheses, summaries, doc content, and wrap-up must all be in that language. Never revert to English mid-session regardless of what language appears in repo names, code comments, or source docs.',
|
|
5
6
|
'Wait for the user\'s first answer before you inspect docs, repos, directories, or files on your own.',
|
|
6
7
|
'Start by asking the user to paste or share organized docs or reference material if they have any; otherwise ask what kind of work they mainly do.',
|
|
7
8
|
'Do **not** start with a repo scan, a company guess, or a broad hypothesis built from directories like `~/sources`.',
|
package/package.json
CHANGED
package/skills/onboard/SKILL.md
CHANGED
|
@@ -8,6 +8,7 @@ description: Launch guided onboarding for the active gc-branch through the confi
|
|
|
8
8
|
Use this when a user wants to create global context for a product, company, or workstream in an empty gc-branch.
|
|
9
9
|
|
|
10
10
|
## Rules
|
|
11
|
+
- **language lock**: detect the language the user writes in from their very first response; use that language for every subsequent message without exception — numbered confirmations (1/2/3), hypotheses, summaries, and wrap-up must all be in the user's language; never revert to English mid-session regardless of what language appears in repo names, code comments, or source docs
|
|
11
12
|
- ask one question at a time
|
|
12
13
|
- keep the active gc-branch explicit
|
|
13
14
|
- this is global-context onboarding, not repo-local onboarding
|