@e0ipso/ai-task-manager 2.0.1 → 2.1.0
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/cli.js +0 -0
- package/package.json +1 -1
- package/templates/harness/skills/task-create-plan/SKILL.md +7 -7
- package/templates/harness/skills/task-create-plan/scripts/get-next-plan-id.cjs +2 -19
- package/templates/harness/skills/task-execute-blueprint/scripts/create-feature-branch.cjs +2 -19
- package/templates/harness/skills/task-execute-blueprint/scripts/validate-plan-blueprint.cjs +2 -19
- package/templates/harness/skills/task-execute-task/scripts/check-task-dependencies.cjs +2 -19
- package/templates/harness/skills/task-execute-task/scripts/validate-plan-blueprint.cjs +2 -19
- package/templates/harness/skills/task-full-workflow/SKILL.md +3 -3
- package/templates/harness/skills/task-full-workflow/scripts/create-feature-branch.cjs +2 -19
- package/templates/harness/skills/task-full-workflow/scripts/get-next-plan-id.cjs +2 -19
- package/templates/harness/skills/task-full-workflow/scripts/get-next-task-id.cjs +2 -19
- package/templates/harness/skills/task-full-workflow/scripts/validate-plan-blueprint.cjs +2 -19
- package/templates/harness/skills/task-generate-tasks/scripts/get-next-task-id.cjs +2 -19
- package/templates/harness/skills/task-generate-tasks/scripts/validate-plan-blueprint.cjs +2 -19
- package/templates/harness/skills/task-refine-plan/scripts/validate-plan-blueprint.cjs +2 -19
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-create-plan
|
|
3
|
-
description: Create a new AI Task Manager plan for this repository. Use when the user asks to draft, plan, or scope a new task-manager plan — discovers the local .ai/task-manager root, runs the project's plan hooks, gathers clarifications, allocates the next plan ID, and writes a
|
|
3
|
+
description: Create a new AI Task Manager plan for this repository. Use when the user asks to draft, plan, or scope a new task-manager plan — discovers the local .ai/task-manager root, runs the project's plan hooks, gathers clarifications, allocates the next plan ID, and writes a Markdown plan conforming to PLAN_TEMPLATE.md. Do not use for generic brainstorming or work outside the AI Task Manager.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# task-create-plan
|
|
@@ -36,8 +36,8 @@ For every subsequent step, treat the path printed by this script as `<root>`.
|
|
|
36
36
|
Read `<root>/config/TASK_MANAGER.md` for the directory structure conventions
|
|
37
37
|
this project uses. Read `<root>/config/hooks/PRE_PLAN.md` and execute the
|
|
38
38
|
instructions it contains before proceeding. Read
|
|
39
|
-
`<root>/config/templates/PLAN_TEMPLATE.
|
|
40
|
-
to its
|
|
39
|
+
`<root>/config/templates/PLAN_TEMPLATE.md` so the plan you emit conforms
|
|
40
|
+
to its structure.
|
|
41
41
|
|
|
42
42
|
### 3. Analyze the work order
|
|
43
43
|
|
|
@@ -74,15 +74,15 @@ and use the unpadded integer in the plan frontmatter and the final summary.
|
|
|
74
74
|
Write the plan to:
|
|
75
75
|
|
|
76
76
|
```
|
|
77
|
-
<root>/plans/{padded-id}--{slug}/plan-{padded-id}--{slug}.
|
|
77
|
+
<root>/plans/{padded-id}--{slug}/plan-{padded-id}--{slug}.md
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
The output must:
|
|
81
81
|
|
|
82
|
-
- Conform to `<root>/config/templates/PLAN_TEMPLATE.
|
|
83
|
-
|
|
82
|
+
- Conform to `<root>/config/templates/PLAN_TEMPLATE.md`, including required
|
|
83
|
+
YAML frontmatter fields (at minimum `id`, `summary`, `created`).
|
|
84
84
|
- Contain the standard sections from the template body.
|
|
85
|
-
- Use
|
|
85
|
+
- Use Markdown, not free-form prose.
|
|
86
86
|
- Avoid time estimates, task lists, or code samples — those belong to the
|
|
87
87
|
later task-generation phase.
|
|
88
88
|
|
|
@@ -123,29 +123,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
123
123
|
}
|
|
124
124
|
return null;
|
|
125
125
|
};
|
|
126
|
-
var
|
|
127
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
128
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
129
|
-
const metaPatterns = [
|
|
130
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
131
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
132
|
-
];
|
|
133
|
-
for (const pattern of metaPatterns) {
|
|
134
|
-
const match = scope.match(pattern);
|
|
135
|
-
if (match && match[1]) {
|
|
136
|
-
const id = validateId(match[1]);
|
|
137
|
-
if (id !== null) return id;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return null;
|
|
141
|
-
};
|
|
142
|
-
var extractPlanId = (content, filePath) => {
|
|
143
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
126
|
+
var extractPlanId = (content, _filePath) => {
|
|
144
127
|
return extractIdFromMarkdown(content);
|
|
145
128
|
};
|
|
146
129
|
|
|
147
130
|
// src/skill-scripts/shared/plan-scan.ts
|
|
148
|
-
var PLAN_EXTENSIONS = [".md"
|
|
131
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
149
132
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
150
133
|
let entries;
|
|
151
134
|
try {
|
|
@@ -140,29 +140,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
140
140
|
}
|
|
141
141
|
return null;
|
|
142
142
|
};
|
|
143
|
-
var
|
|
144
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
145
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
146
|
-
const metaPatterns = [
|
|
147
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
148
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
149
|
-
];
|
|
150
|
-
for (const pattern of metaPatterns) {
|
|
151
|
-
const match = scope.match(pattern);
|
|
152
|
-
if (match && match[1]) {
|
|
153
|
-
const id = validateId(match[1]);
|
|
154
|
-
if (id !== null) return id;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return null;
|
|
158
|
-
};
|
|
159
|
-
var extractPlanId = (content, filePath) => {
|
|
160
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
143
|
+
var extractPlanId = (content, _filePath) => {
|
|
161
144
|
return extractIdFromMarkdown(content);
|
|
162
145
|
};
|
|
163
146
|
|
|
164
147
|
// src/skill-scripts/shared/plan-scan.ts
|
|
165
|
-
var PLAN_EXTENSIONS = [".md"
|
|
148
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
166
149
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
167
150
|
let entries;
|
|
168
151
|
try {
|
|
@@ -125,29 +125,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
129
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
130
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
131
|
-
const metaPatterns = [
|
|
132
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
133
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
134
|
-
];
|
|
135
|
-
for (const pattern of metaPatterns) {
|
|
136
|
-
const match = scope.match(pattern);
|
|
137
|
-
if (match && match[1]) {
|
|
138
|
-
const id = validateId(match[1]);
|
|
139
|
-
if (id !== null) return id;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
};
|
|
144
|
-
var extractPlanId = (content, filePath) => {
|
|
145
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
128
|
+
var extractPlanId = (content, _filePath) => {
|
|
146
129
|
return extractIdFromMarkdown(content);
|
|
147
130
|
};
|
|
148
131
|
|
|
149
132
|
// src/skill-scripts/shared/plan-scan.ts
|
|
150
|
-
var PLAN_EXTENSIONS = [".md"
|
|
133
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
151
134
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
152
135
|
let entries;
|
|
153
136
|
try {
|
|
@@ -129,29 +129,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
};
|
|
132
|
-
var
|
|
133
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
134
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
135
|
-
const metaPatterns = [
|
|
136
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
137
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
138
|
-
];
|
|
139
|
-
for (const pattern of metaPatterns) {
|
|
140
|
-
const match = scope.match(pattern);
|
|
141
|
-
if (match && match[1]) {
|
|
142
|
-
const id = validateId(match[1]);
|
|
143
|
-
if (id !== null) return id;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return null;
|
|
147
|
-
};
|
|
148
|
-
var extractPlanId = (content, filePath) => {
|
|
149
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
132
|
+
var extractPlanId = (content, _filePath) => {
|
|
150
133
|
return extractIdFromMarkdown(content);
|
|
151
134
|
};
|
|
152
135
|
|
|
153
136
|
// src/skill-scripts/shared/plan-scan.ts
|
|
154
|
-
var PLAN_EXTENSIONS = [".md"
|
|
137
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
155
138
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
156
139
|
let entries;
|
|
157
140
|
try {
|
|
@@ -125,29 +125,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
129
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
130
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
131
|
-
const metaPatterns = [
|
|
132
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
133
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
134
|
-
];
|
|
135
|
-
for (const pattern of metaPatterns) {
|
|
136
|
-
const match = scope.match(pattern);
|
|
137
|
-
if (match && match[1]) {
|
|
138
|
-
const id = validateId(match[1]);
|
|
139
|
-
if (id !== null) return id;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
};
|
|
144
|
-
var extractPlanId = (content, filePath) => {
|
|
145
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
128
|
+
var extractPlanId = (content, _filePath) => {
|
|
146
129
|
return extractIdFromMarkdown(content);
|
|
147
130
|
};
|
|
148
131
|
|
|
149
132
|
// src/skill-scripts/shared/plan-scan.ts
|
|
150
|
-
var PLAN_EXTENSIONS = [".md"
|
|
133
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
151
134
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
152
135
|
let entries;
|
|
153
136
|
try {
|
|
@@ -50,7 +50,7 @@ For every subsequent step, treat the path printed by this script as `<root>`.
|
|
|
50
50
|
|
|
51
51
|
#### 2. Load project context
|
|
52
52
|
|
|
53
|
-
Read `<root>/config/TASK_MANAGER.md` for directory structure conventions. Read `<root>/config/hooks/PRE_PLAN.md` and execute its instructions before proceeding. Read `<root>/config/templates/PLAN_TEMPLATE.
|
|
53
|
+
Read `<root>/config/TASK_MANAGER.md` for directory structure conventions. Read `<root>/config/hooks/PRE_PLAN.md` and execute its instructions before proceeding. Read `<root>/config/templates/PLAN_TEMPLATE.md` so the plan conforms to the project's template.
|
|
54
54
|
|
|
55
55
|
#### 3. Analyze the work order
|
|
56
56
|
|
|
@@ -79,10 +79,10 @@ Compute the zero-padded form for directory naming (`{padded-id}--{slug}`) and us
|
|
|
79
79
|
Write the plan to:
|
|
80
80
|
|
|
81
81
|
```
|
|
82
|
-
<root>/plans/{padded-id}--{slug}/plan-{padded-id}--{slug}.
|
|
82
|
+
<root>/plans/{padded-id}--{slug}/plan-{padded-id}--{slug}.md
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
The output must conform to `<root>/config/templates/PLAN_TEMPLATE.
|
|
85
|
+
The output must conform to `<root>/config/templates/PLAN_TEMPLATE.md`, including required YAML frontmatter fields (`id`, `summary`, `created`). Avoid time estimates, task lists, or code samples — those belong to the later task-generation phase.
|
|
86
86
|
|
|
87
87
|
The `<slug>` is derived from the plan summary: lowercase, alphanumeric and hyphens only, collapsed, trimmed.
|
|
88
88
|
|
|
@@ -140,29 +140,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
140
140
|
}
|
|
141
141
|
return null;
|
|
142
142
|
};
|
|
143
|
-
var
|
|
144
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
145
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
146
|
-
const metaPatterns = [
|
|
147
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
148
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
149
|
-
];
|
|
150
|
-
for (const pattern of metaPatterns) {
|
|
151
|
-
const match = scope.match(pattern);
|
|
152
|
-
if (match && match[1]) {
|
|
153
|
-
const id = validateId(match[1]);
|
|
154
|
-
if (id !== null) return id;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return null;
|
|
158
|
-
};
|
|
159
|
-
var extractPlanId = (content, filePath) => {
|
|
160
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
143
|
+
var extractPlanId = (content, _filePath) => {
|
|
161
144
|
return extractIdFromMarkdown(content);
|
|
162
145
|
};
|
|
163
146
|
|
|
164
147
|
// src/skill-scripts/shared/plan-scan.ts
|
|
165
|
-
var PLAN_EXTENSIONS = [".md"
|
|
148
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
166
149
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
167
150
|
let entries;
|
|
168
151
|
try {
|
|
@@ -123,29 +123,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
123
123
|
}
|
|
124
124
|
return null;
|
|
125
125
|
};
|
|
126
|
-
var
|
|
127
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
128
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
129
|
-
const metaPatterns = [
|
|
130
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
131
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
132
|
-
];
|
|
133
|
-
for (const pattern of metaPatterns) {
|
|
134
|
-
const match = scope.match(pattern);
|
|
135
|
-
if (match && match[1]) {
|
|
136
|
-
const id = validateId(match[1]);
|
|
137
|
-
if (id !== null) return id;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return null;
|
|
141
|
-
};
|
|
142
|
-
var extractPlanId = (content, filePath) => {
|
|
143
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
126
|
+
var extractPlanId = (content, _filePath) => {
|
|
144
127
|
return extractIdFromMarkdown(content);
|
|
145
128
|
};
|
|
146
129
|
|
|
147
130
|
// src/skill-scripts/shared/plan-scan.ts
|
|
148
|
-
var PLAN_EXTENSIONS = [".md"
|
|
131
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
149
132
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
150
133
|
let entries;
|
|
151
134
|
try {
|
|
@@ -127,29 +127,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
127
127
|
}
|
|
128
128
|
return null;
|
|
129
129
|
};
|
|
130
|
-
var
|
|
131
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
132
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
133
|
-
const metaPatterns = [
|
|
134
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
135
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
136
|
-
];
|
|
137
|
-
for (const pattern of metaPatterns) {
|
|
138
|
-
const match = scope.match(pattern);
|
|
139
|
-
if (match && match[1]) {
|
|
140
|
-
const id = validateId(match[1]);
|
|
141
|
-
if (id !== null) return id;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return null;
|
|
145
|
-
};
|
|
146
|
-
var extractPlanId = (content, filePath) => {
|
|
147
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
130
|
+
var extractPlanId = (content, _filePath) => {
|
|
148
131
|
return extractIdFromMarkdown(content);
|
|
149
132
|
};
|
|
150
133
|
|
|
151
134
|
// src/skill-scripts/shared/plan-scan.ts
|
|
152
|
-
var PLAN_EXTENSIONS = [".md"
|
|
135
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
153
136
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
154
137
|
let entries;
|
|
155
138
|
try {
|
|
@@ -125,29 +125,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
129
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
130
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
131
|
-
const metaPatterns = [
|
|
132
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
133
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
134
|
-
];
|
|
135
|
-
for (const pattern of metaPatterns) {
|
|
136
|
-
const match = scope.match(pattern);
|
|
137
|
-
if (match && match[1]) {
|
|
138
|
-
const id = validateId(match[1]);
|
|
139
|
-
if (id !== null) return id;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
};
|
|
144
|
-
var extractPlanId = (content, filePath) => {
|
|
145
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
128
|
+
var extractPlanId = (content, _filePath) => {
|
|
146
129
|
return extractIdFromMarkdown(content);
|
|
147
130
|
};
|
|
148
131
|
|
|
149
132
|
// src/skill-scripts/shared/plan-scan.ts
|
|
150
|
-
var PLAN_EXTENSIONS = [".md"
|
|
133
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
151
134
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
152
135
|
let entries;
|
|
153
136
|
try {
|
|
@@ -127,29 +127,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
127
127
|
}
|
|
128
128
|
return null;
|
|
129
129
|
};
|
|
130
|
-
var
|
|
131
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
132
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
133
|
-
const metaPatterns = [
|
|
134
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
135
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
136
|
-
];
|
|
137
|
-
for (const pattern of metaPatterns) {
|
|
138
|
-
const match = scope.match(pattern);
|
|
139
|
-
if (match && match[1]) {
|
|
140
|
-
const id = validateId(match[1]);
|
|
141
|
-
if (id !== null) return id;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return null;
|
|
145
|
-
};
|
|
146
|
-
var extractPlanId = (content, filePath) => {
|
|
147
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
130
|
+
var extractPlanId = (content, _filePath) => {
|
|
148
131
|
return extractIdFromMarkdown(content);
|
|
149
132
|
};
|
|
150
133
|
|
|
151
134
|
// src/skill-scripts/shared/plan-scan.ts
|
|
152
|
-
var PLAN_EXTENSIONS = [".md"
|
|
135
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
153
136
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
154
137
|
let entries;
|
|
155
138
|
try {
|
|
@@ -125,29 +125,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
129
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
130
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
131
|
-
const metaPatterns = [
|
|
132
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
133
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
134
|
-
];
|
|
135
|
-
for (const pattern of metaPatterns) {
|
|
136
|
-
const match = scope.match(pattern);
|
|
137
|
-
if (match && match[1]) {
|
|
138
|
-
const id = validateId(match[1]);
|
|
139
|
-
if (id !== null) return id;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
};
|
|
144
|
-
var extractPlanId = (content, filePath) => {
|
|
145
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
128
|
+
var extractPlanId = (content, _filePath) => {
|
|
146
129
|
return extractIdFromMarkdown(content);
|
|
147
130
|
};
|
|
148
131
|
|
|
149
132
|
// src/skill-scripts/shared/plan-scan.ts
|
|
150
|
-
var PLAN_EXTENSIONS = [".md"
|
|
133
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
151
134
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
152
135
|
let entries;
|
|
153
136
|
try {
|
|
@@ -125,29 +125,12 @@ var extractIdFromMarkdown = (content) => {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
|
-
var
|
|
129
|
-
const headMatch = content.match(/<head[^>]*>([\s\S]*?)<\/head>/i);
|
|
130
|
-
const scope = headMatch && headMatch[1] ? headMatch[1] : content;
|
|
131
|
-
const metaPatterns = [
|
|
132
|
-
/<meta\s+[^>]*name\s*=\s*["']id["'][^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*\/?>/i,
|
|
133
|
-
/<meta\s+[^>]*content\s*=\s*["']([+-]?\d+)["'][^>]*name\s*=\s*["']id["'][^>]*\/?>/i
|
|
134
|
-
];
|
|
135
|
-
for (const pattern of metaPatterns) {
|
|
136
|
-
const match = scope.match(pattern);
|
|
137
|
-
if (match && match[1]) {
|
|
138
|
-
const id = validateId(match[1]);
|
|
139
|
-
if (id !== null) return id;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return null;
|
|
143
|
-
};
|
|
144
|
-
var extractPlanId = (content, filePath) => {
|
|
145
|
-
if (filePath.toLowerCase().endsWith(".html")) return extractIdFromHtml(content);
|
|
128
|
+
var extractPlanId = (content, _filePath) => {
|
|
146
129
|
return extractIdFromMarkdown(content);
|
|
147
130
|
};
|
|
148
131
|
|
|
149
132
|
// src/skill-scripts/shared/plan-scan.ts
|
|
150
|
-
var PLAN_EXTENSIONS = [".md"
|
|
133
|
+
var PLAN_EXTENSIONS = [".md"];
|
|
151
134
|
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
152
135
|
let entries;
|
|
153
136
|
try {
|