[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CAPFSMKHMF7CH4CW44K19F":3,"skill-same:01M6CAPFSMKHMF7CH4CW44K19F":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M6CAPFSMKHMF7CH4CW44K19F","memory-lint","语义记忆健康检查","Health-check any consumer's semantic memory by composing structural and domain-specific checks","通过组合结构化检查与领域特定检查，对任意消费者的语义记忆进行健康检查","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsemantic-memory\u002Fskills\u002Fmemory-lint\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRFRAYBCBW9WKDY9TCSHY3","知识管理与沉淀","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40,41,42],"memory","lint","memory lint","kernel","health","check","health-check","domain","domain-specific","structural","semantic","semantic memory","2026-11-10 10:12:30",false,"---\nname: memory-lint\ndescription: Health-check any consumer's semantic memory by composing structural and domain-specific checks\nnamespace: aiwg\ncategory: kernel\nplatforms: [all]\n---\n\n# memory-lint\n\nValidate the structural integrity and content health of a consumer's semantic memory. Composes eight built-in checks with any domain-specific lint rules declared by the consumer.\n\n## When to Use\n\n- Periodic maintenance (weekly or per-iteration)\n- Before phase transitions or releases — ensures memory is clean\n- After bulk ingest operations\n- When `memory-log-append` flags corruption\n- CI\u002FCD quality gates that include memory health\n\n## Parameters\n\n### --consumer (optional)\nConsumer ID to lint. Resolved via ADR-021 D4 precedence: explicit > wrapper > auto-detect.\n\n### --fix (optional, flag)\nAuto-apply safe fixes. Safe fixes: rebuild index, add missing cross-references, backfill log metadata. Unsafe fixes (resolving contradictions, deleting orphan pages) are reported but left for human action per the `human-authorization` rule.\n\n### --severity (optional, default: warning)\nMinimum severity to include in output: `error`, `warning`, or `suggestion`.\n\n## Operation\n\n1. **Resolve consumer** — determine which consumer to lint using ADR-021 D4 precedence (explicit > wrapper > auto-detect).\n2. **Load topology** — read `memory.topology` from consumer's `manifest.json` to locate pages, index, log, and derived paths.\n3. **Compose checks** — run each check against the resolved topology:\n\n| # | Check | Source | Severity |\n|---|-------|--------|----------|\n| 1 | Broken @-mentions \u002F references | `mention-lint`, link-check | error |\n| 2 | Orphan pages (no inbound links) | new — walks `derivedPages`, tracks inbound refs | warning |\n| 3 | Stale claims (source contradicts page) | `doc-sync` drift + contradiction scan | error |\n| 4 | Missing cross-references (concept appears in multiple pages without its own page) | new — entity extraction + frequency threshold | suggestion |\n| 5 | Index drift (page exists but index entry missing, or vice versa) | filesystem vs `index.md` comparison | warning |\n| 6 | Log integrity (append-only, no gaps, valid JSON Lines) | new — structural validation of `.log.jsonl` | error |\n| 7 | Provenance coverage | `provenance-validate` (only if `ingestRequires` includes `provenance`) | warning |\n| 8 | Domain-specific rules | delegate to consumer's declared `lintRules` skills | varies |\n\n4. **Aggregate findings** — group by severity, deduplicate across checks.\n5. **Auto-fix** (if `--fix`) — apply safe fixes only:\n   - Rebuild `index.md` from filesystem state (fixes check 5)\n   - Insert missing cross-reference links (fixes check 4)\n   - Backfill missing log fields where deterministic (fixes check 6)\n6. **Log operation** — call `memory-log-append` with op `lint` and finding counts.\n7. **Report** — emit structured report grouped by severity.\n\n## Check Details\n\n### Broken @-mentions (check 1)\nDelegates to existing `mention-lint` and link-check skills. Every `@`-reference and relative path in memory pages must resolve to an existing file. Broken references are severity `error`.\n\n### Orphan pages (check 2)\nWalks all `derivedPages` paths and builds an inbound-reference graph. Pages with zero inbound links from other memory pages or the index are flagged as orphans. Severity `warning` because orphans may be entry points.\n\n### Stale claims (check 3)\nCompares memory page claims against their source material using `doc-sync` drift detection. When a source has changed and the memory page hasn't been updated, flags the specific stale sections. Severity `error` because stale claims actively mislead.\n\n### Missing cross-references (check 4)\nExtracts named entities and domain concepts from all pages. When a concept appears in 3+ pages but has no dedicated page or anchor, suggests creating a cross-reference page. Severity `suggestion`.\n\n### Index drift (check 5)\nCompares filesystem contents under the topology's page directories against entries in `index.md`. Reports pages missing from the index and index entries pointing to nonexistent files. Severity `warning`.\n\n### Log integrity (check 6)\nValidates the `.log.jsonl` file line by line: each line must be valid JSON with required fields (`ts`, `op`, `consumer`, `actor`). Checks for monotonic timestamps (append-only guarantee) and sequence gaps. Severity `error`.\n\n### Provenance coverage (check 7)\nOnly runs when the consumer's `ingestRequires` includes `provenance`. Delegates to `provenance-validate` to ensure every derived page has a valid provenance chain. Severity `warning`.\n\n### Domain-specific rules (check 8)\nReads `lintRules` from the consumer's manifest and delegates to each declared skill. Each rule returns findings with its own severity. This allows consumers to inject domain-specific validation without modifying the kernel.\n\n## Output Format\n\n```\nmemory-lint report for \u003Cconsumer>\n================================\n\nERRORS (2)\n  [broken-ref] pages\u002Fapi-design.md:42 — @schemas\u002Fauth-flow.md does not exist\n  [stale-claim] pages\u002Fdeployment.md:18 — source changed 2026-04-10, page last updated 2026-03-15\n\nWARNINGS (3)\n  [orphan] pages\u002Flegacy-migration.md — no inbound references\n  [index-drift] pages\u002Fnew-feature.md — exists on disk but missing from index.md\n  [provenance] pages\u002Fsummary.md — no provenance record found\n\nSUGGESTIONS (1)\n  [missing-xref] \"authentication\" appears in 4 pages — consider a dedicated page\n\nSummary: 2 errors, 3 warnings, 1 suggestion\nAuto-fixable: 2 (run with --fix)\n```\n\n## Error Handling\n\n- Individual check failures do not abort the overall lint run. Failed checks are reported with severity `error` and a diagnostic message.\n- If the consumer cannot be resolved, abort with a clear message listing available consumers.\n- If the topology path is missing or malformed, abort with the specific missing field.\n\n## Schema Reference\n\n@semantic-memory\u002Fschemas\u002Fmemory-topology.md\n\n## Examples\n\n```\n# Lint the sdlc-complete consumer's memory\nmemory-lint --consumer sdlc-complete\n\n# Lint with auto-fix, errors only\nmemory-lint --consumer research-complete --fix --severity=error\n\n# Lint auto-detected consumer (inferred from current directory)\nmemory-lint\n\n# Lint all consumers in the workspace\nmemory-lint --consumer all\n```\n\n## Storage Routing (#934, #966)\n\nThis skill's persistence flows through `resolveStorage('memory')`. On the default `fs` backend the memory subsystem lives at `.aiwg\u002Fmemory\u002F` and behavior is byte-identical to direct file writes. To redirect memory artifacts into Obsidian, Logseq, Fortemi, or another backend without changing this skill, configure `.aiwg\u002Fstorage.config` (#934).\n\nWhen this skill needs to read or write memory artifacts from a Bash step:\n\n```bash\naiwg memory path                        # resolved root (fs only)\naiwg memory list --prefix research-complete\u002F\naiwg memory get research-complete\u002Findex.md\necho \"# index\" | aiwg memory put research-complete\u002Findex.md\necho '{\"op\":\"ingest\",\"summary\":\"foo\"}' | aiwg memory append-log research-complete\u002F.log.jsonl\n```\n\nThe `aiwg memory append-log` subcommand uses atomic `O_APPEND` (#976) on the fs backend — concurrent appenders don't race.\n","# memory-lint\n\nValidate the structural integrity and content health of a consumer's semantic memory. Composes eight built-in checks with any domain-specific lint rules declared by the consumer.\n\n## When to Use\n\n- Periodic maintenance (weekly or per-iteration)\n- Before phase transitions or releases — ensures memory is clean\n- After bulk ingest operations\n- When `memory-log-append` flags corruption\n- CI\u002FCD quality gates that include memory health\n\n## Parameters\n\n### --consumer (optional)\nConsumer ID to lint. Resolved via ADR-021 D4 precedence: explicit > wrapper > auto-detect.\n\n### --fix (optional, flag)\nAuto-apply safe fixes. Safe fixes: rebuild index, add missing cross-references, backfill log metadata. Unsafe fixes (resolving contradictions, deleting orphan pages) are reported but left for human action per the `human-authorization` rule.\n\n### --severity (optional, default: warning)\nMinimum severity to include in output: `error`, `warning`, or `suggestion`.\n\n## Operation\n\n1. **Resolve consumer** — determine which consumer to lint using ADR-021 D4 precedence (explicit > wrapper > auto-detect).\n2. **Load topology** — read `memory.topology` from consumer's `manifest.json` to locate pages, index, log, and derived paths.\n3. **Compose checks** — run each check against the resolved topology:\n\n| # | Check | Source | Severity |\n|---|-------|--------|----------|\n| 1 | Broken @-mentions \u002F references | `mention-lint`, link-check | error |\n| 2 | Orphan pages (no inbound links) | new — walks `derivedPages`, tracks inbound refs | warning |\n| 3 | Stale claims (source contradicts page) | `doc-sync` drift + contradiction scan | error |\n| 4 | Missing cross-references (concept appears in multiple pages without its own page) | new — entity extraction + frequency threshold | suggestion |\n| 5 | Index drift (page exists but index entry missing, or vice versa) | filesystem vs `index.md` comparison | warning |\n| 6 | Log integrity (append-only, no gaps, valid JSON Lines) | new — structural validation of `.log.jsonl` | error |\n| 7 | Provenance coverage | `provenance-validate` (only if `ingestRequires` includes `provenance`) | warning |\n| 8 | Domain-specific rules | delegate to consumer's declared `lintRules` skills | varies |\n\n4. **Aggregate findings** — group by severity, deduplicate across checks.\n5. **Auto-fix** (if `--fix`) — apply safe fixes only:\n   - Rebuild `index.md` from filesystem state (fixes check 5)\n   - Insert missing cross-reference links (fixes check 4)\n   - Backfill missing log fields where deterministic (fixes check 6)\n6. **Log operation** — call `memory-log-append` with op `lint` and finding counts.\n7. **Report** — emit structured report grouped by severity.\n\n## Check Details\n\n### Broken @-mentions (check 1)\nDelegates to existing `mention-lint` and link-check skills. Every `@`-reference and relative path in memory pages must resolve to an existing file. Broken references are severity `error`.\n\n### Orphan pages (check 2)\nWalks all `derivedPages` paths and builds an inbound-reference graph. Pages with zero inbound links from other memory pages or the index are flagged as orphans. Severity `warning` because orphans may be entry points.\n\n### Stale claims (check 3)\nCompares memory page claims against their source material using `doc-sync` drift detection. When a source has changed and the memory page hasn't been updated, flags the specific stale sections. Severity `error` because stale claims actively mislead.\n\n### Missing cross-references (check 4)\nExtracts named entities and domain concepts from all pages. When a concept appears in 3+ pages but has no dedicated page or anchor, suggests creating a cross-reference page. Severity `suggestion`.\n\n### Index drift (check 5)\nCompares filesystem contents under the topology's page directories against entries in `index.md`. Reports pages missing from the index and index entries pointing to nonexistent files. Severity `warning`.\n\n### Log integrity (check 6)\nValidates the `.log.jsonl` file line by line: each line must be valid JSON with required fields (`ts`, `op`, `consumer`, `actor`). Checks for monotonic timestamps (append-only guarantee) and sequence gaps. Severity `error`.\n\n### Provenance coverage (check 7)\nOnly runs when the consumer's `ingestRequires` includes `provenance`. Delegates to `provenance-validate` to ensure every derived page has a valid provenance chain. Severity `warning`.\n\n### Domain-specific rules (check 8)\nReads `lintRules` from the consumer's manifest and delegates to each declared skill. Each rule returns findings with its own severity. This allows consumers to inject domain-specific validation without modifying the kernel.\n\n## Output Format\n\n```\nmemory-lint report for \u003Cconsumer>\n================================\n\nERRORS (2)\n  [broken-ref] pages\u002Fapi-design.md:42 — @schemas\u002Fauth-flow.md does not exist\n  [stale-claim] pages\u002Fdeployment.md:18 — source changed 2026-04-10, page last updated 2026-03-15\n\nWARNINGS (3)\n  [orphan] pages\u002Flegacy-migration.md — no inbound references\n  [index-drift] pages\u002Fnew-feature.md — exists on disk but missing from index.md\n  [provenance] pages\u002Fsummary.md — no provenance record found\n\nSUGGESTIONS (1)\n  [missing-xref] \"authentication\" appears in 4 pages — consider a dedicated page\n\nSummary: 2 errors, 3 warnings, 1 suggestion\nAuto-fixable: 2 (run with --fix)\n```\n\n## Error Handling\n\n- Individual check failures do not abort the overall lint run. Failed checks are reported with severity `error` and a diagnostic message.\n- If the consumer cannot be resolved, abort with a clear message listing available consumers.\n- If the topology path is missing or malformed, abort with the specific missing field.\n\n## Schema Reference\n\n@semantic-memory\u002Fschemas\u002Fmemory-topology.md\n\n## Examples\n\n```\n# Lint the sdlc-complete consumer's memory\nmemory-lint --consumer sdlc-complete\n\n# Lint with auto-fix, errors only\nmemory-lint --consumer research-complete --fix --severity=error\n\n# Lint auto-detected consumer (inferred from current directory)\nmemory-lint\n\n# Lint all consumers in the workspace\nmemory-lint --consumer all\n```\n\n## Storage Routing (#934, #966)\n\nThis skill's persistence flows through `resolveStorage('memory')`. On the default `fs` backend the memory subsystem lives at `.aiwg\u002Fmemory\u002F` and behavior is byte-identical to direct file writes. To redirect memory artifacts into Obsidian, Logseq, Fortemi, or another backend without changing this skill, configure `.aiwg\u002Fstorage.config` (#934).\n\nWhen this skill needs to read or write memory artifacts from a Bash step:\n\n```bash\naiwg memory path                        # resolved root (fs only)\naiwg memory list --prefix research-complete\u002F\naiwg memory get research-complete\u002Findex.md\necho \"# index\" | aiwg memory put research-complete\u002Findex.md\necho '{\"op\":\"ingest\",\"summary\":\"foo\"}' | aiwg memory append-log research-complete\u002F.log.jsonl\n```\n\nThe `aiwg memory append-log` subcommand uses atomic `O_APPEND` (#976) on the fs backend — concurrent appenders don't race.\n",{"name":5,"category":34,"namespace":48,"platforms":49,"description":7},"aiwg",[50],"all","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fplugins\u002Fsemantic-memory\u002Fskills\u002Fmemory-lint",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":9,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add jmagly\u002Faiwg --skill memory-lint",{"tool":67,"command":68},"bunx","bunx skills add jmagly\u002Faiwg --skill memory-lint",{"tool":70,"command":71},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill memory-lint","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsemantic-memory\u002Fskills\u002Fmemory-lint\u002FSKILL.md",true,[75],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fapi_reference.md","REFERENCE","参考文档",15244,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpdb-database\u002Freferences\u002Fapi_reference.md",[82,90,95,122,142,147],{"skillNo":83,"name":84,"nameZh":17,"description":85,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":89},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":91,"name":84,"nameZh":17,"description":85,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":89},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":17,"description":98,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":43},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"hardening","host","host hardening","verification","secrets","read","request","remediation","recommendations","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":123,"name":124,"nameZh":17,"description":125,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":43},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[129,130,131,132,133,134,107,135,113,120,115,136,103,137,117,138,139,121,140,141],"analysis","exposure analysis","collection","reconstruction","operator","write","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":143,"name":97,"nameZh":17,"description":98,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":43},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[102,103,104,119,120,121,114,118,110,106,107,108,109,111,112,113,105,115,116,117],{"skillNo":148,"name":124,"nameZh":17,"description":125,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":43},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[129,130,141,140,133,139,138,117,132,134,107,135,113,131,115,136,103,121,120,137]]