md: add attribute, fact and queries

close #3