@antoneeo/kb-agentic-skill 1.18.0 → 1.20.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/CHANGELOG.md +36 -8
- package/README.md +177 -176
- package/gemini-extension.json +1 -1
- package/package.json +4 -4
- package/scripts/init.js +6 -6
- package/skills/kb-agentic-skill/ENFORCEMENT.md +3 -3
- package/skills/kb-agentic-skill/SKILL.md +13 -13
- package/skills/kb-agentic-skill/dispatch.md +5 -1
- package/skills/kb-agentic-skill/elicitation.md +96 -37
- package/skills/kb-agentic-skill/memory.md +88 -88
- package/skills/kb-agentic-skill/portability.md +125 -125
- package/skills/kb-agentic-skill/review.md +8 -1
- package/skills/kb-agentic-skill/routing.md +28 -16
- package/skills/kb-agentic-skill/scripts/knowledge.py +2089 -2089
- package/skills/kb-agentic-skill/scripts/sdlc_check.py +62 -62
- package/skills/kb-agentic-skill/scripts/sdlc_core.py +14 -1
- package/skills/kb-agentic-skill/templates.md +2 -0
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Knowledge lens entry point. Ship with sdlc_core.py and knowledge.py."""
|
|
3
|
-
import sys
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
6
|
-
try:
|
|
7
|
-
import sdlc_core
|
|
8
|
-
except ImportError as exc:
|
|
9
|
-
sys.stderr.write("[ERROR] missing sdlc_core.py: %s\n"
|
|
10
|
-
"Copy entry point, sdlc_core.py and knowledge.py together.\n" % exc)
|
|
11
|
-
sys.exit(1)
|
|
12
|
-
from sdlc_core import *
|
|
13
|
-
from sdlc_core import _map_refs
|
|
14
|
-
import knowledge
|
|
15
|
-
from knowledge import *
|
|
16
|
-
from knowledge import _kb_extra_validate, _kb_original_candidates
|
|
17
|
-
|
|
18
|
-
DOMAIN = "knowledge"
|
|
19
|
-
|
|
20
|
-
sdlc_core.set_entry_point(DOMAIN, provides=("code", "knowledge"))
|
|
21
|
-
|
|
22
|
-
sdlc_core.set_profile(
|
|
23
|
-
skill_name="kb-agentic",
|
|
24
|
-
unit_noun="topic",
|
|
25
|
-
support_files=("templates.md", "taxonomy.md", "guides.md", "vision.md",
|
|
26
|
-
"distillation.md", "reconciliation.md", "elicitation.md",
|
|
27
|
-
"review.md", "dispatch.md", "routing.md", "portability.md",
|
|
28
|
-
"ENFORCEMENT.md", "memory.md"),
|
|
29
|
-
capabilities=(
|
|
30
|
-
# spine
|
|
31
|
-
"triage", "write_triggers", "workstream_registry", "vision_gate",
|
|
32
|
-
"design_review_gate", "guide_router", "worktree_hygiene",
|
|
33
|
-
# knowledge overlay
|
|
34
|
-
# `knowledge_portability` (F-030) is deliberately NOT declared: the
|
|
35
|
-
# capability vocabulary lives in the shared spine, and no shared test
|
|
36
|
-
# guards on portability, so adding a label there would mean editing
|
|
37
|
-
# sdlc_core.py in three distributions to buy nothing.
|
|
38
|
-
"taxonomy_pass", "subagent_dispatch", "question_discipline",
|
|
39
|
-
),
|
|
40
|
-
# F-046: the per-turn line moved from this file's own `remind` command into
|
|
41
|
-
# the shared spine, which now carries the machine for all three lenses. The
|
|
42
|
-
# kb duties below are unchanged; what is new is the first one -- an unread
|
|
43
|
-
# protocol cannot be applied, and until now nothing said so.
|
|
44
|
-
remind_line=(
|
|
45
|
-
"first decide if this skill governs the work; if yes, LOAD it once -- an "
|
|
46
|
-
"unread protocol cannot be applied. Triage: L1 quick fact, L2 propagation, "
|
|
47
|
-
"L3 new knowledge unit, Spike; declare the level. On this project's "
|
|
48
|
-
"domain, read topics/INDEX.md first and cite claim ids, or state no "
|
|
49
|
-
"coverage. Decisions today get recorded in the KB at close. Revising a "
|
|
50
|
-
"document? Re-read it whole and rewrite to current state -- never append "
|
|
51
|
-
"a delta."
|
|
52
|
-
),
|
|
53
|
-
design_gate_between=("### 3. Request Analysis & Taxonomy Pass",
|
|
54
|
-
"### 4. Knowledge Processing & Distillation"),
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def main(argv=None):
|
|
59
|
-
return knowledge.main(argv)
|
|
60
|
-
|
|
61
|
-
if __name__ == "__main__":
|
|
62
|
-
sys.exit(main())
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Knowledge lens entry point. Ship with sdlc_core.py and knowledge.py."""
|
|
3
|
+
import sys
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
6
|
+
try:
|
|
7
|
+
import sdlc_core
|
|
8
|
+
except ImportError as exc:
|
|
9
|
+
sys.stderr.write("[ERROR] missing sdlc_core.py: %s\n"
|
|
10
|
+
"Copy entry point, sdlc_core.py and knowledge.py together.\n" % exc)
|
|
11
|
+
sys.exit(1)
|
|
12
|
+
from sdlc_core import *
|
|
13
|
+
from sdlc_core import _map_refs
|
|
14
|
+
import knowledge
|
|
15
|
+
from knowledge import *
|
|
16
|
+
from knowledge import _kb_extra_validate, _kb_original_candidates
|
|
17
|
+
|
|
18
|
+
DOMAIN = "knowledge"
|
|
19
|
+
|
|
20
|
+
sdlc_core.set_entry_point(DOMAIN, provides=("code", "knowledge"))
|
|
21
|
+
|
|
22
|
+
sdlc_core.set_profile(
|
|
23
|
+
skill_name="kb-agentic",
|
|
24
|
+
unit_noun="topic",
|
|
25
|
+
support_files=("templates.md", "taxonomy.md", "guides.md", "vision.md",
|
|
26
|
+
"distillation.md", "reconciliation.md", "elicitation.md",
|
|
27
|
+
"review.md", "dispatch.md", "routing.md", "portability.md",
|
|
28
|
+
"ENFORCEMENT.md", "memory.md"),
|
|
29
|
+
capabilities=(
|
|
30
|
+
# spine
|
|
31
|
+
"triage", "write_triggers", "workstream_registry", "vision_gate",
|
|
32
|
+
"design_review_gate", "guide_router", "worktree_hygiene",
|
|
33
|
+
# knowledge overlay
|
|
34
|
+
# `knowledge_portability` (F-030) is deliberately NOT declared: the
|
|
35
|
+
# capability vocabulary lives in the shared spine, and no shared test
|
|
36
|
+
# guards on portability, so adding a label there would mean editing
|
|
37
|
+
# sdlc_core.py in three distributions to buy nothing.
|
|
38
|
+
"taxonomy_pass", "subagent_dispatch", "question_discipline",
|
|
39
|
+
),
|
|
40
|
+
# F-046: the per-turn line moved from this file's own `remind` command into
|
|
41
|
+
# the shared spine, which now carries the machine for all three lenses. The
|
|
42
|
+
# kb duties below are unchanged; what is new is the first one -- an unread
|
|
43
|
+
# protocol cannot be applied, and until now nothing said so.
|
|
44
|
+
remind_line=(
|
|
45
|
+
"first decide if this skill governs the work; if yes, LOAD it once -- an "
|
|
46
|
+
"unread protocol cannot be applied. Triage: L1 quick fact, L2 propagation, "
|
|
47
|
+
"L3 new knowledge unit, Spike; declare the level. On this project's "
|
|
48
|
+
"domain, read topics/INDEX.md first and cite claim ids, or state no "
|
|
49
|
+
"coverage. Decisions today get recorded in the KB at close. Revising a "
|
|
50
|
+
"document? Re-read it whole and rewrite to current state -- never append "
|
|
51
|
+
"a delta."
|
|
52
|
+
),
|
|
53
|
+
design_gate_between=("### 3. Request Analysis & Taxonomy Pass",
|
|
54
|
+
"### 4. Knowledge Processing & Distillation"),
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def main(argv=None):
|
|
59
|
+
return knowledge.main(argv)
|
|
60
|
+
|
|
61
|
+
if __name__ == "__main__":
|
|
62
|
+
sys.exit(main())
|
|
@@ -203,6 +203,11 @@ DOMAINS = {
|
|
|
203
203
|
"risk_label": "## Threat Map / Plan Risks",
|
|
204
204
|
"id_prefix": "M-",
|
|
205
205
|
},
|
|
206
|
+
"course": {
|
|
207
|
+
"risk_section": ("## Learning and Content Risks",),
|
|
208
|
+
"risk_label": "## Learning and Content Risks",
|
|
209
|
+
"id_prefix": "C-",
|
|
210
|
+
},
|
|
206
211
|
}
|
|
207
212
|
# Absent everything -- no `default_domain:` line, no `domain:` field -- a project is
|
|
208
213
|
# `code`. That is what every project created before this field existed already is,
|
|
@@ -1298,7 +1303,7 @@ def cmd_validate(root, strict=False, hybrid=False):
|
|
|
1298
1303
|
"have the user validate it")
|
|
1299
1304
|
|
|
1300
1305
|
# ANALYSIS: frontmatter and mandatory sections
|
|
1301
|
-
# Ids are unique WITHIN a domain (prefixes F-/K-/M- keep them apart in practice):
|
|
1306
|
+
# Ids are unique WITHIN a domain (prefixes F-/K-/M-/C- keep them apart in practice):
|
|
1302
1307
|
# two lenses over one tree must not collide on a number neither of them chose.
|
|
1303
1308
|
seen_ids = {}
|
|
1304
1309
|
default_domain = project_default_domain(root)
|
|
@@ -1574,6 +1579,13 @@ def cmd_stale(root, hybrid=False):
|
|
|
1574
1579
|
return rc # was: return 0 — MUST carry guide rc
|
|
1575
1580
|
use_git = git_available(root)
|
|
1576
1581
|
entry = entry_script()
|
|
1582
|
+
# The audit plan records the marks: its own edits are not a change to the area
|
|
1583
|
+
# that contains it. Counting them made a committed hash mark of that area
|
|
1584
|
+
# stale again, and every re-mark repeated the loop.
|
|
1585
|
+
try:
|
|
1586
|
+
plan_rel = f.resolve().relative_to(Path(root).resolve()).as_posix()
|
|
1587
|
+
except ValueError:
|
|
1588
|
+
plan_rel = None
|
|
1577
1589
|
# F-056: an ANALYZED row whose reference cannot be evaluated is UNVERIFIED,
|
|
1578
1590
|
# never fresh. Each `continue` below that skips such a row records it here;
|
|
1579
1591
|
# skipping silently is how a pruned reference printed `[ok]` over three areas.
|
|
@@ -1641,6 +1653,7 @@ def cmd_stale(root, hybrid=False):
|
|
|
1641
1653
|
except ValueError: # symlink out of the tree: report absolute, never crash
|
|
1642
1654
|
name = str(fp)
|
|
1643
1655
|
changed.append(name)
|
|
1656
|
+
changed = [c for c in changed if c != plan_rel]
|
|
1644
1657
|
if changed:
|
|
1645
1658
|
stale.append((rel, changed))
|
|
1646
1659
|
|
|
@@ -20,6 +20,8 @@ supersedes: old_doc.md # only if it replaces another canonical doc
|
|
|
20
20
|
|
|
21
21
|
When a doc replaces another: the new one declares `supersedes:`, the old one switches to `status: SUPERSEDED` (it stays as history, do not delete it). `sdlc_check.py validate` warns if `status` is missing or if a superseded doc is still `CURRENT`.
|
|
22
22
|
|
|
23
|
+
For a course in the same `ai_docs/` tree, `vision/features/VISION_course_<slug>.md` and `solutions/ANALYSIS_course_<slug>.md` declare `domain: course` explicitly and the ANALYSIS uses a `C-` ID. The feature Vision is scoped to that course; the project-wide Vision stays above all four domains. Course design belongs to `course-creator`.
|
|
24
|
+
|
|
23
25
|
## ai_docs/reference/GUIDE_[topic].md
|
|
24
26
|
|
|
25
27
|
A guide is either OPERATIVE (`source_kind: document` — distilled from USER-PROVIDED
|